1

I was able to get an advanced version of the multiaudience package running. Original Post This code here is working pretty well:

\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}

Latexoutput

However I'm facing two issues:

  1. One can see that the section title "2 Two" is writen in black letters. (This does not happen when using article instead of scrartcl.)

  2. I would like to create a main switch around this, something like "forceAllAudienceOn". When the variable is false, LaTeX should behave as normal without modifications.

Ingmar
  • 6,690
  • 5
  • 26
  • 47
Georg
  • 51
  • 4

0 Answers0