📄 texinfo.tex
字号:
\message{fonts,}% Font-change commands.% Texinfo sort of supports the sans serif font style, which plain TeX does not.% So we set up a \sf analogous to plain's \rm, etc.\newfam\sffam\def\sf{\fam=\sffam \tensf}\let\li = \sf % Sometimes we call it \li, not \sf.% We don't need math for this one.\def\ttsl{\tenttsl}% Default leading.\newdimen\textleading \textleading = 13.2pt% Set the baselineskip to #1, and the lineskip and strut size% correspondingly. There is no deep meaning behind these magic numbers% used as factors; they just match (closely enough) what Knuth defined.%\def\lineskipfactor{.08333}\def\strutheightpercent{.70833}\def\strutdepthpercent {.29167}%\def\setleading#1{% \normalbaselineskip = #1\relax \normallineskip = \lineskipfactor\normalbaselineskip \normalbaselines \setbox\strutbox =\hbox{% \vrule width0pt height\strutheightpercent\baselineskip depth \strutdepthpercent \baselineskip }%}% Set the font macro #1 to the font named #2, adding on the% specified font prefix (normally `cm').% #3 is the font's design size, #4 is a scale factor\def\setfont#1#2#3#4{\font#1=\fontprefix#2#3 scaled #4}% Use cm as the default font prefix.% To specify the font prefix, you must define \fontprefix% before you read in texinfo.tex.\ifx\fontprefix\undefined\def\fontprefix{cm}\fi% Support font families that don't use the same naming scheme as CM.\def\rmshape{r}\def\rmbshape{bx} %where the normal face is bold\def\bfshape{b}\def\bxshape{bx}\def\ttshape{tt}\def\ttbshape{tt}%\def\ttslshape{sltt} gmsh\def\ttslshape{ti}\def\itshape{ti}\def\itbshape{bxti}%\def\slshape{sl} gmsh%\def\slbshape{bxsl} gmsh\def\slshape{ti}\def\slbshape{bxti}\def\sfshape{ss}\def\sfbshape{ss}\def\scshape{csc}\def\scbshape{csc}\newcount\mainmagstep\ifx\bigger\relax % not really supported. \mainmagstep=\magstep1 \setfont\textrm\rmshape{12}{1000} \setfont\texttt\ttshape{12}{1000}\else \mainmagstep=\magstephalf \setfont\textrm\rmshape{10}{\mainmagstep} \setfont\texttt\ttshape{10}{\mainmagstep}\fi% Instead of cmb10, you may want to use cmbx10.% cmbx10 is a prettier font on its own, but cmb10% looks better when embedded in a line with cmr10% (in Bob's opinion).\setfont\textbf\bfshape{10}{\mainmagstep}\setfont\textit\itshape{10}{\mainmagstep}\setfont\textsl\slshape{10}{\mainmagstep}\setfont\textsf\sfshape{10}{\mainmagstep}\setfont\textsc\scshape{10}{\mainmagstep}\setfont\textttsl\ttslshape{10}{\mainmagstep}\font\texti=cmmi10 scaled \mainmagstep\font\textsy=cmsy10 scaled \mainmagstep% A few fonts for @defun, etc.\setfont\defbf\bxshape{10}{\magstep1} %was 1314\setfont\deftt\ttshape{10}{\magstep1}\def\df{\let\tentt=\deftt \let\tenbf = \defbf \bf}% Fonts for indices, footnotes, small examples (9pt).\setfont\smallrm\rmshape{9}{1000}\setfont\smalltt\ttshape{9}{1000}\setfont\smallbf\bfshape{10}{900}\setfont\smallit\itshape{9}{1000}\setfont\smallsl\slshape{9}{1000}\setfont\smallsf\sfshape{9}{1000}\setfont\smallsc\scshape{10}{900}\setfont\smallttsl\ttslshape{10}{900}\font\smalli=cmmi9\font\smallsy=cmsy9% Fonts for small examples (8pt).\setfont\smallerrm\rmshape{8}{1000}\setfont\smallertt\ttshape{8}{1000}\setfont\smallerbf\bfshape{10}{800}\setfont\smallerit\itshape{8}{1000}\setfont\smallersl\slshape{8}{1000}\setfont\smallersf\sfshape{8}{1000}\setfont\smallersc\scshape{10}{800}\setfont\smallerttsl\ttslshape{10}{800}\font\smalleri=cmmi8\font\smallersy=cmsy8% Fonts for title page:\setfont\titlerm\rmbshape{12}{\magstep3}\setfont\titleit\itbshape{10}{\magstep4}\setfont\titlesl\slbshape{10}{\magstep4}\setfont\titlett\ttbshape{12}{\magstep3}\setfont\titlettsl\ttslshape{10}{\magstep4}\setfont\titlesf\sfbshape{17}{\magstep1}\let\titlebf=\titlerm\setfont\titlesc\scbshape{10}{\magstep4}\font\titlei=cmmi12 scaled \magstep3\font\titlesy=cmsy10 scaled \magstep4\def\authorrm{\secrm}\def\authortt{\sectt}% Chapter (and unnumbered) fonts (17.28pt).\setfont\chaprm\rmbshape{12}{\magstep2}\setfont\chapit\itbshape{10}{\magstep3}\setfont\chapsl\slbshape{10}{\magstep3}\setfont\chaptt\ttbshape{12}{\magstep2}\setfont\chapttsl\ttslshape{10}{\magstep3}\setfont\chapsf\sfbshape{17}{1000}\let\chapbf=\chaprm\setfont\chapsc\scbshape{10}{\magstep3}\font\chapi=cmmi12 scaled \magstep2\font\chapsy=cmsy10 scaled \magstep3% Section fonts (14.4pt).\setfont\secrm\rmbshape{12}{\magstep1}\setfont\secit\itbshape{10}{\magstep2}\setfont\secsl\slbshape{10}{\magstep2}\setfont\sectt\ttbshape{12}{\magstep1}\setfont\secttsl\ttslshape{10}{\magstep2}\setfont\secsf\sfbshape{12}{\magstep1}\let\secbf\secrm\setfont\secsc\scbshape{10}{\magstep2}\font\seci=cmmi12 scaled \magstep1\font\secsy=cmsy10 scaled \magstep2% Subsection fonts (13.15pt).\setfont\ssecrm\rmbshape{12}{\magstephalf}\setfont\ssecit\itbshape{10}{1315}\setfont\ssecsl\slbshape{10}{1315}\setfont\ssectt\ttbshape{12}{\magstephalf}\setfont\ssecttsl\ttslshape{10}{1315}\setfont\ssecsf\sfbshape{12}{\magstephalf}\let\ssecbf\ssecrm\setfont\ssecsc\scbshape{10}{\magstep1}\font\sseci=cmmi12 scaled \magstephalf\font\ssecsy=cmsy10 scaled 1315% The smallcaps and symbol fonts should actually be scaled \magstep1.5,% but that is not a standard magnification.% In order for the font changes to affect most math symbols and letters,% we have to define the \textfont of the standard families. Since% texinfo doesn't allow for producing subscripts and superscripts except% in the main text, we don't bother to reset \scriptfont and% \scriptscriptfont (which would also require loading a lot more fonts).%\def\resetmathfonts{% \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf \textfont\ttfam=\tentt \textfont\sffam=\tensf}% The font-changing commands redefine the meanings of \tenSTYLE, instead% of just \STYLE. We do this so that font changes will continue to work% in math mode, where it is the current \fam that is relevant in most% cases, not the current font. Plain TeX does \def\bf{\fam=\bffam% \tenbf}, for example. By redefining \tenbf, we obviate the need to% redefine \bf itself.\def\textfonts{% \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl \resetmathfonts \setleading{\textleading}}\def\titlefonts{% \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy \let\tenttsl=\titlettsl \resetmathfonts \setleading{25pt}}\def\titlefont#1{{\titlefonts\rm #1}}\def\chapfonts{% \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl \resetmathfonts \setleading{19pt}}\def\secfonts{% \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy \let\tenttsl=\secttsl \resetmathfonts \setleading{16pt}}\def\subsecfonts{% \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy \let\tenttsl=\ssecttsl \resetmathfonts \setleading{15pt}}\let\subsubsecfonts = \subsecfonts % Maybe make sssec fonts scaled magstephalf?\def\smallfonts{% \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy \let\tenttsl=\smallttsl \resetmathfonts \setleading{10.5pt}}\def\smallerfonts{% \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy \let\tenttsl=\smallerttsl \resetmathfonts \setleading{9.5pt}}% Set the fonts to use with the @small... environments.\let\smallexamplefonts = \smallfonts% About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample% can fit this many characters:% 8.5x11=86 smallbook=72 a4=90 a5=69% If we use \smallerfonts (8pt), then we can fit this many characters:% 8.5x11=90+ smallbook=80 a4=90+ a5=77% For me, subjectively, the few extra characters that fit aren't worth% the additional smallness of 8pt. So I'm making the default 9pt.% % By the way, for comparison, here's what fits with @example (10pt):% 8.5x11=71 smallbook=60 a4=75 a5=58% % I wish we used A4 paper on this side of the Atlantic.% % --karl, 24jan03.% Set up the default fonts, so we can use them for creating boxes.%\textfonts% Define these so they can be easily changed for other fonts.\def\angleleft{$\langle$}\def\angleright{$\rangle$}% Count depth in font-changes, for error checks\newcount\fontdepth \fontdepth=0% Fonts for short table of contents.\setfont\shortcontrm\rmshape{12}{1000}\setfont\shortcontbf\bxshape{12}{1000}\setfont\shortcontsl\slshape{12}{1000}\setfont\shortconttt\ttshape{12}{1000}%% Add scribe-like font environments, plus @l for inline lisp (usually sans%% serif) and @ii for TeX italic% \smartitalic{ARG} outputs arg in italics, followed by an italic correction% unless the following character is such as not to need one.\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else\/\fi\fi\fi}\def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx}\def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx}\let\i=\smartitalic\let\var=\smartslanted\let\dfn=\smartslanted\let\emph=\smartitalic\let\cite=\smartslanted\def\b#1{{\bf #1}}\let\strong=\b% We can't just use \exhyphenpenalty, because that only has effect at% the end of a paragraph. Restore normal hyphenation at the end of the% group within which \nohyphenation is presumably called.%\def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation}\def\restorehyphenation{\hyphenchar\font = `- }% 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\frenchspacing{% \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m }\catcode`@=\other\def\t#1{% {\tt \rawbackslash \frenchspacing #1}% \null}\let\ttfont=\t\def\samp#1{`\tclose{#1}'\null}\setfont\keyrm\rmshape{8}{1000}\font\keysy=cmsy9\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% \vbox{\hrule\kern-0.4pt \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% \kern-0.4pt\hrule}% \kern-.06em\raise0.4pt\hbox{\angleright}}}}% The old definition, with no lozenge:%\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null}\def\ctrl #1{{\tt \rawbackslash \hat}#1}% @file, @option are the same as @samp.\let\file=\samp\let\option=\samp% @code is a modification of @t,% which makes spaces the same size as normal in the surrounding text.\def\tclose#1{% {% % Change normal interword space to be same as for the current font. \spaceskip = \fontdimen2\font % % Switch to typewriter. \tt % % But `\ ' produces the large typewriter interword space. \def\ {{\spaceskip = 0pt{} }}% % % Turn off hyphenation. \nohyphenation % \rawbackslash \frenchspacing #1% }% \null}% We *must* turn on hyphenation at `-' and `_' in \code.% Otherwise, it is too hard to avoid overfull hboxes% in the Emacs manual, the Library manual, etc.% Unfortunately, TeX uses one parameter (\hyphenchar) to control% both hyphenation at - and hyphenation within words.% We must therefore turn them both off (\tclose does that)% and arrange explicitly to hyphenate at a dash.% -- rms.{ \catcode`\-=\active \catcode`\_=\active % \global\def\code{\begingroup \catcode`\-=\active \let-\codedash \catcode`\_=\active \let_\codeunder \codex } % % If we end up with any active - characters when handling the index, % just treat them as a normal -. \global\def\indexbreaks{\catcode`\-=\active \let-\realdash}}\def\realdash{-}\def\codedash{-\discretionary{}{}{}}\def\codeunder{% % this is all so @math{@code{var_name}+1} can work. In math mode, _ % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.) % will therefore expand the active definition of _, which is us % (inside @code that is), therefore an endless loop. \ifusingtt{\ifmmode \mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_. \else\normalunderscore \fi \discretionary{}{}{}}% {\_}%}\def\codex #1{\tclose{#1}\endgroup}% @kbd is like @code, except that if the argument is just one @key command,% then @kbd has no effect.% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),% `example' (@kbd uses ttsl only inside of @example and friends),% or `code' (@kbd uses normal tty font always).\def\kbdinputstyle{\parsearg\kbdinputstylexxx}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -