Text FormattingRaisebox in Section

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
DeltaCMD
Posts: 1
Joined: Mon Jun 08, 2015 4:12 pm

Raisebox in Section

Post by DeltaCMD »

I got a little Problem here.

I need to use a "#" in a Section Headline.

so i got
\newcommand{\FISs}{FIS\raisebox{2mm}{\tiny\#}}
and i want to put this in a section like
section{\FISs}

But i keek gettig the same Error over and over.
Errorinfo

Code: Select all

! Argument of \@sect has an extra }.<inserted text>\par \section{\FISs}

! Paragraph ended before \@sect was complete.<to be read again>\par \section{\FISs}

! Argument of \@sect has an extra }.<inserted text>\par \section{\FISs}

! Paragraph ended before \@sect was complete.<to be read again>\par \section{\FISs}

! Paragraph ended before \foreignlanguage was complete.<to be read again>\par \newpage

! Extra }, or forgotten \endgroup.<argument> ...idb@x \let \reserved@d =[\def \par }} \newpage

! Extra }, or forgotten \endgroup.<argument> ...db@x \let \reserved@d =[\def \par }} \newpage
I think i requiere some assitance.

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

rais
Posts: 419
Joined: Sun Nov 16, 2014 8:51 pm

Raisebox in Section

Post by rais »

DeltaCMD wrote:I need to use a "#" in a Section Headline.

so i got
\newcommand{\FISs}{FIS\raisebox{2mm}{\tiny\#}}
and i want to put this in a section like
section{\FISs}

But i keek gettig the same Error over and over.
Errorinfo

! Argument of \@sect has an extra }.<inserted text>\par \section{\FISs}
your definition of \FISs is fragile and the argument for \section is a moving argument, hence your \FISs breaks apart. Try

Code: Select all

\section{\protect\FISs}
or use \DeclareRobustCommand instead of \newcommand to make it robust in the first place.

KR
Rainer
Post Reply