Skip to content

Commit

Permalink
Simplify anonymization of an article
Browse files Browse the repository at this point in the history
Signed-off-by: Sven Strickroth <[email protected]>
  • Loading branch information
csware committed May 13, 2023
1 parent 30022c8 commit e485cba
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 4 deletions.
2 changes: 2 additions & 0 deletions lni-author-template.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@

%%% Um einen Artikel auf deutsch zu schreiben, genügt es die Klasse ohne
%%% Parameter zu laden.
%%% Zur Anonymisierung kann die ``anonymous'' Option genutzt werden.
\documentclass[]{lni}
%%% To write an article in English, please use the option ``english'' in order
%%% to get the correct hyphenation patterns and terms.
%%% \documentclass[english]{class}
&%% for anonymizing an article you can use the ``anonymous'' option.
%%
\begin{document}
%%% Mehrere Autoren werden durch \and voneinander getrennt.
Expand Down
3 changes: 3 additions & 0 deletions lni-paper-example-de.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
%% Dies gibt Warnungen aus, sollten veraltete LaTeX-Befehle verwendet werden
\RequirePackage[l2tabu, orthodox]{nag}

% Zur Anonymisierung kann die ``anonymous'' Option genutzt werden, siehe auch \anon-Makro.
\documentclass[utf8,biblatex]{lni}
\bibliography{lni-paper-example-de}

Expand Down Expand Up @@ -83,6 +84,8 @@ \section{Demonstrationen}

Spitze Klammen können direkt eingegeben werden: <test />

Anonymisierungen können mittels anonymous-Option in der documentclass automatisch vorgenommen werden. Dafür gibt es das \texttt{anon}-Makro, z.\,B. \anon{Geheim für Review} und \anon[nur für Review]{nur für finale Version}.

Hier eine kleine Demonstration von \href{https://www.ctan.org/pkg/microtype}{microtype}:
\blindtext

Expand Down
25 changes: 21 additions & 4 deletions lni.cls
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@
\autofontstrue
\newif\ifnorunningheads
\DeclareOption{norunningheads}{\norunningheadstrue}
\newif\ifanonymous
\anonymousfalse
\DeclareOption{anonymous}{\anonymoustrue}
\newcommand{\anon}[2][\iflnienglish ANONYMIZED\else ANONYMISIERT\fi]{%
\ifanonymous%
{\color{orange}#1}%
\else%
#2%
\fi}
\ExecuteOptions{utf8}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions\relax
Expand Down Expand Up @@ -344,7 +353,7 @@
\ifusehyperref
\HyXeTeX@CheckUnicode
\HyPsd@PrerenderUnicode{\@shortauthor}%
\pdfstringdef\@pdfauthor{\@shortauthor}%
\ifanonymous\else\pdfstringdef\@pdfauthor{\@shortauthor}\fi%
\HyXeTeX@CheckUnicode
\HyPsd@PrerenderUnicode{\@title}%
\pdfstringdef\@pdftitle{\@title}%
Expand Down Expand Up @@ -378,7 +387,15 @@
\vskip 19pt% Abstand nach dem Titel
{\normalsize%
\lineskip .5em%
\ifanonymous
\iflnienglish
anonymized for review\footnote{placeholder for contact information}
\else
anonymisiert für Review\footnote{Platzhalter für Kontaktinformationen}
\fi%
\else
\@author
\fi%
\par}%
\vskip 28pt% Abstand vor dem Abstract
\end{center}%
Expand All @@ -402,14 +419,14 @@
\@lni@CC@Icon
\fi
}
\ifdefempty{\@lnidoi}{}{
\ifanonymous\else\ifdefempty{\@lnidoi}{}{
\footnotesize
\ifusehyperref
\href{https://doi.org/\@lnidoi}{doi:\@lnidoi}
\else
doi:\@lnidoi
\fi%
}
}\fi
}
}}
\par
Expand Down Expand Up @@ -560,7 +577,7 @@
\pagestyle{fancy}
\fancyhead{}% Löscht alle Kopfzeileneinstellungen
\fancyhead[RO]{\small\@shorttitle\hspace{5pt}\thepage\hspace{0.05cm}}
\fancyhead[LE]{\hspace{0.05cm}\small\thepage\hspace{5pt}\@shortauthor}
\fancyhead[LE]{\hspace{0.05cm}\small\thepage\hspace{5pt}\ifanonymous\iflnienglish Anonymized for review\else Anonymisiert für Review\fi\else\@shortauthor\fi}
\fancyfoot{}% Löscht alle Fußzeileneinstellungen
\renewcommand{\headrulewidth}{0.4pt} %Linie unter Kopfzeile
\fi%
Expand Down
8 changes: 8 additions & 0 deletions lni.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,14 @@ This work consists of the file lni.dtx
%
% \DescribeOption{norunningheads\space(new in v1.5)}To easily remove all running
% headers from your document, you can use the option \opt{norunningheads}.
%
% \DescribeOption{anonymous\space(new in v1.X)}To easily anonymize a paper for
% blind review, use this option. Then all author information will be replaced
% with a placeholder. Additionally, there is a new macro \cs{anon\marg{hide in review}}
% which will be replaced with ``ANONIMIZED'' if the option is set.
% Also, \cs{anon\marg[for review]{for final version}} can be used that outputs ``for review''
% if the option is set, and ``for final version'' otherwise.
%
% \newpage
% \section{Setting up a document}
% You can use the file \file{lni-author-template.tex} as a starting point
Expand Down

0 comments on commit e485cba

Please sign in to comment.