summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/multiaudience/sample.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-08-03 22:04:47 +0000
committerKarl Berry <karl@freefriends.org>2015-08-03 22:04:47 +0000
commitb1bd2dbbfd4d6be2af62246fa1889e5470fd45f0 (patch)
treeff57789c1f0477df6b98c02c3c62253e577ef469 /Master/texmf-dist/doc/latex/multiaudience/sample.tex
parent8861879f68d110b9c3cbb9b4153c28e5e3799b9d (diff)
multiaudience (3aug15)
git-svn-id: svn://tug.org/texlive/trunk@38035 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/multiaudience/sample.tex')
-rw-r--r--Master/texmf-dist/doc/latex/multiaudience/sample.tex174
1 files changed, 174 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/multiaudience/sample.tex b/Master/texmf-dist/doc/latex/multiaudience/sample.tex
new file mode 100644
index 00000000000..a2d9960c66e
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/multiaudience/sample.tex
@@ -0,0 +1,174 @@
+\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}