2

What is the difference between \normalsize and \@normalsize? I can't find any documentation (plenty of web search hits for \normalsize, but search engines seem to ignore the @ even if I quote it; and nothing I can find in 'The Guide to LaTeX' or 'The LaTeX Companion').

I'm asking because a macro that we've been using seems to have changed its behavior when called from xelatex between TeXLive 2014 and 2015, and I've traced the issue down to the fact that the macro does this:

\def\@selfnt{\ifx\@currsize\normalsize\@normalsize\else\@currsize\fi}

And I don't know what it's trying to accomplish by doing that. (Actually, it only does this if \new@fontshape is defined, which might help if I knew what \new@fontshape did.)

And in general (I realize this is two questions), how does one find documentation for these commands that contain @? I presume at least \@selfnt is defined in "standard" LaTeX, else this macro wouldn't rely on it (it doesn't require any other packages), but where is the documentation for that, if not in those books? (I found \new@fontshape in latexrelease.sty, but the code isn't very enlightening to me.)

5
  • tex/latex/base/ is one source, especially latex.ltx. For example: \def\@documentclasshook{% \ifx\@normalsize\@undefined \let\@normalsize\normalsize \fi }
    – cfr
    Commented Oct 23, 2015 at 1:41
  • The macro does not rely on \@selfnt. It defines it. The definition is \ifx\@currsize\normalsize\@normalsize\else\@currsize\fi. \new@fontshape is deprecated according to latexrelease.sty. It shouldn't be used. It is from an earlier incarnation of NFSS i.e. from an Obsolete New Font Selection Scheme. You should use the (non-obsolete current) New Font Selection Scheme commands instead.
    – cfr
    Commented Oct 23, 2015 at 1:49
  • Regarding your second question, consider reading Where can I find help files or documentation for commands like \@startsection for LaTeX?
    – Werner
    Commented Oct 23, 2015 at 5:29
  • 1
    The reason why you are seeing this now is that the NFSS1 interface (which has been deprecated since latex2e came out in 1993) was finally removed in the 2015/01/01 latex release (which doesn't seem to be mentioned in ltnews22, although it is logged in the change file) Commented Oct 23, 2015 at 7:52
  • Ok, thanks for the pointers. (cfr, I understand that the code I gave above is a macro, but it's only a small part of the larger macro I was trying to understand.) I'm still not clear why the (larger) macro was doing what it was, but at least I understand better what it was doing. Commented Oct 23, 2015 at 15:27

1 Answer 1

3

Normally they are \let equal to each other but if you start your document with \documentstyle instead of \documentclass then some LaTeX2.09 compatibility code gets loaded, and in the latex209.dtx source you find

% The intention of the strange |\normalsize| tests below are that after
% the |\documentstyle| command has completed, then
% if neither of the commands |\normalsize|
% nor |\@normalsize|  were defined by the main style or one of its
% `substyles' or `options', then |\@normalsize| will be undefined and
% |\normalsize| will generate an error saying it hasn't been defined.
%
% If the style defined either |\normalsize| or \@|normalsize| then
% these two commands will be |\let| equal to each other, with the
% definition given by the style file.
%
% If the style defines both |\normalsize| and |\@normalsize| then
% those two definitions are kept.
%    \begin{macrocode}
\def\@documentclasshook{%
  \RequirePackage\@unusedoptionlist
  \let\@unusedoptionlist\@empty
  \def\@tempa{\@normalsize}%
  \ifx\normalsize\@tempa
    \let\normalsize\@normalsize
  \fi
  \ifx\@normalsize\@undefined
    \let\@normalsize\normalsize
  \fi
  \ifx\normalsize\@undefined
    \let\normalsize\original@normalsize
  \fi
  \let\@latex@e@error\@latex@e@error@}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\original@normalsize}
% \changes{v0.51}{1996/05/24}{(DPC) Macro added /2153.}
% Save the original definition of |\normalsize| (which generates an
% error)
%    \begin{macrocode}
\let\original@normalsize\normalsize
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\normalsize}
% \changes{v0.14}{1994/02/07}{Added \cs{normalsize}.}
%    Some styles don't define |\normalsize|, just |\@normalsize|.
%    \begin{macrocode}
\def\normalsize{\@normalsize}
%    \end{macrocode}
% \end{macro}
%

Who was that (DPC) bloke making comments last century?....

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .