45 Commits
002 ... main

Author SHA1 Message Date
Kenneth John Odle 727a07d925 Added several chemistry packages; added chemistry chapter 2 months ago
Kenneth John Odle 2720b26c90 Removed «courier»; added «nott» option to «kpfonts» 2 months ago
Kenneth John Odle e0f7f7cc6e Added «courier» package; updated «kref» macro 2 months ago
Kenneth John Odle ce623f6a46 Updated «ways» 2 months ago
Kenneth John Odle 2c7e5600e3 Updated «flavors» image and scaling 2 months ago
Kenneth John Odle 43023a9eb6 Added example of a kludge 2 months ago
Kenneth John Odle 5346f340d2 Updates to right ways/wrong ways 2 months ago
Kenneth John Odle cc6ce748b8 Updates to right ways/wrong ways 2 months ago
Kenneth John Odle eb1408fb1a Added tables to chapter 6 2 months ago
Kenneth John Odle 65c395fcbd Experimenting with image size 2 months ago
Kenneth John Odle 96ce0a2ba1 - 2 months ago
Kenneth John Odle 315e1162f9 Updated readme with etsy link to 003 2 months ago
Kenneth John Odle 8a885ee11d Added chapter «the right ways» 2 months ago
Kenneth John Odle 952bbaaf21 Added one more link to bash aliases for git 2 months ago
Kenneth John Odle 85c0350642 Added 2 months ago
Kenneth John Odle 5d63f45597 Added 2 months ago
Kenneth John Odle 7064e28572 Added chapter about bash history 2 months ago
Kenneth John Odle b5d9a3eb97 Initial commit of issue #004 3 months ago
Kenneth John Odle a4df7ee225 Updated pdf version 3 months ago
Kenneth John Odle b94f5e4778 Sixth proofreading pass 3 months ago
Kenneth John Odle b1ed2f00bc Updated example labels 3 months ago
Kenneth John Odle 75f7059e02 Fifth proofreading pass 3 months ago
Kenneth John Odle b269886cb8 Updated .gitignore file 3 months ago
Kenneth John Odle fa8e43c706 Fourth proofreading pass; ~12,000 words 3 months ago
Kenneth John Odle c341cea2d6 Added macro for more easily doing href urls 3 months ago
Kenneth John Odle 6a8d3cb0f5 Added macro to format example labels 3 months ago
Kenneth John Odle 3f892de8b2 Third proofreading pass 3 months ago
Kenneth John Odle ebdb293070 Removed section on ABC; now at 40 pages 3 months ago
Kenneth John Odle 8f4be117b7 Updated .gitignore «bak» 3 months ago
Kenneth John Odle 6fc2f3acbd Second proofreading pass; still at 41 pages 3 months ago
Kenneth John Odle 7c6f47a89e First proofreading pass; now 41 pages 3 months ago
Kenneth John Odle 26f4cfa905 Added section about garden hacks 3 months ago
Kenneth John Odle 02ef9c14b4 Added musixtex chord diagrams 3 months ago
Kenneth John Odle 9937cfd5ae Updated «Miscellaneous Things» 3 months ago
Kenneth John Odle b14101b4de Updated music section 3 months ago
Kenneth John Odle 9560f94138 Added Ubuntu 22.04 (and 24.04) 3 months ago
Kenneth John Odle d394e3f909 Added 5.1.3 «Miscellaneous Things» 3 months ago
Kenneth John Odle 61f2a42b74 Added link to Flatland project 3 months ago
Kenneth John Odle ab377f3c8c Additional work to LaTeX section 3 months ago
Kenneth John Odle 786a5ceb52 Updated readme file 3 months ago
Kenneth John Odle fc25b77fb4 Added chapter «An Introduction to LaTeX» 3 months ago
Kenneth John Odle e118528a3d Updated «What's to Like About Linux» 3 months ago
Kenneth John Odle 4e48b77257 Updated .gitignore file 3 months ago
Kenneth John Odle 1b8ac2a57e Added section about Flatland 3 months ago
Kenneth John Odle 9617c37cdd Added music and installing LaTeX packages 7 months ago
  1. 4
      .gitignore
  2. BIN
      003/build/codex-003.pdf
  3. BIN
      003/build/songs-01.pdf
  4. BIN
      003/build/songs-02.pdf
  5. 890
      003/codex-003.tex
  6. BIN
      003/images/songs-01.pdf
  7. BIN
      003/images/songs-02.pdf
  8. 7
      003/songs-01.tex
  9. 7
      003/songs-02.tex
  10. 341
      004/codex-004.tex
  11. BIN
      004/images/codeck.png
  12. BIN
      004/images/flavours.png
  13. BIN
      004/images/ncsa4-0.png
  14. 13
      README.md

