From c341cea2d69cfc049d8dedc8d8bb793aafe21894 Mon Sep 17 00:00:00 2001 From: Kenneth Odle Date: Sat, 8 Jul 2023 09:22:41 -0400 Subject: [PATCH] Added macro for more easily doing href urls --- 003/codex-003.tex | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/003/codex-003.tex b/003/codex-003.tex index 6329e26..865bdd8 100644 --- a/003/codex-003.tex +++ b/003/codex-003.tex @@ -66,7 +66,13 @@ \usepackage{microtype} % Make a nice border and box for the tops of our examples -\newcommand\klab[1]{\noindent{}\hrulefill\fbox{\texttt{~#1~}}\hrulefill} +\newcommand\klab[3]{\vspace{#1}\noindent{}\hrulefill\fbox{\texttt{~#2~}}\hrulefill\vspace{#3}} + +% Add an \hrule with space above and below +\newcommand\krule[2]{\vspace{#1}\hrule\vspace{#2}} + +% Make hrefs easier (must load package hyperref} +\newcommand\kref[2]{\href{#1}{{\texttt{#2}}}} % Keep this in case it becomes useful later % \usepackage{booktabs} @@ -134,6 +140,8 @@ Although this is now in your hands, and it's also on the web, so if you really w FYI, this is made in \LaTeX \,using the report document class. It then gets exported to a letterhalf (5.5 in x 8.5 in) pdf, which then gets made into a booklet using PDF Booklet (\href{https://pdfbooklet.sourceforge.io/wordpress/}{\texttt{https://pdfbooklet.sourceforge.io/wordpress/}}). +The image of Linus Torvalds on the front cover is courtesy JericoDelayah from the WikiMedia Commons. The image is from \href{https://commons.wikimedia.org/wiki/File:4_RETAT_04_Linus_Torvalds.jpg}{\texttt{https://commons.wikimedia.or\\g/wiki/File:4\_RETAT\_04\_Linus\_Torvalds.jpg}} where you can also find a link to the Creative Commons CC BY-SA 3.0 license there, as well. + I'm pushing this to my own git server as I write this. You can find it \href{https://git.kjodle.net/kjodle/the-codex}{here}: \texttt{https://git.kjodle.net/kjodle/the-codex}. New issues will be pushed after they are complete. You can just skip over all the diversions in here if you want. It's just how my mind works. (And yes, there will be politics in this. \textit{You have been warned.}) Also, I use a lot of em-dashes, parentheses, and footnotes because that is also how my mind works. It's just one big long stream of consciousness up in here most days. @@ -544,7 +552,7 @@ For example, this code: \noindent{}produces this output: -\klab{Enumerate Example} +\klab{8pt}{Enumerate Example}{-10pt} \paragraph{The First Punic War} \begin{spacing}{0.7} @@ -562,7 +570,8 @@ For example, this code: \item Events Following the War \end{enumerate} \end{spacing} -\vspace{2mm} \hrule + +\krule{1mm}{0mm} \subsubsection{Itemize} @@ -589,7 +598,7 @@ As an example, we'll use the above example, but in a bulleted list: \noindent{}produces this output: -\klab{Itemize Example} +\klab{8pt}{Itemize Example}{-10pt} \paragraph{The First Punic War} \begin{spacing}{0.7} @@ -608,7 +617,7 @@ As an example, we'll use the above example, but in a bulleted list: \end{itemize} \end{spacing} -\bigskip +\krule{1mm}{5mm} \noindent{} You can also replace the bullets with any math symbol available in \LaTeX{} like this: