%%
%% This is file `multiaudience.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% multiaudience.dtx  (with options: `style')
%% 
%% IMPORTANT NOTICE:
%% 
%% For the copyright see the source file.
%% 
%% Any modified versions of this file must be renamed
%% with new filenames distinct from multiaudience.sty.
%% 
%% For distribution of the original source see the terms
%% for copying and modification in the file multiaudience.dtx.
%% 
%% This generated file may be distributed as long as the
%% original source files, as listed above, are part of the
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% Copyright 2015-2021, Boris Veytsman <borisv@lk.net
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
%% version 1.3 of this license or (at your option) any
%% later version.
%% The latest version of the license is in
%%    http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of
%% LaTeX version 2003/06/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
%%
%% The Current Maintainer of this work is Boris Veytsman
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{multiaudience}
[2021/10/02 v1.04 Generating versions for different audiences from the
same source]
\providecommand*\CurrentAudience{default}
\def\DefCurrentAudience#1{\def\CurrentAudience{#1}}
\newif\if@MULTAU@shown
\@MULTAU@showntrue
\newif\if@MULTAU@include
\@MULTAU@includetrue
\RequirePackage{xkeyval}
\define@key{MULTAU}{-}[]{\@MULTAU@showntrue\@MULTAU@includefalse}
\def\SetNewAudience#1{%
  \define@key{MULTAU}{#1}[]{%
    \def\@MULTAU@currkey{#1}%
    \@for\@tempa:=\CurrentAudience \do{%
      \ifx\@MULTAU@currkey\@tempa\relax
        \if@MULTAU@include
           \@MULTAU@showntrue
        \else
           \@MULTAU@shownfalse
        \fi%
    \fi%
}}}
\long\def\showto#1#2{\@MULTAU@shownfalse\@MULTAU@includetrue
  \setkeys{MULTAU}{#1}%
  \if@MULTAU@shown#2\fi
  \@MULTAU@showntrue\@MULTAU@includetrue}
\RequirePackage{environ}
\NewEnviron{shownto}[1]{%
  \@MULTAU@shownfalse\@MULTAU@includetrue
  \setkeys{MULTAU}{#1}%
  \if@MULTAU@shown\BODY\fi}{\@MULTAU@showntrue\@MULTAU@includetrue}
\def\DefMultiaudienceCommand#1#2{\long\def#1##1##2{\showto{##1}{#2{##2}}}}
\DefMultiaudienceCommand{\Footnote}{\footnote}
\def\NewMultiaudienceSectionEnv#1#2{%
  \NewEnviron{#1}[1]{%
    \@MULTAU@shownfalse\@MULTAU@includetrue
    \setkeys{MULTAU}{##1}%
    \if@MULTAU@shown\expandafter#2\BODY\fi}%
  {\@MULTAU@showntrue\@MULTAU@includetrue}}
\NewMultiaudienceSectionEnv{Section}{\section}
\NewMultiaudienceSectionEnv{Subsection}{\subsection}
\NewMultiaudienceSectionEnv{Subsubsection}{\subsubsection}
\NewMultiaudienceSectionEnv{Paragraph}{\paragraph}
\NewMultiaudienceSectionEnv{Subparagraph}{\subparagraph}
\endinput
%%
%% End of file `multiaudience.sty'.
