diff options
author | Daniel Schadt <kingdread@gmx.de> | 2019-07-20 15:54:41 +0200 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2019-07-20 15:54:41 +0200 |
commit | 5ad410dd55be4394e275f60fce44005eb7b8076a (patch) | |
tree | 282b43d40d0826dc8e1bb5ff98f04ea99ea0b25c /preamble.tex | |
parent | 74a005eea63cf5f5ca778c44002bde70a913d052 (diff) | |
parent | f62af149918575184987c2dfb41b1f07be6a06d9 (diff) | |
download | open-tt-guides-5ad410dd55be4394e275f60fce44005eb7b8076a.tar.gz open-tt-guides-5ad410dd55be4394e275f60fce44005eb7b8076a.tar.bz2 open-tt-guides-5ad410dd55be4394e275f60fce44005eb7b8076a.zip |
Merge branch 'commanding-guide'
Diffstat (limited to 'preamble.tex')
-rw-r--r-- | preamble.tex | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/preamble.tex b/preamble.tex new file mode 100644 index 0000000..a51a5ae --- /dev/null +++ b/preamble.tex @@ -0,0 +1,96 @@ +\usepackage[top=2cm,bottom=2cm,left=2cm,right=2cm]{geometry} +\usepackage{hyperref} +\usepackage{ccicons} +\usepackage{graphicx} +\usepackage{csquotes} +\usepackage[many]{tcolorbox} +\usepackage{xcolor} + + +\setlength{\parskip}{1em} + +% Macros to differentiate between HTML and PDF output +\makeatletter +\@ifpackageloaded{tex4ht} + {\let\iftexforht\iftrue} + {\let\iftexforht\iffalse} +\@ifpackageloaded{tex4ht} + {\let\iftexforhtTF\@firstoftwo} + {\let\iftexforhtTF\@secondoftwo} +\makeatother + +% Problem with ligatures, so don't load font in HTML output +\iftexforht +\else +\usepackage[urw-garamond]{mathdesign} +\usepackage[T1]{fontenc} +\fi + + +\iftexforht +\newenvironment{infobox}[1][]{ + \HCode{</p><div class="infobox"><p class="indent">} + \textbf{#1}: +}{ + \HCode{</p></div><p>} +} +\newenvironment{triviabox}{ + \HCode{</p><div class="triviabox"><p class="indent">} + \textbf{Trivia}: +}{ + \HCode{</p></div><p>} +} +\else +\newtcolorbox{infobox}[1][]{ + breakable, + title=#1, + colback=white, + colbacktitle=white, + coltitle=black, + fonttitle=\bfseries, + bottomrule=0pt, + toprule=0pt, + leftrule=3pt, + rightrule=3pt, + titlerule=0pt, + arc=0pt, + outer arc=0pt, + colframe=black, +} +\newtcolorbox{triviabox}{ + breakable, + title=Trivia, + colback=white, + colbacktitle=white, + coltitle=black, + fonttitle=\bfseries, + bottomrule=0pt, + toprule=0pt, + leftrule=3pt, + rightrule=3pt, + titlerule=0pt, + arc=0pt, + outer arc=0pt, + colframe=blue, +} +\fi + + +\newcommand{\youtube}[2]{ + \iftexforhtTF{ + \begin{figure} + \HCode{ + <iframe width="588" height="331" src="https://www.youtube.com/embed/#1" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> + } + \caption{#2} + \end{figure} + }{ + (\includegraphics[height=0.7\baselineskip]{images/yt_logo} \href{https://youtube.com/watch?v=#1}{#2}) + } +} + + +\newcommand{\skill}[3]{\emph{#3} (#1 #2)} +\newcommand{\uskill}[1]{\emph{#1}} +\newcommand{\trait}[1]{\emph{#1}} +\newcommand{\gwtskills}{(Picture source: \url{http://en.gw2skills.net})} |