bug-texinfo
[Top][All Lists]
Advanced

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

Re: rethinking @def*


From: Gavin Smith
Subject: Re: rethinking @def*
Date: Wed, 10 Aug 2022 16:44:17 +0100

On Wed, Aug 10, 2022 at 03:24:13PM +0100, Gavin Smith wrote:
> On Wed, Aug 10, 2022 at 10:37:41AM +0200, Patrice Dumas wrote:
> > Should be do that, which means never have combinations?  If we do that
> > for those commands, it would be logical to do it for other specific
> > indicatric @-commands, such as @option, @file, @env...?  Combinations
> > would only be possible within those commands, and for font commands such
> > as @slanted and similar.  That means that something like @var{@code{}}
> > or @code{@var{}} will always only apply the internal @-command
> > formatting.
> 
> I think it makes sense for @code (and @t) at least, to force an upright
> shape and never slant the argument.  It is necessary to change the
> output for @code anyway, because \texttt is not enough: compare
> 
> \texttt{a : b} with \texttt{\frenchspacing a : b}.
> 
> The former has extra space after the :.

...and it turns out that defining a new command to do this doesn't work,
due to interactions with the 'hyperref' package.  Input:

\documentclass{book}
\usepackage[T1]{fontenc}
\usepackage{hyperref}

\newcommand{\GNUTexinfocode}[1]{%
  {\frenchspacing\upshape\ttfamily#1}}


\begin{document}

\subsection{{\GNUTexinfocode{@settitle}: Set the Document Title}}

\end{document}


leads to an error message:

! Undefined control sequence.
\frenchspacing  ->\sfcode `\.\@m \sfcode `\?
                                            \@m \sfcode `\!\@m \sfcode `\:\@...
l.11 ...ocode{@settitle}: Set the Document Title}}


I don't see any hope of fixing this, so we have to do more protection,
perhaps outputting something like \texttt{a :\ b} instead of \texttt{a : b}.



reply via email to

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