bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: @verb issues


From: Gavin Smith
Subject: Re: @verb issues
Date: Sun, 4 Dec 2022 12:06:52 +0000

On Sun, Dec 04, 2022 at 05:45:52AM +0000, Werner LEMBERG wrote:
> 
> [texinfo.tex 2022-12-03.17]
> 
> 
> Consider the following input.
> 
> ```
> \input texinfo
> 
> Test Test Test Test Test @verb{@foo@bar bar bar `doodle' doo tiddle di tiddle 
> toggle di toggle dum
> di dum @} Test
> 
> @bye
> ```
> 
> (This is a first long line, with a line break after the first 'dum'.)
> 
> Is the attached result really the desired output?  As you can see,
> 
> (1) ` and ' are changed to curly quotes,
> (2) the text gets hyphenated, and
> (3) the line break gets obeyed.
> 
> IMHO, (1) shouldn't happen.  While it can be configured with
> `txicodequoteundirected` and `txicodequotebacktick`, it changes the
> input without these two flags set.  Note also that this is a behaviour
> different from `texi2any --html`, which doesn't convert the input to
> curly quotes even if the two flags are not set.

I don't think it should be thought of as a conversion but as an alternative
rendering of the ASCII characters ` and '.  As long as the txicodequote* flags
are off by default I wouldn't see any reason to change them.  (I think
we should set txicodequote* by default, although that feels like quite
a major change to make.)


> Item (2) is really bad, since it inserts a character, making it no
> longer verbatim.

I agree, although there doesn't appear to be a way to get line breaking
without hyphenation.  If we change verb to turn off the hyphenation
character (by setting \hyphenchar), then the text extends into the
margin.  Is this what we want?

diff --git a/doc/texinfo.tex b/doc/texinfo.tex
index ff3cd71487..1feac9c46b 100644
--- a/doc/texinfo.tex
+++ b/doc/texinfo.tex
@@ -7428,6 +7428,7 @@
   \def\par{\leavevmode\endgraf}%
   \setcodequotes
   \tabeightspaces
+  \nohyphenation
   % Respect line breaks,
   % print special symbols as themselves, and
   % make each space count


> 
> I think (3) is debatable, but given that `@verb` is intended to be
> used within a paragraph, I suggest that line breaks are not obeyed, as
> an exception to the verbatimness – similar to the HTML output, which
> doesn't obey the line break either.
> 
> 
>     Werner


Attachment: test.pdf
Description: Adobe PDF document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]