\documentclass[twoside]{report}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{makeidx}
\usepackage{graphicx}
\usepackage{kpfonts}
\usepackage{float}
\raggedbottom
\usepackage{array}
\usepackage{multirow}
\usepackage{longtable}

% Where are our images?
\graphicspath{{images/}}

% Let's set this as a half-letter sized sheet
\usepackage{geometry}
\geometry{
	paperheight=8.5in,
	paperwidth=5.5in,
%	heightrounded,
	margin=0.5in
}

% Adjust the top and bottom margins
\addtolength{\topmargin}{0.4in}
\addtolength{\textheight}{-0.75in}

% Set the header style
\usepackage{fancyhdr}
\pagestyle{fancy}
 \fancyhf{}
 \fancyhead[LE,RO]{\textit{the codex}}
 \fancyhead[RE,LO]{Issue \#003}
 \cfoot{Page \thepage}
\renewcommand{\footrulewidth}{0.5pt}

% Includ two- or three-column sections
\usepackage{multicol}

% Stop resetting the footnote count after each chapter
\counterwithout{footnote}{chapter}

% Let's wrap some images
\usepackage{wrapfig}

% Use tab stops when we need to (especially in footnotes)
\usepackage{tabto}
% Define 18 tab stops (at 1/4" intervals)
\NumTabs{18}

% Make things neater. Thanks /u/-LeopardShark-
\usepackage{microtype}

% Make a nice border and box for the tops of our examples
\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}}}}

