the-codex/003/codex-003.tex

1037 lines
82 KiB
TeX
Raw Normal View History

2023-02-16 16:35:18 +00:00
\documentclass[twoside]{report}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{makeidx}
%\makeindex
\usepackage{graphicx}
\usepackage{kpfonts}
\usepackage{float}
\raggedbottom
% Where are our images?
\graphicspath{{images/}}
% Let's set this as a half-letter sized sheet
% https://tex.stackexchange.com/questions/338789/how-to-set-paper-size-to-half-letter-5-5-x-8-5-in-in-amsbook
\usepackage{geometry}
\geometry{
paperheight=8.5in,
paperwidth=5.5in,
% heightrounded,
margin=0.5in
}
% Adjust the top and bottom margins
% http://kb.mit.edu/confluence/pages/viewpage.action?pageId=3907057
\addtolength{\topmargin}{0.4in}
\addtolength{\textheight}{-0.75in}
% Set the header style
% https://www.overleaf.com/learn/latex/Headers_and_footers
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[LE,RO]{\textit{the codex}}
\fancyhead[RE,LO]{Issue \#003}
\cfoot{Page \thepage}
\renewcommand{\footrulewidth}{0.5pt}
% Include sections and subsections in the TOC
% https://latex-tutorial.com/tutorials/table-of-contents/
% \setcounter{tocdepth}{2}
% We will probably want some two- or three-column sections
\usepackage{multicol}
% Stop resetting the footnote count after each chapter
\counterwithout{footnote}{chapter}
% Let's wrap some images
% https://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions
\usepackage{wrapfig}
% Use tab stops when we need to (especially in footnotes)
\usepackage{tabto}
% Define 18 tab stops (at 1/4" intervals)
\NumTabs{18}
% Use strikethrough
\usepackage{ulem}
% Make things neater. Thanks /u/-LeopardShark-
\usepackage{microtype}
2023-07-07 23:10:23 +00:00
% Make a nice border and box for the tops of our examples
2023-07-08 20:19:16 +00:00
\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}}}}
2023-07-07 23:10:23 +00:00
2023-02-16 16:35:18 +00:00
% Keep this in case it becomes useful later
% \usepackage{booktabs}
% Use line numbers with code samples
% \begin{Verbatim}...\end{Verbatim} <-- Note the capitalization!
\usepackage{fancyvrb}
2023-06-25 14:03:09 +00:00
% Break lines inside this environment:
\usepackage{fvextra}
% Control spacing in lists
\usepackage{enumitem}
2023-02-16 16:35:18 +00:00
2023-07-07 23:10:23 +00:00
% Don't force text to fill page
2023-02-16 16:35:18 +00:00
\raggedbottom
% Pictures!
\usepackage{tikz}
% Cancel units in math mode!
\usepackage{cancel}
% Better control over line-spacing
\usepackage{setspace}
2023-02-16 16:35:18 +00:00
% Use nice fractions
\usepackage{nicefrac}
2023-06-26 22:08:34 +00:00
% Keep the footnotes at the bottom of the page
\usepackage[bottom]{footmisc}
% Just for issue #003:
2023-06-26 22:08:34 +00:00
\usepackage{mathtools}
\usepackage{wasysym}
\usepackage{harmony}
\usepackage{musixtex}
\usepackage[generate,ps2eps]{abc}
\usepackage{mathptmx} %Necessary for abc package to work?
% 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 %%%%%
2023-02-16 16:35:18 +00:00
\author{Kenneth John Odle}
\title{
{\Huge the codex} \\
{\footnotesize Life with Linux — A Zine \\
\bigskip
Typeset in \LaTeX{} \\
Issue \#003}
}
\date{\begin{small}\today{}\end{small}}
% Change the name of the TOC
\renewcommand*\contentsname{In This Issue…}
2023-02-16 16:35:18 +00:00
\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}
2023-07-04 17:20:44 +00:00
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/}}).
2023-02-16 16:35:18 +00:00
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.
2023-02-16 16:35:18 +00:00
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/Errata}.
2023-02-16 16:35:18 +00:00
\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.
The picture of a VT100 terminal is courtesy of Jason Scott. It was published at \href{https://en.wikipedia.org/wiki/VT100\#/media/File:DEC_VT100_terminal.jpg}{\texttt{https://en.wikipedia.org/wiki/VT100\#/media/File:DEC\_VT100\_term \\ inal.jpg}} where you can also find the Creative Commons 2.0 license it was licensed under. (By Jason Scott - Flickr: IMG\_9976, CC BY 2.0, https://commons\\.wikimedia.org/w/index.php?curid=29457452)
2023-02-16 16:35:18 +00:00
\tableofcontents
\chapter{The Final Salad Days}
2023-02-16 16:35:18 +00:00
2023-07-06 20:18:53 +00:00
\section{College, 1986}
2023-02-16 16:35:18 +00:00
I went away to college in the fall of 1986. Personal computers were, as always, very much on my mind, but all I had was a Commodore 128. We were still typing papers on electric typewriters at that point, and the height of that technology was correction paper.\footnote{This was a very convenient alternative to a product called "Liquid Paper" (also called "whiteout") which was essentially paper-colored paint in a small bottle with a brush in the cap. When you made a mistake, you shook the bottle and brushed a very thin layer over the mistake. You then waited for the whiteout to dry, backed up, and typed the correct letter. The fluid contained a lot of solvent, and as this was the time of the Satanic Panic, parents were warned that their kids could be huffing whiteout. As you used the product, more and more of the solvent evaporated out of the bottle, until it eventually became a gloopy, chalky mess, meaning you could only use half of what was in the bottle—it was not very efficient. With correction paper, you just backed up to the mistake, put a bit of correction paper on top of the paper, typed the mistake again, removed the correction paper, backed up, and typed the correct letter. It was much neater, had no terrible fumes, and you didn't have Fundies chasing you down the street accusing you of being a devil-worshiping drug addict because you had a bottle of correction fluid in your pocket. (Liquid Paper was invented by Bette Nesmith Graham, who also happened to be the mother of Mike Nesmith of the Monkees. The world is much smaller than we think it is.)}
2023-02-16 16:35:18 +00:00
We did have computers available to us, however. Our college owned two mainframe systems: a DEC-10 and a VAX 9000. As I remember, you had to go down to the basement of the science building to use them, where they had a room filled with VT100 terminals.
2023-07-08 14:55:00 +00:00
I wish for the life of me that I could remember this experience better. The ``computer room'' (nobody thought of it as a ``lab''—it would be many years before I heard that term applied to it) looked a lot like what one might think: a windowless basement room with concrete block walls, tile floors, fluorescent lights buzzing away like hornets overhead, and lots and lots of terminals.\footnote{There is a pdf of the VT100 manual available at \href{https://vt100.net/dec/ek-vt100-tm-002.pdf}{\texttt{https://vt100.net/dec/ek-vt100-tm-002.pdf}}. It makes for fascinating reading, assuming you are into that sort of thing.}
2023-02-16 16:35:18 +00:00
\begin{wrapfigure}[]{l}{0.34\textwidth}
\vspace{-8pt}
\includegraphics{vt100}
\vspace{-12pt}
\end{wrapfigure}
2023-07-06 20:18:53 +00:00
People didn't really know much about these two mainframe systems, although I remember hearing the few computer people who were around praising the VAX as being far superior to the DEC-10.\footnote{A bit of internet research confirms this—the VAX line of mainframes was intended as a replacement for the DEC line of mainframes.} Everything was from the command line. If you saved a file\footnote{I tried for a few weeks to type up some of my notes from class, but quickly realized that this was pointless, as I couldn't take the digital files with me.} and wanted to print it, you had to send it to the print queue, and then go to a different room in the building where the line printer was located.
2023-02-16 16:35:18 +00:00
2023-07-08 14:55:00 +00:00
At this point, it was possible that your printout would be ready. But it was also entirely possible that it wouldn't be ready. Everything was printed on unperforated continuous feed paper that was 15 inches wide.\footnote{See the Wikipedia entry on ``continuous stationery'' to see what I'm talking about.} The problem was someone had to be there to tear off your printout after it was completed—the printers had no way of doing this automatically—figure out that it belonged to you, label it with your name, and set it on a shelf for you to pick up later.
2023-02-16 16:35:18 +00:00
2023-07-08 14:55:00 +00:00
And if nobody was there, the printer just kept printing, and someone would have to separate potentially dozens of different print jobs. If your print job was small, the person responsible could miss it and it would end up stuck on the end of someone else's print job. If the printer ran out of paper and nobody was there to replace it, your file just went into the printer memory (or somewhere into the ether if the printer's memory was full) until the paper was refilled. Printing anything was a big investment of time and energy (not to mention hope) and I will gladly take the occasional printer jam over that experience any day.
2023-02-16 16:35:18 +00:00
The only other remarkable thing I remember about that early college experience is that everybody had to take a basic computer course. This was a single, university-wide, 100-level course that all freshmen had to take.
2023-02-16 16:35:18 +00:00
I hate these sorts of things.
I get the point—computers are going to be a thing in everybody's lives, so lets make sure all our future graduates have a solid background in them. The problem is that information technology moves at a pretty rapid pace, and college students have a wide variety of backgrounds and career plans, and as a result, it's difficult to create a course like this that is in any way useful to every single student who takes it.
And I found that I knew much of the material anyway. It was held in a large lecture hall, and there wasn't really any point for the instructor to hold up a hard drive in her hand and announce ``This is a hard drive''—unless you were in the first ten rows, she could have been holding up a brick.\footnote{This is not hyperbole—drives were a lot bigger in those days.} I'm sure that what she said after that sentence was informative, but I'm also sure I already knew it.
2023-02-16 16:35:18 +00:00
Sometime during the third week we had an entire lecture about modems (``\textit{modem} stands for \textit{modulator-demodulator}'' I remember hearing before I dozed off\footnote{Which is true, but means absolutely nothing to anyone who just wants to get on the internet. Modems were designed to transmit digital data over analog telephone lines, and they accomplished this by \textit{modulating} a carrier wave to carry digital information before sending it, and \textit{demodulating} a received carrier wave to recreate the original digital information. I don't miss 4,800 bps speeds, but I do miss that modem login sound. Apparently other people do as well, because you can hear it at \href{https://www.youtube.com/watch?v=gsNaR6FRuO0}{\texttt{https://www.youtube.com/watch?v=gsNaR6FRuO0}}}) and I decided to just stop attending class. I showed up for the exams, rushed through them, got a C in the course, and decided to never take another computer course ever again.
I should mention that I went to college with the goal of becoming high school biology teacher. Over time, I realized how valuable this computer course was to me, because it made me realize that no matter who you are or where you are in life, any class should be valuable to you in some way, even if it's not the way the course designers intended. This course is now valuable to me because it taught me what a class should \textit{not} be. (This is a lesson that the modern educational-industrial complex has not, and will never, absorb.)
2023-02-16 16:35:18 +00:00
2023-02-16 16:35:18 +00:00
\section{Teaching Computers}
2023-07-08 20:19:16 +00:00
I graduated from college with a B.S. in Biology and a teaching certificate. I could not find a job teaching biology—I quickly discovered that biology teachers are a dime a dozen\footnote{This was a huge surprise to me, because all through college, whenever I told someone I was a biology major, they seemed really impressed and said something like "oh gosh, biology—that's really hard." But note—these were non-science people. If you want to study science, but don't want anything too hard, apparently biology is the default.} and chemistry teachers are about five bucks a dozen, and also that if you majored in physics with a goal of teaching high school science, you would have your choice of any teaching position you wanted.
2023-02-18 20:13:36 +00:00
Of course at this time (the early 90s), lots of people still wanted to be teachers (unlike now) because teachers still mostly garnered respect from the public, parents, and administrators, and teaching jobs were hard to come by (also unlike now). So I started substitute teaching and doing whatever I could to pay the bills.
2023-02-18 20:13:36 +00:00
I eventually managed to find a job at my old high school teaching what used to be called ``night school''\footnote{I have no idea what this is now called, or if it is even still a thing.} and what is still called ``community education''. But names are only labels and are usually irrelevant. My night school students had dropped out of a traditional high school education and were now in search of a GED\footnote{General Equivalency Degree—aka ``high school diploma in a box''.} to help their job prospects. I was there to teach them just enough Earth Science to enable them to pass the science portion of the GED exam.\footnote{There is so much that I could say here, but it is completely irrelevant to our current purpose and so belongs to an entirely different zine.}
More relevant to the purposes of this zine were the community education classes which were your basic ``Introduction to Computers'' class.
2023-07-06 20:18:53 +00:00
I really wish I could remember how I got this job. I would like to think that I had a very long, very detailed job interview which I simply aced, but I very much doubt it. I don't remember meeting with an administrator at all. The only person I can remember interacting with was a much pressed-upon administrative assistant named Geri. (I would not have been surprised to discover that she supplemented her income by delivering pizza on the weekends—such was the level of our funding.)
2023-02-18 20:13:36 +00:00
So yeah, an interview in which I was grilled about my knowledge of both computers and pedagogical theory did not happen. What probably happened was that I applied for the position teaching Earth science and submitted a paper resume written on a Commodore 128 and printed out on an Okidata dot-matrix printer, and they saw that dot-matrix printing and thought ``This guy knows how to use a computer. We should ask if he can teach our community education computer course as well.'' In fact, I'm quite sure that is what happened. Dot-matrix for the win!\footnote{I have no problems with this. Sometimes low expectations work in your favor. Don't look a gift horse in the mouth.}
I don't remember much about this ``Introduction to Computers'' class. It took place in the same room my high school computer class had been in, but all the previous computers were gone and had been replaced by shiny new computers running Windows. As this was around 1992, this would have been some version of Windows 3.
2023-07-04 17:20:44 +00:00
What I do remember the most about this class was that the best way to teach anybody anything about computers was to maintain a completely hands-off policy. That is, if somebody asked me how to do something, rather than grab their mouse and \textit{demonstrate} how to do it, I found that it was better if I stood back, told the student to grab their mouse, and then told them where to point it and where to click. I confess this was partly laziness on my part—you can only \textit{show} someone so many times how to do something as simple as printing a file or turning the computer on before you are completely done with it.
2023-02-18 20:13:36 +00:00
But I discovered a wonderful thing about this: \textit{telling} is very different than \textit{showing}. When I show someone something I tend to use words like ``here,'' ``over here,'' etc. But when I \textit{tell} someone something, I have to use much more specific terms like ``upper-left hand corner'' and ``half way down''.
2023-07-08 20:19:16 +00:00
This meant that when I told someone how to print a file I ended up saying something like ``move your mouse\footnote{i.e., cursor. To someone who is new to computers, the two are one.} to the upper left-hand corner, find the `File' menu and click on it, and then go about half way down until you see the word `Print' and click on it.''
2023-02-18 20:13:36 +00:00
And this worked. My students were not familiar with a ``File'' menu, but they were familiar with the concepts of ``up,'' ``down,'' ``right,'' and ``left''. This led me to realize something that I had not been taught in college—you have to work with students where they are, rather than where you wish they were. You can't play the ``if only'' game. (``If only my students knew where the File menu is…'' Again, there is a lot more to say here, but that's an entirely different zine.)
2023-02-18 20:13:36 +00:00
I know that the usual dictum is ``show, don't tell''. But what's really happening here is that by \textit{telling} my students, they were then \textit{showing} themselves, and developing some muscle memory along the way.
Although I thoroughly enjoyed teaching this class, nothing good can last forever. A new Republican governor was elected and he slashed funding for community education and adult education programs. (A less-educated populace is easier to control, I guess.)\footnote{He also slashed anything that benefits anyone who isn't wealthy \textit{and} white \textit{and} male. (Mathematically, that would be $wealthy \land white \land male$, with emphasis on the \textit{and}.) To this day I would pay good money (i.e., beer money) to buy him a one-way ticket to Planet Fuck-Yourself-Up-The-Ass-With-A-Sharp-Stick.} I taught this course for a year, had a great time, and would gladly teach it again, even with the miserable wages. Hell, I'd do it now as a volunteer. Knowledge should be shared, not horded and sold.
2023-06-27 20:53:55 +00:00
\chapter{Is This Really a Hack? \\(Or is it something even worse?)}
2023-06-27 20:53:55 +00:00
Way back in issue \#1, I took a look at cooking ``hacks'' and wondered if these were really hacks (i.e., ``an appropriate application of ingenuity'') or if they were merely being marketed as a hack because in the past few years, hackers and hacker culture have become a trendy thing to talk about, even though the public really has no idea what those words actually mean.
\begin{quote}
\rule{\linewidth}{0.5pt}
\textit{You keep using that word. I do not think it means what you think it means.}
\begin{flushright}
---Inigo Montoya, \textit{The Princess Bride}
\end{flushright}
\vspace{-16pt}
\rule{\linewidth}{1pt}
\end{quote}
It really bugs me that the words ``hack'' and ``hacker'' have become associated with ``cool'' and ``must have'' thanks to marketers. (It also bugs me that a whole class of employees exist whose only purpose is to convince you to buy things that you probably don't need. But here we are.\footnote{My issue is not that they are here to inform you (if their products were \textit{that} great, an informed decision is all I need to make), but to influence your behavior in ways in which you probably aren't even aware.})
2023-06-27 20:53:55 +00:00
So I decided to attempt this quest again, but instead of cooking hacks, I decided to look at gardening hacks, as I know quite a bit about gardening. I went to the $\Gamma$oogle, typed in ``garden hacks'' and jumped into the first result that came up.
\begin{enumerate}
2023-07-06 20:18:53 +00:00
\item \textbf{Use newspaper as a weed barrier} --- That's right: just lay some newspaper down on the ground, throw some dirt over it, and go to town planting your garden. This is definitely not a hack, it's more like a \textbf{gimmick} that is actually \textbf{really bad advice}. Newspaper will break apart quickly, and is not effective against perennial weeds unless you lay down a really thick layer. Besides, the advice was to put dirt \textit{on top of the newspaper}. What's to keep wind-blown seeds from just landing and sprouting on \textit{that} dirt? Save your money and just buy some mulch.
2023-07-04 17:20:44 +00:00
\item \textbf{Use plastic bottles as mini-greenhouses} --- I've seen this so many times and its popularity seems to rely on the fact that people somehow think of greenhouses as magical boxes.\footnote{Clarke's Law applies to greenhouses, apparently.} The point of an actual greenhouse is to let light in. The watering is still up to you. So yeah, you can cut a bottle in half, fill the bottom with soil, plant your seeds, and throw the top on to keep moisture in until the seeds sprout, but it seems to me it would be easier to just plant the seeds in the bottom and make sure to keep them watered. There is nothing magical about a transparent top, and thus this isn't a hack, but a mere \textbf{gimmick}.\footnote{I suppose this is popular because people can then say ``hey, look at me, I'm recycling!'' but you aren't recycling, you're \textit{reusing}. And the end result is a dirty bottle that \textit{can't} be easily recycled.}
2023-07-06 20:18:53 +00:00
\item \textbf{Punch some holes in the cap of a gallon milk jug and use it as a watering can} --- This is definitely a \textbf{gimmick}. Why not just leave the cap off and pour water directly out of the jug the way you do milk? Is that not simpler? The \textit{real} hack is to drill a few small holes in the \textit{bottom} of the jug, fill it with water, and set it next to your plants. This is a great way to keep tomatoes and other large plants watered during a hot dry summer without constantly sprinkling them with water.
\item \textbf{Place a kitchen sponge in the bottom of a pot to soak up extra water and avoid root rot} --- The problem with this \textbf{gimmick} is that sponges absorb water and hold onto it until it evaporates (and not a lot of evaporation is going to happen if it's been buried). If you give your potted plant too much water, the ideal situation is to have something large---stones, for instance---that don't lock together that will keep the dirt in while letting the excess water out.\footnote{Or you could just learn how to water your plants properly. I admit to not being an expert at this (ADHD makes tasks like this interesting), but it seems better to err on underwatering, which is easily corrected, rather than overwatering, which is not.} A sponge will just hold all that extra water, making this \textbf{really bad advice} if you tend to overwater.
2023-07-08 20:19:16 +00:00
\item \textbf{Use wine corks with a toothpick as plant labels} --- This \textbf{gimmick} was described as a great way to recycle, but I don't know that our landfills are overflowing with wine corks. Corks are just oak bark, and will naturally, if slowly, break down in the soil or in a compost pile.\footnote{The assumption that there is an entire privileged class that has so many wine corks that they don't know what to do with them says a lot about the person spouting this ``advice'' and their intended audience.} Just use some popsicle sticks and let the kids use the corks in their craft projects.
2023-06-27 20:53:55 +00:00
\item \textbf{Use toilet roll cores as seedling pots} --- Most people just throw out the core from a roll of toilet paper, but this is a true \textbf{hack}, as it uses up something that you are just going to end up throwing in either the trash or the recycling anyway. And it will break down in your soil and add some organic matter, as well.
\item \textbf{Use seeds from store-bought vegetables (e.g., tomatoes and peppers) to start your own garden plants} --- This is just \textbf{bad advice}. Most supermarket vegetables are hybrids anyway, and won't come true from seed. Also, starting plants from seed is really hard work! If you're going to go through all that work, you might as well fork out for some high quality seeds.
2023-07-08 20:19:16 +00:00
\item \textbf{Use ordinary table salt as fertilizer} --- This is just \textbf{really bad advice} because excess levels of salt can damage or even kill most plants. Maybe they were thinking of \textit{Epsom} salt, which can be used as a fertilizer when properly diluted, because it contains high quantities of magnesium. (Nope, they actually list that one further down the list.)
2023-07-04 17:20:44 +00:00
\item \textbf{Make homemade weed killer with vinegar, table salt, and dish soap} --- This one would actually probably work, because again, salt is really bad for plants, and vinegar will kill the leaves. But it won't kill the roots, which is I suppose why they are including salt. Also, in light of the previous ``hack'', is salt going to kill your plants or fertilize them? Leave the salt out and I'd be willing to call this a technique, but I'm not sure why weeds are even a problem, what with that thin layer of newspaper you put down all over the place. Again, this is just \textbf{bad advice}.
2023-07-08 14:55:00 +00:00
\item \textbf{Make fertilizer tea from your weeds to feed your plants} --- This \textbf{gimmick} is just silly: take the weeds that you've just pulled up, put them in a bucket and cover them with water, wait for a few hours, get rid of the weeds and then water your garden with this miraculous, nutrient rich water. For one thing, you're just not going to get that many nutrients out of freshly picked weeds in a few hours. This is more like putting some leafy greens in a water bath to perk them up. Second, you still have to get rid of the weeds. It would make more sense to just put the weeds in a compost pile, which is probably where this idea came from because compost tea is a real thing.\footnote{Although if you're going to go through all the trouble of making compost, you may as well just apply it to the soil and let your garden make its own compost tea every time it rains or you water it. Why are you going through extra steps?}
2023-07-06 20:18:53 +00:00
\item \textbf{Make holes to plant your seeds in by putting corks on the end of a garden fork} --- This is not a hack, it's not a gimmick, nor is it even just a ridiculously terrible idea, it's also \textbf{physically impossible}. Most garden forks have tines that almost as wide as a wine cork is, so there's no way you're going to be able to stick a cork on there.\footnote{It's notable that even though this ``hack'' was accompanied by a picture of a garden fork stuck in the ground, there was not a wine cork to be seen anywhere.} And even if you could, this would just become bad advice because 1) not all seeds should be planted the same width apart, and 2) how difficult is it to make a hole in your garden soil to drop a seed in there? If your soil is that hard, you've got bigger problems that all the wine corks in the world aren't going to solve. For what it's worth, here's the entire process, in all its ridiculous glory:
2023-06-27 20:53:55 +00:00
\begin{quote}
\textit{Sowing your seeds just got simpler! Rather than digging individual holes all along your garden bed, enlist the help of recycled materials to turn a garden rake into a makeshift sower. Just press an old wine cork onto each prong so that it's just just} (sic) \textit{ as long as you'd want your holes deep, then push the tool into the dirt. When you pull it back up, you'll be left with a row of holes ready for seeds.}\footnote{Yes, this comes from Bob Vila's website. I know that there used to be a Cult of Bob Vila who thought he could do nothing wrong, but I beg to differ. The byline on his website is ``Tried, True, Trustworthy Home Advice'', but this bit of advice has not been tried and is definitely not true, which makes me question just how trustworthy the rest of the advice on his website is.}
\end{quote}
\end{enumerate}
And that's it. There are plenty more examples, but I am out of space. This has actually been kind of fun, but I don't know if I have it in me to do another one of these, because there just aren't that many things that I know enough about to decide if something is an actual hack or not.
Sadly, a lot of this stuff comes from ``lifestyle'' sites where if something doesn't work, it really doesn't matter. You might be out a few bucks and a few hours of your time, but in the end does it really matter?\footnote{In that way, these lifestyle sites are a lot like religion: you sell a big promise, but when it fails to come about, you conveniently get to blame the user for doing it wrong.} Probably not. It is notable, however, that if you $\gamma$oogle ``brain surgery hacks'' you won't get anything that involves wine corks or toilet rolls.
\paragraph*{What I've learned from this:}
2023-06-27 20:53:55 +00:00
\begin{enumerate}[noitemsep]
\item Ordinary people don't really know what is meant by the terms ``hack'' or ``hacker''.
\item Marketing people (who also don't understand what these terms mean) use them to sell stuff to people who want to feel like they are riding a trend.
\item Most things on the internet that are described as ``hacks'' are really just examples of really poor ``journalism''.
2023-06-27 20:53:55 +00:00
\end{enumerate}
2023-07-06 20:18:53 +00:00
I put \textit{journalism} in quotation marks, because while a lot of people might describe any sort of writing on the web as journalism, it really isn't. It's not like you need a degree and a license to call yourself a ``journalist'', alas.\footnote{It is, unfortunately, one of those words whose meanings have become watered down over the years.} While one of the strengths of the web is that anyone can publish whatever they like to it, in the absence of actual, careful research\footnote{By which I do \textbf{not} mean ``find a bunch of YouTube videos and Facebook posts that confirm your own biases.'' Quite the opposite, in fact.} on the part of the writer and actual, careful fact-checking on the part of a disinterested third-party, it's little more than junk at best, and harmful, dangerous junk at the the worst.
(I could—and probably should at some point—say a lot more about the importance of an independent free press to the functioning of a working democracy, but again, a different topic for a different zine. Suffice it to say that a \textit{real} news source, be it newspaper, magazine, or televsion channel, is not afraid to print retractions when they get things wrong. If your news source is never wrong, it's not news, it's opinion, and you are being duped.)
\chapter{Music (\twonotes) in \LaTeX{}}
\section{Standard Notation}
I have a couple of guitars in the corner of my living room that I keep intending to dust off and play again someday. Of course, with the way my mind works, I thought I should also brush up on some music theory. Because I am an inveterate note-taker, but also have less-than-ideal penmanship, I thought I should figure out if it's possible to write music (and also guitar tablature) in LaTeX, and if so, how much work it would be.
As it turns out, there are a number of packages that enable you to include music in a LaTeX document.\footnote{For much of this early research, I am highly indebted to Martin Thoma, who has an excellent introduction at \href{https://martin-thoma.com/how-to-write-music-with-latex/}{\texttt{https://martin-thoma.com/how-to-write-music-with-latex/}}.}
\subsection{wasysym}
First, there is the \texttt{wasysym} (or Waldi Symbol font) package, which is basically a symbol font for LaTeX. It includes a lot of different symbols, including some interesting circles (\Circle{}, \leftturn{}, \rightturn{}) that I could have used on a different project had I known about this then. It's a symbol font, so when it comes to music, what it offers is rudimentary: you can add an eighth note (\eighthnote), a quarter note (\quarternote), a half note (\halfnote), a whole note (\fullnote), or two joined eighth notes (\twonotes). In math mode, you can also add a natural symbol ($\natural$), a flat symbol ($\flat$), or a sharp symbol ($\sharp$).
I have to admit, while I like this, I'm not entirely sure what it's for. It's possible that it started out as one thing and ended up as another. That is certainly true of most of the projects that I've created. I'll investigate more later.
2023-06-26 22:08:34 +00:00
\subsection{harmony}
There is also the \texttt{harmony} package, which offers up some additional symbols:
\medskip
2023-07-06 20:18:53 +00:00
\AAcht, ~~~ \Acht, ~~~and~~~ \AchtBR\AchtBL ~~~ $\bigl($which is actually two symbols stuck together: \AchtBR ~~ and ~~\AchtBL ~ $\bigl)$, ~~~ \AcPa, ~~~ and a whole lot of very tiny notes: ~~~ \Acht, ~~~ \Sech, ~~ and ~~ \Zwdr ~~~ and some very tiny rests: ~~~ \ViPa, ~~~ \AcPa, ~~~ \SePa, ~~ and ~~ \ZwPa
And it also has what I believe is chord notation (although I could be—and probably am—wrong; it has been a \textit{very} long time), some of which can be quite complicated:
% Define a couple of new commands
\def\h#1h{\hspace*{#1em}}
\newcommand{\Str}[2][0.5]{\raise#1ex\hbox to #2em{\hrulefill}}
\newcommand{\ST}{\h0.03h\Str[0.65]{0.27}\h0.03h}
%
\medskip
\h0,5h\HH.D..8\Str[0,65]{1,2}7\ST6\ST5.8\ST6\ST4\Str[0,65]{2}3.6\ST5\ST8%
\Str[0,65]{3}7.%
\medskip
I didn't create that. (I don't even know what it means.) I just copied it verbatim from the \texttt{harmony} guide. In reality, it looks like this:
2023-07-08 20:19:16 +00:00
\begin{Verbatim}[frame=lines, numbers=left, xleftmargin=5mm, framesep=3mm, breaklines=true, label=\fbox{Harmony Example}]
%
\def\h#1h{\hspace*{#1em}}
\newcommand{\Str}[2][0.5]{\raise#1ex\hbox to #2em{\hrulefill}}
\newcommand{\ST}{\h0.03h\Str[0.65]{0.27}\h0.03h}
2023-07-08 20:19:16 +00:00
\h0,5h\HH.D..8\Str[0,65]{1,2}7\ST6\ST5.8\ST6\ST4
\Str[0,65]{2}3.6\ST5\ST8
\Str[0,65]{3}7.
2023-06-26 22:08:34 +00:00
\end{Verbatim}
What this tells me is that the \texttt{harmony} package is very good at positioning things around other things. I may just have to tuck that in the back of my mind for later. The guide document for \texttt{harmony} is only five or six pages, but there is a lot of information to absorb there.
\subsection{musixtex}
2023-02-18 20:13:36 +00:00
And then there is the \texttt{musixtex} package. It makes use of a \texttt{music} environment, with your relevant code (of which there is a lot). I've copied this bit from the \texttt{musixtex} documentation:
2023-07-08 20:19:16 +00:00
\begin{Verbatim}[frame=lines, numbers=left, xleftmargin=5mm, framesep=3mm, breaklines=true, label=\fbox{Musixtex Example}]
\begin{music}
\instrumentnumber{1} % a single instrument
\setname1{Piano} % whose name is Piano
\setstaffs1{2} % with two staffs
\generalmeter{\meterfrac44} % 4/4 meter chosen
\startextract % starting real score
\Notes\ibu0f0\qb0{cge}\tbu0\qb0g|\hl j\en
\Notes\ibu0f0\qb0{cge}\tbu0\qb0g|\ql l\sk\ql n\en
\zendextract % terminate excerpt
\end{music}
2023-06-26 22:08:34 +00:00
\end{Verbatim}
which produces this bit of music:
\begin{music}
\setname1{Piano} % whose name is Piano
\instrumentnumber{1} % a single instrument
\setstaffs1{2} % with two staffs
\generalmeter{\meterfrac44} % 4/4 meter chosen
\startextract % starting real score
\Notes\ibu0f0\qb0{cge}\tbu0\qb0g|\hl j\en
\Notes\ibu0f0\qb0{cge}\tbu0\qb0g|\ql l\sk\ql n\en
\zendextract % terminate excerpt
\end{music}
What strikes me most is that half of that code is not in any way intuitive. The package is well-documented, but at 166 pages, it's going to take some work to become proficient. There's no reason you \textit{couldn't} learn this, but it's not something you're going to do overnight. Still, I think this might be the package I am looking for.
\subsection{ABC}
2023-07-06 20:18:53 +00:00
The \texttt{abc} package allows you to use the ABC language to create snippets of music directly in your LaTeX document, using the \texttt{abc} environment. Unfortunately, while I can get this to work in standalone documents, I have not been able to figure out how to incorporate it into a regular LaTeX document like this one. I obviously have more work to do to figure this one out.
2023-06-24 18:56:58 +00:00
\section{Tablature}
2023-02-18 20:13:36 +00:00
2023-07-06 20:18:53 +00:00
Tablature is a way of indicating which strings and frets to play on stringed instruments like guitars, basses, and mandolins. (There are arguments about whether it's worth using tabs, as they do leave out some information, but I won't get into that here. Suffice it to say that everything has its divisive issues. Personally, I find that if you already know the tune, tabs are generally enough.)
2023-06-24 18:56:58 +00:00
2023-06-26 22:08:34 +00:00
\subsection{guitartabs}
The first package I found is \texttt{guitartabs}. Unfortunately, this introduces a completely separate document class (called, natch, ``guitartabs'') which means I can't really use it here. (In general, I dislike it when packages do this, because it really limits the usability of their package. In this case, it makes it impossible to incorporate guitar tabs into whatever existing document you would like to include them in.)
\subsection{songs}
2023-07-04 17:20:44 +00:00
The \texttt{songs} package\footnote{Which is available on SourceForge---see my later comments about that site.} says that it produces guitar \textit{tablature}, but what it really produces is guitar \textit{chords}. This should not be surprising, since it is really designed to produce church hymnals. I have very little use (none, actually) for church hymnals, but if you do, I recommend you look into this package because it is fairly powerful.
2023-06-26 22:08:34 +00:00
This code:
2023-07-08 15:45:22 +00:00
\begin{Verbatim}[frame=lines, framesep=3mm, label=\fbox{Songs Example \#1}]
2023-06-26 22:08:34 +00:00
\gtab{A}{X02220:001230}
\end{Verbatim}
\noindent{}produces this chord diagram:
\includegraphics[scale=1]{songs-01}
\noindent{}Like it? Here's another:
2023-07-08 15:45:22 +00:00
\begin{Verbatim}[frame=lines, framesep=3mm, label=\fbox{Songs Example \#2}]
2023-06-26 22:08:34 +00:00
\gtab{C#sus4}{4:XX3341}
\end{Verbatim}
\noindent{}produces this:
\includegraphics[scale=1]{songs-02}
Unfortunately, the \texttt{notes} package is incompatible with the \texttt{musixtex} package which I used earlier, as they both contain the commands \texttt{meterfont} and \texttt{transpose} and I can't figure out a way to make them play nicely together. My solution was to create a new document with the \texttt{standalone} class, create the chords in that document, and add them here using the \verb+\includegraphics[]{}+ command. (See the source code for how I accomplished this.)
This does point out one weakness of \LaTeX{}: it is possible to create a package with the same macro names as some other package, which essentially renders them incompatible.\footnote{For what it's worth, this is possible with just about \textit{any} bit of software.} It would be great if package developers would use some sort of personal prefix for their macros, but we are so far along in this game that I think it's far too late.
\subsection{musixtex}
As it turns out, this package can also be used to produce tab. However, because it was designed for classical music, you'll have to do some work to figure out how to use it for regular guitar tablature.
\section{Lilypond}
2023-07-06 20:18:53 +00:00
There is also a free and open-source software package (originally based on \TeX{}?) which is excellent at setting music—Lilypond. I downloaded this several years and one or two machines ago, and remember thinking that it was big, powerful, and somewhat complicated to learn. ``Well,'' I thought, ``we'll just pack that one along for later when we have time.''
2023-07-04 17:20:44 +00:00
2023-07-06 20:18:53 +00:00
It is now \textit{later} and, well…here we are. I still haven't figured out Lilypond. But it is an exceptional program, and if you are interested in typesetting music, I encourage you to check it out.
2023-07-04 17:20:44 +00:00
2023-06-26 22:08:34 +00:00
\section{Summary}
As it turns out, incorporating musical notation into a text document (which was my original goal) is not that easy in \LaTeX{}. Most of the packages out there are either too simple to produce something useful like a music tutorial or even meaningful music notes. The \texttt{musixtex} package seems to have the most potential for something like this, but it is far from intuitive. (If \verb+\Notes\ibu0f0\qb0{cge}\tbu0\qb0g|\ql+ makes sense to you, I think we are definitely buying donuts in different donut shops.)
\chapter{An Introduction to \LaTeX{}}
I realized that even though I've mentioned that the reason I created this zine was to learn how to use LaTeX, and even though I've mentioned the things I've learned about LaTeX while writing it, I've never really provided a basic guide for others who might be interested in learning \LaTeX{}. So here goes…
2023-07-04 17:20:44 +00:00
\paragraph{A Caveat} First, I am far from an expert in these matters. What follows is pretty much a listing of what I've gleaned from hours spent searching the internet and trying things out myself.
2023-07-06 20:18:53 +00:00
Second, some things will look differently and behave differently for you depending on variables such as the document class you are using (see below) and which other packages you have loaded. My rules for learning things like this are always:
2023-07-04 17:20:44 +00:00
\begin{enumerate}[noitemsep]
\item Don't compare yourself to others. Your mileage can—and will—vary, because people learn things at different rates and in different orders.
\item Practice doesn't make perfect, but it does make things less shitty.
\item A willingness to experiment is your best guide.
\item You will get errors. Try to avoid getting the same error over and over again. Strive for better errors that you can learn something new from.
2023-07-04 17:20:44 +00:00
\end{enumerate}
2023-06-25 20:15:13 +00:00
2023-07-04 17:20:44 +00:00
Also, if you have access to the source code so you can see how other people have done things, so much the better. (You can view the source code for this zine at \href{https://git.kjodle.net/kjodle/the-codex}{\texttt{https://git.kjodle.net/kjodle/the-codex}}.) In particular with \LaTeX{}, it can help if you create an MWE (minimal working example) when working with new things, to rule out interference from other bits of code.
\section{Files}
\LaTeX{} uses plain files with a file extension of \texttt{.tex}. That's it! They contain plain text only and no binary codes or hidden formatting extensions. (Try opening any word processing document in a text editor and see what I mean here.) You can use any text editor, although a GUI is available for most operating systems.
\section{Paragraphs and White Space}
2023-07-08 20:19:16 +00:00
To start a new paragraph, simply skip a line. \LaTeX{} collapses white space, so if you are importing text from a text document, any lines that are adjacent to each other will be in the same paragraph. Additionally, multiple spaces will appear as a single space. For example, this code:
\begin{Verbatim}[frame=lines, numbers=left, xleftmargin=5mm, label=\fbox{White Space Example}, breaklines=true, framesep=3mm]
This is the first paragraph.
This text, although it is on a separate line, is also part of the first paragraph.
We have skipped a line, so this starts a second paragraph.
This line is also in the second paragraph.
Readers will not see
all of these
spaces.
\end{Verbatim}
\noindent{} renders like this: \\
\klab{0mm}{White Space Example}{2mm}
This is the first paragraph.
This text, although it is on a separate line, is also part of the first paragraph.
We have skipped a line, so this starts a second paragraph.
This line is also in the second paragraph.
Readers will not see
all of these
spaces.
\vspace{2mm}
\hrule
\section{File Structure}
Every \LaTeX{} file has two parts:
\begin{enumerate}[noitemsep]
2023-07-06 20:18:53 +00:00
\item A \textbf{preamble} in which you declare the document class and add any packages you may need, as well as set other variables such as the title and author.
\item A \textbf{document} environment which contains the actual text of the document.
\end{enumerate}
If you are familiar with \texttt{html}, these correspond roughly to the \texttt{<head>} and \texttt{<body>} elements.
\subsection{The Preamble}
2023-07-04 17:20:44 +00:00
Within the preamble, you can declare the document's \textit{class}, which is a description of the type of document you are creating. The most common classes are \texttt{article}, \texttt{report}, \texttt{book}, \texttt{memoir}, and \texttt{beamer} (for presentations). A typical class declaration looks like:
\begin{Verbatim}
\documentclass[twoside]{report}
\end{Verbatim}
The class is described between curly brackets, but you can also include several options in square brackets. The above document class is a two-sided report. ``Two-sided'' means that it may have different margins, headers, and footers on right and left handed pages. Other options, such as paper size, are also available.
\subsection{The \texttt{document} Environment}
Your actual text goes in the \texttt{document} environment, which looks like this:
\begin{Verbatim}[commandchars=\+\(\)]
\begin{document}
+textit(…your stuff…)
\end{document}
\end{Verbatim}
\subsection{Publication Structure}\label{docsec}
Each \LaTeX{} document can be divided into a hierarchical structure consisting of the following sections:
\begin{verbatim}
Part
Chapter
Section
Subsection
Subsubsection
Paragraph
Subparagraph
\end{verbatim}
\noindent{} To add one, use something like this:
\begin{verbatim}
\chapter[Books]{Books I Have Read}
\end{verbatim}
Notice that we have the option \texttt{[Books]} which describes how this chapter will appear in the table of contents. To prevent a section from being numbered or appearing in the table of contents, replace this entire option with an asterisk:
\begin{verbatim}
\chapter*{Books I Have Read}
\end{verbatim}
2023-07-04 17:20:44 +00:00
For best results, stick to the hierarchical structure shown above, as this is also how each section will be numbered. See the table of contents of this zine as an example.\footnote{I am a stickler about hierarchical structures because they represent logical, organized thinking about a subject. Not all subjects lend themselves to a perfectly hierarchical information structure, but we should always strive to be less disorganized (i.e., less shitty).}
\subsection{Environments}
\noindent{}This is where \LaTeX{} shows its power, as environments are used to to take care of typesetting tasks. Every environment begins with \verb+\begin{<environment>}+ and ends with \verb+\end{<environment>}+. In fact, we've already seen one environment: the \texttt{document} environment, which encompasses our entire published document. Here are a few other useful ones:
\subsubsection{Enumerate}
2023-07-08 20:19:16 +00:00
\texttt{enumerate} is used to create numbered lists. They can be nested to create an outline. To prevent \LaTeX{} from adding a lot of space between the item numbers, add the \texttt{enumitem} package and pass the \texttt{[noitemsep]} to the environment.
For example, this code:
2023-07-08 15:45:22 +00:00
\begin{Verbatim}[frame=lines, numbers=left, xleftmargin=5mm, label=\fbox{Enumerate Example}, framesep=3mm]
\paragraph{The First Punic War}
\begin{enumerate}[noitemsep]
\item Carthage and Rome
\begin{enumerate}
\item Beginning of Foreign Conquests
\item The Origin of Carthage
\end{enumerate}
\item Operations in the First Punic War
\begin{enumerate}
\item Outbreak of the War in Sicily
\item Capture of Messana and Agrigentum
\end{enumerate}
\item Events Following the War
\end{enumerate}
\end{Verbatim}
2023-07-06 20:18:53 +00:00
\noindent{}produces this output:
\klab{8pt}{Enumerate Example}{-10pt}
2023-07-07 23:10:23 +00:00
\paragraph{The First Punic War}
\begin{spacing}{0.7}
\begin{enumerate}[noitemsep]
\item Carthage and Rome
\begin{enumerate}
\item Beginning of Foreign Conquests
\item The Origin of Carthage
\end{enumerate}
\item Operations in the First Punic War
\begin{enumerate}
\item Outbreak of the War in Sicily
\item Capture of Messana and Agrigentum
\end{enumerate}
\item Events Following the War
\end{enumerate}
\end{spacing}
\krule{1mm}{0mm}
\subsubsection{Itemize}
2023-07-06 20:18:53 +00:00
Similar to the \texttt{enumerate} environment, the \texttt{itemize} environment creates bulleted lists, which can also be nested.
As an example, we'll use the above example, but as a bulleted list:
2023-07-08 15:45:22 +00:00
\begin{Verbatim}[frame=lines, numbers=left, xleftmargin=5mm, label=\fbox{Itemize Example}, framesep=3mm]
\paragraph{The First Punic War}
\begin{itemize}[noitemsep]
\item Carthage and Rome
2023-07-04 17:20:44 +00:00
\begin{itemize}
\item Beginning of Foreign Conquests
\item The Origin of Carthage
2023-07-04 17:20:44 +00:00
\end{itemize}
\item Operations in the First Punic War
2023-07-04 17:20:44 +00:00
\begin{itemize}
\item Outbreak of the War in Sicily
\item Capture of Messana and Agrigentum
2023-07-04 17:20:44 +00:00
\end{itemize}
\item Events Following the War
\end{itemize}
\end{Verbatim}
2023-07-06 20:18:53 +00:00
\noindent{}produces this output:
\klab{8pt}{Itemize Example}{-10pt}
2023-07-07 23:10:23 +00:00
\paragraph{The First Punic War}
\begin{spacing}{0.7}
\begin{itemize}[noitemsep]
\item Carthage and Rome
\begin{itemize}
\item Beginning of Foreign Conquests
\item The Origin of Carthage
\end{itemize}
\item Operations in the First Punic War
\begin{itemize}
\item Outbreak of the War in Sicily
\item Capture of Messana and Agrigentum
\end{itemize}
\item Events Following the War
\end{itemize}
\end{spacing}
\krule{1mm}{5mm}
2023-07-06 20:18:53 +00:00
\noindent{} You can also replace the bullets with any math symbol available in \LaTeX{} like this:
2023-07-08 15:45:22 +00:00
\begin{Verbatim}[frame=lines, numbers=left, xleftmargin=5mm, label=\fbox{Bullets Example}, framesep=3mm]
\begin{itemize}[noitemsep]
2023-07-04 17:20:44 +00:00
\item[$\Box$] First item
\item[$\aleph$] Second item
\item[$\triangle$] Third item
\end{itemize}
\end{Verbatim}
\noindent{} which produces this output:
\begin{itemize}[noitemsep]
2023-07-04 17:20:44 +00:00
\item[$\Box$] First item
\item[$\aleph$] Second item
\item[$\triangle$] Third item
\end{itemize}
\subsection{Math in \LaTeX{}}
\LaTeX{} has a couple of different environments that are useful for typesetting math (\texttt{align} and \texttt{array}, but they get a little beyond what I want to cover here\footnote{Maybe in a later issue? I can, if there is interest.}). In addition, there are other packages (in particular \texttt{amsmath} and \texttt{mathtools}) that greatly extend the power of LaTeX to handle mathematical typesetting, but again, they are beyond the scope of this zine.
2023-07-06 20:18:53 +00:00
There are two types of \textit{entry modes} for math in LaTeX. The first is \textbf{in-line mode}, which begins and ends with a dollar sign, and renders the math in the same line of text as the rest of the paragraph.
2023-07-08 15:45:22 +00:00
\begin{Verbatim}[frame=lines, label=\fbox{In-Line Math Example}, framesep=3mm]
The Pythagorean Theorem is $x^2 + y^2 = z^2$.
\end{Verbatim}
\noindent{} which renders as \\
\noindent{} The Pythagorean Theorem is $x^2 + y^2 = z^2$. \\
2023-07-06 20:18:53 +00:00
This is particularly useful if you want to include Greek characters in your text, because the code for the letter is simply the letter itself. For example, \verb+&\alpha$+ renders as $\alpha$. Need capital letters?\footnote{At least for the characters where the Greek and Latin alphabets \textit{don't} share a common capital character.} Just capitalize it: \verb+$\Gamma$+ $\rightarrow \, \Gamma$.
2023-06-25 20:15:13 +00:00
2023-07-06 20:18:53 +00:00
Math in \LaTeX{} can also be shown in \textbf{display mode}, which renders the mathematics on a separate line. This entry mode begins with \verb+\[+ and ends with \verb+\]+. If we change our example up above to this:
2023-07-08 15:45:22 +00:00
\begin{Verbatim}[frame=lines, label=\fbox{Display Mode Math Example}, framesep=3mm]
The Pythagorean Theorem is \[x^2 + y^2 = z^2\]
\end{Verbatim}
\noindent{} we get this: \\
The Pythagorean Theorem is \[x^2 + y^2 = z^2\]
2023-07-04 17:20:44 +00:00
\paragraph{Installing \LaTeX{}} I realize that I haven't talked about how to install LaTeX, but that really depends on what system you are running. Trying to include every possible operating system could easily turn this from a zine into a book.\footnote{And a quickly outdated and inaccurate book, at that.} The best approach is to search for your operating system + ``install latex''.
2023-02-18 20:13:36 +00:00
2023-02-16 16:35:18 +00:00
\chapter{What's to Like About Linux}
\section{Open Source}
This doesn't come up for me every day as I use Linux, but one of my favorite things about Linux is that it's open source. That is, the source code is easily and freely available, provided you know where to look for it. This means two primary things:
\begin{enumerate}[noitemsep]
2023-07-04 17:20:44 +00:00
\item I can download the software for free, and install and use it on as many machines as I choose to.
\item I can download the source code and make whatever changes I like. I can then keep them to myself, or release those changes to the world for other people to use.
\end{enumerate}
We'll look at each of those two things in turn. But first, read the back cover and then come back here.
2023-07-06 20:18:53 +00:00
Let's start with point \#1.
2023-06-25 14:03:09 +00:00
\subsection{Open Source Software is Available for Free}
\medskip
The two main commercial alternatives to Linux are macOS (Apple) and Windows (Microsoft).
2023-07-08 20:19:16 +00:00
macOS is less widely available than Windows. The only way to get it is to buy an Apple product. I admit, Apple products are \textit{gorgeous} and the hardware is usually designed to last for a long time.\footnote{iPhones may be the exception to this.} But it is also \textit{expensive}. I've done a bit of cost comparison and the cheapest Macintosh laptop I can buy is easily five times the price of the cheapest Windows laptop I can buy.
That actually makes Windows sound cheap in comparison. But is it?
\medskip
\hrule
\medskip
2023-07-06 20:18:53 +00:00
\noindent\textbf{Oh look, it's our only diversion.}
\begin{multicols}{2}
\noindent{}We are in Late Stage Capitalism. That is, we have reached a stage of capitalism which is unsustainable on this planet alone. The entire point of capitalism is ``growth'' but when you are limited to an existence on a single planet that has no trade with other planets, that growth is limited by the amount of whatever resources that planet has. And when those resources run out—or it becomes impossible to make a profit by exploiting them—capitalism will collapse, and it will very like take billions of us with it.
These resources have always been \textit{physical} resources—food, wood, coal, oil, rare-earth elements, and the labor of the working classes to extract and process them.
Because those resources are finite, we've seen capitalism go off in other directions to find other resources to exploit. This explains why rich white guys with entirely too much time on their hands want to ride their penis-rockets into space—because asteroids are out there and they're just full of iron, cobalt, and other metals just waiting to be mined and turned into cell phones.
But we've also seen capitalism go in a hitherto new direction: the digital direction. Capitalism is no longer interested in just mining iron or coal; it's also interested in mining \textit{data}. Data, it seems, is the one resource we can never run out of.\footnote{When I worked in retail, I was always told to push the extended warranties whenever I could. This was partly because the profit margin on them was incredibly high (extended warranties are basically a legal scam because there are so many terms and conditions you'll never be able to cash in) and ``they're the one inventory item we never run out of.''}
The primary kind of data they want is information about what we are interested in and what we want to buy, because if they know what we are interested in, they can then sell that information to advertising platforms who will slug your user experience full of advertisements for those exact things.
Order a ham sandwich for lunch online? That is now data. We know you like both ham and sandwiches. (Okay, this is really an \textit{assumption}, but algorithms are built by people, and they are only as good as the people who build them. In short, algorithms make the same assumptions as the people who build them.)
Order a ham sandwich on Monday, but order a turkey sandwich on Friday? That is also data. Now I know lots of things about you:
2023-07-04 17:20:44 +00:00
\begin{enumerate}[noitemsep]
\item You like sandwiches.
\item You sometimes order out for lunch.
\item You prefer pork-based products early in the week.
\item You prefer poultry-based products later in the week.
\end{enumerate}
2023-07-06 20:18:53 +00:00
That is now four data points that can be sold to companies that will direct advertising at you for those items. And they will combine that data with other things they know about you (where you live, how old you are, your marriage status, your income, etc.) to come up with a list of stuff they think you'll \textit{probably} be interested in and slug those ads in front of you.\footnote{This isn't \textit{exactly} how it works, but you get the idea.}
Of course, they aren't selling that data to a local mom-and-shop sandwich shop down the road that cures their own meats and bakes their own bread according to a 100-year-old family recipe. They're selling that data to multi-million dollar corporations whose success will be built on the corpses of little mom-and-pop shops.\footnote{Oh wait, that's already happening.}
As a result, when you think ``I could really go for a sandwich right about now'' you automatically think of the nearest Evil International Sandwich Shop and not the local mom-and-pop sandwich shop, simply because you saw an ad for the EISS, and when it comes to both hunger and money, your big huge mammalian brain depends on that little tiny reptilian bit at its core. You \textit{think} you are choosing, but you are not. Like a rat in a Skinner test, you are merely being rewarded for pushing the button that capitalism wants you to push.
And this is what Windows does. It gathers your data and ``shares'' it with other companies it has paid agreements with. The price is low, but the cost is high.
\end{multicols}
2023-07-08 20:19:16 +00:00
Windows may appear to be low-cost or even free when you buy that new computer, but it does have a very high cost—your privacy. And because advertisers use some pretty sophisticated techniques to get you to buy their stuff, there is an additional cost—your ability to truly choose for yourself.
2023-06-25 14:03:09 +00:00
Which brings us to point \#2.
\subsection{You Can Alter the Source Code}
2023-07-04 17:20:44 +00:00
This is really the greatest thing about open source projects: if you find something you don't like, you can change it. For example, if I want to change something about Linux, I can head over to \href{https://github.com/torvalds/linux}{\texttt{https://github.com/torvalds/linux}} and become a contributor, or I can \textit{fork} the software and create my own version.
2023-06-25 14:03:09 +00:00
2023-07-08 20:19:16 +00:00
That's a huge advantage, because it is not something that you can do with either Windows or macOS. But it comes with a huge cost: you have to know how to write code.
2023-06-25 14:03:09 +00:00
That phrase---``write code''---covers a \textit{lot} of territory, because there are a lot of different programming and scripting languages and just because you know one does not know that you know the rest, although people will often think that you do.\footnotemark{} Knowing one does not mean that you know all of them, just the same way that learning Spanish does not mean that you now automatically know Urdu or Mandarin or even Italian. It takes time to learn the basics, it takes more time to become proficient, and it takes even more time to understand the code structure of the project you are looking at.
\footnotetext{A long time ago I was a contributor to a theme for WordPress and worked as a (volunteer) moderator on its forum. Somebody wrote a post to complain that something he had attempted was not working the way he wanted it to and could we please fix it because, as he said ``I'm sure it's just a coding thing'', to which my (internal) reply was ``Dude, if it's just a `coding thing' then \textit{you} figure it out''. His implication was that we basically have a magic button that does things instantly, and we just sit around the rest of the time drinking coffee. The coffee thing (or any caffeinated beverage, really) \textit{is} true, but the sitting around thing and the magic button thing are definitely \textit{not} true.}
2023-07-08 20:19:16 +00:00
So yes, there is a cost, but if you decide to pay it, it has the additional benefit of making you more knowledgeable than you were before. Learning to code anything, even something as simple and straightforward as basic \texttt{html}, requires that you think logically and systematically about what you want to achieve and that you develop a systematic way of solving problems. Because, yes, nothing ever just works the first time you use it (if I had a dollar for every error message I've ever received while using LaTeX, I could probably afford to take a year off from work) and a \textit{systematic} method for diagnosing and solving problems is a lot more efficient than just guessing.
2023-06-25 14:03:09 +00:00
2023-07-04 17:20:44 +00:00
\subsubsection{A side note:} An optional benefit if you learn to write some code is that you can---and should---learn a revision control system, which will keep track of your changes and let you go back to an earlier version if you \textit{really} screw something up, which you are bound to do at some point because really screwing something up is part of the learning process. I like and use \texttt{git}, which is included in the Ubuntu default repositories, but others such as \texttt{mercurial} and \texttt{bazaar} are also available. I like \texttt{git} because it's what I've worked with the longest and know fairly well, but that doesn't make it the best one; it's just the best one for me. They all have their advantages and disadvantages, and the point is not to find the perfect one,\footnote{The perfect one doesn't exist. The entire idea of perfection is one which has entered our culture through the door of religion, and it is an idea which we much abandon to regain our cultural sanity.} but to find one that will meet your needs. Once you do, you'll wonder how you ever got along without it.
2023-06-25 14:03:09 +00:00
\section{Containerization}
2023-07-04 17:20:44 +00:00
Thanks to the Unix Principle, a Linux-based operating system is not one big piece of software, but rather, it consists of a number of smaller software packages that work together (more or less). That means that if you don't like the way something behaves and you can't get it to do what you want it to do through its preferences, you can often replace it.
2023-06-25 14:03:09 +00:00
2023-07-06 20:18:53 +00:00
For example, I became unhappy with Nautilus, the default file manager in Ubuntu. (The file manager is what you see when you open a folder on the desktop.) There wasn't anything particularly wrong with it---it just lacked a lot of features that I wished it had. Sure, I could learn to code my own file manager, or I could attempt to contribute\footnote{Sometimes open source projects become so large that they are difficult to contribute to---the equivalent of banks being ``too big to fail''. Unless you are one of TPTB in the project, chances are you you won't be able to make the kinds of changes you want to. But I have enough experience with this (I'm looking at you, WordPress) for a longish article or a shortish book, and I don't want to spend too much time here discussing it. Just know that it's a thing that happens.} to the Ubuntu source code and get Nautilus to behave closely to what I was envisioning, but I didn't need to because there was already a file manager available that did what I wanted---Nemo.
2023-06-25 14:03:09 +00:00
Nemo is actually a fork of Nautilus (version 3.4, I believe) and includes a lot of features that were removed from Nautilus. It was developed as part of the Cinnamon desktop for Linux Mint, which was itself a fork from Ubuntu. Did I mention that Ubuntu is a fork from Debian? Yeah, open source family trees get pretty complicated pretty fast.
It turns out that installing Nemo and making it the default file manager is fairly simple. These are the commands you need:
2023-07-08 15:45:22 +00:00
\vspace{-8pt}
\begin{Verbatim}[frame=lines, xleftmargin=5mm, numbers=left, baselinestretch=1.2, breaklines=true]
2023-06-25 14:03:09 +00:00
sudo apt install nemo -y
xdg-mime default nemo.desktop inode/directory application/x-gnome-saved-search
gsettings set org.gnome.desktop.background show-desktop-icons false
gsettings set org.nemo.desktop show-desktop-icons true
\end{Verbatim}
\noindent{}What each line of this code does:
\begin{enumerate}[noitemsep]
2023-07-04 17:20:44 +00:00
\item Installs Nemo (the \texttt{-y} flag automatically answers ``yes'' to any questions \texttt{apt} sends your way)
2023-06-25 14:03:09 +00:00
\item Makes Nemo the default file manager in Ubuntu
\item Disables the handling of the desktop by Nautilus
\item Enables the handling of the desktop by Nemo
2023-06-25 14:03:09 +00:00
\end{enumerate}
2023-07-08 14:55:00 +00:00
\noindent{}Removal is the opposite of installation:
2023-06-25 14:03:09 +00:00
2023-07-08 15:45:22 +00:00
\vspace{-8pt}
\begin{Verbatim}[frame=lines,xleftmargin=5mm, numbers=left, baselinestretch=1.2, breaklines=true]
2023-06-25 14:03:09 +00:00
xdg-mime default nautilus.desktop inode/directory application/x-gnome-saved-search
gsettings set org.gnome.desktop.background show-desktop-icons true
sudo apt purge nemo nemo*
sudo apt autoremove
\end{Verbatim}
\begin{enumerate}[noitemsep]
\item Makes Nautilus the default again
2023-07-04 17:20:44 +00:00
\item Enables Nautilus to draw desktop icons
2023-06-25 14:03:09 +00:00
\item Uninstalls Nemo
\item Removes any dependencies used only by Nemo
\end{enumerate}
2023-07-08 14:55:00 +00:00
\noindent{}As it turns out, this method allows an extremely high degree of customization while knowing very minimal code. It is possible, of course, to type those instructions wrong and completely screw something up, so it's good to double-check what you enter into the terminal. The terminal is extremely literal---it doesn't make guesses about what it thinks you meant to do (which is one of the reasons I find working with Microsoft Office such a miserable experience most of the time), it just does whatever you tell it.
2023-06-25 14:03:09 +00:00
\subsubsection{An old joke that describes how the terminal thinks}
\begin{quote}
\textit{A woman sends her computer programmer husband to the store to buy a gallon of milk. On his way out the door, she adds ``If they have eggs, pick up a dozen''. The store had eggs, so naturally, he came home with a dozen gallons of milk.}
\end{quote}
The joke, of course, arises from the fact that she never changed the object of the verb ``pick up''. What she should have said was ``If they have eggs, pick up a dozen eggs, also''.
2023-07-06 20:18:53 +00:00
Yes, this is how computers ``think''—i.e., process inputs. \textbf{You have to be specific.}
2023-06-26 20:05:17 +00:00
\chapter{Ubuntu 22.04 \\(and Ubuntu 24.04)}
\begin{quote}
\textit{I just got this bucket back together. I'm not going to let something tear it apart.}
\begin{flushright}
---Han Solo
\end{flushright}
\end{quote}
\noindent{}Back in issue \#2 I wrote about what a complete and utter disaster Ubuntu 22.04 had been for me and for many other users. I'm pleased to say that most of those issues have now been taken care of through numerous updates. But it has definitely been an uphill climb that left me questioning my sanity at times.
2023-07-06 20:18:53 +00:00
Most notable is that I still have not been able to configure Python2 on Ubuntu 22.04. Which is \textit{not} a big deal really, as we all should have moved on to Python3 by now. (This is something that the powers that be at Python have acknowledged by deprecating Python2.) What I really needed Python2 for was PDF Booklet, which is what I use to turn all of these letter-half sized pdf documents into booklets that I can print and staple together.\footnote{What PDF Booklet does---and does well---is handle the page imposition. That is, it puts the pages in the order that you would get if you took the staples out of this zine and examined the pages---you'll note that the first sheet has pages 40 and 1 on one side and pages 2 and 39 on the other side. This pattern continues until you get to the last page which has pages 22 and 19 on one side and pages 20 and 21 on the other. Page imposition is not at all complicated, but it never fails to amaze me how many people simply can't wrap their minds around it until they see it in action. I was one of them, once.} I actually met the author of this package on SourceForge where it is hosted and he told me how to remove the Python2 dependencies, which I did. I figured out how to configure it as an installable (i.e., a \texttt{deb}) package, but then I lost track of him on SourceForge and have no idea how to contribute to that project.
2023-06-26 20:05:17 +00:00
\medskip
2023-07-04 17:20:44 +00:00
\noindent{}\textit{…slides out soapbox…}
2023-06-26 20:05:17 +00:00
\medskip
2023-07-04 17:20:44 +00:00
I'm going to take this moment while I have your attention to say that I detest SourceForge will all my heart. It's ugly, it places ads first and foremost in your user experience, it's ugly, it has a confusing interface, it's ugly, it's slow and clunky, and on top of it all, it's also ugly. It's like something designed by an alien who can only see half the visible spectrum and all of the ultraviolet spectrum. And it's been like that \textit{forever}. Why is this thing still a thing?
2023-06-26 20:05:17 +00:00
\medskip
2023-07-04 17:20:44 +00:00
\noindent{}\textit{…slides soapbox back under the sofa…takes meds…}
2023-06-26 20:05:17 +00:00
\medskip
2023-07-04 17:20:44 +00:00
Anyway, because I couldn't figure out how to get this on SourceForge, I just dropped it into my own personal git server at \href{https://git.kjodle.net/kjodle/pdf-booklet}{\texttt{https://git.kjodle.net/kjodle\\/pdf-booklet}}. Enjoy.
2023-06-26 20:05:17 +00:00
As I write this, the release of Ubuntu 24.04 is less than a year away. Unlike the release of Ubuntu 22.04, I am not in the least bit excited. And I will \textbf{not} be upgrading immediately, if at all. (Ubuntu 22.04 has ten years of security releases,\footnote{See \href{https://ubuntu.com/about/release-cycle}{\texttt{https://ubuntu.com/about/release-cycle}} for more information.} so I will be good for a while.)
2023-07-08 14:55:00 +00:00
I do have a spare machine that I can experiment with Ubuntu 24.04 on. The main problem is that I don't have a lot of time.\footnote{If I did, you'd be reading issue \#12 of this zine, rather than issue \#3.} So yeah, I can install Ubuntu 24.04 and \textit{ooh} and \textit{aah} over whatever is new and shiny (and I admit, ``new and shiny'' was a big part of the reason I was so eager to update to 22.04---I'm a human and our eyes are quite naturally drawn to ``new and shiny''). But I don't have the needed time to fully experiment with it and determine if it is suitable to my needs (which range from ``has to be perfect'' to ``can be just the right amount of shitty'') or if it's another disaster-in-waiting.
2023-06-26 20:05:17 +00:00
And yeah, the emphasis in the promotional material will focus on the ``new'' and the ``shiny'' because, like I said, human beings are just naturally attracted to those things. But \textit{new} and \textit{shiny} don't always translate to \textit{useful} and \textit{functional}. That was certainly true of 22.04 out of the box.
All of which is to say that it will be a \textit{long} time before I upgrade to Ubuntu 24.04. Canonical (the corporate interest behind Ubuntu) lost my trust with 22.04, and it's going to take a long time before they regain it. As the song says ``I won't get fooled again''. And that is assuming that they \textit{can} even regain it. (``Meet the new boss'' the other song goes; ``same as the old boss''.)
So yeah, a bird in the hand is worth two in the bush. Sometimes it's worth 22.04 of them.
2023-02-16 16:35:18 +00:00
\chapter{Coda}
\section{What I Learned About \LaTeX{} While Creating This Issue}
\subsection{Image Sizes}
2023-07-06 20:18:53 +00:00
A few people have noted on Reddit that the images I included in prior images are far larger than I need them to be. This is true. I had a lot of things like this in issue \#2:
2023-02-16 16:35:18 +00:00
\begin{verbatim}
2023-07-06 20:18:53 +00:00
\includegraphics[scale=0.5]{paper_cutter}
2023-02-16 16:35:18 +00:00
\end{verbatim}
\noindent{}And it seems that the worst offender was this line:
\begin{verbatim}
\includegraphics[scale=0.13]{c128}
\end{verbatim}
This is a problem because that \texttt{paper\_cutter.jpg} image is 136kb in size and that \texttt{c128.jpg} image is 2.3 mb in size. Because these get included in \LaTeX{}, which then handles the scaling, the resulting pdf file is rather bloated, which is the exact opposite of what you want when you are distributing something via the internet.
Because I am scaling the paper cutter image by 0.5, the resulting file size should be about a fourth of that, or 34 kb. And because I'm scaling the c128 image by 0.13, the corresponding file size should be about 0.0169 of that, or roughly 40 kb in size. That's a huge difference.\footnote{Roughly, the size of your file should be approximately reduced by the inverse square of your scaling factor. But these are jpg files, which are lossy, so it's never exactly that amount.}
2023-02-16 16:35:18 +00:00
The problem is that I always envisioned this zine as being a physical object, not a digital one. I only uploaded it to my git repository because this is a learning project for me, and I wanted to keep track of any changes I made.
But yeah, you should definitely resize your images before including them in any document you intend to distribute digitally. (Thank you, GIMP.) You'll notice that the image of the VT100 terminal on page 5 clocks in at a very sensible 79 kb. That's more like it.
\subsection{Installing \LaTeX{} Packages on Ubuntu}
\subsubsection{Method \#1}
Every once in a while I run into a package that I want to use with LaTeX that is not installed on my system. Alas, there is no easy way to do this, at least that I found. \textit{Later}, I always thought. I'll figure that out later.
\textit{Later} became \textit{today} when I wanted to use the \texttt{harmony} package to produce some music symbols but couldn't, because it wasn't installed on my system. It took some doing, but I finally figured it out. Here's what I did:
2023-07-08 14:55:00 +00:00
First, I downloaded the \texttt{harmony} package from \href{https://www.ctan.org/pkg/harmony}{\texttt{https://www.ctan.org \\ /pkg/harmony}} and unpacked the archive. That was easy enough.
Next, I had to figure out where to put it. I ran this command:
\begin{verbatim}
$ kpsewhich -var-value TEXMFLOCAL
\end{verbatim}
which gave me this location:
\begin{verbatim}
/usr/local/share/texmf
\end{verbatim}
Following the directions I found at \href{https://jvgomez.github.io/pages/manually-install-latex-packages-in-ubuntu.html}{\texttt{https://jvgomez.github.io/page \\ s/manually-install-latex-packages-in-ubuntu.html}} I entered that directory using \texttt{sudo} and created the following directory structure:
\begin{verbatim}
/usr/local/share/texmf/tex/latex/harmony
\end{verbatim}
I then copied my files over from the unpacked \texttt{harmony} files:
\begin{verbatim}
$ sudo cp * /usr/local/share/texmf/tex/latex/harmony
\end{verbatim}
I then had to update the search path to make my system aware of the new package:
\begin{verbatim}
$ sudo mktexlsr
\end{verbatim}
2023-07-08 14:55:00 +00:00
This should have been the end of it, but the \texttt{harmony} package requires a certain set of fonts to do its work. After a bit of searching, I found them at \href{https://ctan.org/tex-archive/fonts/musixtex-fonts}{\texttt{https://ctan.org/tex-archive/fonts/musixtex-fonts}}.
2023-07-08 14:55:00 +00:00
Fortunately, that package had a pdf document that described how to install the fonts. I started by copying the ``fonts'' folder over to the \texttt{texmf} directory:
\begin{verbatim}
$ cp fonts /usr/local/share/texmf
\end{verbatim}
And then I updated the search path and then the font-map files with these commands:
\begin{verbatim}
$ sudo mktexlsr
$ sudo udpmap-user --enable MixedMap musix.map
\end{verbatim}
Like I've said elsewhere, I'm running a recently updated Ubuntu 22.04 system, and this worked for me. It may work for you, it may not. I can't even guarantee that it will work for me next time. (I suspect having a generic folder name like ``fonts'' may cause me issues down the road if I ever want to install some other LaTeX fonts.) But if I got it to work once, I'm pretty sure I can get it to work again. We shall see.
\subsubsection{Method \#2}
A perhaps easier (and certainly more \textit{portable}) way of installing LaTeX packages is to add them to a local directory along the lines of:
\begin{verbatim}
/home/user/texmf
\end{verbatim}
This is how I installed the \textit{musixtex} package, and it is far simpler than what I have described in method \#1.
First, I downloaded the package and unpacked it. Then I copied its contents into my \texttt{texmf} directory, and finally updated the filename database:
\begin{verbatim}
$ cp * ~/texmf
2023-06-24 18:56:58 +00:00
$ texhash ~/texmf
\end{verbatim}
Mischief managed!
2023-06-26 11:56:32 +00:00
\subsection{Miscellaneous Things}
\begin{enumerate}[noitemsep]
2023-06-26 11:56:32 +00:00
\item Need a little bit more control over things in a \texttt{verbatim} environment? Just add the \texttt{fancyvrb} package.
\item Need even more control than the \texttt{fancyvrb} package gives you? Try the \texttt{fvextra} package. (I used it because it very nicely breaks lines inside this environment.)
2023-06-26 22:10:16 +00:00
\item Notice that your footnotes are floating above the footer on some pages? Try adding \verb+\usepackage[bottom]{footmisc}+ to your preamble.
2023-06-26 11:56:32 +00:00
\end{enumerate}
2023-06-24 18:56:58 +00:00
\section{What I learned About \LaTeX{} While Creating Something Else}
For reasons I don't understand I went down an internet rabbit hole reading about the book \textit{Flatland}, by Edwin A. Abbott. This is a book I had purchased years ago in my youth (thank you, Dover Thrift Editions!) but had never gotten around to reading. I found a copy in \LaTeX{} at \href{https://github.com/Ivesvdf/flatland}{\texttt{https://github.com/Ivesvdf/flatland}}. It was old---twelve years old, in fact---and it was set up as a single-sided A4 document. If you've been following this journey this far, you know that I'm pretty fond of booklets, and that I'm in North America, so everything has to be lettersize paper.\footnote{As an American citizen, I am bound by the U.S. Constitution to both completely disavow the metric system and be utterly confused by it, and to decry it as terribly confusing despite the fact that it is based on dividing and multiplying by the number 10. This is part of our constitutional duty to vehemently oppose anything which makes sense and also makes life better, such as universal health care. I don't know, something about eagles and gravy and guns.}
2023-06-24 18:56:58 +00:00
2023-07-06 20:18:53 +00:00
I downloaded it, and decided to play around with it to see how much I could make it look like an actual book. My original purpose for starting this zine was to learn how to typeset things in \LaTeX{}, but it can be limiting since I've already figured out this format. Since I learn best from projects, another project was in order. This one fell into my lap at the perfect time.
2023-06-24 18:56:58 +00:00
\subsection{Removing Page Numbers from ``Part'' Pages}
2023-07-06 20:18:53 +00:00
In \LaTeX{}, chapters can be grouped into ``parts'' using
2023-06-24 18:56:58 +00:00
\begin{verbatim}
part[]{}
\end{verbatim}
\noindent wherever you want a new part. (See the section on publication structure on page \pageref{docsec} for more information.) Surprisingly, these pages still have page numbers, which I just find odd. You can remove them by adding the \texttt{nonumonpart} package.
2023-06-24 18:56:58 +00:00
\subsection{Adding Additional Text to ``Part'' Pages}
It's fairly easy to \textit{remove} page numbers from the ``Part'' pages, but it not nearly as easy as it is to \textit{add} text to them. And it should be! In actual books, these pages often contain some sort of epigraph.
2023-07-06 20:18:53 +00:00
As it turns out, you can make the text an optional argument to the \verb|\part| command by adding this to the preamble:\footnote{As described by \href{https://tex.stackexchange.com/users/1090/david-carlisle}{David Carlisle} at \href{https://tex.stackexchange.com/questions/336361/how-to-write-text-after-part}{\texttt{https://tex.stackexchange.com/questions/336361/h\\ow-to-write-text-after-part}}.}
2023-06-24 18:56:58 +00:00
\begin{verbatim}
\makeatletter
\let\old@endpart\@endpart
\renewcommand\@endpart[1][]{%
\begin{quote}#1\end{quote}%
\old@endpart}
\makeatother
\end{verbatim}
2023-07-04 17:20:44 +00:00
\texttt{makeatletter} changes the \texttt{@} to the ``letter'' category code so that the current document has access to package internal macros. \texttt{makeatother} changes it back to a letter so you can use it in your document.\footnote{This gets into the internal workings of LaTeX and so is far beyond the scope of this zine. However, there is some good information at \href{https://tex.stackexchange.com/questions/8351/what-do-makeatletter-and-makeatother-do}{\texttt{https://tex.stackexchange.com/questions/8351/what-do-makeatletter-and-makeatother-do}} and at \href{https://www.tug.org/pipermail/tugindia/2002-January/000178.html}{\texttt{https://www.tug.org/pipermail/tugindi \\ a/2002-January/000178.html}} if you are interested. A complete list of category codes can be found at \href{https://en.wikibooks.org/wiki/TeX/catcode}{\texttt{https://en.wikibooks.org/wiki/TeX/catcode}}}
2023-06-24 18:56:58 +00:00
\verb|\let\old@endpart\@endpart| says ``take the old value for \texttt{endpart} (which is part of the \texttt{part} function) and give it this new value that I'm about to describe''.
The rest of it (that is, the \texttt{renewcommand} part) redefines the \texttt{endpart} to now include a \verb|\quote| environment, which is quite appropriate for an epigraph.
2023-06-24 18:56:58 +00:00
\subsection{Adjusting the Line Spacing}
\LaTeX{} was designed to write documents; as such, its ability to fine-tune certain document parameters, such as line-spacing, is fairly limited out of the box.\footnote{As it should be! Remember, the Unix Principle is to do one thing and do it well, not to be a Swiss army knife.} But if you need something, chances are that someone else has needed it before you and has created a package that will do just that. In this case, the package you need is the \texttt{setspace} package.
2023-06-24 18:56:58 +00:00
Add that to your preamble, and you can adjust the line spacing of your document by adding either \texttt{singlespacing}, \texttt{onehalfspacing}, or the \texttt{doublespacing} command to your preamble.
That gives you the versatility that you had with a typewriter. To set more precise line spacing, you can use the \texttt{setstretch} command in your preamble:
\begin{verbatim}
\setstretch{1.1}
\end{verbatim}
\noindent which sets a line spacing equivalent to 1.1 lines. If you want to change the line spacing for just a portion of your document, use the \texttt{spacing} environment:
\begin{verbatim}
\begin{spacing}{2.5}
Your widely spaced text goes here.
\end{spacing}
\end{verbatim}
This is a small, simple package, but one that I am sure I'll have a lot of use for down the road.
\subsection{Include Page Numbers on ``Chapter'' Pages}
I set up my version of \textit{Flatland} to have the page numbers in the header and to completely suppress the footers. But I wanted those headers to appear on the chapter pages (you'll notice in this zine that they don't appear), because this is how the book was originally typeset back in the nineteenth century. As it turns out, the \texttt{titlesec} package makes this very easy:
\begin{verbatim}
\usepackage[]{titlesec}
\assignpagestyle{\chapter}{fancy}
\end{verbatim}
For what it's worth, if you want to \textit{omit} the headers and footers on a given page, just add
2023-06-24 18:56:58 +00:00
\begin{verbatim}
\thispagestyle{empty}
\end{verbatim}
2023-07-06 20:18:53 +00:00
\noindent{}somewhere \textit{after} the start of the page.
2023-06-24 18:56:58 +00:00
\subsection{A Few Little Things}
\begin{itemize}[noitemsep]
2023-06-24 18:56:58 +00:00
\item Want \textsc{Small Caps}? Wrap them in \verb|textsc{ }|.
\item Need to control the gap between the header and the rest of the text? Pass the \verb|headsep| argument to the \texttt{geometry} package and set it equal to the amount of space you need (i.e., \texttt{headsep=12pt}).
\item If you want to add a degree symbol to inline text, the simplest way I've found (so far) is to just pop in and out of math mode with this: \verb|$^{\circ}$| which gives you this: $^{\circ}$
\end{itemize}
2023-07-04 17:20:44 +00:00
\paragraph{I almost forgot to add:} If you are interested in seeing this project, you can view it at and download it from \href{https://git.kjodle.net/kjodle/Flatland}{\texttt{https://git.kjodle.net/kjodle/Flatland}}.
2023-06-24 18:56:58 +00:00
\end{document}