Skip to content

Commit

Permalink
Merge pull request #234 from IACR/crossmark
Browse files Browse the repository at this point in the history
Add crossmark button if \IACR@CROSSMARKURL is defined.
  • Loading branch information
kmccurley authored Feb 15, 2024
2 parents 1eda431 + 073dc9f commit cb6c132
Showing 1 changed file with 40 additions and 22 deletions.
62 changes: 40 additions & 22 deletions iacrcc/iacrcc.cls
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,10 @@
\def\IACR@fp{1}
\def\IACR@EISSN{}
\def\IACR@DOI{}
\def\IACR@Received{20XX-XX-XX}
\def\IACR@Revised{20XX-XX-XX}
\def\IACR@Accepted{20XX-XX-XX}
\def\IACR@Published{20XX-XX-XX}
\newif\if@IACR@Received \@IACR@Receivedfalse
\newif\if@IACR@Revised \@IACR@Revisedfalse
\newif\if@IACR@Accepted \@IACR@Acceptedfalse
\newif\if@IACR@Published \@IACR@Publishedfalse
\def\IACR@CROSSMARKURL{}
\global\let\IACR@Received\@empty
\global\let\IACR@Accepted\@empty
\global\let\IACR@Published\@empty

% etoolbox: is a toolbox of programming facilities geared primarily
% towards LaTeX class and package authors.
Expand All @@ -73,7 +69,7 @@
% The jobname.iacrmetadata file will contain accepted \IACR@Received, \IACR@Accepted,
% \IACR@Published, and \IACR@DOI.
\InputIfFileExists{\jobname.iacrmetadata}{
\@IACR@Receivedtrue\@IACR@Acceptedtrue\@IACR@Publishedtrue\typeout{Inserted DOI into PDF}%
\typeout{Inserted DOI into PDF}%
}{}
\newif\if@optbiblatex
\@optbiblatexfalse
Expand Down Expand Up @@ -263,6 +259,25 @@
% End of macros for orcidlink
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Macro for crossmark image.
\definecolor{c948f8f}{RGB}{148,143,143}
\definecolor{cd0d0d0}{RGB}{208,208,208}
\definecolor{ca0a0a0}{RGB}{192,192,192}
\definecolor{c535353}{RGB}{83,83,83}
\definecolor{cc72914}{RGB}{199,41,20}
\definecolor{cef3340}{RGB}{239,51,64}
\definecolor{c3eb1c8}{RGB}{62,177,200}
\definecolor{cffc72c}{RGB}{255,199,44}
\newcommand\crossmarkimage[1]{%
\begin{tikzpicture}[scale=#1, every node/.append style={scale=#1}, inner sep=0pt, outer sep=0pt]
\path[draw=c948f8f,shading=axis,top color=white,bottom color=ca0a0a0,fill=cd0d0d0,line width=0.0198cm,miter limit=10.0,rounded corners=0.0529cm] (0.1058, -0.1058) rectangle (7.0, -1.5875);
\node[text=c535353,anchor=south west] (text235) at (1.8, -1.15){\fontfamily{phv}\selectfont \LARGE Check for updates};
\path[fill=cc72914] (0.6599, -1.1044) -- (1.1393, -0.7848) -- (1.1393, -0.4011) -- (0.6599, -0.4011) -- (0.6599, -1.1044) -- (0.6599, -1.1044)-- cycle;
\path[fill=cef3340] (1.1393, -1.1044) -- (0.6599, -0.7848) -- (0.6599, -0.4011) -- (1.1393, -0.4011) -- (1.1393, -1.1044) -- (1.1393, -1.1044)-- cycle;
\path[fill=c3eb1c8] (0.8996, -0.3175)arc(90.0:360.0:0.5292)arc(0.0:90.0:0.5292) -- cycle(0.8996, -1.2462)arc(270.0:0.0:0.3995)arc(0.0:-90.0:0.3995) -- cycle;
\path[fill=cffc72c] (1.193, -1.1173)arc(317.2441:158.1926:0.3993) -- (0.418, -0.6281)arc(155.807:319.67:0.5292) -- cycle;
\end{tikzpicture}}
% end of crossmark image
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This produces an icon for an external link. We use it as the external link
% icon for onclick on authors.
Expand Down Expand Up @@ -464,10 +479,12 @@
\global\let\date\relax
\global\let\and\relax
% Adjust header size for title page
\addtolength{\headheight}{\baselineskip}%
\ifx\IACR@CROSSMARKURL\@empty\addtolength{\headheight}{\baselineskip}\else%
\addtolength{\headheight}{2\baselineskip}\fi%
\addtolength{\headsep}{-\baselineskip}%
\afterpage{%
\global\advance\headheight by -\baselineskip%
\ifx\IACR@CROSSMARKURL\@empty\global\advance\headheight by -\baselineskip\else%
\global\advance\headheight by -2\baselineskip\fi
\global\advance\headsep by \baselineskip%
}%
}%
Expand Down Expand Up @@ -936,9 +953,10 @@
\small%
\publname{}\\
\ifx\IACR@EISSN\@empty\else{ISSN~\IACR@EISSN, }\fi%
Vol.~\IACR@vol, No.~\IACR@no, \IACR@lp\ pages.%
\ifx\IACR@DOI\@empty\else\hfill{}\href{https://doi.org/\IACR@DOI}{https://doi.org/\IACR@DOI}\fi%
}
Vol.~\IACR@vol, No.~\IACR@no, \IACR@lp\ pages.}
\ifx\IACR@DOI\@empty\else\fancyhead[R]{\small%
\begin{tabular}{r}\href{https://doi.org/\IACR@DOI}{https://doi.org/\IACR@DOI}\ifx\IACR@CROSSMARKURL\@empty\else\vspace{2px}\\%
\href{\IACR@CROSSMARKURL}{\crossmarkimage{.35}}\fi\end{tabular}}\fi%
}{}% final
\ifx\@IACR@License\@empty\else%
% If \license is provided show this for preprint and final (not for submission)
Expand All @@ -948,22 +966,22 @@
\doclicenseText%
\hfill{}%
\doclicenseImage[imagewidth=4em]\\[.1em]%
\if@IACR@Received Received: \IACR@Received \hfill{}\fi%
\if@IACR@Revised Revised: \IACR@Revised \hfill{}\fi%
\if@IACR@Accepted Accepted: \IACR@Accepted \hfill{}\fi%
\if@IACR@Published Published: \IACR@Published\fi%
\if@IACR@Received\else
\ifcsstring{@IACRversion}{final}{% Only show this information on the final version
\ifx\IACR@Received\@empty\else Received: \IACR@Received \hfill{}\fi%
\ifx\IACR@Accepted\@empty\else Accepted: \IACR@Accepted \hfill{}\fi%
\ifx\IACR@Published\@empty\else Published: \IACR@Published\fi%
}{%
\ifdefined\@IACR@docdate@defined%
\ifx\@IACR@docdate\@empty%
% an empty string was passed to indicate to
% *not* display any date
% an empty string was passed \documentdate to
% indicate to *not* display any date
\else
Date of this document: \@IACR@docdate.%
\fi% !if \@IACR@docdate = \@empty
\else%
Date of this document: \ymdtoday.%
\fi% !if \@IACR@docdate@defined is defined
\fi%
}%
}%
}% !if @IACRversion != submission
\fi% !\@IACR@License
Expand Down

0 comments on commit cb6c132

Please sign in to comment.