A zine about Linux. That's all.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

221 lines
9.3 KiB

10 months ago
10 months ago
10 months ago
10 months ago
  1. \documentclass[twoside]{report}
  2. \usepackage[utf8]{inputenc}
  3. \usepackage{amsmath}
  4. \usepackage{amssymb}
  5. \usepackage{makeidx}
  6. \usepackage{graphicx}
  7. \usepackage{kpfonts}
  8. \usepackage{float}
  9. \raggedbottom
  10. \usepackage{array}
  11. \usepackage{multirow}
  12. \usepackage{longtable}
  13. % Where are our images?
  14. \graphicspath{{images/}}
  15. % Let's set this as a half-letter sized sheet
  16. \usepackage{geometry}
  17. \geometry{
  18. paperheight=8.5in,
  19. paperwidth=5.5in,
  20. % heightrounded,
  21. margin=0.5in
  22. }
  23. % Adjust the top and bottom margins
  24. \addtolength{\topmargin}{0.4in}
  25. \addtolength{\textheight}{-0.75in}
  26. % Set the header style
  27. \usepackage{fancyhdr}
  28. \pagestyle{fancy}
  29. \fancyhf{}
  30. \fancyhead[LE,RO]{\textit{the codex}}
  31. \fancyhead[RE,LO]{Issue \#003}
  32. \cfoot{Page \thepage}
  33. \renewcommand{\footrulewidth}{0.5pt}
  34. % Includ two- or three-column sections
  35. \usepackage{multicol}
  36. % Stop resetting the footnote count after each chapter
  37. \counterwithout{footnote}{chapter}
  38. % Let's wrap some images
  39. \usepackage{wrapfig}
  40. % Use tab stops when we need to (especially in footnotes)
  41. \usepackage{tabto}
  42. % Define 18 tab stops (at 1/4" intervals)
  43. \NumTabs{18}
  44. % Make things neater. Thanks /u/-LeopardShark-
  45. \usepackage{microtype}
  46. % Make a nice border and box for the tops of our examples
  47. \newcommand\klab[3]{\vspace{#1}\noindent{}\hrulefill\fbox{\texttt{~#2~}}\hrulefill\vspace{#3}}
  48. % Add an \hrule with space above and below
  49. \newcommand\krule[2]{\vspace{#1}\hrule\vspace{#2}}
  50. % Make hrefs easier (must load package hyperref}
  51. \newcommand\kref[2]{\href{#1}{{\texttt{#2}}}}
  52. % Rotate text in tables easier
  53. % https://tex.stackexchange.com/questions/89115/how-to-rotate-text-in-multirow-table
  54. \newcommand\krot[3]{\parbox[t]{#1}{\multirow{#2}{*}{\rotatebox[origin=c]{90}{#3}}}}
  55. % Use line numbers with code samples
  56. % \begin{Verbatim}...\end{Verbatim} <-- Note the capitalization!
  57. \usepackage{fancyvrb}
  58. % Break lines inside this environment:
  59. \usepackage{fvextra}
  60. % Control spacing in lists
  61. \usepackage{enumitem}
  62. % Don't force text to fill page
  63. \raggedbottom
  64. % Better control over line-spacing
  65. \usepackage{setspace}
  66. % Use nice fractions
  67. \usepackage{nicefrac}
  68. % Keep the footnotes at the bottom of the page
  69. \usepackage[bottom]{footmisc}
  70. % Do we want to include URLs?
  71. % Yes, but we also want to hide the big red box it puts around them in the pdf. Thanks /u/0b0101011001001011
  72. \usepackage[hidelinks]{hyperref}
  73. %%%% Document Information %%%%%
  74. \author{Kenneth John Odle}
  75. \title{
  76. {\Huge the codex} \\
  77. {\footnotesize Life with Linux — A Zine \\
  78. \bigskip
  79. Typeset in \LaTeX{} \\
  80. Issue \#004}
  81. }
  82. \date{\begin{small}\today{}\end{small}}
  83. % Change the name of the TOC
  84. \renewcommand*\contentsname{In This Issue…}
  85. \begin{document}
  86. \maketitle
  87. \section*{Impressum}
  88. All contents \copyright2023 Kenneth John Odle
  89. 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}
  90. 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/}).
  91. 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.
  92. 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.
  93. 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.
  94. \medskip
  95. \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}.
  96. \medskip
  97. \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.
  98. \tableofcontents
  99. \chapter{The Final Salad Days}
  100. \section{College, 2008}
  101. 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.
  102. \section{Today}
  103. \chapter{Math in \LaTeX{} with \texttt{align} and \texttt{array}}
  104. \chapter{Searching your Bash History}
  105. https://www.cyberciti.biz/faq/linux-unix-shell-history-search-command/
  106. https://www.digitalocean.com/community/tutorials/how-to-use-bash-history-commands-and-expansions-on-a-linux-vps
  107. https://superuser.com/questions/7414/how-can-i-search-the-bash-history-and-rerun-a-command
  108. https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html\#Bindable-Readline-Commands
  109. https://stackoverflow.com/questions/7131670/make-a-bash-alias-that-takes-a-parameter
  110. https://tecadmin.net/how-to-create-bash-aliases-with-parameters/
  111. \chapter{Other Flavors of Linux}
  112. 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:
  113. \begin{center}
  114. \fbox{\includegraphics[scale=1]{flavours2}}
  115. \end{center}
  116. This also omits Edubuntu which, as a former teacher, I am very interested in.
  117. \chapter{What's to Like About Linux}
  118. \section{bash Aliases for \texttt{git}}
  119. \chapter{The Right Ways vs The Wrong Ways}
  120. 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.
  121. 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.
  122. % Provide some additional spacing in this table; may move this to preamble later
  123. \setlength{\tabcolsep}{14pt}
  124. \renewcommand{\arraystretch}{1.4}
  125. \begin{table}[h]
  126. \begin{tabular}{ | c | l | p{60mm} | } \hline
  127. \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}
  128. & Very Wrong & It doesn't work and it breaks at least 50\% of things \\ \cline{2-3}
  129. & Wrong & It doesn't work and it only breaks a few things \\ \hline
  130. \multirow{2}{*}{\krot{2mm}{2}{Still Wrong}} & Kind of Wrong & It works, but it breaks a lot of other things. \\ \cline{2-3}
  131. & Wrong & It works, but it breaks a handful of things that shouldn't have to be fixed. \\ \hline
  132. \multirow{2}{*}{\krot{2mm}{2}{Wrong\textit{ish}}} & Not bad & It works in this specific instance, but not in all instances. \\ \cline{2-3}
  133. & Wrong & It works, but it's far more work than it should be. \\ \hline
  134. \end{tabular}
  135. \end{table}
  136. \begin{longtable}{ | c | l | p{60mm} | } \hline
  137. \multirow{3}{*}{\krot{2mm}{3}{Very Wrong}} & Very Wrong & It doesn't work and it breaks almost everything. \\ \cline{2-3}
  138. & Very Wrong & It doesn't work and it breaks at least 50\% of things \\ \cline{2-3}
  139. & Wrong & It doesn't work and it only breaks a few things \\ \hline
  140. \multirow{2}{*}{\krot{2mm}{2}{Still Wrong}} & Kind of Wrong & It works, but it breaks a lot of other things. \\ \cline{2-3}
  141. & Wrong & It works, but it breaks a handful of things that shouldn't have to be fixed. \\ \hline
  142. \multirow{2}{*}{\krot{2mm}{2}{Wrong\textit{ish}}} & Not bad & It works in this specific instance, but not in all instances. \\ \cline{2-3}
  143. & Wrong & It works, but it's far more work than it should be. \\ \hline
  144. \end{longtable}
  145. \chapter{More about those folders in \texttt{root}}
  146. \chapter{Coda}
  147. \section{What I Learned About \LaTeX{} While Creating This Issue}
  148. \subsection{Page Count using \texttt{detex}}
  149. \subsection{How to Create Macros}
  150. \section{What I learned About \LaTeX{} While Creating Something Else}
  151. \end{document}