rendered paste body\newcommand{\ifbold}{%
\edef\bolda{\the\font} {\bf\xdef\boldb{\the\font}}\ifx\bolda\boldb }
\newcommand{\ifit}{%
\edef\ita{\the\font} {\it\xdef\itb{\the\font}}\ifx\ita\itb }
%%trouble now:
\def\n{\ifbold {\ifit\boldmath{$\itpi$}\else\boldmath{$\uppi$}\fi}\else{\ifit $\itpi$\else $\uppi$\fi}\fi}
%%End of latex code
$pdflatex new.tex
<snip>
Chapter 1.
(/usr/share/texmf/tex/latex/MinionPro/OMLMinionPro-TOsF.fd
(/usr/share/texmf/tex/latex/MinionPro/MinionPro-FontDef.sty))
! Extra \else.
\n ...itpi $}\else \boldmath {$\uppi $}\fi }\else
{\ifit $\itpi $\else $\upp...
l.110 {Testi\n
\N\textit{\N ga\n}\emph{\N ga\n}\textsl{\N ga\n}}\textbf{\N ga\n}
?
$
line 110 is:
{Testi\n\N\textit{\N ga\n}\emph{\N ga\n}\textsl{\N ga\n}}\textbf{\N ga\n}