diff --git a/CHANGELOG b/CHANGELOG index 2d0086e..4d86662 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,4 @@ +2018-01-23:开始尝试使用Latex写作 2017-12-25:开始写 Crypto 部分 2017-12-22:250 star 成就达成 2017-12-15:中文名“CTF从入门到放弃” diff --git a/CONTRIBUTION.md b/CONTRIBUTION.md index ee69ee4..b4bdc9b 100644 --- a/CONTRIBUTION.md +++ b/CONTRIBUTION.md @@ -76,5 +76,6 @@ | 章节 | 作者 | 进度 | | --------------- | --------- | ---- | | 2.6_idapro.md | Sky3 | 未完成 | +| 开始使用Latex | Sky3 | 未完成 | | 2.12_burpsuite.md | phantom0301 | 未完成 | | 1.4.*.md | phantom0301 | 未完成 | diff --git a/tex/README.md b/tex/README.md new file mode 100644 index 0000000..cffb241 --- /dev/null +++ b/tex/README.md @@ -0,0 +1,18 @@ +# 一些使用Latex事项 + +* 使用开源Latex模板https://github.com/GGolbik/GGLaTeXBookTemplate,该模板为GPL 3.0 协议。具体使用,以该仓库的README为准。 +* 目前还在测试中,需各位仍以markdown写作为主。 +* 仅在Share Latex上测试,已经成功生成PDF文件于build目录(看上去还不错,细节有待打磨) + +## 其他 + +### 字体 + +为了减小仓库体积,fonts文件夹下字体全为空文件,可以从以下地址下载并编译使用: + +- NotoSansCJKsc + - Source: [Google Noto Fonts](https://www.google.com/get/noto/#sans-hans) + - License: [SIL Open Font License, Version 1.1](https://github.com/GGerry/GGLaTeXBookTemplate/blob/master/fonts/NotoSansCJKjp/LICENSE_OFL.txt) +- Roboto + - Source: [Google Fonts](https://fonts.google.com/specimen/Roboto?selection.family=Roboto) + - License: [Apache License 2.0](https://github.com/GGerry/GGLaTeXBookTemplate/blob/master/fonts/Roboto/LICENSE.txt) \ No newline at end of file diff --git a/tex/base/abbreviations/abbreviations.tex b/tex/base/abbreviations/abbreviations.tex new file mode 100644 index 0000000..ea42f02 --- /dev/null +++ b/tex/base/abbreviations/abbreviations.tex @@ -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} +%-------------------------------------- + diff --git a/tex/init b/tex/base/appendix/ZH.tex similarity index 100% rename from tex/init rename to tex/base/appendix/ZH.tex diff --git a/tex/base/appendix/appendix.tex b/tex/base/appendix/appendix.tex new file mode 100644 index 0000000..f5bdedb --- /dev/null +++ b/tex/base/appendix/appendix.tex @@ -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}} \ No newline at end of file diff --git a/tex/base/appendix/appendixcontent.tex b/tex/base/appendix/appendixcontent.tex new file mode 100644 index 0000000..5b09885 --- /dev/null +++ b/tex/base/appendix/appendixcontent.tex @@ -0,0 +1,7 @@ +% \section{Packed Objects Encoding tables} + +% \subsection{Packed Objects Encoding tables} + +% \section{Encoding Packed Objects} + +% \section{Decoding Packed Objects} diff --git a/tex/base/bibliography/bibliography.tex b/tex/base/bibliography/bibliography.tex new file mode 100644 index 0000000..06669d0 --- /dev/null +++ b/tex/base/bibliography/bibliography.tex @@ -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 +] \ No newline at end of file diff --git a/tex/base/bibliography/references.bib b/tex/base/bibliography/references.bib new file mode 100644 index 0000000..e245610 --- /dev/null +++ b/tex/base/bibliography/references.bib @@ -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 +} diff --git a/tex/base/copyright/EN.tex b/tex/base/copyright/EN.tex new file mode 100644 index 0000000..8bd6e07 --- /dev/null +++ b/tex/base/copyright/EN.tex @@ -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. \ No newline at end of file diff --git a/tex/base/copyright/ZH.tex b/tex/base/copyright/ZH.tex new file mode 100644 index 0000000..af025c3 --- /dev/null +++ b/tex/base/copyright/ZH.tex @@ -0,0 +1,4 @@ +\begin{flushleft} + \copyright~版权~\the\year~\DICTDocAuthor +\end{flushleft} + Creative Commons license (CC BY-SA 4.0) \ No newline at end of file diff --git a/tex/base/copyright/copyright.tex b/tex/base/copyright/copyright.tex new file mode 100644 index 0000000..728c753 --- /dev/null +++ b/tex/base/copyright/copyright.tex @@ -0,0 +1,5 @@ +\IfFileExists{base/copyright/\CONFIGLanguage}{ + \input{base/copyright/\CONFIGLanguage} +}{ + Copyright: UNSUPPORTED LANGUAGE ,,\CONFIGLanguage `` +} \ No newline at end of file diff --git a/tex/base/disclaimer/EN.tex b/tex/base/disclaimer/EN.tex new file mode 100644 index 0000000..d8a58ec --- /dev/null +++ b/tex/base/disclaimer/EN.tex @@ -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. \ No newline at end of file diff --git a/tex/base/disclaimer/ZH.tex b/tex/base/disclaimer/ZH.tex new file mode 100644 index 0000000..65ff69b --- /dev/null +++ b/tex/base/disclaimer/ZH.tex @@ -0,0 +1,5 @@ +\begin{center} + {\Large 声明} +\end{center} + +本书使用 Creative Commons license (CC BY-SA 4.0),大可随意使用。欢迎来本书的Github页面提交PR. \ No newline at end of file diff --git a/tex/base/disclaimer/disclaimer.tex b/tex/base/disclaimer/disclaimer.tex new file mode 100644 index 0000000..b2048f3 --- /dev/null +++ b/tex/base/disclaimer/disclaimer.tex @@ -0,0 +1,5 @@ +\IfFileExists{base/disclaimer/\CONFIGLanguage}{ + \input{base/disclaimer/\CONFIGLanguage} +}{ + DISCLAIMER: UNSUPPORTED LANGUAGE ,,\CONFIGLanguage `` +} \ No newline at end of file diff --git a/tex/base/headerfooter/headerfooter.tex b/tex/base/headerfooter/headerfooter.tex new file mode 100644 index 0000000..d2ef26e --- /dev/null +++ b/tex/base/headerfooter/headerfooter.tex @@ -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]{} + } +} \ No newline at end of file diff --git a/tex/base/index/index.tex b/tex/base/index/index.tex new file mode 100644 index 0000000..5628bb5 --- /dev/null +++ b/tex/base/index/index.tex @@ -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 \ No newline at end of file diff --git a/tex/base/listoffigures/listoffigures.tex b/tex/base/listoffigures/listoffigures.tex new file mode 100644 index 0000000..fb5b533 --- /dev/null +++ b/tex/base/listoffigures/listoffigures.tex @@ -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} \ No newline at end of file diff --git a/tex/base/listoftables/listoftables.tex b/tex/base/listoftables/listoftables.tex new file mode 100644 index 0000000..296fb31 --- /dev/null +++ b/tex/base/listoftables/listoftables.tex @@ -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} \ No newline at end of file diff --git a/tex/base/lstlistoflistings/lstlistoflistings.tex b/tex/base/lstlistoflistings/lstlistoflistings.tex new file mode 100644 index 0000000..af4cf77 --- /dev/null +++ b/tex/base/lstlistoflistings/lstlistoflistings.tex @@ -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} \ No newline at end of file diff --git a/tex/base/tableofcontents/tableofcontents.tex b/tex/base/tableofcontents/tableofcontents.tex new file mode 100644 index 0000000..05988f2 --- /dev/null +++ b/tex/base/tableofcontents/tableofcontents.tex @@ -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 \ No newline at end of file diff --git a/tex/base/titlepage/titlepage.tex b/tex/base/titlepage/titlepage.tex new file mode 100644 index 0000000..2f3e64e --- /dev/null +++ b/tex/base/titlepage/titlepage.tex @@ -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} \ No newline at end of file diff --git a/tex/build/ctf_all_in_one.pdf b/tex/build/ctf_all_in_one.pdf new file mode 100644 index 0000000..d649ffd Binary files /dev/null and b/tex/build/ctf_all_in_one.pdf differ diff --git a/tex/config/colors.tex b/tex/config/colors.tex new file mode 100644 index 0000000..98bc2f0 --- /dev/null +++ b/tex/config/colors.tex @@ -0,0 +1,14 @@ +% Required packages: +% \usepackage{xcolor} + +\definecolor{brandcolor}{RGB}{0, 148, 134} + +\definecolor{LightGray}{RGB}{235,235,235} + +\definecolor{Gray}{RGB}{210,210,210} + +\definecolor{Blue}{RGB}{48,129,238} + +\definecolor{HyperlinkBlue}{RGB}{0,0,195} + +\definecolor{VioletBlue}{RGB}{102,51,153} \ No newline at end of file diff --git a/tex/config/config.tex b/tex/config/config.tex new file mode 100644 index 0000000..3dbb4a1 --- /dev/null +++ b/tex/config/config.tex @@ -0,0 +1,33 @@ +% Define the used document language in ISO 639-1 code +% see for more info https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes +%-------------------------------------- +\def\CONFIGLanguage{ZH} +%-------------------------------------- + +\def\CONFIGEnableTitlePage{true} % true or false +\def\CONFIGEnableDisclaimer{true} % true or false +\def\CONFIGEnableCopyright{true} % true or false +\def\CONFIGEnableTableOfContents{true} % true or false +\def\CONFIGEnableListOfFigures{true} % true or false +\def\CONFIGEnableListOfTables{true} % true or false +\def\CONFIGEnableListOfSnippets{true} % true or false +\def\CONFIGEnableListOfAbbreviations{true} % true or false +\def\CONFIGEnableAppendix{true} % true or false +\def\CONFIGEnableTableOfAppendix{true} % true or false +\def\CONFIGEnableReferences{true} % true or false +\def\CONFIGEnableIndex{true} % true or false + +% check if document is oneside or twoside +% The type is set in main.tex in \documentclass[...]{...} -> line 2 +%-------------------------------------- +\makeatletter +\if@twoside + \def\CONFIGOneTwoSided{twoside} +\else + \def\CONFIGOneTwoSided{oneside} +\fi +\makeatother +%-------------------------------------- + +% Load basic packages for layout +\input{config/layout} \ No newline at end of file diff --git a/tex/config/images.tex b/tex/config/images.tex new file mode 100644 index 0000000..237c1fc --- /dev/null +++ b/tex/config/images.tex @@ -0,0 +1,7 @@ +\def\IMGTitlePage{images/favicon/favicon_white_padding_192.png} + +\def\IMGHeader{images/favicon/favicon_32.png} +\def\IMGHeaderColored{images/favicon/favicon_white_32.png} + +\def\IMGExampleOne{images/content/ben-kolde-367194.jpg} +\def\IMGExampleTwo{images/content/nate-grant-346782.jpg} \ No newline at end of file diff --git a/tex/config/layout.tex b/tex/config/layout.tex new file mode 100644 index 0000000..0dfe007 --- /dev/null +++ b/tex/config/layout.tex @@ -0,0 +1,162 @@ +\usepackage{ifthen} + +% page dimensions +%-------------------------------------- +% see https://de.sharelatex.com/learn/Page_size_and_margins +\ifthenelse{\equal{\CONFIGOneTwoSided}{oneside}} + { + \usepackage{geometry}\geometry{ + a4paper, % a4 size 210x297 mm + left=35mm, + right=20mm, + top=35mm, + bottom=25mm, + footskip=10mm, + headheight=20mm % required for header + } + } + { + \usepackage{geometry}\geometry{ + a4paper, % a4 size 210x297 mm + twoside, + left=35mm, + right=20mm, + top=35mm, + bottom=25mm, + footskip=10mm, + headheight=20mm % required for header + } + } +%-------------------------------------- + +% reduce chapter margin +\renewcommand*{\chapterheadstartvskip}{\vspace*{0mm}} + +% Multi line comments +%-------------------------------------- +\usepackage{verbatim} +%-------------------------------------- + +% font +%-------------------------------------- +\usepackage{fontspec} +\setmainfont[ExternalLocation=fonts/Roboto/, + BoldFont = Roboto-Bold.ttf, + ItalicFont = Roboto-Italic.ttf , + BoldItalicFont = Roboto-BoldItalic.ttf]{Roboto-Regular.ttf} +% language Japanese + %-------------------------------------- + \usepackage{xeCJK} + \setCJKmainfont[ExternalLocation=fonts/NotoSansCJKSC/, + BoldFont = NotoSansCJKsc-Bold.otf]{NotoSansCJKsc-Regular.otf} + %-------------------------------------- + +% set line height/spacing +\renewcommand{\baselinestretch}{1.5} + +\ifthenelse{\equal{\CONFIGLanguage}{DE}} + { + % German hyphenation + \usepackage[ngerman]{babel} + \usepackage{csquotes} + }{} +%-------------------------------------- + +% Remove indentation +%-------------------------------------- +\parindent0pt +%------------------------------------- + +% Landscape +%-------------------------------------- +\usepackage{pdflscape} +%-------------------------------------- + +% dictionary +%-------------------------------------- +\input{dictionary/dictionary} +%-------------------------------------- + +% colors +%-------------------------------------- +\usepackage[table]{xcolor} +\input{config/colors} +%-------------------------------------- + +% images +%-------------------------------------- +\usepackage{graphicx} +% \input{config/images} +%-------------------------------------- + +% Tables +%-------------------------------------- +\usepackage{longtable} +% alternate rowcolors for all long-tables +\let\oldlongtable\longtable +\let\endoldlongtable\endlongtable +%-------------------------------------- + +% date +%-------------------------------------- +\usepackage[yyyymmdd]{datetime} +% format date +\renewcommand{\dateseparator}{--} +%-------------------------------------- + +% Header & footer +%-------------------------------------- +\usepackage{fancyhdr} +\usepackage{lastpage} +\usepackage{etoolbox} +%-------------------------------------- + +% Enable linking e.g. for table of contents +%-------------------------------------- +\usepackage{hyperref} +\urlstyle{rm} +%-------------------------------------- + +% Listings - e.g. List of code snippets +%-------------------------------------- +\usepackage{listings} +% load style +\input{config/lstdefinestyle} +% init file variables +%\input{config/snippets} +%-------------------------------------- + +% Abbreviations +%-------------------------------------- +\usepackage[printonlyused]{acronym} +%-------------------------------------- + +% Bibliography/References +%-------------------------------------- +\usepackage[ + backend=biber, + style=numeric, + sorting=ynt + % citestyle=chicago-authordate + ]{biblatex} +% define reference resource +\addbibresource{base/bibliography/references.bib} +%-------------------------------------- + +% Index +%-------------------------------------- +\usepackage{imakeidx} + +% uncomment to at numbering +%\indexsetup{level=\chapter} + +% Activate index commands +\makeindex +%-------------------------------------- + +% Appendix +%-------------------------------------- +\usepackage{appendix} +\usepackage[german]{minitoc} +\usepackage{titletoc} +%-------------------------------------- \ No newline at end of file diff --git a/tex/config/lstdefinestyle.tex b/tex/config/lstdefinestyle.tex new file mode 100644 index 0000000..0c8478a --- /dev/null +++ b/tex/config/lstdefinestyle.tex @@ -0,0 +1,150 @@ +% Default code style +\lstset{ + frame=single, + captionpos=b, + lineskip=0.5em, + xleftmargin=\parindent, + belowskip=0em +} + +\lstdefinestyle{customStyleBashDark}{ + language=Bash, + numbers=left,%position of line numbers (left/right/none, i.e. no line numbers) + basicstyle=\footnotesize\ttfamily\color[RGB]{255,255,255},%font size/family/etc. for source (e.g. basicstyle=\ttfamily\small) + numberstyle=\color[RGB]{0,0,0},%style used for line-numbers + backgroundcolor=\color[RGB]{33,36,33},%colour for the background. External color or xcolor package needed. + commentstyle=\itshape\color[RGB]{153,153,153},%style of comments in source language. + keywordstyle=\bfseries\color[RGB]{143,217,68},%style of keywords in source language (e.g. keywordstyle=\color{red}) + identifierstyle=\color[RGB]{101,197,222}, + stringstyle=\color[RGB]{236,118,0},%style of strings in source language + belowcaptionskip=1\baselineskip,%is the vertical space respectively above or below each caption + breaklines=true,%automatic line-breaking + frame=single,%showing frame outside code (none/leftline/topline/bottomline/lines/single/shadowbox) + xleftmargin=\parindent, + showstringspaces=false, + captionpos=b,%position of caption (t/b) + showspaces=false,%emphasize spaces in code (true/false) + showtabs=false,%emphasize tabulators in code (true/false) + tabsize=4,%default tabsize + lineskip=0.5em, + postbreak=\raisebox{0ex}[0ex][0ex]{\ensuremath{\color{VioletBlue}\hookrightarrow\space}} +} + +\lstdefinestyle{customStyleBashLight}{ + language=Bash, + numbers=left,%position of line numbers (left/right/none, i.e. no line numbers) + basicstyle=\footnotesize\ttfamily\color[RGB]{0,0,0},%font size/family/etc. for source (e.g. basicstyle=\ttfamily\small) + numberstyle=\color[RGB]{0,0,0},%style used for line-numbers + backgroundcolor=\color[RGB]{255,255,255},%colour for the background. External color or xcolor package needed. + commentstyle=\itshape\color[RGB]{52,121,54},%style of comments in source language. + keywordstyle=\bfseries\color[RGB]{138,18,130},%style of keywords in source language (e.g. keywordstyle=\color{red}) + identifierstyle=\color[RGB]{0,0,0}, + stringstyle=\color[RGB]{0,0,192},%style of strings in source language + belowcaptionskip=1\baselineskip,%is the vertical space respectively above or below each caption + breaklines=true,%automatic line-breaking + frame=shadowbox,%showing frame outside code (none/leftline/topline/bottomline/lines/single/shadowbox) + rulesepcolor=\color{black}, + xleftmargin=\parindent, + showstringspaces=false, + captionpos=b,%position of caption (t/b) + showspaces=false,%emphasize spaces in code (true/false) + showtabs=false,%emphasize tabulators in code (true/false) + tabsize=4,%default tabsize + lineskip=0.5em, + postbreak=\raisebox{0ex}[0ex][0ex]{\ensuremath{\color{VioletBlue}\hookrightarrow\space}} +} + +\lstdefinestyle{customStyleJavaDark}{ + language=Java, + numbers=left,%position of line numbers (left/right/none, i.e. no line numbers) + basicstyle=\footnotesize\ttfamily\color[RGB]{255,255,255},%font size/family/etc. for source (e.g. basicstyle=\ttfamily\small) + numberstyle=\color[RGB]{0,0,0},%style used for line-numbers + backgroundcolor=\color[RGB]{33,36,33},%colour for the background. External color or xcolor package needed. + commentstyle=\itshape\color[RGB]{153,153,153},%style of comments in source language. + keywordstyle=\bfseries\color[RGB]{143,217,68},%style of keywords in source language (e.g. keywordstyle=\color{red}) + identifierstyle=\color[RGB]{101,197,222}, + stringstyle=\color[RGB]{236,118,0},%style of strings in source language + belowcaptionskip=1\baselineskip,%is the vertical space respectively above or below each caption + breaklines=true,%automatic line-breaking + frame=single,%showing frame outside code (none/leftline/topline/bottomline/lines/single/shadowbox) + xleftmargin=\parindent, + showstringspaces=false, + captionpos=b,%position of caption (t/b) + showspaces=false,%emphasize spaces in code (true/false) + showtabs=false,%emphasize tabulators in code (true/false) + tabsize=4,%default tabsize + lineskip=0.5em, + postbreak=\raisebox{0ex}[0ex][0ex]{\ensuremath{\color{VioletBlue}\hookrightarrow\space}} +} + +\lstdefinestyle{customStyleJavaLight}{ + language=Java, + numbers=left,%position of line numbers (left/right/none, i.e. no line numbers) + basicstyle=\footnotesize\ttfamily\color[RGB]{0,0,0},%font size/family/etc. for source (e.g. basicstyle=\ttfamily\small) + numberstyle=\color[RGB]{0,0,0},%style used for line-numbers + backgroundcolor=\color[RGB]{255,255,255},%colour for the background. External color or xcolor package needed. + commentstyle=\itshape\color[RGB]{52,121,54},%style of comments in source language. + keywordstyle=\bfseries\color[RGB]{138,18,130},%style of keywords in source language (e.g. keywordstyle=\color{red}) + identifierstyle=\color[RGB]{0,0,0}, + stringstyle=\color[RGB]{0,0,192},%style of strings in source language + belowcaptionskip=1\baselineskip,%is the vertical space respectively above or below each caption + breaklines=true,%automatic line-breaking + frame=shadowbox,%showing frame outside code (none/leftline/topline/bottomline/lines/single/shadowbox) + rulesepcolor=\color{black}, + xleftmargin=\parindent, + showstringspaces=false, + captionpos=b,%position of caption (t/b) + showspaces=false,%emphasize spaces in code (true/false) + showtabs=false,%emphasize tabulators in code (true/false) + tabsize=4,%default tabsize + lineskip=0.5em, + postbreak=\raisebox{0ex}[0ex][0ex]{\ensuremath{\color{VioletBlue}\hookrightarrow\space}} +} + +\lstdefinestyle{customStyleHTMLDark}{ + language=HTML, + numbers=left,%position of line numbers (left/right/none, i.e. no line numbers) + basicstyle=\footnotesize\ttfamily\color[RGB]{255,255,255},%font size/family/etc. for source (e.g. basicstyle=\ttfamily\small) + numberstyle=\color[RGB]{0,0,0},%style used for line-numbers + backgroundcolor=\color[RGB]{33,36,33},%colour for the background. External color or xcolor package needed. + commentstyle=\itshape\color[RGB]{153,153,153},%style of comments in source language. + keywordstyle=\bfseries\color[RGB]{143,217,68},%style of keywords in source language (e.g. keywordstyle=\color{red}) + identifierstyle=\color[RGB]{101,197,222}, + stringstyle=\color[RGB]{236,118,0},%style of strings in source language + belowcaptionskip=1\baselineskip,%is the vertical space respectively above or below each caption + breaklines=true,%automatic line-breaking + frame=single,%showing frame outside code (none/leftline/topline/bottomline/lines/single/shadowbox) + xleftmargin=\parindent, + showstringspaces=false, + captionpos=b,%position of caption (t/b) + showspaces=false,%emphasize spaces in code (true/false) + showtabs=false,%emphasize tabulators in code (true/false) + tabsize=4,%default tabsize + lineskip=0.5em, + usekeywordsintag=false, + postbreak=\raisebox{0ex}[0ex][0ex]{\ensuremath{\color{VioletBlue}\hookrightarrow\space}} +} + +\lstdefinestyle{customStyleHTMLLight}{ + language=HTML, + numbers=left,%position of line numbers (left/right/none, i.e. no line numbers) + basicstyle=\footnotesize\ttfamily\color[RGB]{0,0,0},%font size/family/etc. for source (e.g. basicstyle=\ttfamily\small) + numberstyle=\color[RGB]{0,0,0},%style used for line-numbers + backgroundcolor=\color[RGB]{255,255,255},%colour for the background. External color or xcolor package needed. + commentstyle=\itshape\color[RGB]{52,121,54},%style of comments in source language. + keywordstyle=\bfseries\color[RGB]{138,18,130},%style of keywords in source language (e.g. keywordstyle=\color{red}) + stringstyle=\color[RGB]{0,0,238},%style of strings in source language + belowcaptionskip=1\baselineskip,%is the vertical space respectively above or below each caption + breaklines=true,%automatic line-breaking + frame=shadowbox,%showing frame outside code (none/leftline/topline/bottomline/lines/single/shadowbox) + rulesepcolor=\color{black}, + xleftmargin=\parindent, + showstringspaces=false, + captionpos=b,%position of caption (t/b) + showspaces=false,%emphasize spaces in code (true/false) + showtabs=false,%emphasize tabulators in code (true/false) + tabsize=4,%default tabsize + lineskip=0.5em, + usekeywordsintag=false, + postbreak=\raisebox{0ex}[0ex][0ex]{\ensuremath{\color{VioletBlue}\hookrightarrow\space}} +} \ No newline at end of file diff --git a/tex/contents/EN/contents.tex b/tex/contents/EN/contents.tex new file mode 100644 index 0000000..f4e3bed --- /dev/null +++ b/tex/contents/EN/contents.tex @@ -0,0 +1,21 @@ +\input{contents/EN/introduction/introduction} +\newpage +\input{contents/EN/snippets/snippets} +\newpage +\input{contents/EN/useofabbreviations/useofabbreviations} +\newpage +\input{contents/EN/useofbibliography/useofbibliography} +\newpage +\input{contents/EN/useofindex/useofindex} +\newpage +\input{contents/EN/tables/tables} +\newpage +\input{contents/EN/footnotes/footnotes} +\newpage +\input{contents/EN/japanese/japanese} +\newpage +\input{contents/EN/images/images} +\newpage +\input{contents/EN/landscape/landscape} +\newpage +\input{contents/EN/mathematics/mathematics} \ No newline at end of file diff --git a/tex/contents/EN/footnotes/footnotes.tex b/tex/contents/EN/footnotes/footnotes.tex new file mode 100644 index 0000000..9a0113d --- /dev/null +++ b/tex/contents/EN/footnotes/footnotes.tex @@ -0,0 +1,9 @@ +\chapter{Footnotes} + +one\footnote{\label{foot-1}Footnote 1.} +two\footnote{\label{foot-2}Footnote 2.} +three\footnote{\label{foot-3}Footnote 3.} +four\textsuperscript{\ref{foot-2}} + +\section{Example 1} +test \ No newline at end of file diff --git a/tex/contents/EN/images/images.tex b/tex/contents/EN/images/images.tex new file mode 100644 index 0000000..798a5a0 --- /dev/null +++ b/tex/contents/EN/images/images.tex @@ -0,0 +1,18 @@ +\chapter{Use of Images} + +% Required packages: "graphicx", "float" +% See for more info: https://en.wikibooks.org/wiki/LaTeX/Importing_Graphics +\section{Image Area}\index{Image Area} +\subsection{Example Image 1} + +\includegraphics[trim = 10mm 60mm 20mm 5mm, clip, height=\linewidth, angle=90]{\IMGExampleOne} +\captionof{figure}{Example Image 1} + +\subsection{Example Image 2} + +\includegraphics[width=\linewidth]{\IMGExampleTwo} +\captionof{figure}{Example Image 2} +\label{figure:anime} + +You can reference images, for instance, the image \ref{figure:anime} shows +an image from \textit{unsplash} \ No newline at end of file diff --git a/tex/contents/EN/introduction/introduction.tex b/tex/contents/EN/introduction/introduction.tex new file mode 100644 index 0000000..f9cc03e --- /dev/null +++ b/tex/contents/EN/introduction/introduction.tex @@ -0,0 +1,37 @@ +\chapter{Introduction} + +this is the first chapter + +\section{section} + +This is the first section. + +\subsection{Subsection} + +normal \emph{italic}, \textbf{bold} and \textbf{\emph{bold italic}}. + +ä ö ü ß + +% Required packages: "csquotes", (optional) "babel" + +% bold +{\textbf{Sample Text 0123}} +\\ % italic +{\textit{Sample Text 0123}} +\\ % small caps +{\textsc{Sample Text 0123}} +\\ % sans serif +{\textsf{Sample Text 0123}} +\\ % tiny +{\tiny{Sample Text 0123}} +\\ % normalsize +{\normalsize{Sample Text 0123}} +\\ % huge +{\huge{Sample Text 0123}} +\\ % hiperlink +{\color{HyperlinkBlue}\url{https://de.sharelatex.com/learn/}} +\\ +\\ +A \rotatebox{90}{B} C +\\ +These are special characters: äöüß \ No newline at end of file diff --git a/tex/contents/EN/japanese/japanese.tex b/tex/contents/EN/japanese/japanese.tex new file mode 100644 index 0000000..d23a111 --- /dev/null +++ b/tex/contents/EN/japanese/japanese.tex @@ -0,0 +1,4 @@ +\chapter{Japanese - 日本語} + +むかし、むかし、ある所におじいさんとおばあさんが住んでいました。おじいさんは山へしば刈りに、おばあさんは川へ洗濯に行きました。すると大きな桃が流れてきました。 +「なんと大きな桃じゃろう!家に持って帰ろう。」とおばあさんは背中に担いで帰って行きました。 \ No newline at end of file diff --git a/tex/contents/EN/landscape/landscape.tex b/tex/contents/EN/landscape/landscape.tex new file mode 100644 index 0000000..0615d1e --- /dev/null +++ b/tex/contents/EN/landscape/landscape.tex @@ -0,0 +1,6 @@ +% Requierd packages: "pdflscape" alternative: lscape +\begin{landscape} +\chapter{Landscape Area}\index{Landscape Area} +\section{Example 1} +This page is in Landscape mode +\end{landscape} \ No newline at end of file diff --git a/tex/contents/EN/mathematics/mathematics.tex b/tex/contents/EN/mathematics/mathematics.tex new file mode 100644 index 0000000..ce57f8c --- /dev/null +++ b/tex/contents/EN/mathematics/mathematics.tex @@ -0,0 +1,30 @@ +\chapter{Mathematics Area}\index{Mathematics Area} +\section{Example 1} + +The well known Pythagorean theorem \(x^2 + y^2 = z^2\) was +proved to be invalid for other exponents. +Meaning the next equation has no integer solutions: + +\[ x^n + y^n = z^n \] + + An alternative: + +\begin{center} + \begin{math} + 7+12+x=10 + \end{math} +\end{center} + +In physics, the mass-energy equivalence is stated +by the equation $E=mc^2$, discovered in 1905 by Albert Einstein. + +The mass-energy equivalence is described by the famous equation + +$$E=mc^2$$ + +discovered in 1905 by Albert Einstein. +In natural units ($c$ = 1), the formula expresses the identity + +\begin{equation} +E=m +\end{equation} \ No newline at end of file diff --git a/tex/contents/EN/snippets/bash.tex b/tex/contents/EN/snippets/bash.tex new file mode 100644 index 0000000..76bf344 --- /dev/null +++ b/tex/contents/EN/snippets/bash.tex @@ -0,0 +1,21 @@ +\section{Bash Light} + +\begin{lstlisting}[language=bash, style=customStyleBashLight, caption=Snippet title] +#!/bin/bash + +STRING="HELLO WORLD!!!" +echo $STRING +\end{lstlisting} + +\section{Bash Dark} + +\begin{lstlisting}[language=bash, style=customStyleBashDark, caption=Snippet title] +#!/bin/bash + +STRING="HELLO WORLD!!!" +echo $STRING +\end{lstlisting} + +\section{Bash Import} + +\lstinputlisting[language=bash, style=customStyleBashDark, caption=Snippet title]{\SNIPPETBash} \ No newline at end of file diff --git a/tex/contents/EN/snippets/html.tex b/tex/contents/EN/snippets/html.tex new file mode 100644 index 0000000..b272c39 --- /dev/null +++ b/tex/contents/EN/snippets/html.tex @@ -0,0 +1,51 @@ +\section{HTML Light} + +\begin{lstlisting}[language=bash, style=customStyleHTMLLight, caption=Snippet title] + + +
+ +