corso-di-italiano-per-stran.../definitions.tex

34 lines
881 B
TeX

\newcommand\gm{\textit{(m.)} }
\newcommand\gf{\textit{(f.)} }
\definecolor{translationcolor}{RGB}{128, 0, 128}
\providecommand{ActiveTranslation}{none}
\newenvironment{translation}[1]{%
\def\switchtolang{#1}
\ifx\switchtolang\ActiveTranslation
\bigskip
\begin{adjustwidth}{3em}{}
\begin{\switchtolang}
\textsc{\titlecap{\switchtolang}}:
\itshape\color{translationcolor}
}{%
\end{\switchtolang}
\end{adjustwidth}
\bigskip
\else % do not translate
% No output
\fi
}
\newcommand\itranslation[2]{%
\def\switchtolang{#1}
\ifx\switchtolang\ActiveTranslation
\begin{\switchtolang}
\textsc{\titlecap{\switchtolang}}:
\itshape\color{translationcolor}
#2
\end{\switchtolang}
\else % do not translate
% No output
\fi
}