summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/huawei/DEPENDS.txt1
-rw-r--r--Master/texmf-dist/doc/latex/huawei/huawei.pdfbin332594 -> 332659 bytes
-rw-r--r--Master/texmf-dist/doc/latex/huawei/huawei.tex4
-rw-r--r--Master/texmf-dist/doc/latex/huawei/samples/huawei-cfp.tex4
-rw-r--r--Master/texmf-dist/doc/latex/huawei/samples/huawei-charter.tex6
-rw-r--r--Master/texmf-dist/tex/latex/huawei/huawei.cls182
6 files changed, 104 insertions, 93 deletions
diff --git a/Master/texmf-dist/doc/latex/huawei/DEPENDS.txt b/Master/texmf-dist/doc/latex/huawei/DEPENDS.txt
index bcf146a97f2..0b4ee96ab58 100644
--- a/Master/texmf-dist/doc/latex/huawei/DEPENDS.txt
+++ b/Master/texmf-dist/doc/latex/huawei/DEPENDS.txt
@@ -28,3 +28,4 @@ hard titling
hard svg
hard textpos
hard fancyhdr
+hard changepage
diff --git a/Master/texmf-dist/doc/latex/huawei/huawei.pdf b/Master/texmf-dist/doc/latex/huawei/huawei.pdf
index c46f5907b17..61d6c689316 100644
--- a/Master/texmf-dist/doc/latex/huawei/huawei.pdf
+++ b/Master/texmf-dist/doc/latex/huawei/huawei.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/huawei/huawei.tex b/Master/texmf-dist/doc/latex/huawei/huawei.tex
index 63e24594bca..ade62504a9f 100644
--- a/Master/texmf-dist/doc/latex/huawei/huawei.tex
+++ b/Master/texmf-dist/doc/latex/huawei/huawei.tex
@@ -29,9 +29,9 @@
\begin{document}
\maketitle
-\ff{Version: 0.11.0}
+\ff{Version: 0.12.0}
\newline
-\ff{Date: 2021/09/09}
+\ff{Date: 2021/09/13}
\section{Overview}
diff --git a/Master/texmf-dist/doc/latex/huawei/samples/huawei-cfp.tex b/Master/texmf-dist/doc/latex/huawei/samples/huawei-cfp.tex
index 733cec37519..cbc9a6deadd 100644
--- a/Master/texmf-dist/doc/latex/huawei/samples/huawei-cfp.tex
+++ b/Master/texmf-dist/doc/latex/huawei/samples/huawei-cfp.tex
@@ -27,6 +27,10 @@
\addbibresource{huawei-main.bib}
\begin{document}
+\begin{abstract}This is just a demo document, to show how
+this package works and formats simple business documents. This
+block of text is the abstract.\end{abstract}
+
\maketitle
In this document you don't see the logo, because we use \ff{nobrand}
diff --git a/Master/texmf-dist/doc/latex/huawei/samples/huawei-charter.tex b/Master/texmf-dist/doc/latex/huawei/samples/huawei-charter.tex
index e8083929208..cb948574dd3 100644
--- a/Master/texmf-dist/doc/latex/huawei/samples/huawei-charter.tex
+++ b/Master/texmf-dist/doc/latex/huawei/samples/huawei-charter.tex
@@ -21,9 +21,9 @@
% SOFTWARE.
\documentclass[landscape,nocover,XL]{../huawei}
-\renewcommand*\thetitle{Test Charter}
-\renewcommand*\thesubtitle{Technology Project Charter}
-\renewcommand*\theauthor{Yegor Bugayenko}
+% \renewcommand*\thetitle{Test Charter}
+% \renewcommand*\thesubtitle{Technology Project Charter}
+% \renewcommand*\theauthor{Yegor Bugayenko}
\begin{document}
\PrintFirstPage{}
diff --git a/Master/texmf-dist/tex/latex/huawei/huawei.cls b/Master/texmf-dist/tex/latex/huawei/huawei.cls
index 480e84e2b44..0e63e27b3c0 100644
--- a/Master/texmf-dist/tex/latex/huawei/huawei.cls
+++ b/Master/texmf-dist/tex/latex/huawei/huawei.cls
@@ -21,34 +21,36 @@
% SOFTWARE.
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{huawei}[2021/09/09 0.11.0 Template for Huawei Documents]
-
-\newif\ifnosecurity
-\DeclareOption{nosecurity}{\nosecuritytrue}
-\newif\ifauthordraft
-\DeclareOption{authordraft}{\authordrafttrue}
-\newif\ifnobrand
-\DeclareOption{nobrand}{\nobrandtrue}
-\newif\ifnodate
-\DeclareOption{nodate}{\nodatetrue}
-\newif\ifnocover
-\DeclareOption{nocover}{\nocovertrue}
-\newif\ifnopaging
-\DeclareOption{nopaging}{\nopagingtrue}
-\newif\iflandscape
-\DeclareOption{landscape}{\landscapetrue}
-\newif\ifanonymous
-\DeclareOption{anonymous}{\anonymoustrue}
-\ProcessOptions\relax
+\ProvidesClass{huawei}[2021/09/13 0.12.0 Template for Huawei Documents]
\LoadClass[12pt]{article}
+\makeatletter
+\newif\ifhuawei@nosecurity
+\DeclareOption{nosecurity}{\huawei@nosecuritytrue}
+\newif\ifhuawei@authordraft
+\DeclareOption{authordraft}{\huawei@authordrafttrue}
+\newif\ifhuawei@nobrand
+\DeclareOption{nobrand}{\huawei@nobrandtrue}
+\newif\ifhuawei@nodate
+\DeclareOption{nodate}{\huawei@nodatetrue}
+\newif\ifhuawei@nocover
+\DeclareOption{nocover}{\huawei@nocovertrue}
+\newif\ifhuawei@nopaging
+\DeclareOption{nopaging}{\huawei@nopagingtrue}
+\newif\ifhuawei@landscape
+\DeclareOption{landscape}{\huawei@landscapetrue}
+\newif\ifhuawei@anonymous
+\DeclareOption{anonymous}{\huawei@anonymoustrue}
+\ProcessOptions\relax
+\makeatother
+
\RequirePackage{geometry}
-\iflandscape
+\makeatletter\ifhuawei@landscape
\geometry{paperwidth=16in, paperheight=9in, left=4in, right=2in, top=1.5in, bottom=1.5in}
\else
\geometry{a4paper, left=1.5in, right=1in, top=1.2in, bottom=1.2in}
-\fi
+\fi\makeatother
\RequirePackage[T1]{fontenc}
\RequirePackage[utf8]{inputenc}
\RequirePackage{CJKutf8}
@@ -90,40 +92,19 @@
\RequirePackage[absolute]{textpos}
\TPGrid{16}{16}
-% Our custom commands to redefine:
-\renewcommand\title[1]{\renewcommand\thetitle{#1}}
-\newcommand\thetitle{Untitled}
-\newcommand*\thecompany{Huawei Technologies Co., Ltd.}
-\newcommand\thesubtitle{}
-\renewcommand\author[1]{\renewcommand\theauthor{#1}}
-\newcommand\theauthor{Unknown}
-\newcommand*\thesecurity{Confidential}
-\newcommand*\theid{}
-
-\newcommand\nospell[1]{#1}
-
-\newcommand\HuaweiHeader[1]{{%
+\makeatletter\newcommand\huawei@header[1]{{%
\setstretch{0.8}%
- \fontsize{11pt}{11pt}\selectfont%
+ \fontsize{11pt}{13pt}\selectfont%
\sffamily\color{gray}#1\par%
-}}
+}}\makeatother
-\AtBeginDocument{%
- \raggedbottom%
- \setlength\topskip{0mm}%
- \setlength\parindent{0pt}%
- \setlength\parskip{6pt}%
- \setlength\columnsep{32pt}%
- \def\arraystretch{1.5}%
-}
-
-\newcommand\LeftHuaweiBar{%
+\makeatletter\newcommand\huawei@bar{%
\begin{textblock}{1}[0,0](0,0)%
\tikz \node[fill=red,minimum width=\TPHorizModule,minimum height=16\TPVertModule] {};%
\end{textblock}%
-}
+}\makeatother
-\newcommand\PrintHuaweiLogo{
+\makeatletter\newcommand\huawei@logo{
\begin{tikzpicture}[y=0.80pt, x=0.80pt, yscale=-1, inner sep=0pt, outer sep=0pt]
\begin{scope}[even odd rule,line width=0.800pt]
\begin{scope}[shift={(0,-0.00024)}]
@@ -145,15 +126,15 @@
\end{scope}%
\end{scope}%
\end{tikzpicture}%
-}
+}\makeatother
\RequirePackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
\fancyhf{}
- \fancyfoot[L]{
- \LeftHuaweiBar{}
- \ifauthordraft%
+ \makeatletter\fancyfoot[L]{
+ \huawei@bar
+ \ifhuawei@authordraft%
\begin{textblock}{14}[0.5,0.5](8,8)%
\tikz \node[minimum width=14\TPHorizModule] {%
\fontsize{64}{64}\selectfont\sffamily\scshape\color{gray!20}\rotatebox{30}{it is a draft}
@@ -161,55 +142,60 @@
\end{textblock}%
\else\fi%
\ifnum\value{page}=1\else%
- \ifnobrand\else%
+ \ifhuawei@nobrand\else%
\begin{textblock}{8}[0,0](1.2,0.2)%
- \PrintHuaweiLogo{}%
+ \huawei@logo%
\end{textblock}%
\fi%
\fi%
\begin{textblock}{8}[1,0](15.8,0.2)%
- \raggedleft\HuaweiHeader{%
- \ifnosecurity\else%
+ \raggedleft\huawei@header{%
+ \ifhuawei@nosecurity\else%
\thesecurity
\fi%
}%
\end{textblock}%
\begin{textblock}{8}[0,1](1.2,15.8)%
\ifnum\value{page}=1\else%
- \HuaweiHeader{%
- \ifanonymous\else%
+ \huawei@header{%
+ \ifhuawei@anonymous\else%
\theauthor%
- \ifnosecurity\else%
+ \ifhuawei@nosecurity\else%
\ifx\theid\empty\else,\theid\fi
\fi%
- \ifnobrand\else%
+ \ifhuawei@nobrand\else%
\newline
\fi%
\fi%
- \ifnobrand\else%
+ \ifhuawei@nobrand\else%
\thecompany{}
\fi%
}%
\fi%
\end{textblock}%
\begin{textblock}{8}[1,1](15.8,15.8)%
- \raggedleft\HuaweiHeader{%
+ \raggedleft\huawei@header{%
\ifnum\value{page}=1\else%
- \ifnopaging\else%
+ \ifhuawei@nopaging\else%
Page \#\thepage{} of \pageref*{LastPage}%
- \ifnodate\else%
+ \ifhuawei@nodate\else%
\\
\fi%
\fi%
\fi%
- \ifnodate\else%
+ \ifhuawei@nodate\else%
\today{} \settimeformat{daytime}\currenttime{}%
\fi%
}%
\end{textblock}%
- }
+ }\makeatother
+
+\RequirePackage{changepage}
+\renewenvironment{abstract}
+ {\begin{adjustwidth}{0pt}{1in}{\scshape Abstract:}\newline\small}
+ {\end{adjustwidth}}
-\renewcommand\maketitle{%
+\makeatletter\renewcommand\maketitle{%
\vspace*{18pt}
{\bfseries{\Huge\thetitle}}
\ifx\thesubtitle\empty\else%
@@ -217,23 +203,23 @@
{\color{gray!50!black}\large\thesubtitle}
\fi
\\[18pt]
- \ifnobrand\else%
- \ifanonymous\else%
+ \ifhuawei@nobrand\else%
+ \ifhuawei@anonymous\else%
\ifx\thecompany\empty\else%
\thecompany\newline
\fi
\fi
\fi
\ifx\theauthor\empty\else%
- {\scshape\ifanonymous
+ {\scshape\ifhuawei@anonymous
Anonymous Authors
\else%
\theauthor
\fi}%
\fi%
- \ifanonymous\else%
+ \ifhuawei@anonymous\else%
\ifx\theauthor\empty\else
- \ifnobrand\else%
+ \ifhuawei@nobrand\else%
\ifx\theid\empty\else
$\;$/ {\theid}
\fi
@@ -241,7 +227,7 @@
\fi
\fi
\vspace{2em}
-}
+}\makeatother
\newcommand\PrintCrumb[2]{%
\begin{minipage}{\columnwidth}%
@@ -259,14 +245,14 @@
\vspace*{\fill}
}
-\newcommand\PrintDisclaimer{%
+\makeatletter\newcommand\PrintDisclaimer{%
\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%
+ \ifhuawei@nobrand%
the author%
\else%
\thecompany{}%
@@ -274,7 +260,7 @@
makes no representations and gives no warranties of whatever
nature in respect of these documents, including but not limited to the
accuracy or completeness of any information, facts and/or opinions contained therein.
- \ifnobrand%
+ \ifhuawei@nobrand%
The author%
\else%
\thecompany{}%
@@ -284,13 +270,13 @@
findings in these documents.
\par
\endgroup%
-}
+}\makeatother
-\newcommand\PrintFirstPage[1]{
- \iflandscape\else
+\makeatletter\newcommand\PrintFirstPage[1]{
+ \ifhuawei@landscape\else
\PackageError{huawei}{It's allowed to use PrintFirstPage only in landscape mode}{Read huawei.pdf for more information}
\fi
- \LeftHuaweiBar{}
+ \huawei@bar
\def\param{#1}%
\ifx\param\empty\else
\includegraphics[height=2in]{#1}
@@ -298,15 +284,15 @@
\fi
\vspace*{0.5in}
\maketitle
- \ifnocover\else
+ \ifhuawei@nocover\else
\begin{textblock}{14}[1,1](14,14)
\raggedleft\includegraphics[height=3.6in]{huawei-cover-picture.pdf}
\end{textblock}
\fi
-}
+}\makeatother
-\newcommand\PrintLastPage{
- \iflandscape\else
+\makeatletter\newcommand\PrintLastPage{
+ \ifhuawei@landscape\else
\PackageError{huawei}{It's allowed to use PrintLastPage only in landscape mode}{Read huawei.pdf for more information}
\fi
\newpage
@@ -341,7 +327,7 @@
from those expressed or implied in the predictive statements.
Therefore, such information is provided for reference purpose
only and constitutes neither an offer nor an acceptance.
- \ifnobrand%
+ \ifhuawei@nobrand%
The author%
\else%
\thecompany{}%
@@ -349,18 +335,38 @@
may change the information at any time without notice.
\end{minipage}
\end{center}%
-}
+}\makeatother
-\newcommand\PrintBibliography{
+\makeatletter\newcommand\PrintBibliography{
\setlength\bibitemsep{3pt}
\AtNextBibliography{\small}
\newpage
\raggedright
- \iflandscape
+ \ifhuawei@landscape
\begin{multicols}{3}\setstretch{0.95}\printbibliography\end{multicols}
\else
\begin{multicols}{2}\setstretch{0.95}\printbibliography\end{multicols}
\fi
+}\makeatother
+
+\AtBeginDocument{%
+ \raggedbottom%
+ \setlength\topskip{0mm}%
+ \setlength\parindent{0pt}%
+ \setlength\parskip{6pt}%
+ \setlength\columnsep{32pt}%
+ \def\arraystretch{1.5}%
}
+\renewcommand\title[1]{\renewcommand\thetitle{#1}}
+\newcommand\thetitle{\textbackslash{}thetitle}
+\newcommand*\thecompany{Huawei Technologies Co., Ltd.}
+\newcommand\thesubtitle{}
+\renewcommand\author[1]{\renewcommand\theauthor{#1}}
+\newcommand\theauthor{\textbackslash{}theauthor}
+\newcommand*\thesecurity{Confidential}
+\newcommand*\theid{}
+
+\ifcsname nospell\endcsname\else\newcommand\nospell[1]{#1}\fi
+
\endinput \ No newline at end of file