@c $Id: common.texi 1224 2026-04-26 05:28:47Z vincentb1 $
@c Public domain.
@set LTXREFMAN_HOME_PAGE https://latexref.xyz
@set LTXREFMAN_BUGS latexrefman@@tug.org

@clear TEXFAMILY
@iftex
@set TEXFAMILY
@tex
@ifx@setupmarkupstyle@undefined
  @gdef@setupmarkupstyle#1{}%
@fi
@expandafter@ifx@csname iflatex@endcsname@relax
  @long@gdef@iflatex#1@end iflatex{}%
@fi
@end tex
@end iftex
@iflatex
@set TEXFAMILY
@end iflatex
@ifset TEXFAMILY
@macro visiblespace
@tex%
{@tt@char`@ }%
@end tex@c
@end macro
@macro iftexfamilythenelse {then,else}
\then\@c
@end macro
@end ifset
@ifclear TEXFAMILY
@macro visiblespace
@w{@U{2423}}
@end macro
@macro iftexfamilythenelse {then,else}
\else\
@end macro
@end ifclear
@clear HAS-MATH
@iftex
@set HAS-MATH
@macro ifhasmaththenelse {then,else}
\then\@c
@end macro
@end iftex
@c
@ifnottex
@macro ifhasmaththenelse {then,else}
\else\@c
@end macro
@end ifnottex

@c package reference.
@macro package {packagename}
@code{\packagename\}
@end macro

@c used to remove something from the spell checker.
@macro identity {x}
\x\
@end macro

@c so we can use \mbox in @math/@tex blocks. Should never be used outside.
@iftex
@macro mbox {text}
@hbox{\text\}
@end macro
@end iftex

@c For text that semantically is a @samp but we want in current font. Typically used
@c for counter typesetting examples.
@macro qtext {text}
`\text\'
@end macro

@tex
\globaldefs=1
% lasyfont characters for Texinfo (latexsym package in LaTeX).
% JH 2018-Nov-12, ideas from wasyfont.tex. Public domain.
% not going to try to make fonts
\font\tenlasy = lasy10
% \font\ninelasy = lasy9
% \font\eightlasy = lasy8
\font\sevenlasy = lasy7
\font\fivelasy = lasy5
\newfam\lasyfam
\newcount\lasyfamcount
% family number is third-least-significant hex digit of mathchar
\lasyfamcount=\lasyfam \multiply\lasyfamcount by 256
%
\textfont\lasyfam=\tenlasy
 \scriptfont\lasyfam=\sevenlasy
 \scriptscriptfont\lasyfam=\fivelasy
%
\def\lasymathchardef#1#2{%
    \count255=\lasyfamcount
    \advance\count255 by"#1
    \mathchardef#2\count255 }
% char 1 (math class): 0=ord, 2=bin, 3=rel (taken from latexsym.dtx).
% char 2: family number, added in by \lasymathchardef.
% chars 3-4: character code in font. All in hex.
\lasymathchardef{0030}{\mho}
\lasymathchardef{3031}{\Join}
\lasymathchardef{0032}{\Box}
\lasymathchardef{0033}{\Diamond}
\lasymathchardef{303B}{\leadsto}
\lasymathchardef{303C}{\sqsubset}
\lasymathchardef{303D}{\sqsupset}
\lasymathchardef{2001}{\lhd}
\lasymathchardef{2003}{\rhd}
\lasymathchardef{2002}{\unlhd}
\lasymathchardef{2004}{\unrhd}
\font\tenmathbb = msbm10
% use \hbox to force horizontal mode, as \mathbbN is to be called from Math mode.
\def\mathbbN{{\hbox{\tenmathbb N}}}
%
% must explicitly reset before the (at)end tex, not let the (at)end group
% reset it; else internal Texinfo variables get messed up.
\globaldefs=0
@end tex