% Rotate text in tables easier
% https://tex.stackexchange.com/questions/89115/how-to-rotate-text-in-multirow-table
\newcommand\krot[3]{\parbox[t]{#1}{\multirow{#2}{*}{\rotatebox[origin=c]{90}{#3}}}}

% Use line numbers with code samples
% \begin{Verbatim}...\end{Verbatim} <-- Note the capitalization!
\usepackage{fancyvrb}
% Break lines inside this environment:
\usepackage{fvextra}

% Control spacing in lists
\usepackage{enumitem}

% Don't force text to fill page
\raggedbottom

% Better control over line-spacing
\usepackage{setspace}

% Use nice fractions
\usepackage{nicefrac}

% Keep the footnotes at the bottom of the page
\usepackage[bottom]{footmisc}

% Do we want to include URLs?
% Yes, but we also want to hide the big red box it puts around them in the pdf. Thanks /u/0b0101011001001011
\usepackage[hidelinks]{hyperref}

%%%% Document Information %%%%%
\author{Kenneth John Odle}
\title{
 {\Huge the codex} \\
 {\footnotesize Life with Linux — A Zine \\
 \bigskip
 Typeset in \LaTeX{} \\
 Issue \#004}
}
\date{\begin{small}\today{}\end{small}}

% Change the name of the TOC
\renewcommand*\contentsname{In This Issue…}

\begin{document}
\maketitle

\section*{Impressum}
All contents  \copyright2023 Kenneth John Odle

Although this is now in your hands, and it's also on the web, so if you really wanted to steal this, I've made it pretty darn easy. I can't imagine why anyone would want to, though. However, you don't need to, because this is licenced under a CC BY-NA-SA 4.0 Creative Commons license. More information is at \href{https://creativecommons.org/licenses/by-nc-sa/4.0/}{\texttt{https://creativecommons.org/licenses/by-nc-sa/4.0/}} \includegraphics[scale=0.30]{ncsa4-0}

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 (\kref{https://pdfbooklet.sourceforge.io/wordpress/}{https://pdfbooklet.sourceforge.io/word\\press/}).

The image of Linus Torvalds on the front cover is courtesy JericoDelayah from the WikiMedia Commons. The image is from \kref{https://commons.wikimedia.org/wiki/File:4_RETAT_04_Linus_Torvalds.jpg}{https://commons.wiki\\media.org/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.

\medskip

\noindent \textbf{Errata:} To err is human, to document those errors is divine. A list of errata can be found at \kref{https://git.kjodle.net/kjodle/the-codex/wiki/Errata}{https://git.kjodle.net/kjodle/the-codex/wiki/Err\\ata}.

\medskip

\noindent \textbf{Credit where credit is due:} A lot of people have come forth (mostly from Reddit) to help me out in various ways. See the preamble to this document in the source code to see them. One aspect of our society is that nobody \textit{has} to help you. It is wonderful when it happens, and I am grateful for their help.


\tableofcontents

\chapter{The Final Salad Days}

\section{College, 2008}

Bush II decided to tank the economy for ordinary people so that rich people could get richer.\footnote{This is the second of three "once in a lifetime" recessions I have lived through. Yay, capitalism!} I decided to go back into teaching (which, thanks to current conservative political policies\footnote{Along with the asshole behavior of parents who approve of those policies.} there will always be a demand for), which meant I needed to go back to college to renew my teaching license. But this is a whole other story for which I have run out of space, so it will have to go in a future issue.

\section{Today}

\chapter{Math in \LaTeX{} with \texttt{align} and \texttt{array}}

\chapter{Searching your Bash History}

https://www.cyberciti.biz/faq/linux-unix-shell-history-search-command/

https://www.digitalocean.com/community/tutorials/how-to-use-bash-history-commands-and-expansions-on-a-linux-vps

https://superuser.com/questions/7414/how-can-i-search-the-bash-history-and-rerun-a-command

https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html\#Bindable-Readline-Commands

https://stackoverflow.com/questions/7131670/make-a-bash-alias-that-takes-a-parameter

https://tecadmin.net/how-to-create-bash-aliases-with-parameters/

\chapter{Other Flavors of Linux}

I admit, I am pretty invested in Ubuntu. But I don't have to be that way. There are \textit{lots} of ways to swim in the Linux pool. Just doing a quick search for ``linux flavors'' yields a lot of options:

\begin{center}
\fbox{\includegraphics[scale=1]{flavours2}}
\end{center}

This also omits Edubuntu which, as a former teacher, I am very interested in.

\chapter{What's to Like About Linux}

\section{bash Aliases for \texttt{git}}

\chapter{The Right Ways vs The Wrong Ways}

A lot of grew up hearing that ``there's a right way to do things and a wrong way to do things.'' I don't disagree that there is always a \textit{wrong} way to do things, but like house maintenance, working on computers quickly teaches you that there are a lot of wrong ways to do things. 

As I get older, however, I tend to think of this as less of a black-and-white issue. That is, ``how to do a thing'' can be answered any number of ways, which are on a spectrum from quite truly wrong to quite truly right with a lot of grey space in between. 

% Provide some additional spacing in this table; may move this to preamble later
\setlength{\tabcolsep}{14pt}
\renewcommand{\arraystretch}{1.4}

\begin{table}[h]
\begin{tabular}{ | c | l | p{60mm} | } \hline
\multirow{3}{*}{\parbox[t]{2mm}{\multirow{3}{*}{\rotatebox[origin=c]{90}{Very Wrong}}}} & Very  Wrong & It doesn't work and it breaks almost everything.  \\ \cline{2-3} 
 & Very Wrong & It doesn't work and it breaks at least 50\% of things \\ \cline{2-3}
 & Wrong & It doesn't work and it only breaks a few things \\ \hline
\multirow{2}{*}{\krot{2mm}{2}{Still Wrong}} & Kind of Wrong & It works, but it breaks a lot of other things.  \\ \cline{2-3} 
 & Wrong & It works, but it breaks a handful of things that shouldn't have to be fixed. \\ \hline
\multirow{2}{*}{\krot{2mm}{2}{Wrong\textit{ish}}} & Not bad & It works in this specific instance, but not in all instances. \\ \cline{2-3}
  & Wrong & It works, but it's far more work than it should be. \\ \hline
\end{tabular}
\end{table}

\begin{longtable}{ | c | l | p{60mm} | } \hline

\multirow{3}{*}{\krot{2mm}{3}{Very Wrong}} & Very  Wrong & It doesn't work and it breaks almost everything.  \\ \cline{2-3} 
 & Very Wrong & It doesn't work and it breaks at least 50\% of things \\ \cline{2-3}
 & Wrong & It doesn't work and it only breaks a few things \\ \hline
 
\multirow{2}{*}{\krot{2mm}{2}{Still Wrong}} & Kind of Wrong & It works, but it breaks a lot of other things.  \\ \cline{2-3} 

 & Wrong & It works, but it breaks a handful of things that shouldn't have to be fixed. \\ \hline
 
\multirow{2}{*}{\krot{2mm}{2}{Wrong\textit{ish}}} & Not bad & It works in this specific instance, but not in all instances. \\ \cline{2-3}
  & Wrong & It works, but it's far more work than it should be. \\ \hline
\end{longtable}

\chapter{More about those folders in \texttt{root}}

\chapter{Coda}

\section{What I Learned About \LaTeX{} While Creating This Issue}

\subsection{Page Count using \texttt{detex}}

\subsection{How to Create Macros}

\section{What I learned About \LaTeX{} While Creating Something Else}

\end{document}