4
.gitignore

@ -8,3 +8,7 @@ Covers
*.dvi
*.odt
metric*
*.mx1
*.abc
*.bak
*wc*

BIN
003/build/codex-003.pdf

BIN
003/build/songs-01.pdf

BIN
003/build/songs-02.pdf

890
003/codex-003.tex
File diff suppressed because it is too large
View File

BIN
003/images/songs-01.pdf

BIN
003/images/songs-02.pdf

7
003/songs-01.tex

@ -0,0 +1,7 @@
\documentclass{standalone}
\usepackage[chorded]{songs}
\begin{document}
\gtab{A}{X02220:001230}
\end{document}

7
003/songs-02.tex

@ -0,0 +1,7 @@
\documentclass{standalone}
\usepackage[chorded]{songs}
\begin{document}
\gtab{C#sus4}{4:XX3341}
\end{document}

341
004/codex-004.tex

@ -0,0 +1,341 @@
\documentclass[twoside]{report}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{makeidx}
\usepackage{graphicx}
\usepackage[nott]{kpfonts}
\usepackage{float}
\raggedbottom
\usepackage{array}
\usepackage{multirow}
% 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}
% Include 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}
% Just for issue #004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{pifont}
\usepackage{qrcode}
\usepackage{mhchem}
\usepackage{chemformula}
\usepackage{chemfig}
%%%% 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
\kref{https://creativecommons.org/licenses/by-nc-sa/4.0/}{https://creativecommons.org/licenses/by-nc-sa/4.0/} \includegraphics[scale=0.30]{ncsa4-0}
\medskip
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, which you can find at
\kref{https://pdfbooklet.sourceforge.io/wordpress/}{https://pdfbooklet.sourceforge.io/wordpress/}
\medskip
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.wi\\kimedia.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}: \kref{https://git.kjodle.net/kjodle/the-codex}{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/Errata}.
\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=0.35]{flavours}}
\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.
Experience has shown me that not all wrong ways are wrong in the same way or to the same degree, and that the same is true of right ways. There may be multiple right ways to get something done, but some require less work and some require more work. It is not just a black-and-white issue.
In the past few years, I've started things less in terms of a particular ``right way'' opposed to a particular ``wrong way'', and started thinking in terms of a spectrum of choices, some of which are obviously wrong (but wrong to varying degrees) and some of which are right because they work, but you have to take different roads to get there.
What I have tried to do here is to create a hierarchy of ``rightness'' and ``wrongness'' as a way to organize my thinking on this subject; I can then jump in and discuss why things fall the way they do. No doubt, other people might have more distinctions or fewer in their hierarchy, or might have things in a separate order, or might have different reasons.
And, as we shall see, sometimes it's beneficial to do something the wrong way.
\newpage % Move this list to a new page.
\begin{itemize}[noitemsep]
\item \textbf{Very Wrong}
\begin{itemize}[noitemsep]
\item It doesn't work and it breaks things in weird places.
\item It doesn't work and it breaks almost everything.
\item It doesn't work but it only breaks a few local things.
\end{itemize}
\item \textbf{Wrong}
\begin{itemize}[noitemsep]
\item It works, but it breaks things in weird places.
\item It works, but it breaks almost everything else.
\item It works, but it still manages to break a few local things.
\end{itemize}
\item \textbf{Wrong\textit{ish}}
\begin{itemize}[noitemsep]
\item It works in this specific instance, but not in all instances.
\item It works, but it's far more work than it should be.
\end{itemize}
\item \textbf{Right\textit{ish}}
\begin{itemize}[noitemsep]
\item It works, but you have no idea why.
\item It works, but it requires you to rework some other pieces.
\item It works, but it's a bit of a kludge.
\end{itemize}
\item \textbf{Right}
\begin{itemize}[noitemsep]
\item It works, and is considered a best practice.
\end{itemize}
\item \textbf{Genius}
\begin{itemize}[noitemsep]
\item It's a true hack.
\end{itemize}
\end{itemize}
\section*{Very Wrong Ways}
Very wrongs ways are very wrong because not only do they not work, they take other things down with them.
\paragraph{It doesn't work and it breaks things in weird places.} You may wonder why this is worse than ``It doesn't work and it breaks almost everything else'' but for me the answer is simple: it can be terribly difficult to find those weird places. When I say ``weird'' I mean that they may be obscure places that nobody looks, they may be distant from the current situation and apparently unconnected,\footnote{But nothing is \textit{truly} disconnected from anything else.}, or they may be things that you don't have to rely on very often, so you may not discover that they are broken until days, weeks, or even months later.
\paragraph{It doesn't work and it breaks almost everything else.} This is bad, but it is not bad as the previous example, because it has two advantages. First, because almost everything is breaking, those breaks are pretty obvious. Second, because almost everything is breaking, this provides you an opportunity to look at the overall structure of your project and examine how all the different parts are connected. There may be connections that you weren't aware of. You may realize that some things are connected that shouldn't be or that some things aren't connected that should be. Sometimes it takes a real disaster to point out the strengths and weaknesses of your system.
\paragraph{It doesn't work and it still manages to break a few local things.} No complaints here. You have to undo what you did and maybe fix a few things, but you probably don't have a whole lot more to think about here.
\section*{Wrong Ways}
Wrong ways may work, but they break other things along the way. As we shall see, this is not always a bad thing.
\paragraph{It works, but it breaks things in weird places.} Again, the main issue here is that those weird places may not be obvious at first. You might use this technique, and it looks like it's working fine, but suddenly there is a person in Germany whose toilet no longer flushes properly. Or it works fine for you now, but in ten months \textit{your} toilet no longer flushes properly. And because these two things are so separated in place (in the former case) or time (in the latter case) it can be difficult to connect the two things, and we might end up spending a lot of time going down rabbit holes when the real solution is right in front of us the entire time. We waste time and effort.
\paragraph{It works, but it breaks almost everything else.} This is almost exactly like ``It doesn't work and it breaks almost everything else'' except that your solution \textit{does} work. You just need to look at your overall system and figure out why everything else is going into meltdown mode.
\paragraph{It works, but it still manages to break a few local things.} Even though this is listed as a wrong way---you are still breaking things, after all---this is not always a bad outcome to experience. It's possible that those few things that are breaking are breaking because they are weak. If you strengthen those items and then apply this technique, it turns out that this isn't actually wrong after all, it only seemed wrong at the time. In the end, you have a much project that is much less fragile overall.
\section*{Wrong\textit{ish} Ways}
\paragraph{It works in this specific instance, but not in all instances.} It works, so why is this way still wrong? Because it's not \textit{universal} for all similar situations. If it works in \textit{this one particular instance} but not similar instances, and you don't know why, then there is something about this particular instance that you are not aware of. This is not a bad thing if you're willing to chase down that unknown thing; it's potentially disastrous if you are not.
\paragraph{It works, but it's far more work than it should be.} This is often a case of not having the right tools, or having the right tools but not knowing how to use them. If you need to dig a ditch, a shovel will work, but a backhoe works much better. All that time you spent working with a shovel is time you could have spent doing something else.
\section*{Right\textit{ish} Ways}
\paragraph{It works, but you have no idea why.} I was very tempted to put this in the wrong\textit{ish} section, and in some cases it may certainly belong there. Quite frankly, you should know why a technique works. Not knowing why can be dangerous, because you assume too much about this particular technique. That may cause you to be a bit overconfident with it, and use it in a situation that doesn't really warrant its use.
\paragraph{It works, but it requires you to rework some other parts of the project.} I admit, I was at a lost as to where to put this one. And I guess it depends if you are using a kludge or a best practice, so I'm going to assume you are using a best practice. In which case, this shows you places that you were possibly \textit{not} using something which is a best practice, and now you need to make those things better.
\paragraph{It works, but it's a bit of a kludge.} A kludge is not always a bad thing (sometimes you have to work with what you have) but they are at best, inelegant, and at worst weighty and ugly. But they work for now, they don't break things, and they will last until you learn or can afford a better way. (I created a bit of a kludge when I couldn't figure out how to indent a bibliography entry. \footnote{You can see it in action in this commit for a different project: \kref{https://git.kjodle.net/kjodle/Notes-on-Python/commit/d4f93ec00f1e1078b1cfcb3aacd3481eb82bb0cd}{https://git.kjodle.net/kjodle/Notes-on-Python/commit/d4f93ec00f1e1078b1cfcb3a\\acd3481eb82bb0cd}.} Does it work? Yes. Am I happy with it? Not entirely. I'm 75\% there is a better way to do this, but I haven't found it yet. But it works for now, and I've marked it as a kludge, so I know this is something that I can come back to later. At least I made this less weighty and hid its heft and inelegance by turning it into a macro.)
\section*{Right Ways}
\paragraph{It works, and is considered a best practice.} A best practice is one that has generally been accepted as the best way to do things not because it is perfect, but because it produces results that are better than the results achieved by other methods. This is a good thing. A best practice is a best practice because it's proven itself. It's not perfect (hence it's a ``best practice'' not a ``perfect practice''), but you can count on it to get the job done. And because it is a best practice, when things go pear-shaped, it's probably because of something you've done, but if it isn't, there will most likely be a lot of people who are \textit{very} interested in helping you.
Unfortunately, sometimes a best practice is arrived at that for no other reason than ``that's how we've always done it and nothing has exploded yet.'' That's not great, but still, have a fire extinguisher handy.
\section*{Genius Ways}
\paragraph{It's a true hack.}
As I said way back in the first issue, I define a hack as ``an appropriate application of ingenuity''\footnote{See \kref{http://www.catb.org/~esr/jargon/html/meaning-of-hack.html}{http://www.catb.org/~esr/jargon/html/meaning-of-hack.html} for more information.}. These are rare, often false (it only resembles a hack; like the wizard in \textit{The Wizard of Oz}, it's based on smoke and mirrors), and even more often small.\footnote{You can usually identify a false hack by how large it is.} If you find one, enjoy it, preserve, and help to disseminate it.
\chapter{Chemistry in \LaTeX{}}
\section{Package \texttt{hmchem}}
For typesetting chemical equations:
\ce{CO2 + C -> 2 CO}
\ce{Hg^2+ ->[I-] HgI2 ->[I-] [Hg^{II}I4]^2-}
\ce{1/2H2O}
\section{Package \texttt{chemformula}}
For typesetting chemical compounds and reactions:
\ch{KCr(SO4)2 * 12 H2O}
\ch{[Cu(NH3)4]^2+}
\ch{$2n$ Na + $n$ Cl2 -> $2n$ NaCl} \par
\ch{\{[CH2=CH-CH2]- <-> {}[CH2-CH=CH2]- \}} \par
\section{Package \texttt{chemfig}}
For drawing molecules:
Glucose:
\chemfig{?(-[:190]OH)-[:-50](-[:170]OH)-[:10](-[:-55,0.7]OH)
-[:-10](-[6,0.7]OH)-[:130]O-[:190]?(-[:150,0.7]-[2,0.7]OH)}
\chapter{A \texttt{git} Workflow}
\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}

BIN
004/images/codeck.png

After

Width: 510  |  Height: 264  |  Size: 28 KiB

BIN
004/images/flavours.png

After

Width: 1160  |  Height: 849  |  Size: 136 KiB

BIN
004/images/ncsa4-0.png

After

Width: 88  |  Height: 31  |  Size: 1.6 KiB

13
README.md

@ -15,6 +15,10 @@ If you have questions or suggestions, you can join the [forum for this zine](htt
## Paper Copies
**Issue 003**
You can buy this on etsy at [https://www.etsy.com/listing/1507867746/the-codex-a-zine-about-linux-issue-3](https://www.etsy.com/listing/1507867746/the-codex-a-zine-about-linux-issue-3). I don't have metric versions available for download as of yet (12 July 2023) but I am working on it.
**Issue 002**
You can buy a paper copy of issue [#002](https://www.etsy.com/listing/1262188799/the-codex-a-zine-about-linux-issue-2) in my Etsy shop. Unfortunately, I can only ship to North America at the present time.
@ -51,4 +55,13 @@ I used a handful of packages to make this document, which I've listed below, alo
Also reddit user -LeopardShark- recommended using the package [microtype](https://www.ctan.org/pkg/microtype) to get finer typographical control. ~~Maybe in the next issue.~~ I'm actually using this in issue 002 and you can tell the difference by comparing page 2 in both issues and looking at the placement of the Creative Commons icon.
### New in issue 3:
* [fancyvrb](https://ctan.org/pkg/fancyvrb) &mdash; Extending the ``verbatim`` environment.
* [fvextra](https://ctan.org/pkg/fvextra) &mdash; Extending the ``fancyvrb`` package.
* [enumitem](https://ctan.org/pkg/enumitem) &mdash; Extra control over the basic list environments.
*****
If you like this, but don't want to buy, you can always [donate](https://www.paypal.me/kjodle) via PayPal. (No PayPal account is necessary.) It's greatly appreciated.
Loading…
Cancel
Save