Example
Code: Select all
\def\target{admin} %who is documentation targeted to?
\newcommand{\checkuser}[3]{
\IfSubStringInString{,#1,}{,\target,}{#2}{#3}
}
(.....)
Feature XYZ is supposed to do this and that.
%this part is visible for admins only
\checkuser{admin}
{
Technical info for admins goes here
\input{technical_info_xyz.tex}
}
{ Technical information is available to administators. } %this part is visible for non-admins
lets assume i would like to create a source of the documentation for users, that means hide everything that would be visible for admins. something like pdflatex/latex would do, but with producing another source file instead of pdf/dvi output.
in other words i would like obtain something like this from above example :
admin version:
Code: Select all
\def\target{admin} %who is documentation targeted to?
\newcommand{\checkuser}[3]{
\IfSubStringInString{,#1,}{,\target,}{#2}{#3}
}
(.....)
Feature XYZ is supposed to do this and that.
Technical info for admins goes here
< file technical_info_xyz.tex is inserted in this place >
user version: (after altering \target variable}
Code: Select all
\def\target{user} %who is documentation targeted to?
\newcommand{\checkuser}[3]{
\IfSubStringInString{,#1,}{,\target,}{#2}{#3}
}
(.....)
Feature XYZ is supposed to do this and that.
Technical information is available to administators.
the resulting file should be a latex source file.
so, my question is - is there an automated tool that will help me accomplish this?
i know i can already use filename-recorder feature of pdflatex and help me with that somewhat.