summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/huawei/huawei.cls
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/huawei/huawei.cls')
-rw-r--r--macros/latex/contrib/huawei/huawei.cls37
1 files changed, 22 insertions, 15 deletions
diff --git a/macros/latex/contrib/huawei/huawei.cls b/macros/latex/contrib/huawei/huawei.cls
index fa0ce1537c..87c562736c 100644
--- a/macros/latex/contrib/huawei/huawei.cls
+++ b/macros/latex/contrib/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
}