开始使用Latex写作啦!不过目前处于测试摸索阶段,欢迎提issue~

This commit is contained in:
skyel1u
2018-01-13 23:29:42 +08:00
parent c68ed33d4c
commit bf8f3d4038
62 changed files with 1443 additions and 0 deletions

View File

@ -0,0 +1,54 @@
% add table of contents entry
\addstarredchapter{\DICTAbbreviations}
% update mark for use of \leftmark and \rightmark
\markboth{\DICTAbbreviations}{\DICTAbbreviations}
\chapter*{\DICTAbbreviations}
% You can enter a short name between the abbreviation and the long form (for example, for I²C). This is necessary for mathematical characters, for example, since only normal characters may be used in the abbreviation. The corresponding call looks like usual: \ac{I2C}, the abbreviation I²C appears in the generated document.
% After \begin{acronym} an expression can be specified in square brackets. After the length of this expression, the indentation of the abbreviations is set. In this case, it is recommended to use the longest abbreviation in order to obtain a uniform indentation for all abbreviations.
\begin{acronym}[Bash]
\acro{KDE}{K Desktop Environment}
\acro{SQL}{Structured Query Language}
\acro{Bash}{Bourne-again shell}
\end{acronym}
% Use in the text
% Here are only the most important examples:
% Outputs the long form with the abbreviation in parentheses for the first use, from then on always the short form.
%--------------------------------------
% \ac{KDE} % K Desktop Environment (KDE)
%--------------------------------------
% Returns the abbreviation.
%--------------------------------------
% \acs{KDE} % KDE
%--------------------------------------
% Outputs the long and short form.
%--------------------------------------
% \acf{KDE} % K Desktop Environment (KDE)
%--------------------------------------
% Only outputs the long form without the short form.
%--------------------------------------
% \acl{KDE} % K Desktop Environment
%--------------------------------------
% Similar to the above commands, the plural can also be displayed accordingly:
%--------------------------------------
% \acp{KDE} % K Desktop Environments (KDEs)
% \acsp{KDE} % KDEs
% \acfp{KDE} % K Desktop Environments (KDEs)
% \aclp{KDE} % K Desktop Environments
%--------------------------------------
% If the plural does not end at -s, you can set it with the following command:
%--------------------------------------
% \acrodefplural{VM}[VMs]{Virtuelle Maschinen}
%--------------------------------------

0
tex/base/appendix/ZH.tex Normal file
View File

View File

@ -0,0 +1,33 @@
\RedeclareSectionCommand[tocnumwidth=6em]{section}
\RedeclareSectionCommand[tocnumwidth=6.5em]{subsection}
\RedeclareSectionCommand[tocindent=0em]{section}
\RedeclareSectionCommand[tocindent=2em]{subsection}
\addtocontents{toc}{\protect\setcounter{tocdepth}{0}}
% update mark for use of \leftmark and \rightmark
\markboth{\DICTAppendix}{\DICTAppendix}
\chapter*{\DICTAppendix}
\nomtcrule
\mtcsettitle{minitoc}{\DICTTableOfAppendix}
\setcounter{section}{0}
\addstarredchapter{\DICTAppendix}
\ifthenelse{\equal{\CONFIGEnableTableOfAppendix}{true}}
{
\minitoc % minitoc-Ausgeben
\newpage
}{}
\renewcommand{\thesection}{\DICTAppendix~\Alph{section}}
% include appendix content
%--------------------------------------
\input{base/appendix/appendixcontent}
%--------------------------------------
\addtocontents{toc}{\protect\setcounter{tocdepth}{3}}

View File

@ -0,0 +1,7 @@
% \section{Packed Objects Encoding tables}
% \subsection{Packed Objects Encoding tables}
% \section{Encoding Packed Objects}
% \section{Decoding Packed Objects}

View File

@ -0,0 +1,18 @@
% Use the below command to add references
% \cite{name of reference}
% Required for table of contents
\addstarredchapter{\DICTReferences}
% update mark for use of \leftmark and \rightmark
\markboth{\DICTReferences}{\DICTReferences}
% to avoid the warning: Overfull \hbox
\emergencystretch=1em
% show all entries even the once which are not used
%\nocite{*}
\printbibliography[title={\DICTReferences}
%,heading=bibnumbered
]

View File

