[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * doc/texinfo.tex (\ifmonotype): Replace with \if
From: |
Gavin D. Smith |
Subject: |
branch master updated: * doc/texinfo.tex (\ifmonotype): Replace with \ifusingtt which is nearly identical. (\ifusingtt, \ifusingit): Move earlier in file. |
Date: |
Sat, 24 Sep 2022 17:05:39 -0400 |
This is an automated email from the git hooks/post-receive script.
gavin pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new df79530aed * doc/texinfo.tex (\ifmonotype): Replace with \ifusingtt
which is nearly identical. (\ifusingtt, \ifusingit): Move earlier in file.
df79530aed is described below
commit df79530aed40551be6cd39931dd7098f1e211b14
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Sat Sep 24 22:05:27 2022 +0100
* doc/texinfo.tex (\ifmonotype): Replace with \ifusingtt which
is nearly identical.
(\ifusingtt, \ifusingit): Move earlier in file.
---
ChangeLog | 6 ++++
doc/texinfo.tex | 103 ++++++++++++++++++++++++--------------------------------
2 files changed, 50 insertions(+), 59 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index a417920483..f90eb89587 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2022-09-24 Gavin Smith <gavinsmith0123@gmail.com>
+
+ * doc/texinfo.tex (\ifmonotype): Replace with \ifusingtt which
+ is nearly identical.
+ (\ifusingtt, \ifusingit): Move earlier in file.
+
2022-09-24 Gavin Smith <gavinsmith0123@gmail.com>
* doc/texinfo.texi (Less Cluttered Menu Entry, Other Info Files):
diff --git a/doc/texinfo.tex b/doc/texinfo.tex
index cc0f1fa2e2..ea944ac522 100644
--- a/doc/texinfo.tex
+++ b/doc/texinfo.tex
@@ -3,7 +3,7 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
-\def\texinfoversion{2022-09-21.15}
+\def\texinfoversion{2022-09-24.20}
%
% Copyright 1985, 1986, 1988, 1990-2022 Free Software Foundation, Inc.
%
@@ -2645,9 +2645,17 @@ end
% Check if we are currently using a typewriter font. Since all the
% Computer Modern typewriter fonts have zero interword stretch (and
% shrink), and it is reasonable to expect all typewriter fonts to have
-% this property, we can check that font parameter.
-%
-\def\ifmonospace{\ifdim\fontdimen3\font=0pt }
+% this property, we can check that font parameter. #1 is what to
+% print if we are indeed using \tt; #2 is what to print otherwise.
+\def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi}
+
+
+% Same as above, but check for italic font. Actually this also catches
+% non-italic slanted fonts since it is impossible to distinguish them from
+% italic fonts. But since this is only used by $ and it uses \sl anyway
+% this is not a problem.
+\def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi}
+
% Check if internal flag is clear, i.e. has not been @set.
\def\ifflagclear#1#2#3{%
@@ -2672,33 +2680,28 @@ end
% lilypond developers report. xpdf does work with the regular 0x27.
%
\def\codequoteright{%
- \ifmonospace
- \ifflagclear{txicodequoteundirected}{%
- \ifflagclear{codequoteundirected}{%
- '%
- }{\char'15 }%
- }{\char'15 }%
- \else
- '%
- \fi
+ \ifusingtt
+ {\ifflagclear{txicodequoteundirected}%
+ {\ifflagclear{codequoteundirected}%
+ {'}%
+ {\char'15 }}%
+ {\char'15 }}%
+ {'}%
}
-%
+
% and a similar option for the left quote char vs. a grave accent.
% Modern fonts display ASCII 0x60 as a grave accent, so some people like
% the code environments to do likewise.
+% \relax disables Spanish ligatures ?` and !` of \tt font.
%
\def\codequoteleft{%
- \ifmonospace
- \ifflagclear{txicodequotebacktick}{%
- \ifflagclear{codequotebacktick}{%
- % [Knuth] pp. 380,381,391
- % \relax disables Spanish ligatures ?` and !` of \tt font.
- \relax`%
- }{\char'22 }%
- }{\char'22 }%
- \else
- \relax`%
- \fi
+ \ifusingtt
+ {\ifflagclear{txicodequotebacktick}%
+ {\ifflagclear{codequotebacktick}%
+ {\relax`}%
+ {\char'22 }}%
+ {\char'22 }}%
+ {\relax`}%
}
% Commands to set the quote options.
@@ -3389,8 +3392,8 @@ $$%
\let\atchar=\@
% @{ @} @lbracechar{} @rbracechar{} all generate brace characters.
-\def\lbracechar{{\ifmonospace\char123\else\ensuremath\lbrace\fi}}
-\def\rbracechar{{\ifmonospace\char125\else\ensuremath\rbrace\fi}}
+\def\lbracechar{{\ifusingtt{\char123}{\ensuremath\lbrace}}}
+\def\rbracechar{{\ifusingtt{\char125}{\ensuremath\rbrace}}}
\let\{=\lbracechar
\let\}=\rbracechar
@@ -3537,7 +3540,7 @@ $$%
% @pounds{} is a sterling sign, which Knuth put in the CM italic font.
%
-\def\pounds{\ifmonospace{\ecfont\char"BF}\else{\it\$}\fi}
+\def\pounds{{\ifusingtt{\ecfont\char"BF}{\it\$}}}
% @euro{} comes from a separate font, depending on the current style.
% We use the free feym* fonts from the eurosym package by Henrik
@@ -3651,18 +3654,17 @@ $$%
% hopefully nobody will notice/care.
\edef\ecsize{\csname\curfontsize ecsize\endcsname}%
\edef\nominalsize{\csname\curfontsize nominalsize\endcsname}%
- \ifmonospace
- % typewriter:
- \font\thisecfont = #1ctt\ecsize \space at \nominalsize
- \else
- \ifx\curfontstyle\bfstylename
- % bold:
- \font\thisecfont = #1cb\ifusingit{i}{x}\ecsize \space at \nominalsize
- \else
- % regular:
- \font\thisecfont = #1c\ifusingit{ti}{rm}\ecsize \space at \nominalsize
- \fi
- \fi
+ \ifusingtt
+ % typewriter:
+ {\font\thisecfont = #1ctt\ecsize \space at \nominalsize}%
+ % else
+ {\ifx\curfontstyle\bfstylename
+ % bold:
+ \font\thisecfont = #1cb\ifusingit{i}{x}\ecsize \space at \nominalsize
+ \else
+ % regular:
+ \font\thisecfont = #1c\ifusingit{ti}{rm}\ecsize \space at \nominalsize
+ \fi}%
\thisecfont
}
@@ -3695,11 +3697,11 @@ $$%
% only change font for tt for correct kerning and to avoid using
% \ecfont unless necessary.
\def\quotedblleft{%
- \ifmonospace{\ecfont\char"10}\else{\char"5C}\fi
+ \ifusingtt{{\ecfont\char"10}}{{\char"5C}}%
}
\def\quotedblright{%
- \ifmonospace{\ecfont\char"11}\else{\char`\"}\fi
+ \ifusingtt{{\ecfont\char"11}}{{\char`\"}}%
}
@@ -11420,23 +11422,6 @@ directory should work if nowhere else does.}
\catcode`\|=\other \def\normalverticalbar{|}
\catcode`\~=\other \def\normaltilde{~}
-% This macro is used to make a character print one way in \tt
-% (where it can probably be output as-is), and another way in other fonts,
-% where something hairier probably needs to be done.
-%
-% #1 is what to print if we are indeed using \tt; #2 is what to print
-% otherwise. Since all the Computer Modern typewriter fonts have zero
-% interword stretch (and shrink), and it is reasonable to expect all
-% typewriter fonts to have this, we can check that font parameter.
-%
-\def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi}
-
-% Same as above, but check for italic font. Actually this also catches
-% non-italic slanted fonts since it is impossible to distinguish them from
-% italic fonts. But since this is only used by $ and it uses \sl anyway
-% this is not a problem.
-\def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi}
-
% Set catcodes for Texinfo file
% Active characters for printing the wanted glyph.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * doc/texinfo.tex (\ifmonotype): Replace with \ifusingtt which is nearly identical. (\ifusingtt, \ifusingit): Move earlier in file.,
Gavin D. Smith <=