% \iffalse meta-comment
% SPDX-FileCopyrightText: Copyright (c) 2021-2026 Yegor Bugayenko
% SPDX-License-Identifier: MIT
% \fi

%%% \CheckSum{0}
%
% \CharacterTable
%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%   Digits        \0\1\2\3\4\5\6\7\8\9
%   Exclamation   \!     Double quote  \"     Hash (number) \#
%   Dollar        \$     Percent       \%     Ampersand     \&
%   Acute accent  \'     Left paren    \(     Right paren   \)
%   Asterisk      \*     Plus          \+     Comma         \,
%   Minus         \-     Point         \.     Solidus       \/
%   Colon         \:     Semicolon     \;     Less than     \<
%   Equals        \=     Greater than  \>     Question mark \?
%   Commercial at \@     Left bracket  \[     Backslash     \\
%   Right bracket \]     Circumflex    \^     Underscore    \_
%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%   Right brace   \}     Tilde         \~}

% \GetFileInfo{huawei.dtx}
% \DoNotIndex{\endgroup,\begingroup,\let,\else,\fi,\newcommand,\newenvironment}

% \iffalse
%<*driver>
\ProvidesFile{huawei.dtx}
%</driver>
%<class>\NeedsTeXFormat{LaTeX2e}
%<class>\ProvidesClass{huawei}
%<*class>
[2026-10-26 0.19.2 Template for Huawei Documents]
%</class>
%<*driver>
\documentclass{ltxdoc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{fail-fast}
\usepackage[utf8]{inputenc}
\usepackage{microtype}
  \AddToHook{env/verbatim/begin}{\microtypesetup{protrusion=false}}
\usepackage[dtx,margin=0,log,nocrop]{docshots}
\PassOptionsToPackage{hyperindex=false}{hyperref}
\usepackage{href-ul}
\usepackage{bookmark}
\renewcommand{\RerunFileCheck}[3]{\AddToHook{enddocument/info}{#2}}
\PageIndex
\EnableCrossrefs
\CodelineIndex
\RecordChanges
\begin{document}
	\DocInput{huawei.dtx}
	\PrintChanges
	\PrintIndex
\end{document}
%</driver>
% \fi

% \title{\LaTeX{} Class |huawei|\thanks{The sources are in GitHub at \href{https://github.com/yegor256/huawei.cls}{yegor256/huawei.cls}}}
% \author{Yegor Bugayenko \\ \texttt{yegor256@gmail.com}}
% \date{\filedate, \fileversion}
%
% \maketitle
%
% \section{Introduction}
%
% The class |huawei| facilitates the preparation of work
% documents and presentations, while keeping the source concise
% and the style sufficiently refined for both managerial and
% technical papers. The class is invoked by naming it
% in the preamble:
% \begin{docshot}[prerequisite=huawei-cover-picture.pdf]
% \documentclass{huawei}
% \begin{document}
% Hello, world!
% \end{document}
% \end{docshot}

% The use of |latexmk| is recommended for compiling |.tex| files into |.pdf|.
% The simplest configuration requires a small number of files alongside the
% |.tex| file, within the same directory (``story'' here serves as the
% project name):

%\iffalse
%<*verb>
%\fi
\begin{verbatim}
story\
  .latexmkrc
  .gitignore
  story.tex
\end{verbatim}
%\iffalse
%</verb>
%\fi

% The contents of the |.latexmkrc| file would be as follows:

%\iffalse
%<*verb>
%\fi
\begin{verbatim}
$pdflatex = 'pdflatex %O --shell-escape %S';
\end{verbatim}
%\iffalse
%</verb>
%\fi

% The |.gitignore| file should list every file produced by |pdflatex|
% during compilation. Such artefacts need not be committed to the
% repository, since they are temporary and are regenerated upon each
% compilation. To compile the document, the command |latexmk| suffices.

% \section{Class Options}

% A number of class options, supplied in square brackets after
% |\documentclass|, permit fine adjustment of the document's layout.
% An option that neither the class nor any loaded package recognizes
% stops the compilation with an error:

% \DescribeMacro{landscape}
% The |landscape| option sets the document in landscape orientation and
% adjusts the paper size to 16x9 inches (the default page size being
% \href{https://en.wikipedia.org/wiki/Paper_size}{A4}),
% rendering it well-suited to presentations.

% \DescribeMacro{dark}
% The |dark| option enables a dark layout, in which the page background is black and the text white.

% \DescribeMacro{slides}
% The |slides| option enlarges all headers somewhat, on the assumption that the document
% is in landscape orientation and is to be presented as a slide deck.

% \DescribeMacro{nocover}
% The |nocover| option, when present, suppresses the printing of cover images on the first page by
% the |\PrintTitlePage| command.

% \DescribeMacro{anonymous}
% The |anonymous| option removes the author's name from every location, including the foot
% of the page, where it would otherwise stand alongside the name of the
% company.

% \DescribeMacro{nobrand}
% The |nobrand| option suppresses any mention of the Huawei brand within
% the document and likewise removes the logo.

% \DescribeMacro{nosecurity}
% The |nosecurity| option suppresses the security classification ordinarily printed at the upper
% right corner of the document and likewise hides the author's ID where it would otherwise appear.

% \DescribeMacro{nodate}
% The |nodate| option suppresses the date and time at the foot of each page,
% where they are otherwise rendered in ISO~8601 format.

% \DescribeMacro{nopaging}
% The |nopaging| option suppresses the page numbers at the foot of each page.

% \DescribeMacro{authordraft}
% The |authordraft| option prints a large ``it is a draft'' message diagonally across each page.

% \DescribeMacro{breaks}
% The |breaks| option compels every |\section| to begin on a new page.

% \DescribeMacro{boring}
% The |boring| option sets the entire document in Helvetica, paints section
% titles in red, and draws a gray bar at the foot of each page, making the layout
% more compliant with the expectations of Huawei.

% \section{Preamble}

% Within the preamble, meta-information about the document may be supplied,
% such as the title or the author's name, in the following manner:
% \begin{docshot}[prerequisite=huawei-cover-picture.pdf]
% \documentclass{huawei}
% \renewcommand*
%   \thetitle{15\% Faster Algorithm}
% \renewcommand*
%   \thesubtitle{Technical Report}
% \renewcommand*
%   \theauthor{Yegor Bugayenko}
% \begin{document}
% \maketitle
% Hello, world!
% \end{document}
% \end{docshot}

% The use of |\renewcommand*| in lieu of
% |\renewcommand| is recommended, so that \LaTeX{} may detect
% any inadvertent newline that should slip into the content.

% The following meta commands are defined:

% \DescribeMacro{\thetitle}
% |\thetitle| is the principal title of the document, employed both
%   within the text and within the metadata of the PDF.

% \DescribeMacro{\thesubtitle}
% |\thesubtitle| is the subtitle, printed beneath the title.

% \DescribeMacro{\theauthor}
% |\theauthor| denotes the author of the document
%   in ``first-name last-name'' format.

% \DescribeMacro{\theid}
% |\theid| denotes the internal ID of the author, where applicable.

% \DescribeMacro{\thesecurity}
% This denotes the security classification of the document,
%   ordinarily printed at the upper right corner; typical values
%   include ``Internal,'' ``Confidential,'' or ``Secret.''

% The default values of |\thesubtitle| and |\theid| are empty; should they not
% be renewed within the document, nothing is printed in their place.
% The default value of |\thesecurity| is ``Confidential,'' while
% |\thetitle| and |\theauthor| print their own names as a reminder to renew them.

% \section{Custom Commands}

% The following commands are available within the body of the document:

% \DescribeMacro{\PrintFirstPage}
% The use of |\PrintFirstPage| is recommended for rendering the first
% page of a landscape document, for example a project charter.
% The sole argument denotes the name of an image to be rendered above
% the title. The argument may be left empty, whereupon no image is rendered there.
% A default image of agreeable appearance is rendered at the lower right corner,
% unless the |nocover| option is present:
% \begin{docshot}[prerequisite=huawei-cover-picture.pdf]
% \documentclass[landscape]{huawei}
% \renewcommand*
%   \thetitle{Perpetuum Mobile}
% \renewcommand*
%   \theauthor{Yegor Bugayenko}
% \begin{document}
% \PrintFirstPage{}
% \end{document}
% \end{docshot}

% \DescribeMacro{\PrintLastPage}
% |\PrintLastPage| prints the last page of a project charter or a similar landscape document:
% \begin{docshot}[prerequisite=huawei-cover-picture.pdf]
% \documentclass[landscape]{huawei}
% \begin{document}
% \PrintLastPage{}
% \end{document}
% \end{docshot}

% \DescribeMacro{\PrintThankYouPage}
% |\PrintThankYouPage| prints the final page with a ``Thank You'' message in the centre.
% \begin{docshot}[prerequisite=huawei-cover-picture.pdf]
% \documentclass[landscape,dark]{huawei}
% \begin{document}
% \PrintThankYouPage{}
% \end{document}
% \end{docshot}

% \DescribeMacro{\PrintDisclaimer}
% |\PrintDisclaimer| prints a paragraph at the bottom of the page with a standard disclaimer:
% \begin{docshot}[prerequisite=huawei-cover-picture.pdf]
% \documentclass{huawei}
% \begin{document}
% \section{Introduction}
% Hello, world!
% \subsection{More Details}
% Hello again!
% \PrintDisclaimer
% \end{document}
% \end{docshot}

% \section{Best Practices}

% Authors are at liberty to design their documents as they see fit. Nevertheless,
% adherence to the conventions established for business and technical documents
% is convenient both for the author and for the reader.

% The rule of thumb is simple: \emph{abstain} from formatting the document.
% The class itself should be entrusted with this task. Content should merely
% be entered, without alteration of layout, addition of colours, modification of
% fonts, and the like. The less the look-and-feel is tampered with, the more
% favourably the document will be received by its readers.

% \subsection{Two Columns}

% Within landscape format, the use of two columns is recommended in the
% interest of readability. The following illustrates this:
% \begin{docshot}[prerequisite=huawei-cover-picture.pdf]
% \documentclass[landscape]{huawei}
% \begin{document}
% \newpage
% \begin{multicols}{2}
% \section*{First}
% The first column content goes here.
% \columnbreak
% \section*{Second}
% The second column content goes here.
% \end{multicols}
% \end{document}
% \end{docshot}

% \subsection{Crumbs}

% Whenever a multitude of small pieces of information must be accommodated
% on a single page, the use of ``crumbs'' is recommended:
% \begin{docshot}[prerequisite=huawei-cover-picture.pdf]
% \documentclass{huawei}
% \begin{document}
% \newpage
% \section*{Project Details}
% \begin{multicols}{2}
% \raggedright
% \PrintCrumb{Budget}{\$100K}
% \PrintCrumb{Duration}{5 months}
% \end{multicols}
% \end{document}
% \end{docshot}

% \StopEventually{}

% \section{Implementation}

% \changes{v0.1.0}{2021/04/18}{The first draft version.}
% \changes{v0.3.0}{2021/05/24}{The cover picture added for front pages.}
% \changes{v0.4.0}{2021/05/26}{The current time is rendered without seconds.}
% \changes{v0.5.0}{2021/05/26}{The \texttt{DEPENDS.txt} file added.}
% \changes{v0.6.0}{2021/06/14}{The \texttt{ffcode} and \texttt{href-ul} packages created and their code removed from this class.}
% \changes{v0.7.0}{2021/06/27}{The \texttt{authordraft} option is now supported.}
% \changes{v0.10.0}{2021/09/08}{Some colors redefined.}
% \changes{v0.11.0}{2021/09/09}{The fixed-width font is rendered correctly now, without \texttt{ffcode}.}
% \changes{v0.12.0}{2021/09/13}{The \texttt{abstract} is now formatted correctly.}
% \changes{v0.14.0}{2022/10/05}{The \texttt{l3build} is now used for build automation, instead of \texttt{Makefile}.}

% First, we load the parent class:
%    \begin{macrocode}
\LoadClass[12pt]{article}
%    \end{macrocode}

% Then, we parse class options:
% \changes{v0.15.0}{2022/12/13}{A new package option \texttt{breaks} introduced, which forces all sections to start from a new page.}
% \changes{v0.18.0}{2023/08/09}{Now we use \texttt{pgfopts} for parsing class options.}
% \changes{v0.19.0}{2024/10/25}{New option \texttt{boring} added, making the layout of the document more compliant with the expectations of Huawei.}
%    \begin{macrocode}
\RequirePackage{pgfopts}
\pgfkeys{
  /huawei/.cd,
  boring/.store in=\huawei@boring,
  breaks/.store in=\huawei@breaks,
  dark/.store in=\huawei@dark,
  slides/.store in=\huawei@slides,
  nosecurity/.store in=\huawei@nosecurity,
  authordraft/.store in=\huawei@authordraft,
  nobrand/.store in=\huawei@nobrand,
  nodate/.store in=\huawei@nodate,
  nocover/.store in=\huawei@nocover,
  nopaging/.store in=\huawei@nopaging,
  landscape/.store in=\huawei@landscape,
  anonymous/.store in=\huawei@anonymous,
}
\ProcessPgfPackageOptions{/huawei}
%    \end{macrocode}

% Then, we fail if any class option remains unused by both the class and the packages
% when the document begins, since it is most probably misspelled:
%    \begin{macrocode}
\AddToHook{begindocument/before}{%
  \ifx\@unusedoptionlist\@empty\else%
    \ClassError{huawei}{Unknown class option(s): \@unusedoptionlist}%
      {Check the spelling of the options given to \string\documentclass}%
  \fi%
}
%    \end{macrocode}

% Then, we set Helvetica as the default font for the entire document, if the |boring| document option is used:
%    \begin{macrocode}
\ifdefined\huawei@boring
  \RequirePackage[scaled]{helvet}
  \renewcommand\familydefault{\sfdefault}
\fi
%    \end{macrocode}

% Then, we redefine |\section| command in order to break pages for each section, with the help of |titlesec| package:
%    \begin{macrocode}
\RequirePackage{titlesec}
\ifdefined\huawei@boring
  \def\huawei@sectioncolor{red}
\else
  \def\huawei@sectioncolor{black}
\fi
\makeatletter
\titleformat
  {\section}
  {\color{\huawei@sectioncolor}\ifdefined\huawei@breaks\clearpage\fi\normalfont\Large\bfseries}
  {\color{\huawei@sectioncolor}\thesection}{1em}{}
\makeatother
%    \end{macrocode}

% Then, we set the size of the page:
%    \begin{macrocode}
\RequirePackage{geometry}
\makeatletter\ifdefined\huawei@landscape
  \ifdefined\huawei@boring
    \geometry{paperwidth=16in, paperheight=9in,
      left=3in, right=2.5in, top=1in, bottom=1.8in}
  \else
    \geometry{paperwidth=16in, paperheight=9in,
      left=4in, right=2in, top=1.5in, bottom=1.5in}
  \fi
\else
  \geometry{a4paper, left=1.5in, right=1in,
    top=1.2in, bottom=1.2in}
\fi\makeatother
%    \end{macrocode}

% Then, we set the size of the font:
%    \begin{macrocode}
\makeatletter\ifdefined\huawei@slides
  \RequirePackage[fontsize=24pt]{fontsize}
\fi\makeatother
%    \end{macrocode}

% Then, we configure the encodings:
%    \begin{macrocode}
\PassOptionsToPackage{T1}{fontenc}
\RequirePackage{fontenc}
\PassOptionsToPackage{utf8}{inputenc}
\RequirePackage{inputenc}
%    \end{macrocode}

% Then, we include a few important packages:
%    \begin{macrocode}
\RequirePackage{tabularx}
\RequirePackage{anyfontsize}
\RequirePackage{multicol}
\RequirePackage{ragged2e}
\RequirePackage{paralist}
\RequirePackage{makecell}
\RequirePackage{graphicx}
\RequirePackage{array}
\PassOptionsToPackage{abspath}{currfile}
\RequirePackage{currfile}
\RequirePackage{wrapfig}
\RequirePackage{tikz}
\RequirePackage{titling}
\RequirePackage{svg}
%    \end{macrocode}

% Then, we include |lastpage| package to enable total counting of pages:
%    \begin{macrocode}
\RequirePackage{lastpage}
%    \end{macrocode}

% Then, we configure |microtype|:
%    \begin{macrocode}
\RequirePackage{microtype}
\AddToHook{env/verbatim/begin}{\microtypesetup{protrusion=false}}
%    \end{macrocode}

% Then, we configure |footmisc|:
%    \begin{macrocode}
\PassOptionsToPackage{para}{footmisc}
\RequirePackage{footmisc}
\setlength{\footnotemargin}{2pt}
\setlength{\footnotesep}{2pt}
%    \end{macrocode}

% Then, we configure |enumitem|:
%    \begin{macrocode}
\PassOptionsToPackage{inline}{enumitem}
\RequirePackage{enumitem}
\setlist{nosep}
%    \end{macrocode}

% Then, we configure |textpos|:
%    \begin{macrocode}
\PassOptionsToPackage{absolute}{textpos}
\RequirePackage{textpos}
\TPGrid{16}{16}
%    \end{macrocode}

% Then, we configure |datetime|:
%    \begin{macrocode}
\PassOptionsToPackage{mmddyyyy,iso}{datetime}
\RequirePackage{datetime}
\newtimeformat{daytime}{\twodigit{\THEHOUR}:\twodigit{\THEMINUTE}}
%    \end{macrocode}

% Then, to enable |\pageref*| command, we configure |hyperref|:
%    \begin{macrocode}
\PassOptionsToPackage{hidelinks}{hyperref}
\RequirePackage{hyperref}
%    \end{macrocode}

% Then, we pass the title and the author to the metadata of the PDF,
% leaving the author out if the |anonymous| class option is used:
%    \begin{macrocode}
\makeatletter\AtBeginDocument{%
  \hypersetup{%
    pdftitle={\thetitle},%
    pdfauthor={\ifdefined\huawei@anonymous\else\theauthor\fi}%
  }%
}\makeatother
%    \end{macrocode}

% Then, we configure |biblatex|:
% \changes{v0.16.0}{2023/05/20}{The \texttt{doi} tag enabled for \texttt{biblatex}.}
%    \begin{macrocode}
\PassOptionsToPackage{maxnames=1,minnames=1,natbib=true,
  citestyle=numeric,bibstyle=numeric,
  url=false,isbn=false}{biblatex}
\RequirePackage{biblatex}
%    \end{macrocode}

% Then, we make figure captions smaller and in |sf| font:
% \changes{v0.17.0}{2023/08/08}{Smaller and sans-serif font for captions of figures.}
%    \begin{macrocode}
\PassOptionsToPackage{font={small,sf}}{caption}
\RequirePackage{caption}
%    \end{macrocode}

% Then, we make all figures and tables bordered by default, with the help of the |float| package:
% \changes{v0.17.0}{2023/08/08}{All figures and tables are bordered by default.}
%    \begin{macrocode}
\RequirePackage{float}
\floatstyle{boxed}
\restylefloat{table}
\restylefloat{figure}
%    \end{macrocode}

% Then, we make sure all figures and tables are centered by default, as recommended
% \href{https://tex.stackexchange.com/questions/2651/}{here}:
% \changes{v0.17.0}{2023/08/08}{All figures and tables are centered by default.}
%    \begin{macrocode}
\makeatletter
\g@addto@macro\@floatboxreset\centering
\makeatother
%    \end{macrocode}

% Then, we set spacing between lines:
%    \begin{macrocode}
\RequirePackage{setspace}
\setstretch{1.08}
%    \end{macrocode}

% Then, we define branded colors:
%    \begin{macrocode}
\PassOptionsToPackage{table}{xcolor}
\RequirePackage{xcolor}
\makeatletter
\ifdefined\huawei@boring
  \definecolor{red}{HTML}{8C1A11}
  \definecolor{black}{HTML}{000000}
  \definecolor{gray}{HTML}{878C8F}
  \definecolor{lightgray}{HTML}{DCDDDF}
  \definecolor{yellow}{HTML}{F6C342}
  \definecolor{blue}{HTML}{2B62BA}
  \definecolor{green}{HTML}{499167}
  \definecolor{orange}{HTML}{F7CEA1}
\else
  \definecolor{red}{HTML}{CF0A2C}
  \definecolor{black}{HTML}{232527}
  \definecolor{gray}{HTML}{878C8F}
  \definecolor{lightgray}{HTML}{DCDDDF}
  \definecolor{yellow}{HTML}{F2DC5D}
  \definecolor{blue}{HTML}{2274A5}
  \definecolor{green}{HTML}{499167}
  \definecolor{orange}{HTML}{F06543}
\fi
\makeatother
%    \end{macrocode}

% \begin{macro}{\huawei@header}
% Then, we define |\huawei@header|:
%    \begin{macrocode}
\makeatletter\newcommand\huawei@header[1]{{%
  \ifdefined\huawei@slides%
    \setstretch{0.8}%
    \fontsize{19pt}{24pt}\selectfont%
  \else%
    \setstretch{0.8}%
    \fontsize{11pt}{13pt}\selectfont%
  \fi%
  \sffamily\color{gray}#1\par%
}}\makeatother
%    \end{macrocode}
% \end{macro}

% Then, we define the colors of the ink and of the page, which swap in the |dark| mode:
%    \begin{macrocode}
\def\huawei@black{\ifdefined\huawei@dark white\else black\fi}
\def\huawei@blank{\ifdefined\huawei@dark black\else white\fi}
%    \end{macrocode}

% \begin{macro}{\huawei@bar}
% Then, we define |\huawei@bar|:
%    \begin{macrocode}
\makeatletter\newcommand\huawei@bar{%
  \ifdefined\huawei@boring%
    \begin{textblock}{16}[0,1](0,16)%
      \tikz \node[fill=lightgray,minimum width=16\TPHorizModule,
        minimum height=1.5\TPVertModule] {};%
    \end{textblock}%
    \ifdefined\huawei@nobrand\else%
      \begin{textblock}{8}[1,0.5](15,15.25)%
        \raggedleft\huawei@logo{1.4}
      \end{textblock}%
    \fi%
    \ifdefined\huawei@nobrand\else%
      \begin{textblock}{8}[0,0.5](1,15.25)%
        \fontsize{16}{16}\selectfont%
        \textcolor{gray}{\thecompany{}}%
      \end{textblock}%
    \fi%
    \ifdefined\huawei@nosecurity\else%
      \begin{textblock}{8}[0.5,0.5](7,15.25)%
        \fontsize{16}{16}\selectfont%
        \centering\textcolor{gray}{\thesecurity}%
      \end{textblock}%
    \fi%
    \ifdefined\huawei@nopaging\else%
      \begin{textblock}{8}[1,0.5](12,15.25)%
        \raggedleft\fontsize{16}{16}\selectfont%
        \textcolor{gray}{Page \#\thepage{} of \pageref*{LastPage}}%
      \end{textblock}%
    \fi%
    \begin{textblock}{2}[1,0.5](14,15.25)%
      \tikz \path[scale=0.3, draw=none, rotate=40, fill=\huawei@blank] (0,0) .. controls (3,1) .. (16,0) -- (16,3) .. controls (8, 2) .. (0, 3) -- (0,0);
    \end{textblock}%
  \else%
    \begin{textblock}{1}[0,0](0,0)%
      \tikz \node[fill=red,minimum width=\TPHorizModule,
        minimum height=16\TPVertModule] {};%
    \end{textblock}%
  \fi%
}\makeatother
%    \end{macrocode}
% \end{macro}

% \begin{macro}{\huawei@logo}
% Then, we define |\huawei@logo|:
%    \begin{macrocode}
\makeatletter\newcommand\huawei@logo[1]{
\definecolor{logo-red}{HTML}{CF0A2C}
\begin{tikzpicture}[y=0.80pt, x=0.80pt, yscale=-#1,
xscale=#1, inner sep=0pt, outer sep=0pt]
\begin{scope}[even odd rule,line width=0.800pt]
\begin{scope}[shift={(0,-0.00024)}]
\path[fill=\huawei@black] (10.9375,30.2240) -- (10.9375,33.6097)
.. controls (10.9375,34.5713) and (10.4603,35.0845) ..
   (9.5932,35.0845) .. controls (8.7212,35.0845) and
   (8.2411,34.5565)
.. (8.2411,33.5686) -- (8.2411,30.2278) -- (7.0415,30.2278)
-- (7.0415,33.6097) .. controls (7.0415,35.2737) and
   (7.9658,36.2272) .. (9.5774,36.2272) .. controls
   (11.2041,36.2272) and (12.1371,35.2554) .. (12.1371,33.5609) --
   (12.1371,30.2240)
-- (10.9375,30.2240) -- cycle;
\path[fill=\huawei@black] (15.3511,30.2240) -- (12.7456,36.1351) --
 (13.9702,36.1351) -- (14.4731,34.9903) -- (14.5091,34.9045) --
 (17.2158,34.9045) -- (17.7467,36.1351) -- (19.0045,36.1351) --
 (16.4233,30.2590) -- (16.4001,30.2240) -- cycle;
\path[fill=\huawei@black] (22.4840,30.2240) -- (21.1414,34.2912) --
 (19.8344,30.2271) -- (18.5578,30.2271) -- (20.6186,36.1388) --
 (21.6120,36.1388) -- (22.9573,32.2553) -- (24.3016,36.1388) --
 (25.3034,36.1388) -- (27.3592,30.2271) -- (26.1152,30.2271) --
 (24.8055,34.2912) -- (23.4626,30.2240) -- cycle;
\path[fill=\huawei@black] (34.2236,30.2240) -- (34.2236,36.1300) --
 (35.4074,36.1300) -- (35.4074,30.2240) -- cycle;
\path[fill=\huawei@black] (0.2686,30.2244) -- (0.2686,36.1384) --
 (1.4686,36.1384) -- (1.4686,33.7365) -- (4.1780,33.7365) --
 (4.1780,36.1384) -- (5.3783,36.1384) -- (5.3783,30.2244) --
 (4.1780,30.2244) -- (4.1780,32.6102) -- (1.4686,32.6102) --
 (1.4686,30.2244) -- cycle;
\path[fill=\huawei@black] (28.3267,30.2284) -- (28.3267,36.1344) --
 (32.7928,36.1344) -- (32.7928,35.0575) -- (29.5105,35.0575) --
 (29.5105,33.5931) -- (31.6931,33.5931) -- (31.6931,32.5160) --
 (29.5105,32.5160) -- (29.5105,31.3052) -- (32.6785,31.3052) --
 (32.6785,30.2284) -- cycle;
\path[fill=\huawei@blank] (15.8594,31.7207) -- (16.7149,33.7008) --
 (16.7119,33.7008) -- (16.7701,33.8374) -- (14.9552,33.8374) --
 (15.0127,33.7008) -- (15.0117,33.7008) -- cycle;
\path[fill=logo-red] (15.2113,0.0001) .. controls (14.7353,0.0422) and
 (13.4491,0.3349) .. (13.4491,0.3349) -- (13.4486,0.3349) .. controls
 (10.5495,1.0843) and (9.8643,3.7151) .. (9.8643,3.7151) .. controls
 (9.7227,4.1575) and (9.6584,4.6109) .. (9.6395,5.0380) --
 (9.6395,5.6194) .. controls (9.6780,6.5176) and (9.8777,7.1883) ..
 (9.8777,7.1883) .. controls (10.8461,11.4823) and
 (15.6075,18.5379) ..(16.6308,20.0200) .. controls
 (16.7034,20.0920) and(16.7615,20.0660) ..
 (16.7615,20.0660) .. controls(16.8720,20.0355) and
 (16.8633,19.9296) .. (16.8633,19.9296) --
 (16.8654,19.9301) .. controls (18.4416,4.1760) and
 (15.2113,0.0001) .. (15.2113,0.0001) -- (15.2113,0.0001) -- cycle;
\path[fill=logo-red] (20.4192,0.0000) .. controls (20.4192,0.0000) and
 (17.1748,4.1782) .. (18.7521,19.9415) --
 (18.7542,19.9415) .. controls (18.7664,20.0416) and
 (18.8374,20.0624) ..(18.8374,20.0624) .. controls
 (18.9430,20.1033) and(18.9971,20.0019) .. (18.9971,20.0019) --
 (18.9976,20.0029) .. controls (20.0472,18.4829) and
 (24.7814,11.4657) ..(25.7455,7.1882) .. controls(25.7455,7.1882) and
 (26.2683,5.1179) .. (25.7636,3.7150) .. controls
 (25.7636,3.7150) and (25.0470,1.0434) ..(22.1442,0.3375) .. controls
 (22.1442,0.3375) and (21.3077,0.1251) .. (20.4193,0.0000) --
 (20.4192,0.0000) -- cycle;
\path[fill=logo-red] (5.4542,4.7294) .. controls (5.4542,4.7294) and
 (2.6920,7.3513) .. (2.5547,10.1307) -- (2.5558,10.1307) --
 (2.5558,10.5519) .. controls (2.5579,10.5836) and
 (2.5595,10.6157) .. (2.5615,10.6480) .. controls
 (2.6804,12.8893) and (4.3665,14.2157) ..
 (4.3665,14.2157) .. controls (7.0831,16.8634) and
 (13.6611,20.2062) .. (15.1896,20.9647) .. controls
 (15.2110,20.9727) and (15.2900,20.9985) ..
 (15.3364,20.9399) .. controls (15.3364,20.9399) and
 (15.3605,20.9216) .. (15.3715,20.8887) --
 (15.3715,20.8189) .. controls (15.3704,20.8149) and
 (15.3683,20.8109) .. (15.3663,20.8065) --
 (15.3669,20.8065) .. controls (11.1809,11.6620) and
 (5.4543,4.7294) .. (5.4543,4.7294) -- (5.4542,4.7294) -- cycle;
\path[fill=logo-red] (30.1695,4.7294) .. controls (30.1695,4.7294) and
 (24.4602,11.6403) .. (20.2761,20.7662) --
 (20.2777,20.7657) .. controls (20.2777,20.7657) and
 (20.2283,20.8715) .. (20.3082,20.9399) .. controls
 (20.3082,20.9399) and (20.3320,20.9579) .. (20.3650,20.9652) --
 (20.4229,20.9652) .. controls (20.4333,20.9622) and
 (20.4444,20.9582) .. (20.4554,20.9507) --
 (20.4554,20.9517) .. controls (22.0255,20.1724) and
 (28.5525,16.8516) .. (31.2563,14.2162) .. controls
 (31.2563,14.2162) and (32.9686,12.8412) ..
 (33.0583,10.6334) .. controls (33.2560,7.5672) and
 (30.1696,4.7294) .. (30.1696,4.7294) -- (30.1695,4.7294) -- cycle;
\path[fill=logo-red] (35.3082,13.8080) .. controls (35.3082,13.8080) and
 (26.0003,18.8031) .. (21.1876,22.0494) -- (21.1882,22.0499) --
 (21.1893,22.0509) .. controls (21.1893,22.0509) and
 (21.1019,22.1081) .. (21.1324,22.2106) .. controls
 (21.1324,22.2106) and (21.1781,22.2933) .. (21.2446,22.2933) --
 (21.2446,22.2938) .. controls (22.9684,22.2968) and
 (29.4914,22.3041) .. (29.6549,22.2736) .. controls
 (29.6549,22.2736) and (30.4983,22.2399) ..
 (31.5406,21.8395) .. controls (31.5406,21.8395) and
 (33.8608,21.1019) .. (35.0659,18.4677) .. controls
 (35.0659,18.4677) and (35.6166,17.3662) .. (35.6246,15.8187) --
 (35.6246,15.7531) .. controls (35.6206,15.1563) and
 (35.5365,14.4957) .. (35.3083,13.8080) --
 (35.3082,13.8080) -- cycle;
\path[fill=logo-red] (0.3129,13.8313) .. controls (-0.5339,16.4531) and
 (0.6062,18.5656) .. (0.6080,18.5690) .. controls
 (1.7962,21.0795) and (4.0641,21.8401) ..
 (4.0641,21.8401) .. controls (5.1112,22.2703) and
 (6.1586,22.3000) .. (6.1586,22.3000) .. controls
 (6.3221,22.3300) and (12.6713,22.3030) ..
 (14.3725,22.2950) .. controls (14.4445,22.2945) and
 (14.4842,22.2221) .. (14.4842,22.2221) .. controls
 (14.4892,22.2142) and (14.4936,22.2062) .. (14.4955,22.1989) --
 (14.4955,22.1333) .. controls (14.4814,22.0893) and
 (14.4439,22.0584) .. (14.4439,22.0584) --
 (14.4450,22.0578) .. controls (9.6347,18.8126) and
 (0.3130,13.8315) .. (0.3130,13.8315) -- (0.3129,13.8313) -- cycle;
\path[fill=logo-red] (14.1782,23.1010) -- (3.2285,23.4850) .. controls
 (4.4160,25.6018) and (6.4158,27.2469) ..
 (8.4990,26.7416) .. controls (9.9366,26.3822) and
 (13.1935,24.1105) .. (14.2687,23.3429) --
 (14.2651,23.3399) .. controls (14.3487,23.2648) and
 (14.3188,23.2045) .. (14.3188,23.2045) .. controls
 (14.2913,23.1062) and (14.1783,23.1063) .. (14.1783,23.1063) --
 (14.1782,23.1010) -- cycle;
\path[fill=logo-red] (21.4305,23.1090) -- (21.4294,23.1130) .. controls
 (21.4294,23.1130) and (21.3333,23.1252) ..
 (21.3064,23.1972) .. controls (21.3064,23.1972) and
 (21.2831,23.2956) .. (21.3478,23.3445) --
 (21.3467,23.3455) .. controls (22.3950,24.0973) and
 (25.5729,26.3191) .. (27.1039,26.7505) .. controls
 (27.1039,26.7505) and (27.3359,26.8294) .. (27.7246,26.8435) --
 (27.9581,26.8435) .. controls (28.9839,26.8075) and
 (30.7708,26.2805) .. (32.3946,23.4907) --
 (21.4305,23.1090) -- cycle;
\end{scope}%
\end{scope}%
\end{tikzpicture}%
}\makeatother
%    \end{macrocode}
% \end{macro}

% Then, we configure headers using |fancyhdr|:
%    \begin{macrocode}
\RequirePackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
\fancyhf{}
\makeatletter\fancyfoot[L]{
  \huawei@bar
  \ifdefined\huawei@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}%
      };%
    \end{textblock}%
  \else\fi%
}\makeatother
\makeatletter\fancyhead[L]{
  \ifnum\value{page}=1\else%
    \ifdefined\huawei@nobrand\else%
      \ifdefined\huawei@boring\else%
        \begin{textblock}{8}[0,0](1.2,0.2)%
          \huawei@logo{\ifdefined\huawei@slides 1.8\else 1\fi}%
        \end{textblock}%
      \fi
    \fi%
  \fi%
}\makeatother
\makeatletter\fancyhead[R]{
  \ifdefined\huawei@boring\else%
    \begin{textblock}{8}[1,0](15.8,0.2)%
      \raggedleft\huawei@header{%
        \ifdefined\huawei@nosecurity\else%
          \thesecurity%
        \fi%
      }%
    \end{textblock}%
  \fi%
}\makeatother
\makeatletter\fancyfoot[R]{
  \ifdefined\huawei@boring\else%
    \begin{textblock}{8}[0,1](1.2,15.8)%
      \ifnum\value{page}=1\else%
        \huawei@header{\raggedright%
          \ifdefined\huawei@anonymous\else%
            \theauthor%
            \ifdefined\huawei@nosecurity\else%
              \ifx\theid\empty\else, \theid\fi%
            \fi%
            \ifdefined\huawei@nobrand\else%
              \newline
            \fi%
          \fi%
          \ifdefined\huawei@nobrand\else%
            \thecompany{}%
          \fi%
        }%
      \fi%
    \end{textblock}%
    \begin{textblock}{8}[1,1](15.8,15.8)%
      \raggedleft\huawei@header{%
        \ifnum\value{page}=1\else%
          \ifdefined\huawei@nopaging\else%
            Page \#\thepage{} of \pageref*{LastPage}%
            \ifdefined\huawei@nodate\else%
              \\
            \fi%
          \fi%
        \fi%
        \ifdefined\huawei@nodate\else%
          \today{} \settimeformat{daytime}\currenttime{}%
        \fi%
      }%
    \end{textblock}%
  \fi%
}\makeatother
%    \end{macrocode}

% \begin{macro}{abstract}
% Then, we redefine |abstract| environment:
%    \begin{macrocode}
\RequirePackage{changepage}
\renewenvironment{abstract}
  {\begin{adjustwidth}{0pt}{1in}{\scshape Abstract:}\newline\small}
  {\end{adjustwidth}}
%    \end{macrocode}
% \end{macro}

% \begin{macro}{\maketitle}
% Then, we redefine |\maketitle|:
%    \begin{macrocode}
\makeatletter\renewcommand\maketitle{%
  \vspace*{18pt}%
  {%
    \bfseries{\begin{spacing}{.9}\Huge\raggedright%
    \ifdefined\huawei@boring%
      \color{red}%
    \fi%
    \thetitle\par\end{spacing}}%
  }%
  \ifx\thesubtitle\empty\else%
    {\color{gray!50!black}\large\raggedright\thesubtitle\par}%
  \fi%
  \ifdefined\huawei@nobrand\else%
    \ifdefined\huawei@anonymous\else%
      \ifx\thecompany\empty\else%
        \thecompany\par%
      \fi%
    \fi%
  \fi%
  \parbox{.6\textwidth}{\raggedright%
    \ifx\theauthor\empty\else%
      {\scshape\ifdefined\huawei@anonymous%
        Anonymous Authors%
      \else%
        \theauthor%
      \fi}%
    \fi%
    \ifdefined\huawei@anonymous\else%
      \ifx\theauthor\empty\else%
        \ifdefined\huawei@nosecurity\else%
          \ifx\theid\empty\else%
            $\;$/ {\theid}%
          \fi%
        \fi%
      \fi%
    \fi%
    \par%
  }%
  \vspace{2em}%
}\makeatother
%    \end{macrocode}
% \end{macro}

% \begin{macro}{\PrintCrumb}
% Then, we define |\PrintCrumb|:
%    \begin{macrocode}
\newcommand\PrintCrumb[2]{%
  \begin{minipage}{\columnwidth}%
    \raggedright\textsc{#1}:\\#2%
  \end{minipage}\vspace{1em}%
}
%    \end{macrocode}
% \end{macro}

% \begin{macro}{\PrintThankYouPage}
% Then, we define |\PrintThankYouPage|:
%    \begin{macrocode}
\newcommand\PrintThankYouPage{
  \newpage
  \vspace*{\fill}
  \begin{center}
    \normalsize
    {\Huge\color{red}\textbf{Thank you!}}
  \end{center}
  \vspace*{\fill}
}
%    \end{macrocode}
% \end{macro}

% \begin{macro}{\PrintDisclaimer}
% Then, we define |\PrintDisclaimer|:
%    \begin{macrocode}
\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,
  \ifdefined\huawei@nobrand%
    the author%
  \else%
    \thecompany{}%
  \fi{}
  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.
  \ifdefined\huawei@nobrand%
    The author%
  \else%
    \thecompany{}%
  \fi,
  its subsidiaries, the directors, employees and agents
  cannot be held liable for the use of and reliance on
  the opinions, estimates, forecasts and findings in
  these documents.
  \par%
  \endgroup%
}\makeatother
%    \end{macrocode}
% \end{macro}

% \begin{macro}{\PrintFirstPage}
% Then, we define |\PrintFirstPage|:
%    \begin{macrocode}
\makeatletter\newcommand\PrintFirstPage[1]{%
  \ifdefined\huawei@landscape\else%
    \ClassError{huawei}{It's allowed to use
    PrintFirstPage only in landscape mode}{Read huawei.pdf
    for more information}
  \fi%
  \huawei@bar%
  \def\huawei@param{#1}%
  \ifx\huawei@param\empty\else%
    \includegraphics[height=2in]{#1}%
    \newline%
  \fi%
  \vspace*{0.5in}%
  \maketitle%
  \ifdefined\huawei@nocover\else%
    \begin{textblock}{14}[1,1](14,14)%
      \raggedleft\includegraphics[height=3.6in]{huawei-cover-picture.pdf}%
    \end{textblock}%
  \fi%
}\makeatother
%    \end{macrocode}
% \end{macro}

% \begin{macro}{\PrintLastPage}
% Then, we define |\PrintLastPage|:
%    \begin{macrocode}
\makeatletter\newcommand\PrintLastPage{%
  \ifdefined\huawei@landscape\else%
    \ClassError{huawei}{It's allowed to use
    PrintLastPage only in landscape mode}{Read huawei.pdf
    for more information}
  \fi%
  \newpage%
  \vspace*{1in}%
  \begin{center}%
    \begin{minipage}{0.8\columnwidth}\raggedright%
      \normalsize%
      \setlength{\parskip}{6pt}%
      {\Huge\color{red}\textbf{Thank you!}}%
      \par%
      \vspace{0.5in}%
      \par%
      \ifdefined\huawei@nobrand\else%
        Bring digital to every person, home and organization
        \newline%
        for a fully connected, intelligent world.
        \par%
        \textbf{%
          Copyright \copyright{} \the\year{} \thecompany{}
          \newline
          All Rights Reserved.%
        }
        \par%
      \fi%
      The information in this document may contain predictive
      statements including, without limitation, statements regarding
      the future financial and operating results, future product
      portfolio, new technology, etc. There are a number of factors that
      could cause actual results and developments to differ materially
      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.
      \ifdefined\huawei@nobrand%
        The author%
      \else%
        \thecompany{}%
      \fi{}
      may change the information at any time without notice.
    \end{minipage}
  \end{center}%
}\makeatother
%    \end{macrocode}
% \end{macro}

% \begin{macro}{\PrintBibliography}
% Then, we define |\PrintBibliography|:
% \changes{v0.18.0}{2023/08/09}{The bibliography prints in one column unless \texttt{breaks} class option is specified.}
%    \begin{macrocode}
\makeatletter\newcommand\PrintBibliography{%
  \setlength\bibitemsep{3pt}%
  \AtNextBibliography{\small}%
  \ifdefined\huawei@breaks\newpage\fi%
  \begingroup%
  \raggedright%
  \setstretch{0.95}%
  \ifdefined\huawei@landscape%
    \begin{multicols}{3}\printbibliography\end{multicols}%
  \else%
    \ifdefined\huawei@breaks%
      \begin{multicols}{2}\printbibliography\end{multicols}%
    \else
      \printbibliography%
    \fi%
  \fi%
  \endgroup%
}\makeatother
%    \end{macrocode}
% \end{macro}

% Then, we set the background color of the document, if required by the |dark| class option:
%    \begin{macrocode}
\makeatletter\ifdefined\huawei@dark%
  \RequirePackage{pagecolor}%
  \pagecolor{black}%
  \color{white}%
\fi
%    \end{macrocode}

% Then, we configure the layout:
%    \begin{macrocode}
\AtBeginDocument{%
\raggedbottom%
\raggedcolumns%
\setlength\headheight{32pt}%
\setlength\footskip{32pt}%
\setlength\topskip{0mm}%
\setlength\parindent{0pt}%
\setlength\parskip{6pt}%
\setlength\columnsep{32pt}%
\renewcommand{\arraystretch}{1}%
}
%    \end{macrocode}

% Then, we renew a few commands:
%    \begin{macrocode}
\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
%    \end{macrocode}

% \Finale

%\clearpage
%
%\PrintChanges
%\clearpage
%\PrintIndex
