diff options
author | Karl Berry <karl@freefriends.org> | 2021-07-07 20:56:12 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-07-07 20:56:12 +0000 |
commit | 15bae662472b5fa928adc54d03c0003ae32f981d (patch) | |
tree | c33cbe23e6f3e25f4e0b852c3c0ef5bace4ebf79 /Master/texmf-dist/tex/latex/huawei | |
parent | de238e4185c051869eac5fa81c3b8d71f9e31188 (diff) |
huawei (7jul21)
git-svn-id: svn://tug.org/texlive/trunk@59866 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/huawei')
-rw-r--r-- | Master/texmf-dist/tex/latex/huawei/huawei.cls | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/Master/texmf-dist/tex/latex/huawei/huawei.cls b/Master/texmf-dist/tex/latex/huawei/huawei.cls index fa0ce1537cc..87c562736cd 100644 --- a/Master/texmf-dist/tex/latex/huawei/huawei.cls +++ b/Master/texmf-dist/tex/latex/huawei/huawei.cls @@ -21,7 +21,7 @@ % SOFTWARE. \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{huawei}[2021/07/05 0.7.2 Template for Huawei Documents] +\ProvidesClass{huawei}[2021/07/07 0.7.3 Template for Huawei Documents] \newif\ifnosecurity \DeclareOption{nosecurity}{\nosecuritytrue} @@ -66,20 +66,15 @@ \setlength{\footnotesep}{2pt} \RequirePackage{graphicx} \RequirePackage{array} +\RequirePackage[hidelinks]{hyperref} % to enable \pageref* command \RequirePackage[abspath]{currfile} \RequirePackage{enumitem} \setlist{nosep} \RequirePackage{microtype} \RequirePackage{wrapfig} \RequirePackage{lastpage} -\RequirePackage{xfp} % for \setrelativestretch \RequirePackage{setspace} \setstretch{1.08} - \newcommand{\setrelativestretch}[1]{% - \begingroup\edef\x{\endgroup% - \noexpand\setstretch{\fpeval{(#1)*(\baselinestretch)}}% - }\x% - } \RequirePackage[maxnames=1,minnames=1,natbib=true,citestyle=numeric,bibstyle=numeric,doi=false,url=false,isbn=false,isbn=false]{biblatex} \RequirePackage[table]{xcolor} \definecolor{huawei-red}{HTML}{CF0A2C} @@ -103,7 +98,7 @@ % Custom commands \newcommand\nospell[1]{#1} -\newcommand\headers[1]{\setrelativestretch{0.8}{\small\sffamily\color{gray}#1}} +\newcommand\headers[1]{\setstretch{0.8}{\small\sffamily\color{gray}#1\par}} \newcommand\tbd[1]{{\color{red}#1}} \newcommand\crumb[2]{\begin{minipage}{\columnwidth}\raggedright\textsc{#1}:\\#2\end{minipage}\vspace{4pt}} @@ -252,7 +247,10 @@ } \newcommand\PrintDisclaimer{% - \justify\vspace*{\fill}\setrelativestretch{0.55}{{\sffamily\scriptsize\color{gray!50!black}% + \justify\vspace*{\fill}% + \begingroup% + \setstretch{0.55}% + \sffamily\scriptsize\color{gray!50!black}% \textbf{Disclaimer}: The opinions expressed in this document are in good faith and while every care has been taken in preparing it, \ifnobrand% @@ -270,9 +268,15 @@ \fi, its subsidiaries, the directors, employees and agents cannot be held liable for the use of and reliance of the opinions, estimates, forecasts and - findings in these documents.}}} + findings in these documents. + \par + \endgroup% +} \newcommand\PrintFirstPage[1]{ + \iflandscape\else + \PackageError{huawei}{It's allowed to use PrintFirstPage only in landscape mode}{Read huawei.pdf for more information} + \fi \LeftHuaweiBar{} \def\param{#1}% \ifx\param\empty\else @@ -281,14 +285,17 @@ \fi \vspace*{0.5in} \maketitle - \iflandscape\ifnocover\else + \ifnocover\else \begin{textblock}{14}[1,1](14,14) \raggedleft\includegraphics[height=3.6in]{huawei-cover-picture.pdf} \end{textblock} - \fi\fi + \fi } \newcommand\PrintLastPage{ + \iflandscape\else + \PackageError{huawei}{It's allowed to use PrintLastPage only in landscape mode}{Read huawei.pdf for more information} + \fi \newpage \vspace*{1in} \begin{center} @@ -331,14 +338,14 @@ } \newcommand\PrintBibliography{ - \setlength\bibitemsep{0pt} + \setlength\bibitemsep{3pt} \AtNextBibliography{\small} \newpage \raggedright \iflandscape - \begin{multicols}{3}\setrelativestretch{1.0}{\printbibliography}\end{multicols} + \begin{multicols}{3}\setstretch{0.95}\printbibliography\end{multicols} \else - \begin{multicols}{2}\setrelativestretch{1.0}{\printbibliography}\end{multicols} + \begin{multicols}{2}\setstretch{0.95}\printbibliography\end{multicols} \fi } |