我能够multiaudience
运行该软件包的高级版本。原始帖子
此处的代码运行良好:
\documentclass{scrartcl}
\usepackage{ifthen}
\usepackage{multiaudience}
\usepackage{color}
\usepackage{lipsum}
\definecolor{red}{rgb}{1,0,0}
\SetNewAudience{internGER}
\SetNewAudience{externGER}
\DefCurrentAudience{internGER}
%\DefCurrentAudience{externGER}
% original definition
%\NewEnviron{shownto}[1]{%
% \@MULTAU@shownfalse\@MULTAU@includetrue
% \setkeys{MULTAU}{#1}%
% \if@MULTAU@shown\BODY\fi}
\makeatletter
\RenewEnviron{shownto}[1]{%
\@MULTAU@shownfalse\@MULTAU@includetrue
\setkeys{MULTAU}{#1}%
\if@MULTAU@shown
\ifthenelse{\equal{#1}{internGER}}{
\textcolor{red}{\scriptsize\textit{[Following red text will be published in the internal version only: ]}\\
\normalsize\BODY}}{\BODY}%
\fi
}
\makeatother
%\long\def\showto#1#2{\@MULTAU@shownfalse\@MULTAU@includetrue
% \setkeys{MULTAU}{#1}%
% \if@MULTAU@shown#2\fi
% \@MULTAU@showntrue\@MULTAU@includetrue}
\makeatletter
\def\showto#1#2{%
\@MULTAU@shownfalse\@MULTAU@includetrue
\setkeys{MULTAU}{#1}%
\if@MULTAU@shown \ifthenelse{\equal{#1}{internGER}}{\textcolor{red}{\scriptsize\textit{[Following red text will be published in the internal version only: ] }\normalsize #2}}{#2}\fi
\@MULTAU@showntrue\@MULTAU@includetrue
}
\makeatother
\begin{document}
\begin{shownto}{internGER, externGER}
\section{One}
Text for everyone. \lipsum[1-1]
\begin{shownto}{internGER}
Text for internals only. \lipsum[2-2][3]
\end{shownto}
Again a text for everyone. \lipsum[2-2][3] \showto{internGER}{And only an internal text}
\end{shownto}
\lipsum[3-3]
\begin{shownto}{internGER}
\section{Two}
Text for internals only. \lipsum[4-4]
\end{shownto}
\begin{shownto}{internGER, externGER}
\section{Three}
\lipsum[5-5][5]
\end{shownto}
\end{document}
但是我面临两个问题:
可以看到,章节标题“2 Two”是用黑色字母书写的。(使用冠词代替 时不会出现这种情况
scrartcl
。)我想围绕此创建一个主开关,类似于“forceAllAudienceOn”。当变量为 false 时,
LaTeX
应该可以正常运行而无需修改。