GeneralReading \show\command

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Laurentius
Posts: 132
Joined: Wed Feb 11, 2009 11:38 pm

Reading \show\command

Post by Laurentius »

Code: Select all

\documentclass{article}
\begin{document}

a\footnote{b\par c}

% I tried to redefine \@footnotetext as it seems to be defined already from
% \show\@footnotetext ; but it I must have done something wrong, for 
% afterwards, I cannot use \par within a footnote.

\makeatletter
\def\@footnotetext#1{\insert \footins {\reset@font \footnotesize 
\interlinepenalty \interfootnotelinepenalty \splittopskip \footnotesep 
\splitmaxdepth \dp \strutbox \floatingpenalty \@MM \hsize \columnwidth 
\@parboxrestore \protected@edef \@currentlabel {\csname p@footnote\endcsname 
\@thefnmark }\color@begingroup \@makefntext {\rule \z@ \footnotesep 
\ignorespaces #1\@finalstrut \strutbox }\color@endgroup }}
\makeatother

a\footnote{b\par c}


\end{document}

PS Where are basic LaTeX commands defined?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Reading \show\command

Post by cgnieder »

Laurentius wrote:

Code: Select all

% I tried to redefine \@footnotetext as it seems to be defined already from
% \show\@footnotetext ; but it I must have done something wrong, for 
% afterwards, I cannot use \par within a footnote.

\makeatletter
\def\@footnotetext#1{...

PS Where are basic LaTeX commands defined?
For your first question: in order to be able to use \par in the argument of a macro the macro needs to be defined \long:

Code: Select all

\long\def\foo#1{...}
See What's the difference between \newcommand and \newcommand*? for more information.

Regarding the basic LaTeX commands (i.e. not the TeX primitives): they're defined in a file called latex.ltx (the LaTeX2e Kernel) that you can find in the base tree of your TeX installation.

Regards
site moderator & package author
Laurentius
Posts: 132
Joined: Wed Feb 11, 2009 11:38 pm

Re: Reading \show\command

Post by Laurentius »

Danke Clementi!

Lorenz
Post Reply