@ -0,0 +1,62 @@
% You can find the documentation on ftp://ctan.tug.org/tex-archive/macros/latex/exptl/biblatex/doc/biblatex.pdf
% Article
%
% An article in a journal, magazine, newspaper, or other periodical which forms a
% self-contained unit with its own title. The title of the periodical is given in the
% journaltitle field. If the issue has its own title in addition to the main title of
% the periodical, it goes in the issuetitle field. Note that editor and related
% fields refer to the journal while translator and related fields refer to the article.
@article{exampleArticle,
% Required fields:
author = "Max Mustermann",
title = "Mustertitle - Article",
journaltitle = "Muster Journal",
date = "2017-12-13",
% Optional fields: see documentation
}
% Book
%
% A single-volume book with one or more authors where the authors share credit for
% the work as a whole. This entry type also covers the function of the @inbook type
% of traditional BibTeX, see § 2.3.1 for details
@book{exampleBook,
% Required fields:
author = "Max Mustermann",
title = "Mustertitle - Book",
date = "2017-12-14",
% Optional fields: see documentation
}
% Manual
%
% Technical or other documentation, not necessarily in printed form. The author or
% editor is omissible in terms of § 2.3.2.
@manual{exampleManual,
% Required fields:
author = "Max Mustermann",
title = "Mustertitle - Manual",
date = "2017-12-15",
% Optional fields: see documentation
}
% Online
%
% An online resource. author, editor, and year are omissible in terms of § 2.3.2.
% This entry type is intended for sources such as web sites which are intrinsically
% online resources. Note that all entry types support the url field. For example, when
% adding an article from an online journal, it may be preferable to use the @article
% type and its url field.
@online{exampleOnline,
% Required fields:
author = "Max Mustermann",
title = "Mustertitle - Online",
date = "2017-12-16",
url = "http://example.url",
% Optional fields: see documentation
}

View File

@ -0,0 +1,4 @@
\begin{flushleft}
\copyright~Copyright~\the\year~\DICTDocAuthor
\end{flushleft}
This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the author or other organizations.

View File

@ -0,0 +1,4 @@
\begin{flushleft}
\copyright~版权~\the\year~\DICTDocAuthor
\end{flushleft}
Creative Commons license (CC BY-SA 4.0)

View File

@ -0,0 +1,5 @@
\IfFileExists{base/copyright/\CONFIGLanguage}{
\input{base/copyright/\CONFIGLanguage}
}{
Copyright: UNSUPPORTED LANGUAGE ,,\CONFIGLanguage ``
}

View File

@ -0,0 +1,5 @@
\begin{center}
{\Large DISCLAIMER}
\end{center}
This document and the information contained herein is provided on an “As Is” basis and the author disclaims all warranties, express or implied, including but not limited to any warranty that the use of the information herein will not infringe any rights or any implied warranties of merchantability or fitness for a particular purpose.

View File

@ -0,0 +1,5 @@
\begin{center}
{\Large 声明}
\end{center}
本书使用 Creative Commons license (CC BY-SA 4.0)大可随意使用。欢迎来本书的Github页面提交PR.

View File

@ -0,0 +1,5 @@
\IfFileExists{base/disclaimer/\CONFIGLanguage}{
\input{base/disclaimer/\CONFIGLanguage}
}{
DISCLAIMER: UNSUPPORTED LANGUAGE ,,\CONFIGLanguage ``
}

View File

