summaryrefslogtreecommitdiff
path: root/doc/misc/texinfo.tex
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2022-11-26 10:49:04 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2022-11-26 10:56:53 -0800
commitb27e8f26284770162cc9e9d95d4d273902d35927 (patch)
tree4d51d3b369f849c8ef5f0f9d58ea0779f63e2519 /doc/misc/texinfo.tex
parentd440ca47ed6251f134e87386853798228983dd85 (diff)
downloademacs-b27e8f26284770162cc9e9d95d4d273902d35927.tar.gz
Update from Gnulib by running admin/merge-gnulib
Diffstat (limited to 'doc/misc/texinfo.tex')
-rw-r--r--doc/misc/texinfo.tex428
1 files changed, 282 insertions, 146 deletions
diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex
index 09f2d28c2f2..cfc77a84ea8 100644
--- a/doc/misc/texinfo.tex
+++ b/doc/misc/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-11-12.22}
%
% Copyright 1985, 1986, 1988, 1990-2022 Free Software Foundation, Inc.
%
@@ -2544,34 +2544,30 @@ end
\scriptfont\sffam=\sevensf
}
-%
-% The font-changing commands (all called \...fonts) redefine the meanings
-% of \STYLEfont, instead of just \STYLE. We do this because \STYLE needs
-% to also set the current \fam for math mode. Our \STYLE (e.g., \rm)
-% commands hardwire \STYLEfont to set the current font.
-%
-% The fonts used for \ifont are for "math italics" (\itfont is for italics
-% in regular text). \syfont is also used in math mode only.
-%
-% Each font-changing command also sets the names \lsize (one size lower)
-% and \lllsize (three sizes lower). These relative commands are used
-% in, e.g., the LaTeX logo and acronyms.
-%
-% This all needs generalizing, badly.
+
+% \defineassignfonts{SIZE} -
+% Define sequence \assignfontsSIZE, which switches between font sizes
+% by redefining the meanings of \STYLEfont. (Just \STYLE additionally sets
+% the current \fam for math mode.)
%
+\def\defineassignfonts#1{%
+ \expandafter\edef\csname assignfonts#1\endcsname{%
+ \let\noexpand\rmfont\csname #1rm\endcsname
+ \let\noexpand\itfont\csname #1it\endcsname
+ \let\noexpand\slfont\csname #1sl\endcsname
+ \let\noexpand\bffont\csname #1bf\endcsname
+ \let\noexpand\ttfont\csname #1tt\endcsname
+ \let\noexpand\smallcaps\csname #1sc\endcsname
+ \let\noexpand\sffont \csname #1sf\endcsname
+ \let\noexpand\ifont \csname #1i\endcsname
+ \let\noexpand\syfont \csname #1sy\endcsname
+ \let\noexpand\ttslfont\csname #1ttsl\endcsname
+ }
+}
\def\assignfonts#1{%
- \expandafter\let\expandafter\rmfont\csname #1rm\endcsname
- \expandafter\let\expandafter\itfont\csname #1it\endcsname
- \expandafter\let\expandafter\slfont\csname #1sl\endcsname
- \expandafter\let\expandafter\bffont\csname #1bf\endcsname
- \expandafter\let\expandafter\ttfont\csname #1tt\endcsname
- \expandafter\let\expandafter\smallcaps\csname #1sc\endcsname
- \expandafter\let\expandafter\sffont \csname #1sf\endcsname
- \expandafter\let\expandafter\ifont \csname #1i\endcsname
- \expandafter\let\expandafter\syfont \csname #1sy\endcsname
- \expandafter\let\expandafter\ttslfont\csname #1ttsl\endcsname
+ \csname assignfonts#1\endcsname
}
\newif\ifrmisbold
@@ -2595,12 +2591,21 @@ end
\csname\curfontstyle\endcsname
}%
+% Define the font-changing commands (all called \...fonts).
+% Each font-changing command also sets the names \lsize (one size lower)
+% and \lllsize (three sizes lower). These relative commands are used
+% in, e.g., the LaTeX logo and acronyms.
+%
+% Note: The fonts used for \ifont are for "math italics" (\itfont is for
+% italics in regular text). \syfont is also used in math mode only.
+%
\def\definefontsetatsize#1#2#3#4#5{%
+ \defineassignfonts{#1}%
\expandafter\def\csname #1fonts\endcsname{%
\def\curfontsize{#1}%
\def\lsize{#2}\def\lllsize{#3}%
\csname rmisbold#5\endcsname
- \assignfonts{#1}%
+ \csname assignfonts#1\endcsname
\resetmathfonts
\setleading{#4}%
}}
@@ -2645,9 +2650,16 @@ 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{%
@@ -2655,8 +2667,6 @@ end
#2\else#3\fi
}
-
-
{
\catcode`\'=\active
\catcode`\`=\active
@@ -2672,33 +2682,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.
@@ -2817,20 +2822,29 @@ end
\def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation}
\def\restorehyphenation{\hyphenchar\font = `- }
+\newif\iffrenchspacing
+\frenchspacingfalse
+
% Set sfcode to normal for the chars that usually have another value.
% Can't use plain's \frenchspacing because it uses the `\x notation, and
% sometimes \x has an active definition that messes things up.
%
\catcode`@=11
\def\plainfrenchspacing{%
- \sfcode`\.=\@m \sfcode`\?=\@m \sfcode`\!=\@m
- \sfcode`\:=\@m \sfcode`\;=\@m \sfcode`\,=\@m
- \def\endofsentencespacefactor{1000}% for @. and friends
+ \iffrenchspacing\else
+ \frenchspacingtrue
+ \sfcode`\.=\@m \sfcode`\?=\@m \sfcode`\!=\@m
+ \sfcode`\:=\@m \sfcode`\;=\@m \sfcode`\,=\@m
+ \def\endofsentencespacefactor{1000}% for @. and friends
+ \fi
}
\def\plainnonfrenchspacing{%
- \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000
- \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250
- \def\endofsentencespacefactor{3000}% for @. and friends
+ \iffrenchspacing
+ \frenchspacingfalse
+ \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000
+ \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250
+ \def\endofsentencespacefactor{3000}% for @. and friends
+ \fi
}
\catcode`@=\other
\def\endofsentencespacefactor{3000}% default
@@ -3389,8 +3403,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 +3551,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 +3665,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
}
@@ -3678,7 +3691,10 @@ $$%
% @textdegree - the normal degrees sign.
%
-\def\textdegree{$^\circ$}
+\def\textdegree{%
+ \ifmmode ^\circ
+ \else {\tcfont \char 176}%
+ \fi}
% Laurent Siebenmann reports \Orb undefined with:
% Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38
@@ -3695,11 +3711,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`\"}}%
}
@@ -5257,7 +5273,10 @@ $$%
\xdef\trimmed{\segment}%
\xdef\trimmed{\expandafter\eatspaces\expandafter{\trimmed}}%
\xdef\indexsortkey{\trimmed}%
- \ifx\indexsortkey\empty\xdef\indexsortkey{ }\fi
+ \ifx\indexsortkey\empty
+ \message{Empty index sort key near line \the\inputlineno}%
+ \xdef\indexsortkey{ }%
+ \fi
}\fi
%
% Append to \fullindexsortkey.
@@ -6386,6 +6405,16 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\def\Yappendixkeyword{Yappendix}
\def\Yomitfromtockeyword{Yomitfromtoc}
%
+%
+% Definitions for @thischapter. These can be overridden in translation
+% files.
+\def\thischapterAppendix{%
+ \putwordAppendix{} \thischapternum: \thischaptername}
+
+\def\thischapterChapter{%
+ \putwordChapter{} \thischapternum: \thischaptername}
+%
+%
\def\chapmacro#1#2#3{%
\expandafter\ifx\thisenv\titlepage\else
\checkenv{}% chapters, etc., should not start inside an environment.
@@ -6408,22 +6437,14 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\xdef\currentchapterdefs{%
\gdef\noexpand\thischaptername{\the\toks0}%
\gdef\noexpand\thischapternum{\appendixletter}%
- % \noexpand\putwordAppendix avoids expanding indigestible
- % commands in some of the translations.
- \gdef\noexpand\thischapter{\noexpand\putwordAppendix{}
- \noexpand\thischapternum:
- \noexpand\thischaptername}%
+ \let\noexpand\thischapter\noexpand\thischapterAppendix
}%
\else
\toks0={#1}%
\xdef\currentchapterdefs{%
\gdef\noexpand\thischaptername{\the\toks0}%
\gdef\noexpand\thischapternum{\the\chapno}%
- % \noexpand\putwordChapter avoids expanding indigestible
- % commands in some of the translations.
- \gdef\noexpand\thischapter{\noexpand\putwordChapter{}
- \noexpand\thischapternum:
- \noexpand\thischaptername}%
+ \let\noexpand\thischapter\noexpand\thischapterChapter
}%
\fi\fi\fi
%
@@ -6509,6 +6530,12 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\def\subsubsecheadingskip{\subsecheadingskip}
\def\subsubsecheadingbreak{\subsecheadingbreak}
+% Definition for @thissection. This can be overridden in translation
+% files.
+\def\thissectionDef{%
+ \putwordSection{} \thissectionnum: \thissectionname}
+%
+
% Print any size, any type, section title.
%
@@ -6550,11 +6577,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\xdef\currentsectiondefs{%
\gdef\noexpand\thissectionname{\the\toks0}%
\gdef\noexpand\thissectionnum{#4}%
- % \noexpand\putwordSection avoids expanding indigestible
- % commands in some of the translations.
- \gdef\noexpand\thissection{\noexpand\putwordSection{}
- \noexpand\thissectionnum:
- \noexpand\thissectionname}%
+ \let\noexpand\thissection\noexpand\thissectionDef
}%
\fi
\else
@@ -6563,11 +6586,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\xdef\currentsectiondefs{%
\gdef\noexpand\thissectionname{\the\toks0}%
\gdef\noexpand\thissectionnum{#4}%
- % \noexpand\putwordSection avoids expanding indigestible
- % commands in some of the translations.
- \gdef\noexpand\thissection{\noexpand\putwordSection{}
- \noexpand\thissectionnum:
- \noexpand\thissectionname}%
+ \let\noexpand\thissection\noexpand\thissectionDef
}%
\fi
\fi\fi\fi
@@ -7107,12 +7126,19 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\startsavinginserts
\lskip=\leftskip \rskip=\rightskip
\leftskip=0pt\rightskip=0pt % we want these *outside*.
+ %
+ % Set paragraph width for text inside cartouche. There are
+ % left and right margins of 3pt each plus two vrules 0.4pt each.
\cartinner=\hsize \advance\cartinner by-\lskip
\advance\cartinner by-\rskip
+ \advance\cartinner by -6.8pt
+ %
+ % For drawing top and bottom of cartouche. Each corner char
+ % adds 6pt and we take off the width of a rule to line up with the
+ % right boundary perfectly.
\cartouter=\hsize
- \advance\cartouter by 18.4pt % allow for 3pt kerns on either
- % side, and for 6pt waste from
- % each corner char, and rule thickness
+ \advance\cartouter by 11.6pt
+ %
\normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
%
% If this cartouche directly follows a sectioning command, we need the
@@ -8405,21 +8431,21 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\ifcase\paramno
% 0
\expandafter\xdef\csname\the\macname\endcsname{%
- \bgroup
+ \begingroup
\noexpand\spaceisspace
\noexpand\endlineisspace
\noexpand\expandafter % skip any whitespace after the macro name.
\expandafter\noexpand\csname\the\macname @@@\endcsname}%
\expandafter\xdef\csname\the\macname @@@\endcsname{%
- \egroup
+ \endgroup
\noexpand\scanmacro{\macrobody}}%
\or % 1
\expandafter\xdef\csname\the\macname\endcsname{%
- \bgroup
+ \begingroup
\noexpand\braceorline
\expandafter\noexpand\csname\the\macname @@@\endcsname}%
\expandafter\xdef\csname\the\macname @@@\endcsname##1{%
- \egroup
+ \endgroup
\noexpand\scanmacro{\macrobody}%
}%
\else % at most 9
@@ -8430,7 +8456,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% @MACNAME@@@ removes braces surrounding the argument list.
% @MACNAME@@@@ scans the macro body with arguments substituted.
\expandafter\xdef\csname\the\macname\endcsname{%
- \bgroup
+ \begingroup
\noexpand\expandafter % This \expandafter skip any spaces after the
\noexpand\macroargctxt % macro before we change the catcode of space.
\noexpand\expandafter
@@ -8444,7 +8470,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\expandafter\xdef
\expandafter\expandafter
\csname\the\macname @@@@\endcsname\paramlist{%
- \egroup\noexpand\scanmacro{\macrobody}}%
+ \endgroup\noexpand\scanmacro{\macrobody}}%
\else % 10 or more:
\expandafter\xdef\csname\the\macname\endcsname{%
\noexpand\getargvals@{\the\macname}{\argl}%
@@ -8887,11 +8913,10 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\xrefprintnodename\printedrefname
%
\ifflagclear{txiomitxrefpg}{%
- % But we always want a comma and a space:
- ,\space
- %
+ % We always want a comma
+ ,%
% output the `page 3'.
- \turnoffactive \putwordpage\tie\refx{#1-pg}%
+ \turnoffactive \putpageref{#1}%
% Add a , if xref followed by a space
\if\space\noexpand\tokenafterxref ,%
\else\ifx\ \tokenafterxref ,% @TAB
@@ -8907,6 +8932,10 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\endlink
\endgroup}
+% can be overridden in translation files
+\def\putpageref#1{%
+ \space\putwordpage\tie\refx{#1-pg}}
+
% Output a cross-manual xref to #1. Used just above (twice).
%
% Only include the text "Section ``foo'' in" if the foo is neither
@@ -9338,13 +9367,6 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\makevalueexpandable
\ifvmode
\imagevmodetrue
- \else \ifx\centersub\centerV
- % for @center @image, we need a vbox so we can have our vertical space
- \imagevmodetrue
- \vbox\bgroup % vbox has better behavior than vtop here
- \fi\fi
- %
- \ifimagevmode
\medskip
% Usually we'll have text after the image which will insert
% \parskip glue, so insert it here too to equalize the space
@@ -9356,14 +9378,17 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\vtop\bgroup \kern -\capheight \vskip-\parskip
\fi
%
- % Enter horizontal mode so that indentation from an enclosing
- % environment such as @quotation is respected.
- % However, if we're at the top level, we don't want the
- % normal paragraph indentation.
- % On the other hand, if we are in the case of @center @image, we don't
- % want to start a paragraph, which will create a hsize-width box and
- % eradicate the centering.
- \ifx\centersub\centerV \else \imageindent \fi
+ \ifx\centersub\centerV
+ % For @center @image, enter vertical mode and add vertical space
+ % Enter an extra \parskip because @center doesn't add space itself.
+ \vbox\bgroup\vskip\parskip\medskip\vskip\parskip
+ \else
+ % Enter horizontal mode so that indentation from an enclosing
+ % environment such as @quotation is respected.
+ % However, if we're at the top level, we don't want the
+ % normal paragraph indentation.
+ \imageindent
+ \fi
%
% Output the image.
\ifpdf
@@ -9388,7 +9413,10 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\egroup
\medskip % space after a standalone image
\fi
- \ifx\centersub\centerV \egroup \fi
+ \ifx\centersub\centerV % @center @image
+ \medskip
+ \egroup % close \vbox
+ \fi
\endgroup}
@@ -10038,7 +10066,7 @@ directory should work if nowhere else does.}
\gdefchar^^ae{\v Z}
\gdefchar^^af{\dotaccent Z}
%
- \gdefchar^^b0{\textdegree{}}
+ \gdefchar^^b0{\textdegree}
\gdefchar^^b1{\ogonek{a}}
\gdefchar^^b2{\ogonek{ }}
\gdefchar^^b3{\l}
@@ -10461,7 +10489,7 @@ directory should work if nowhere else does.}
\DeclareUnicodeCharacter{00AE}{\registeredsymbol{}}%
\DeclareUnicodeCharacter{00AF}{\={ }}%
%
- \DeclareUnicodeCharacter{00B0}{\ringaccent{ }}%
+ \DeclareUnicodeCharacter{00B0}{\textdegree}
\DeclareUnicodeCharacter{00B1}{\ensuremath\pm}%
\DeclareUnicodeCharacter{00B2}{$^2$}%
\DeclareUnicodeCharacter{00B3}{$^3$}%
@@ -10965,7 +10993,7 @@ directory should work if nowhere else does.}
%
\DeclareUnicodeCharacter{20AC}{\euro{}}%
%
- \DeclareUnicodeCharacter{2192}{\expansion{}}%
+ \DeclareUnicodeCharacter{2192}{\arrow}%
\DeclareUnicodeCharacter{21D2}{\result{}}%
%
% Mathematical symbols
@@ -11401,6 +11429,131 @@ directory should work if nowhere else does.}
\hfuzz = 1pt
+\message{microtype,}
+
+% protrusion, from Thanh's protcode.tex.
+\def\mtsetprotcode#1{%
+ \rpcode#1`\!=200 \rpcode#1`\,=700 \rpcode#1`\-=700 \rpcode#1`\.=700
+ \rpcode#1`\;=500 \rpcode#1`\:=500 \rpcode#1`\?=200
+ \rpcode#1`\'=700
+ \rpcode#1 34=500 % ''
+ \rpcode#1 123=300 % --
+ \rpcode#1 124=200 % ---
+ \rpcode#1`\)=50 \rpcode#1`\A=50 \rpcode#1`\F=50 \rpcode#1`\K=50
+ \rpcode#1`\L=50 \rpcode#1`\T=50 \rpcode#1`\V=50 \rpcode#1`\W=50
+ \rpcode#1`\X=50 \rpcode#1`\Y=50 \rpcode#1`\k=50 \rpcode#1`\r=50
+ \rpcode#1`\t=50 \rpcode#1`\v=50 \rpcode#1`\w=50 \rpcode#1`\x=50
+ \rpcode#1`\y=50
+ %
+ \lpcode#1`\`=700
+ \lpcode#1 92=500 % ``
+ \lpcode#1`\(=50 \lpcode#1`\A=50 \lpcode#1`\J=50 \lpcode#1`\T=50
+ \lpcode#1`\V=50 \lpcode#1`\W=50 \lpcode#1`\X=50 \lpcode#1`\Y=50
+ \lpcode#1`\v=50 \lpcode#1`\w=50 \lpcode#1`\x=50 \lpcode#1`\y=0
+ %
+ \mtadjustprotcode#1\relax
+}
+
+\newcount\countC
+\def\mtadjustprotcode#1{%
+ \countC=0
+ \loop
+ \ifcase\lpcode#1\countC\else
+ \mtadjustcp\lpcode#1\countC
+ \fi
+ \ifcase\rpcode#1\countC\else
+ \mtadjustcp\rpcode#1\countC
+ \fi
+ \advance\countC 1
+ \ifnum\countC < 256 \repeat
+}
+
+\newcount\countB
+\def\mtadjustcp#1#2#3{%
+ \setbox\boxA=\hbox{%
+ \ifx#2\font\else#2\fi
+ \char#3}%
+ \countB=\wd\boxA
+ \multiply\countB #1#2#3\relax
+ \divide\countB \fontdimen6 #2\relax
+ #1#2#3=\countB\relax
+}
+
+\ifx\XeTeXrevision\thisisundefined
+ \ifx\luatexversion\thisisundefined
+ \ifpdf % pdfTeX
+ \mtsetprotcode\textrm
+ \def\mtfontexpand#1{\pdffontexpand#1 20 20 1 autoexpand\relax}
+ \else % TeX
+ \def\mtfontexpand#1{}
+ \fi
+ \else % LuaTeX
+ \mtsetprotcode\textrm
+ \def\mtfontexpand#1{\expandglyphsinfont#1 20 20 1\relax}
+ \fi
+\else % XeTeX
+ \mtsetprotcode\textrm
+ \def\mtfontexpand#1{}
+\fi
+
+
+\newif\ifmicrotype
+
+\def\microtypeON{%
+ \microtypetrue
+ %
+ \ifx\XeTeXrevision\thisisundefined
+ \ifx\luatexversion\thisisundefined
+ \ifpdf % pdfTeX
+ \pdfadjustspacing=2
+ \pdfprotrudechars=2
+ \fi
+ \else % LuaTeX
+ \adjustspacing=2
+ \protrudechars=2
+ \fi
+ \else % XeTeX
+ \XeTeXprotrudechars=2
+ \fi
+ %
+ \mtfontexpand\textrm
+ \mtfontexpand\textsl
+ \mtfontexpand\textbf
+}
+
+\def\microtypeOFF{%
+ \microtypefalse
+ %
+ \ifx\XeTeXrevision\thisisundefined
+ \ifx\luatexversion\thisisundefined
+ \ifpdf % pdfTeX
+ \pdfadjustspacing=0
+ \pdfprotrudechars=0
+ \fi
+ \else % LuaTeX
+ \adjustspacing=0
+ \protrudechars=0
+ \fi
+ \else % XeTeX
+ \XeTeXprotrudechars=0
+ \fi
+}
+
+\microtypeON
+
+\parseargdef\microtype{%
+ \def\txiarg{#1}%
+ \ifx\txiarg\onword
+ \microtypeON
+ \else\ifx\txiarg\offword
+ \microtypeOFF
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @microtype option `\txiarg', must be on|off}%
+ \fi\fi
+}
+
+
\message{and turning on texinfo input format.}
\def^^L{\par} % remove \outer, so ^L can appear in an @comment
@@ -11420,23 +11573,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.