\documentclass{article}
\usepackage{multiaudience}
\SetNewAudience{admins}
\SetNewAudience{devs}
\SetNewAudience{execs}
\usepackage[colorlinks]{hyperref}
\usepackage{fancyvrb}
\VerbatimFootnotes
\begin{document}

\title{Examples of \textsl{multiaudience} package use}
\date{$ $Date: 2015/07/11 22:49:40 $ $}
\author{Boris Veytsman}
\maketitle

\clearpage
\tableofcontents
\clearpage

\section{Introduction}
\label{sec:intro}

We defined three audiences:
\begin{verbatim}
\SetNewAudience{admins}
\SetNewAudience{devs}
\SetNewAudience{execs}
\end{verbatim}


\section{The \texttt{\textbackslash CurrentAudience} command}
\label{sec:CurrentAudience}

\begin{verbatim}
The current audience is \CurrentAudience.
\end{verbatim}

The current audience is \CurrentAudience.

\section{The \texttt{\textbackslash showto} command}
\label{sec:showto}


Note the nesting here:
\begin{verbatim}
\showto{admins}{This text is visible to admins only\footnote{And
    admins see a footnote}.}
\showto{admins, devs}{This text is visible to admins and
  devs. \showto{devs}{This text is visible to devs.}}  
\showto{-, admins}{This text is \emph{not} visible to admins.}
This text is visible to everybody\footnote{And everybody sees a
  footnote}.  
\end{verbatim}

\showto{admins}{This text is visible to admins only\footnote{And
    admins see a footnote}.}
\showto{admins, devs}{This text is visible to admins and
  devs. \showto{devs}{This text is visible to devs.}}  
\showto{-, admins}{This text is \emph{not} visible to admins.}
This text is visible to everybody\footnote{And everybody sees a
  footnote}.   

\section{The \texttt{shownto} environment}
\label{sec:env}

\begin{verbatim}
\begin{shownto}{admins}
  This is for admins only.
\end{shownto}
\end{verbatim}

\begin{shownto}{admins}
  This is for admins only.
\end{shownto}


\begin{verbatim}
\begin{shownto}{-, admins}
  This is for everybody \emph{but} admins.
\end{shownto}
\end{verbatim}

\begin{shownto}{-, admins}
  This is for everybody \emph{but} admins.
\end{shownto}


\section{Use of verbatim text}
\label{sec:verbatiom}



\begin{verbatim}
\begin{shownto}{-,execs}
We cannot use \texttt{verbatim} inside shownto, but we can use
\texttt{input} with \texttt{verbatim} inside.


We also can use \texttt{path} and \texttt{url} from hyperref package:
\path{a$2}, \url{http://borisv.lk.net/cv/cv.html\#Publications}. 
\input{verbatim}

We also can use \texttt{path} and \texttt{url} from hyperref package:
\path{a$2}, \url{http://borisv.lk.net/cv/cv.html\#Publications}. 
\end{shownto}
\end{verbatim}

\begin{shownto}{-,execs}
We cannot use \texttt{verbatim} inside shownto, but we can use
\texttt{input} with \texttt{verbatim} inside.


We also can use \texttt{path} and \texttt{url} from hyperref package:
\path{a$2}, \url{http://borisv.lk.net/cv/cv.html\#Publications}. 
\input{verbatim}
\end{shownto}

Another option is the use of \verb|\SaveVerb| and friends from
\textsl{fancyvrb} package:

\begin{verbatim}
\begin{SaveVerbatim}{SavedVerb}
This is a verbatim line: ~!@#$%^&*{}:"`'<>?  
\end{SaveVerbatim}

\begin{shownto}{-,devs}
  \UseVerbatim{SavedVerb}
\end{shownto}
\end{verbatim}

\begin{SaveVerbatim}{SavedVerb}
This is a verbatim line: ~!@#$%^&*{}:"`'<>?  
\end{SaveVerbatim}

\begin{shownto}{-,devs}
  \UseVerbatim{SavedVerb}
\end{shownto}

\section{Syntactic sugar}
\label{sec:sugar}

\begin{verbatim}
We have a special footnote command\Footnote{admins}{This footnote is
  for admins only.}.
\end{verbatim}

We have a special footnote command\Footnote{admins}{This footnote is
  for admins only.}.

\begin{verbatim}
\begin{Subsection}{admins}[Admins-only subsection]{This subsection is
    visible only to admins}
We have special sectioning commands.  
\end{Subsection}
\end{verbatim}

\begin{Subsection}{admins}[Admins-only subsection]{This subsection is
    visible only to admins}
We have special sectioning commands.  
\end{Subsection}

\begin{verbatim}
\begin{Subsection}{-,admins}[Not for admins]{This subsection is not
    visible to admins}
  Another example.  \showto{devs}{This is visible to devs only.}
\end{Subsection}
\end{verbatim}

\begin{Subsection}{-,admins}[Not for admins]{This subsection is not
    visible to admins}
  Another example.  \showto{devs}{This is visible to devs only.}
\end{Subsection}

\end{document}