@ -0,0 +1,88 @@
%\ifthenelse{\equal{\CONFIGLanguage}{twoside}}
% {\input{base/headerfooter/twoside}}
% {\input{base/headerfooter/oneside}}
\pagestyle{fancy}
\fancyhf{}
% E for even page
% O for odd page
% L for left side
% C for centered
% R for right side
% set header
%--------------------------------------
\ifthenelse{\equal{\CONFIGOneTwoSided}{oneside}}
{
\fancyhead[L]{\includegraphics[width=5mm]{\IMGHeader}}
\fancyhead[R]{\DICTDocTitle}
\fancyhead[C]{}
}
{
\fancyhead[RE,LO]{\includegraphics[width=5mm]{\IMGHeader}}
\fancyhead[LE,RO]{\DICTDocTitle}
\fancyhead[CE,CO]{}
}
% change header line color
\patchcmd{\headrule}{\hrule}{\color{LightGray}\hrule}{}{}
% show header line
\renewcommand{\headrulewidth}{0.4pt} % set to 0pt if line shall be removed
%--------------------------------------
% set footer
%--------------------------------------
\ifthenelse{\equal{\CONFIGOneTwoSided}{oneside}}
{
\fancyfoot[R]{Page \thepage \hspace{1pt} of \pageref{LastPage}}
\fancyfoot[L]{\DICTDocDate}
\fancyfoot[C]{}
}
{
\fancyfoot[RE,LO]{Page \thepage \hspace{1pt} of \pageref{LastPage}}
\fancyfoot[LE,RO]{\DICTDocDate}
\fancyfoot[CE,CO]{}
}
% change footer line color
\patchcmd{\footrule}{\hrule}{\color{LightGray}\hrule}{}{}
% show footer line
\renewcommand{\footrulewidth}{0.4pt}% default is 0pt
%--------------------------------------
\fancypagestyle{plain}{%
\fancyhf{}
% set header
%--------------------------------------
\ifthenelse{\equal{\CONFIGOneTwoSided}{oneside}}
{
\fancyhead[L]{\includegraphics[width=5mm]{\IMGHeader}}
\fancyhead[R]{\DICTDocTitle}
\fancyhead[C]{}
}
{
\fancyhead[RE,LO]{\includegraphics[width=5mm]{\IMGHeader}}
\fancyhead[LE,RO]{\DICTDocTitle}
\fancyhead[CE,CO]{}
}
%--------------------------------------
% set footer
%--------------------------------------
\ifthenelse{\equal{\CONFIGOneTwoSided}{oneside}}
{
\fancyfoot[R]{Page \thepage \hspace{1pt} of \pageref{LastPage}}
\fancyfoot[L]{\DICTDocDate}
\fancyfoot[C]{}
}
{
\fancyfoot[RE,LO]{Page \thepage \hspace{1pt} of \pageref{LastPage}}
\fancyfoot[LE,RO]{\DICTDocDate}
\fancyfoot[CE,CO]{}
}
}

10
tex/base/index/index.tex Normal file
View File

@ -0,0 +1,10 @@
% use the below command to add index entries
% \index{index name}
% add table of contents entry
\addstarredchapter{\DICTIndex}
% update mark for use of \leftmark and \rightmark
\markboth{\DICTIndex}{\DICTIndex}
\printindex

View File

@ -0,0 +1,11 @@
\setcounter{tocdepth}{3}
% add table of contents entry
\addstarredchapter{\DICTListOfFigures}
\renewcommand{\listfigurename}{\DICTListOfFigures}
\renewcommand{\figurename}{\DICTFigureName}
\listoffigures
% update mark for use of \leftmark and \rightmark
\markboth{\DICTListOfFigures}{\DICTListOfFigures}

View File

@ -0,0 +1,11 @@
\setcounter{tocdepth}{3}
% add table of contents entry
\addstarredchapter{\DICTListOfTables}
\renewcommand{\listtablename}{\DICTListOfTables}
\renewcommand{\tablename}{\DICTTableName}
\listoftables
% update mark for use of \leftmark and \rightmark
\markboth{\DICTListOfTables}{\DICTListOfTables}

View File

@ -0,0 +1,14 @@
\setcounter{tocdepth}{3}
% change listings name below code
\renewcommand{\lstlistingname}{\DICTListingName}
% add table of contents entry
\addstarredchapter{\DICTListOfCodeSnippets}
% List of Listings -> List of Algorithms
\renewcommand{\lstlistlistingname}{\DICTListOfCodeSnippets}
\lstlistoflistings
% update mark for use of \leftmark and \rightmark
\markboth{\DICTListOfCodeSnippets}{\DICTListOfCodeSnippets}

View File

@ -0,0 +1,10 @@
% add table of contents entry
\addstarredchapter{\DICTTableOfContents}
% Rename name of table of contents
\renewcommand\contentsname{\DICTTableOfContents}
% update mark for use of \leftmark and \rightmark
\markboth{\DICTTableOfContents}{\DICTTableOfContents}
\tableofcontents

View File

@ -0,0 +1,37 @@
\pagecolor{brandcolor}
\color{white}
\begin{titlepage}
% doc image
% \begin{figure}[ht]
% \centering
% \includegraphics{\IMGTitlePage}
% \end{figure}
\begin{center}
{\Huge \DICTDocTitle}
\end{center}
\vfill
% \begin{center}
% {\Large by}
% \end{center}
\begin{center}
{\Large \DICTDocAuthor}
\end{center}
\begin{center}
{\Large \DICTDocEmail}
\end{center}
\begin{center}
{\Large \DICTDocDate}
\end{center}
\vspace{5mm}
\end{titlepage}
\pagecolor{white}
\color{black}