diff --git a/006/006 time.csv b/006/006 time.csv index b8c0cce..93062f6 100644 --- a/006/006 time.csv +++ b/006/006 time.csv @@ -61,4 +61,7 @@ Date,Topic,Minutes 2026.02.09, terminal commands, 100 2026.02.14, first round final proofreading, 100 2026.02.15, second round final proofreading, 63 -2026.02.16, third round final proofreading, 40 \ No newline at end of file +2026.02.16, third round final proofreading, 40 +2026.02.18, fourth round final proofreading, 30 +2026.02.20,,29 +2026.02.22,,44 \ No newline at end of file diff --git a/006/chapters/ada_lovelace.tex b/006/chapters/ada_lovelace.tex index 7f74831..ec88fa7 100644 --- a/006/chapters/ada_lovelace.tex +++ b/006/chapters/ada_lovelace.tex @@ -11,11 +11,11 @@ Computer science is strongly allied with mathematics, and while the face of both Ada Lovelace, otherwise known as Augusta Ada King, Countess of Lovelace, was the first woman to make significant contributions to both fields. -Lovelace was the child of the English poet Lord Byron and reformer Anne Isabella Milbanke. This period in English history is especially fascinating to me, as Lord Byron was in a social circle that included the poet Percy Bysshe Shelley and his wife Mary Shelley (who was the daughter of Mary Wollstonecraft, an early feminist and advocate of women's rights, and William Godwin, who had many not-so-nice things to say about aristocracy), in addition to his wife and daughter. This circle would eventually lead to the production of \textit{Dracula} by Bram Stoker, \textit{Frankenstein, or the Modern Prometheus} by Mary Shelley, the modern computer algorithm and by extension, the modern computer industry, a progressive view toward education, and many, many great horror films (not to mention quite a few bad, but delightful, ones). +Lovelace was the child of the English poet Lord Byron\footnote{Who was ``mad, bad, and dangerous to know'' according to his mistriss Lady Caroline Lamb.} and reformer Anne Isabella Milbanke. This period in English history is especially fascinating to me, as Lord Byron was in a social circle that included the poet Percy Bysshe Shelley and his wife Mary Shelley (who was the daughter of Mary Wollstonecraft, an early feminist and advocate of women's rights, and William Godwin, who had many not-so-nice things to say about aristocracy), in addition to his wife and daughter. This circle would eventually lead to the production of \textit{Dracula} by Bram Stoker, \textit{Frankenstein, or the Modern Prometheus} by Mary Shelley, the modern computer algorithm and by extension, the modern computer industry, a progressive view toward education, and many, many great horror films (not to mention quite a few bad, but delightful, ones). -Ada's mother Lady Byron (i.e., Anne Isabella Noel Byron, 11th Baroness Wentworth and Baroness Byron) was an interesting personality herself. She was an educational reformer and philanthropist, in addtion to being an abolitionist. She established the Ealing Grove School, the first industrial school in England. At this school, academic subjects were combined with three hours of gardening each day, and corporal punishment was not allowed. (By contrast, corporal punishment in elementary school was still a thing when I was a student in the 1970s.) +While much as been written about Ada's father Lord Byron, her mother Lady Byron (i.e., Anne Isabella Noel Byron, 11th Baroness Wentworth and Baroness Byron) was an interesting personality herself. She was an educational reformer and philanthropist, in addtion to being an abolitionist. She established the Ealing Grove School, the first industrial school in England. At this school, academic subjects were combined with three hours of gardening each day, and corporal punishment was not allowed. (By contrast, corporal punishment in elementary school was still a thing when I was a student in the 1970s.) -Ada showed an early interest in mathematics, and her mother encouraged this in an effort to ward off the development of what she perceived as Lord Byron's insanity.\footnote{This was, after all, an age which did not have a good understanding of mental illness. We are doing better in this regard, but we still have quite a way to go.} At the age of eighteen, she began a long working relationship and friendship with Charles Babbage, the British mathematician. At the time, Babbage used to host a ``Saturday night soirée'' which was often attended by the cultural elite, including Charles Dickens, Michael Farday (an early pioneer in the study of electromagnetism), Henry Fox Talbot (a photography pioneer who invented the calotype process, an early precursor to modern wet photography), and Charles Wheatstone (who was a pioneer in the study of electricity, invented the English concertina, and also invented the Playfair cypher, which was the first cipher to encrypt pairs of letters, rather than individual letters). +Ada showed an early interest in mathematics, and her mother encouraged this in an effort to ward off the development of what she perceived as Lord Byron's insanity.\footnote{This was, after all, an age which did not have a good understanding of mental illness. We are doing better in this regard, but we still have quite a way to go.} At the age of eighteen, she began a long working relationship and friendship with Charles Babbage, the British mathematician. At the time, Babbage used to host a ``Saturday night soirée'' which was often attended by the cultural elite, including Charles Dickens, Michael Faraday (an early pioneer in the study of electromagnetism), Henry Fox Talbot (a photography pioneer who invented the calotype process, an early precursor to modern wet photography), and Charles Wheatstone (who was a pioneer in the study of electricity, invented the English concertina, and also invented the Playfair cypher, which was the first cipher to encrypt pairs of letters, rather than individual letters). That's a pretty impressive crowd to hang out with on Saturday nights. @@ -25,9 +25,9 @@ Let's take note of a couple of things about Babbage's Analytical Engine. First, What it means for a computer to be Turing complete is complex (and therefore, the subject of much controversy) but it basically boils down to its capabilities. A Turing complete device means that you can program it to find any answer, provided you have unlimited runtime and memory\footnote{Because no computer has unlimited runtime or memory, no device is \textit{truly} Turing complete—as Captain Barbossa said, it's more of a guideline than a rule.}. Your computer is Turing complete, whereas your calculator and kitchen timer are not. The Difference Engine was not Turing complete because its intended output (and what the British government wanted and was willing to give Babbage so much money for) was tables of logarithms and trigonometric functions and as a result its initial numerical constants consisted of polynomial differences set physically, but that was all that it could produce. The Analytical Engine had the same basic structure as modern computer design, albeit in a larger, clunkier fashion. -Because it was Turing complete meant that it had a \textit{lot} of potential, and Ada Lovelace was the first person to figure out a way to tap that potential. Despite her close association to Babbage, it was a somewhat tortuous path to unleashing that potential, however. In 1840, Babbage gave a seminar about the Analytical Engine at the University of Turin. This seminar was transcribed into French by a young Italian engineer (and future prime minister of Italy—oh, for the day when there are more scientists in politics!) named Luigi Menabrea. A couple of years later, Charles Wheatstone (who was a member of Saturday night soirées that Babbage had hosted) commissioned Lovelace to translate Menabrea's paper into English, which she did, adding seven notes (labeled A-G). The notes were three times longer than the actual translation, so she not only translated Babbage's seminar, she greatly expanded the understanding of how the Analytical Engine could be used for practical purposes. +Because it was Turing complete meant that it had a \textit{lot} of potential, and Ada Lovelace was the first person to figure out a way to tap that potential. Despite her close association to Babbage, it was a somewhat indirect path to unleashing that potential. In 1840, Babbage gave a seminar about the Analytical Engine at the University of Turin. This seminar was transcribed into French by a young Italian engineer (and future prime minister of Italy) named Luigi Menabrea. A couple of years later, Charles Wheatstone (remember him?) commissioned Lovelace to translate Menabrea's paper into English, which she did, adding seven notes (labeled A-G). The notes were three times longer than the actual translation, so she not only translated Babbage's seminar, she also greatly expanded the understanding of how the Analytical Engine could be used for practical purposes. -Of these seven notes, the last—Note G—is perhaps the most significant in the history of computers, because it describes, in complete detail, how to use the Analytical Engine to calculate a sequence of Bernoulli numbers. I am not a mathematician, so I had to look this up (because I initially confused these with the Fibonacci sequence\footnote{I did mention that I'm not a mathematician, right?}), and \textit{Wolfram Mathworld} describes them as +Of these seven notes, the last—Note G—is perhaps the most significant in the history of computers, because it describes, in complete detail, how to use the Analytical Engine to calculate a sequence of Bernoulli numbers. I am not a mathematician, so I had to look this up (because I initially confused these with the Fibonacci sequence), and \textit{Wolfram Mathworld} describes them as \begin{quote} The Bernoulli numbers $B_n$ are a sequence of signed rational numbers that can be defined by the exponential generating function @@ -44,7 +44,7 @@ That is not something I understand and therefore cannot do on a calculator or wi Many scientists of the time did not understand the Analytical Engine and most of them showed little interest it it.\footnotemark{} Were it not for the interest of a young Italian engineer and the efforts of Ada Lovelace, his work might be unknown to this day. To be certain, Babbage's personal notes contained programs for the engine, but because Lovelace's work was published, Note G is considered to be the first published computer program. % Keep with next paragraph -\footnotetext{I mentioned earlier that Babbage had disagreements with his chief engineer. (If I learned anything from \textit{Star Trek} it's that you shouldn't argue with your chief engineer. Science does not care about your military tactics.) He also expressed a distaste for the common people, campaiging in his later life to make street musicians and hoop-rolling (a popular game for boys at the time that dates back to ancient Greece) and tip-cat (a probable early precursor or analog to both cricket and baseball) illegal, and actually counted all the broken panes of glass in a factory, noting that of the 464 panes, 14 were caused by ``drunken men, women or boys''. (Seriously, who does this?) He also railed against his detractors in later life, so he was either just bitter or he was a difficult person to get along with (or possibly both). Despite his Saturday night soirées, he does \textit{not} seem fun at parties. (See \textit{Nineteenth-Century Science: An Anthology} edited by A.S. Weber and published by Broadview Press in 2000 for the few details that exist.)} +\footnotetext{I mentioned earlier that Babbage had disagreements with his chief engineer. (If I learned anything from \textit{Star Trek} it's that you shouldn't argue with your chief engineer. Science does not care about your military tactics.) He also expressed a distaste for the common people, campaiging in his later life to make street musicians and hoop-rolling (a popular game for boys at the time that dates back to ancient Greece) and tip-cat (a probable early precursor or analog to both cricket and baseball) illegal, and once actually counted all the broken panes of glass in a factory, noting that of the 464 panes, 14 were caused by ``drunken men, women or boys''. (Seriously, who does this?) He also railed against his detractors in later life, so he was either just bitter or he was a difficult person to get along with (or possibly both). Despite his Saturday night soirées, he does \textit{not} seem fun at parties. (See \textit{Nineteenth-Century Science: An Anthology} edited by A.S. Weber and published by Broadview Press in 2000 for the few details that exist.)} I am constantly astounded by the depth and breadth of Lovelace's vision here. First, she was asked to translate (nothing more) a seminar on a device that hadn't been built yet, and then went on to also imagine practical use for that device and then describe the exact process to do that. She also allowed her notes to be published, albeit under the initials ``AAL'' because it's unlikely the vast majority of the scientific community of the time would have taken anything published by a woman seriously at the time, although I'm sure it wasn't difficult for anyone in the scientific community at the time to have found out who ``AAL'' actually was.\footnote{Scientists tend to be pragmatic, so accepting the work of a female mathematician would not necessarily have been a personal issue. But science does not operate in a vacuum, so \textit{publically} acknowledging the work of a female mathematician is not something they were able to do. This is an issue we continue to struggle with to this day, leading to the work of women and minorities being ignored or worse, credited to white men who contributed little if anything to it, other than pointing it out.} diff --git a/006/chapters/basic_terminal_commands.tex b/006/chapters/basic_terminal_commands.tex index f957a35..3bb907b 100644 --- a/006/chapters/basic_terminal_commands.tex +++ b/006/chapters/basic_terminal_commands.tex @@ -2,13 +2,13 @@ A lot of people are reluctant to try Linux because they think you need to be proficient in the terminal, which is not true. The point of Linux, after all, is that it is a GUI (a graphical user interface) which is meant to eliminate your need to use text-based commands. -The fact is, you don't need to use the terminal at all to use Linux. Using the terminal can make your life in Linux a lot easier, so it pays to learn how to use it. (The converse is that the improper use of the terminal can make your life in Linux a lot more difficult.) If you have been nervous about using the terminal, fear no more. What follows is a basic introduction to using the terminal. It's designed to get your feet wet, not to make you an expert user. +You don't have to use the terminal at all to use Linux. But using the terminal can make your life in Linux a lot easier, so it pays to learn how to use it. (The converse is that the improper use of the terminal can make your life in Linux a lot more difficult.) If you have been nervous about using the terminal, fear no more. What follows is a basic introduction to using the terminal. It's designed to get your feet wet, not to make you an expert user. \section{What is a Terminal?} We really should talk about what a terminal actually is, though, because Linux doesn't actually have one. What Linux has is a terminal \textit{emulator}. Now we have two questions: what is a terminal and what is a terminal emulator? -In the early days of computing, computers were huge and often took up the entire basement of a building. The only way to input data into them was to use punched cards\footnote{See \kref{https://en.wikipedia.org/wiki/Punched_card}{https://en.wikipedia.org/wiki/Punched\_card}} or paper tape\footnote{See \kref{https://en.wikipedia.org/wiki/Punched_tape}{https://en.wikipedia.org/wiki/Punched\_tape}} which meant that to interact with the computer, you had to prepare your cards or your tape and then head down to the basement.\footnote{For attribution and licensing information for the images in this chapter, see \kref{https://en.wikipedia.org/wiki/File:Used_Punchcard_(5151286161).jpg}{https://en.wikipedia.org/wiki/File:Used\_Punchcard\_(5151286161).jpg}, \kref{https://en.wikipedia.org/wiki/File:PaperTapes-5and8Hole.jpg}{https://en\\.wikipedia.org/wiki/File:PaperTapes-5and8Hole.jpg}, and \kref{https://en.wikipedia.org/wiki/File:DEC_VT100_terminal_transparent.png}{https://en.wikipedia.o\\rg/wiki/File:DEC\_VT100\_terminal\_transparent.png}.} +In the early days of computing, computers were huge and often took up the entire basement of a building. The only way to input data into them was to use punched cards or paper tape\footnote{See \kref{https://en.wikipedia.org/wiki/Punched_card}{https://en.wikipedia.org/wiki/Punched\_card} and \kref{https://en.wikipedia.org/wiki/Punched_tape}{https://en.wikipedia.or\\g/wiki/Punched\_tape}} which meant that to interact with the computer, you had to prepare your cards or your tape and then head down to the basement.\footnote{For attribution and licensing information for the images in this chapter, see \kref{https://en.wikipedia.org/wiki/File:Used_Punchcard_(5151286161).jpg}{https://en.wikipedia.org/wiki/File:Used\_Punchcard\_(5151286161).jpg}, \kref{https://en.wikipedia.org/wiki/File:PaperTapes-5and8Hole.jpg}{https://e\\n.wikipedia.org/wiki/File:PaperTapes-5and8Hole.jpg}, and \kref{https://en.wikipedia.org/wiki/File:DEC_VT100_terminal_transparent.png}{https://en.wikipedia.o\\rg/wiki/File:DEC\_VT100\_terminal\_transparent.png}.} Somebody eventually figured out a way to use a keyboard to provide input for a computer, which meant that you could put the keyboard in your office on the third floor and just run wires from it down to the computer. No more running up and down the stairs with paper cards or tape in your hands. The output from the terminal originally went to a line printer, but at some point, somebody realized that they could use a CRT (a cathode-ray tube, akin to what televisions used to be before flat screens came along) and send the output to that instead, thus saving on paper. Pretty handy. @@ -17,7 +17,7 @@ Somebody eventually figured out a way to use a keyboard to provide input for a c \caption{A 12-row/80-column IBM punch card from the mid-twentieth century} \end{wrapfigure} -The point here is that a terminal is a physical object (either keyboard and printer or keyboard and screen), while the terminal emulator in Linux is merely a piece of software that allows you to interact with the Linux kernel (i.e., that bit of software that exists between the physical hardware of the computer and the programs you use on a regular day). Thus, the Linux terminal just \textit{emulates} that keyboard and monitor, hence it's a terminal \textit{emulator}, rather than an actual terminal. But by and large, people don't bother to make that distinction any more (and I'm willing to be a lot of people don't even know that distinction exists) and when people talk about a modern day terminal, they're really talking about a terminal emulator. +The point here is that a terminal is a physical object (either keyboard and printer or keyboard and screen), while the terminal emulator in Linux is merely a piece of software that allows you to interact with the Linux kernel (i.e., that bit of software that exists between the physical hardware of the computer and the programs you use on a regular day). Thus, the Linux terminal just \textit{emulates} that keyboard and monitor, and hence it's a terminal \textit{emulator}, rather than an actual terminal. But by and large, people don't bother to make that distinction any more (and I'm willing to be a lot of people don't even know that distinction exists) and when people talk about a modern day terminal, they're really talking about a terminal emulator. \begin{wrapfigure}[9]{l}{0.4\textwidth} \includegraphics[scale=0.9]{paper_tape} @@ -34,11 +34,11 @@ In figure \ref{dec10}, we see a DEC terminal, which is similar to the terminal I \label{dec10} \end{wrapfigure} -My background in computers was basically programming in BASIC, and I had no idea how to do much else. But I had terrible handwriting, and I wanted a decent copy of my class notes to refer to, so it was either check out a typewriter room on the first floor of the dorm or the second floor of the library\footnote{In those days, you could check out a study room either with or without a typewriter. What an eternity ago that seems like now.} or use the computer. Using the computer meant that I didn't have to bother with correction paper—I could just edit on the terminal. I would save my files, then send them to the printer in another room, then go stand in line to get my printouts. It was a different age, to be certain. +My background in computers was pretty much limited programming in BASIC, and I had no idea how to do much else. But I had terrible handwriting, and I wanted a decent copy of my class notes to refer to, so it was either check out a typewriter room on the first floor of the dorm or the second floor of the library\footnote{In those days, you could check out a study room either with or without a typewriter. What an eternity ago that seems like now.} or use the computer. Using the computer meant that I didn't have to bother with correction paper—I could just edit on the terminal. I would save my files, then send them to the printer in another room, then go stand in line to get my printouts. It was a different age, to be certain. \section{Basic Commands} -Enough about me. Let's talk about some basic terminal commands you can start using right now. But first, let's talk about information, and which way it flows… +Enough about me. Let's talk about some basic terminal commands you can start using right now. But first, we need to talk about information, and which way it flows… \subsection{Input, Output, Errors, Redirects, and Piping} @@ -48,7 +48,7 @@ We have standard names for these things: \texttt{stdin}, \texttt{stdout}, and \t For example, let's say that you want to see the contents of a particular directory. You would use the command \texttt{ls} (which we will talk about in a bit), and the \texttt{stdin} you would provide would be the name of the directoy. The \texttt{stdout} would be the contents of that directory. If you misspelled the name of the directory or the directory doesn't exist, then the \texttt{ls} command would give you an error like ``cannot access : No such file or directory'', which would be the \texttt{stderr}. -Understanding standard streams is important because you need to know exactly what input a command needs to get from you in order to operate correctly, and you also need to understand where it is sending its output and errors in case you get something you weren't expecting. For the most part, simple commands send their \texttt{stdout} and \texttt{stderr} to your monitor. (If this were 1972, those would probably go to that line printer attached to your terminal.) But it's also possible to \textit{redirect} those streams to a file, via a redirect symbol (which is typically >). This is sometimes handy if you want a record of that information, or you need to use that data in a different program like a spreadsheet. +Understanding standard streams is important because you need to know exactly what input a command needs to get from you in order to operate correctly, and you also need to understand where it is sending its output and errors in case you get something you weren't expecting. For the most part, simple commands send their \texttt{stdout} and \texttt{stderr} to your monitor. (If this were 1972, those would probably go to that line printer attached to your terminal.) But it's also possible to \textit{redirect} those streams to a file, via a redirect symbol (which is typically >). This can be handy if you want a record of that information, or you need to use that data in a different program like a spreadsheet. It's also possible to take the \texttt{stdout} of one command and use it as the \texttt{stdin} of another command. This is called ``piping'' and makes use of the pipe symbol (that is, |) that is generally located on the key just above the \kkey{enter} key on your keyboard. This is a good technique when you know the command you are using will produce a lot of output, but you are only concerned with a small subset of it, so you send that output through a command (usually \texttt{grep}, which we will talk about) to filter out just the bits that you are interested in. @@ -58,7 +58,7 @@ We'll look at specifics about redirects and piping when we discuss actual comman You have two ways to access the terminal on most Linux systems.\footnote{For the record, I am most familiar with Ubuntu, which is based on Debian, but not all Linux distros work exactly the same way. Going forward, whenever I make a statement, assume that I mean ``on most Linux systems, and in particular, Debian-based systems like Ubuntu''.} -First, you can go into your application manager and search for ``terminal''. You can install other terminals besides Bash, so if you type that command, you'll probably see them. +First, you can go into your application manager and search for ``terminal''. You can install other terminals besides Bash, so you should be able see them in the app manager. The other, easier (and thus the method I use) is to hit \kkey{ctrl-alt-t} on your keyboard, which will open up your default terminal. @@ -82,7 +82,7 @@ Arguments (see the next section) are typically shown between angle brackets, so \subsection{Arguments and Switches} -Bash commands follow the Unix principle (``Do one thing and do it well'') but that doesn't mean that they are simple. I mean, they are simple, but they can accomplish complex things.\footnote{Which I guess means that ``simple'' is a matter of perspective. When I was first starting with Linux, I thought these commands were terribly complicated. But as I've gained experience, I went from ``complex input $\rightarrow$ simple input'' and ``simple output $\rightarrow$ complex output''. Experience and knowledge change your perspective.} +Bash commands follow the Unix principle (``Do one thing and do it well'') but that doesn't mean that they are simple. I mean, they are simple, but they can accomplish complex things.\footnote{Which I guess means that ``simple'' is a matter of perspective. When I was first starting with Linux, I thought these commands were terribly complicated. Experience and knowledge change your perspective.} Most but not all commands have both \textit{arguments} and \textit{switches}, which are sometimes called \textit{options}. (I like the term ``switch'' because I like to think that a command can switch between doing things in different ways.) For example, if I want to copy a file on the command line, I need to tell the terminal which file I'd like to copy. That file's name is the \textit{argument}—in other words, it's the thing I want the command to act on. @@ -183,13 +183,13 @@ The Linux filesystem is large, and chances are that your home directory is also \paragraph{find} A more useful command is \texttt{find}, which has a \textit{ton} of options. (The \texttt{man} page runs to over 1,600 lines, so yep, a lot of options.) -A command like \texttt{find } will search your entire filesystem for directories and files containing \texttt{} in their name. To search just your home directory, you can use \texttt{find \$HOME }. \footnote{\texttt{\$HOME} is a variable (hence the dollar sign and upper case) in Linux, which in this case is a variable for your user's home directory.} +A command like \texttt{find } will search your entire filesystem for directories and files containing \texttt{} in their name. To search just your home directory, you can use \texttt{\$find \$HOME }. \footnote{\texttt{\$HOME} is a variable (hence the dollar sign and upper case) in Linux, which in this case is a variable for your user's home directory.} \subsection{Finding Binaries} A \textit{binary} is just another name for an application file that you can run. Often you need to find where a binary is located so that you can add it as a command to another application. You have a couple of options here. -\paragraph{which} This command will return the name of all binaries that are located in your \texttt{PATH} variable, which is a list of locations that your system will search when attempting to execute that command. For example, if I run \texttt{which latex} in a terminal, I get this output: \texttt{/usr/bin/latex}. This tells me a couple of things. First, it means that LaTeX is installed on my system. Second, it tells me that its location is contained in my \texttt{PATH} variable, which means that I can use it by simply typing \texttt{latex} in a terminal.\footnote{Yep, \texttt{\$PATH} is yet another variable, just like \texttt{\$HOME}. I'll talk about variables in a future issue.} +\paragraph{which} This command will return the name of all binaries that are located in your \texttt{PATH} variable, which is a list of locations that your system will search when attempting to execute that command. For example, if I run \texttt{which latex} in a terminal, I get this output: \texttt{/usr/bin/latex}. This tells me a couple of things. First, it means that LaTeX is installed on my system. Second, it tells me that its location is contained in my \texttt{PATH} variable, which means that I can use it by simply typing \texttt{latex} in a terminal.\footnote{\texttt{\$PATH} is yet another variable, just like \texttt{\$HOME}. I'll talk about variables in a future issue.} \paragraph{whereis} Sometimes binaries get installed without getting added to the \texttt{PATH}, however. To find all binaries, regardless of whether or not they are in the \texttt{PATH}, use \texttt{wheris}. For example, typing \texttt{whereis latex} in my terminal gives me this output: @@ -205,7 +205,7 @@ The \texttt{find} command is useful because it can take wildcards. A full discus The first is \texttt{?} which takes the place of a single character. Thus \texttt{find ?at} would match ``cat'' and ''hat'' but it wouldn't match ``what''. -There is also \texttt{*} which matches any character of any length. The command \texttt{find *at} would match ``cat'', ``hat'', ``what'', and also ``casey\_at\_the\_\-bat''. +There is also \texttt{*} which matches any character of any length. The command \texttt{find *at} would match ``cat'', ``hat'', ``what'', and also ``casey\_at\_the\_b\\at''. You can also use square brackets to provide a comma-delimited list of characters to match. The command \texttt{find [b,c]at} would match both ``bat'' and ``cat'' but it wouldn't match ``hat''. @@ -221,7 +221,7 @@ Bash has a number of commands for working with files and directories. Many of th \paragraph{touch} The most basic file command is probably \texttt{touch} which will create a file if it doesn't exist, or will update the date and time it was modified if it does exist.\footnote{I admit, I'm a little confused as to the purpose of this command, and have never found a use for it. It is probably a legacy from the early days of Linux or possbily Unix, and I have never had the time—or the amount of curiosity required—to investigate it.} -\paragraph{cat} A command I do find a lot of use for however is \texttt{cat}, which is short for ``concatenate''. This command can create files and add content to them, but it can also add content to existing files. But the thing I find it most useful for is simply displaying the contents of a file, which I use a lot when examining log files. +\paragraph{cat} A command I do find a lot of use for however is \texttt{cat}, which is short for ``concatenate''. This command can create files and add content to them, and it can also add content to existing files. But the thing I find it most useful for is simply displaying the contents of a file, which I use a lot when examining log files. To use \texttt{cat} to create files, just type \texttt{cat > } in the terminal. \texttt{cat} will then create a file named ``'' and then go into \textit{interactive mode}, meaning it looks like it's not doing anything. In reality, it's waiting for you to add input. Type what you want the contents of the file to be and then press \kkey{ctrl+d} to save the file and exit interactive mode. @@ -233,7 +233,7 @@ Notice that we are using a redirect symbol here (\texttt{>}) to push your conten \paragraph{tail} Of course, if new information is appended to the \textit{end} of the log file, then you can use the \texttt{tail} command, which works pretty much the same way the \texttt{head} command does. -\paragraph{more} If \texttt{head} and \texttt{tail} don't get you what you need, you can always use the \texttt{more} command, which allows you to page through text one screenful at a time. You can see the next line by pressing the space bar, or see the next screen by pressing either \kkey{z} or \kkey{enter}. I particularly ``\texttt{-c}'' option, which doesn't scroll, but clears the screen before displaying the next screenful of text. For some reason my brain finds that easier to deal with. +\paragraph{more} If \texttt{head} and \texttt{tail} don't get you what you need, you can always use the \texttt{more} command, which allows you to page through text one screenful at a time. You can see the next line by pressing the space bar, or see the next screen by pressing either \kkey{z} or \kkey{enter}. I particularly like the ``\texttt{-c}'' option, which doesn't scroll, but clears the screen before displaying the next screenful of text. For some reason my brain finds that easier to deal with. The \texttt{more} command will also tell you how much of the file you've seen by providing a percentage in the bottom left corner of the screen. For example, if I use this command to look at the main \LaTeX{} file for this issue: diff --git a/006/chapters/coda.tex b/006/chapters/coda.tex index 5a15924..462c887 100644 --- a/006/chapters/coda.tex +++ b/006/chapters/coda.tex @@ -4,7 +4,7 @@ \subsection{\texttt{include} is Your Friend} -Last time around, I mentioned using \verb|\input{}| to keep your \LaTeX{} GUI happy. But I've also found that using \verb|\include{}| keeps \textit{me} happy. Creating this zine means I end up with a very long file (the file for issue \#5 was 1005 lines long!) making it time consuming to constanty scroll through the file to get to the last part I was editing. (It's not terrible in and of itself, but repeatedly having to do it impacts my overall efficiency.) +Last time around, I mentioned using \verb|\input{}| to keep your \LaTeX{} GUI happy. But I've also found that using \verb|\input{}| keeps \textit{me} happy. Creating this zine means I end up with a very long file (the file for issue \#5 was 1005 lines long!) making it time consuming to constanty scroll through the file to get to the last part I was editing. (It's not terrible in and of itself, but repeatedly having to do it impacts my overall efficiency.) For this issue, I decided to write up each chapter as a separate file, and then just \texttt{include} that file into my main document. This makes it much easier to manage, and I do feel more efficient. But because I'm using a GUI (Texmaker) I do have to remember to switch back to my main file when I compile the document. Overall, that's a trade-off I can live with. As a bonus, I can comment out chapters I am not concerned about when compiling. This saves both printer paper (since I tend to edit on paper—I'm very old-school in that way) and my adult-onset-attention-deficit-disordered brain.) @@ -28,9 +28,9 @@ The first line saves the \texttt{textsf} command under a new name (\texttt{oldte It looks like this is a thing now, and a single repo just won't work. I'm just over 300 commits in that repo, which doesn't really reveal much about the state of each issue. Going forward, I've decided to make this an organization on my git repo at \kref{https://git.kjodle.net/the-codex-zine}{https://git.kjodle.net/the-codex-\\zine}. That way, each issue can have its own repository and will eventually come to a logical end, instead of being never ending. I still need to move the wiki over from its current location at \kref{https://git.kjodle.net/kjodle/the-codex/wiki}{https://git.kjodle.net/kjodle/the\\-codex/wiki}. -Believe it or not, I also have a forum for it at \kref{https://forums.kjodle.net/forumdisplay.php?fid=15}{https://forums.kjodle.net/forumdi\\splay.php?fid=15}, so if you want to join that forum and share your opinions and ideas, I encourage you to do so. +Believe it or not, I also have a forum for it at \kref{https://forums.kjodle.net/forumdisplay.php?fid=15}{https://forums.kjodle.net/\\forumdisplay.php?fid=15}, so if you want to join that forum and share your opinions and ideas, I encourage you to do so. -Starting with this issue, I wrote each chapter in a separate \LaTeX{} file, and then used the \texttt{include} command to include it in the main file. This made writing and editing this issue a lot easier, but I realize now that this method also makes it easier to collaborate with others on the writing of this zine. If you are interested in contributing a chapter to this zine, and are familiar with \LaTeX{} and Git, then you can just clone the repo for the current issue, make your changes, and then file a pull request. +Starting with this issue, I wrote each chapter in a separate \LaTeX{} file, and then used the \texttt{input} command to include it in the main file. This made writing and editing this issue a lot easier, but I realize now that this method also makes it easier to collaborate with others on the writing of this zine. If you are interested in contributing a chapter to this zine, and are familiar with \LaTeX{} and Git, then you can just clone the repo for the current issue, make your changes, and then file a pull request. \label{codeberg}Because you probably don't already have an account on my personal Git server (although if you are interested, contact me and we can talk about it), I'm also pushing the entire thing to Codeberg, which you can see here: \kref{https://codeberg.org/the-codex-zine}{https://codeberg.org/the-codex-zi\\ne}. (I've included the template files that I use for each issue there, so if you want to make your own zine in \LaTeX{}, you can download those and create your own.) @@ -42,11 +42,15 @@ To mark this change, I've made a few changes to the title page to make it a bit You're already doing the best thing you can do to support this zine: you're reading it. (I'm grateful that you are and I hope you're enjoying it.) -But everything that I wrote in section \ref{support} also applies here: Please talk about this zine on whatever social media platforms you participate on and share the Etsy link. And yep, please remember to talk about \textit{why} you like this zine. (Also tell me what you'd like to see more of. Like a lot of creative people, I vacillate between having too many things to talk about and not having enough things to talk about.) If you have friends you think would like this zine, please send them over to take a look, or buy them a copy. If you want to buy some copies in bulk to give away, please contact me so we can work out a pretty hefty discount. +But everything that I wrote in section \ref{support} also applies here: Please talk about this zine on whatever social media platforms you participate on and share the Etsy link. And yep, please remember to talk about \textit{why} you like this zine. (Also tell me what you'd like to see more of. Like a lot of creative people, I vacillate between having too many things to talk about and not having enough things to talk about.) If you have friends you think would like this zine, please send them over to take a look, or buy them a copy. If you want to buy some copies in bulk to give away, please contact me so we can work out a pretty hefty bulk discount. + +If you want to donate just to keep this thing going, you can always do so via PayPal at + +\kref{https://paypal.me/kjodle}{https://paypal.me/kjodle}. + +\noindent{}But really, please just read and enjoy this zine. And remember to tell your friends. Thanks! -If you want to donate just to keep this thing going, you can always do so via PayPal at \kref{https://paypal.me/kjodle}{https://paypal.me/kjo\\dle}.\footnote{You are under absolutely no obligation to do so, and my imposter syndrome actually means I would be embarassed if somebody did so. Relevant link is here: \kref{https://www.youtube.com/watch?v=rl_NpdAy3WY}{https://www.youtube.com/watch?v=rl\_NpdAy3WY}.} -But really, please just read and enjoy this zine. And remember to tell your friends. Thanks! \paragraph{Me, on social media:} I used to love Twitter, and was disappointed (to say the least) to see what it's devolved into. I am on both Mastodon (\texttt{@kjodle}) and Bluesky (\texttt{@iswpw.bsky.social}). Please feel free to reach out to me there, although I am not nearly as active on either of those platforms as I used to be on Twitter. Maybe someday, again, although I doubt it. Sometimes that which is lost will never be found again. \paragraph{Zine site:} I make other zines besides this one, which you can read about at \kref{https://just13.click/}{https://just13.click/}. I also have a mailing list there, and I encourage you to sign up for it. I have to pay if I send out more than one email per month anyway, so I definitely won't be clogging up your inbox. diff --git a/006/chapters/open_source.tex b/006/chapters/open_source.tex index 9d5534b..61c934e 100644 --- a/006/chapters/open_source.tex +++ b/006/chapters/open_source.tex @@ -2,9 +2,9 @@ \section{The Trouble With Open Source} -As a Linux user, I'm a big fan of open-source software. All the software I use in real life (i.e., when I'm not at work) is open source. (I finally did abandon VueScan for NAPS2, as I mentioned back in issue \#4.) I don't want Microsoft or Apple or Google in my personal life at all, if I can avoid it. I'm not worried about their stealing my identity or anything like that. What I want to avoid is their pernicious insistence on occupying a larger and larger role in my life. Alas, that takes a bit of work these days. +As a Linux user, I'm a big fan of open-source software. All the software I use in real life (i.e., when I'm not at work) is open source. (I finally did abandon VueScan for NAPS2, as I mentioned back in issue \#4.) I don't want Microsoft or Apple or Google in my personal life at all, if I can avoid it. I'm not worried about their stealing my identity or anything like that. For the most part, they already have it. What I want to avoid is their pernicious insistence on occupying a larger and larger role in my life. Alas, that takes a bit of work these days. -Also, open-source is a difficult path to follow these days. There are always people looking to exploit this model for their own greed. As I mention later on, it helps to examine a person's source code. +Also, open-source is a difficult path to follow these days. There are always people looking to exploit this model for their own greed. As I mention in the next issue, it helps to examine a person's source code. \subsection{GitHub} @@ -22,11 +22,11 @@ This is problematic in so many ways. For one thing, once I have that app on my p The worst thing about this is how deceitful it is. First, Microsoft creates an artificial barrier to doing what you want to do, and then it conveniently offers you a ``free'' solution to get around that barrier.\footnote{We would be wise here to remember Doctorow's Law: In a capitalist society, if somebody gives you something for free, you are not the customer, you are the product.} And of course, that solution means that Microsoft is going everywhere you go. It's a part of your life now. You can only get rid of it with a great deal of effort. -As an aside, my company is heavily invested in Microsoft technology, and we have to use 2FA to log into our VPN. Fortunately, they gave us the option of either using the app or using these little credit-card sized authenticator cards (they call them tokens; I'm not sure if that's the official name). But there have been rumors that the cards will soon go away and we'll be forced to install the Microsoft authenticator app on our phones and use that. For that reason (among others) I am looking to move on from this company. If they want me to use a digital device, then they need to provide it. Why should I have to spend my increasingly dwindling resources to help them make more profit? +As an aside, my company is heavily invested in Microsoft technology, and we have to use 2FA to log into our VPN. Fortunately, they gave us the option of either using the app or using these little credit-card sized authenticator cards (they call them tokens; I'm not sure if that's the official name). But there have been rumors that the tokens will soon go away and we'll be forced to install the Microsoft authenticator app on our phones and use that. For that reason (among others) I am looking to move on from this company. If they want me to use a digital device, then they need to provide it. Why should I have to spend my increasingly dwindling resources to help them make more profit? I don't use GitHub any more as a result. I have moved all my online repositories from there to both my own git server (located at \kref{https://git.kjodle.net/kjodle}{https://git.k\\jodle.net/kjodle}) and also to Codeberg (located at \kref{https://codeberg.org/kjodle}{https://codeberg.or\\g/kjodle}). -So long, GitHub. +So long, GitHub. It was good while it lasted, but nothing lasts forever. \subsection{WordPress} @@ -36,13 +36,13 @@ Back in the day, I absolutely \textit{loved} WordPress. The community was warm a In this case, it was the ``block editor'' known as Gutenberg.\footnote{It saddens me that it was named after a person who made it possible to bring knowledge and wisdom to the masses, and now it's being used to name an utterly worthless thing that is only meant to manipulate people. More about that later.} -First available as a plugin, I eagerly tried it out. And it was disappointing. I use WordPress to convey \textit{content}: information and ideas in the form of words occasionally augmented by images. But this was all about window dressing. It was about making things look pretty. (It was also about making things look all the same, alas. Such is the nature of modern web design.) +First available as a plugin, I eagerly tried it out. And it was disappointing. I use WordPress to convey \textit{content}: information and ideas in the form of words occasionally augmented by images. But this was all about window dressing. It was about making things look pretty. (It was also about making things look all the same, alas. Such is the nature of modern web design.\footnote{Do \textit{not} get me started on modern web design.}) -Which I'm fine with, in some ways—I've been interested in design since I first learned how to read and can go on \textit{at length}\footnote{Seriously, do \textbf{not} get me started on the subject of design.} about the differences between two different typefaces\footnote{\textit{Not} fonts. Seriously, also don't get me started on the differences between fonts and typefaces.}. But this is not what Gutenberg was about. There are (or there were at the time; I've since stopped paying attention to these things) a number of ``page-building'' plugins available to help you design a website with WordPress if you know nothing about HTML and CSS. +Which I'm fine with, in some ways—I've been interested in design since I first learned how to read and can go on \textit{at length}\footnote{Seriously, do \textbf{not} get me started on the subject of design.} about the differences between two different typefaces\footnote{\textit{Not} fonts. Seriously, also don't get me started on the differences between fonts and typefaces.}. But this is not what Gutenberg was about. There are\footnote{or there were at the time; I've since stopped paying attention to these things} a number of ``page-building'' plugins available to help you design a website with WordPress if you know nothing about HTML and CSS. The ostensible purpose of the Gutenberg plugin (which was eventually included in the WordPress core\footnote{``in the WordPress core'' means that once you install the latest version of WordPress, you have this thing whether or not you want it or need it.}) was generally presented as a way to make WordPress \textit{easier} to use for non-technical users. One of the nice things about blogging software is that it levels the playing field for mounting a bully pulpit of your own—getting online is largely a matter of logging on, rather than building something from scratch. I used to think that this was a good thing, but the last ten years has taught me that giving idiots a bigger and better soapbox is probably \textit{not} a good idea. We should have the digital equivalent of ``you must be this tall to ride this ride'', which used to be a basic knowledge of HTML. Maybe we should bring that back. -But it didn't really take a genius (because I am \textit{not}, in any way, shape, or form, a genius) to figure out the \textit{real} purpose of Gutenberg, and that was to basically squash all of those competing companies that provided page-building plugins out of existence. +But it didn't really take a genius to figure out the \textit{real} purpose of Gutenberg (because I am \textit{not}, in any way, shape, or form, a genius), and that was to basically squash all of those competing companies that provided page-building plugins out of existence. The entire point of WordPress was that it made getting on the web easier for people. But here is WordPress saying that ``\textit{our} way of getting on the web is not just the \textit{best} way, but the \textit{only} way.'' @@ -58,19 +58,19 @@ The key difference between WordPress and all those other companies is that Matt This is a tremendous conflict of interest. Part of the purpose of the Gutenberg project was to make all those page-building plugins in the WordPress plugin repository unnecessary—and to impact the companies producing them with a financial hit, since most of them include both free (but limited) and paid (and thus, fully-featured) versions. If their customers no longer need those plugins because their capabilities are now part of WordPress core, those companies lose out on income, and possibly go out of business, meaning that wordpress.\textit{com} has fewer competitors.\footnote{Squashing your competitors is a feature, not a bug, of capitalism. If it weren't we wouldn't need anti-trust laws, would we?} -And now that WordPress (.org? .com? I'm not sure which anymore.) has attacked WPEngine for not ``supporting'' the wordpress.org project, we see that this is not really about promoting open-source projects but about yet another oligarch (or in this case, a wannabe oligarch; Mullenweg is small peanuts compared to others) trying to consolidate his\footnote{It's interesting to note that all oligarchs are male.} power, and drive all of its competitors out of their business either by hook or by crook, it seems. +And now that WordPress (.org? .com? I'm not sure which anymore.) has attacked WPEngine for not ``supporting'' the wordpress.org project, we see that this is not really about promoting open-source projects but about yet another oligarch (or in this case, a wannabe oligarch; Mullenweg is small peanuts compared to others) trying to consolidate his\footnote{It's interesting to note that all current oligarchs are male.} power, and drive all of its competitors out of their business either by hook or by crook, it seems. -Again, this would not be an issue if wordpress.\textit{com} were not a thing. The creators (or forkers, in this case) of open-source software should not be allowed to create for-profit entities that directly benefit from the volunteer labor of thousands of volunteers. +Again, this would not be an issue if wordpress.\textit{com} were not a thing. The creators (or forkers, in this case) of open-source software should not be allowed to create for-profit entities that directly benefit from the volunteer labor of thousands of volunteers that they also control. \section{How to Support Actual Open-Source Software Projects}\label{support} It's not always about money. I mean, it is \textit{partly} about money for now, at least until we can build a society based upon ensuring people have what they need, and can contribute what they are able, rather than a society built upon avarice. In the meantime, here are some things you can do. \begin{enumerate}%[itemsep=\baselineskip] -\item Use the software, on a a regular basis. Get good at using it. Become an expert at using it, so you can help others down the road. (More about that later.) +\item Use the software, on a regular basis. Get good at using it. Become an expert at using it, so you can help others down the road. (More about that later.) \item Talk up this software. Use social media to talk about how much you like it—and most importantly, why. (The \textit{why} is very important!) \item If you create projects with this software, make sure people know you created that project with this particular bit of software. (This is branding, but for altruistic, rather than selfish, reasons.) -\item Write up tutorials for how to use this software. Share what you have learned. These tutorials can be for everyday use, or an edge case. Whatever you know, put it out there. +\item Write tutorials for how to use this software. Share what you have learned. These tutorials can be for everyday use, or an edge case. Whatever you know, put it out there. \item Contribute to the documentation. A lot of open-source software projects have less than complete documentation. If you can help make it a bit more complete, please do. \item Donate money. For better or for worse (mostly for worse) we live in a capitalist society where resources are allocated not on intrinsic value (i.e., how useful is this thing?) but on extrinsic value (i.e., how many people can we convince this thing is useful, even if it isn't?). Until the revolution comes\footnote{And it will someday, I'm sure—the only question is whether it will happen in time to save this planet.} we're going to have to depend on money.\par The good news is that you don't have to donate a lot of money. Capitalism is based on the Pareto Principle—80\% or more of the outputs are based on 20\% or less of the inputs. Alternatives to capitalism will advocate the Parity Principle, in which you give what you can, you take what you need, and you need what you take. If only 10\% of the users of any open-source project donated on an annual basis what they earn in an hour or even a half hour (after income taxes), then those software projects would probably experience anywhere between a 100 to a 1,000 times increase in their funding. \item Contribute to the core, if you can. Most of us can't, and that's okay. diff --git a/006/chapters/styling_text.tex b/006/chapters/styling_text.tex index 44f1423..2e07f17 100644 --- a/006/chapters/styling_text.tex +++ b/006/chapters/styling_text.tex @@ -1,12 +1,12 @@ \chapter{Styling Text in \LaTeX{}} -One of the most confusing things in \LaTeX{} for some people is how to format text, especially when you are creating some custom macros that change the appearance of text. +One of the most confusing things in \LaTeX{} for some people is how to format text, especially when you are creating some custom macros that change the appearance of text. If you sense the voice of experience here, you are correct. -There are two key concepts to keep in mind here. The first concept to keep in mind here is that \LaTeX{} has both \textit{commands} and \textit{switch commands} to style text. The second is that ``text'' is not just a collection of characters, but a collection of characters with \textit{distinct groups of characteristics}. +There are two key concepts to keep in mind here. The first concept to keep in mind here is that \LaTeX{} has both \textit{commands} to style a small portion of text and \textit{switch commands} to style all the text that comes after. The second is that ``text'' is not just a collection of characters, but a collection of characters with distinct groups of characteristics. \section{Text Characteristics} -The history of making marks on paper (or clay, or cave walls, or skin) goes a long way back in human history, so the subject of type and how to talk about it is complex, but interesting. Needless to say, we don't have the space to discuss all of it here, so we'll just look at those things that \LaTeX{} gives us control over. Those characteristics are: +The history of making marks on paper (or clay, or cave walls, or skin) goes a long way back in human history, so the subject of type and how to talk about it is complex and interesting. Needless to say, we don't have the space to discuss all of it here, so we'll just look at those things that \LaTeX{} gives us control over. Those characteristics are: \begin{itemize}[noitemsep] \item Family @@ -43,7 +43,7 @@ You can see this in action if we compare five of the same characters with differ \item[] \texttt{WWWWW} WWWWW \end{itemize} -We can easily see that the each letter in a monospace font all takes up the same amount of space as every other letter, but in the second set we can see that letters in a proportional font take up widely different amounts of space.\footnote{Again, this is a remarkably difficult concept for some people to understand.} +We can easily see that the each letter in a monospace font all takes up the same amount of space as every other letter, but in the second set we can see that letters in a proportional font take up widely different amounts of space. Interestingly, both proportional and monospace fonts can be either serif or sans-serif. The first three issues of this zine used a sans-serif monospace font for the code samples. I've never particularly cared for most sans-serif fonts, but I learned I could pass the \texttt{[nott]} option to the \textsf{kpfonts} package, which prevents it from modifying the default fixed width fonts. @@ -53,7 +53,7 @@ The \textit{shape} of a font refers to how the individual characters are formed. Both italic and slanted shapes lean to the right. The main difference between the two occurs when you apply this to a serif font. A slanted shape is just that: it's as if you had written out the text on a flexible substrate and then just stretched it a bit so it leans to the right. An italic shape, however, actually has a completely different, somewhat more curvy shape to each character. \textsl{This is slanted text}, and \textit{this is italic text}. Italic or slanted shapes are often used to emphasize a word or group of words (i.e., ``This is \textit{very} good cake.'') but it also used by convention to indicate the titles of books and movies (i.e., \textit{The Grapes of Wrath}, \textit{Star Wars}). -Small caps is shorthand for ``small capitals'' and refers to text in which all the lower-case characters are substituted by their upper-case equivalents. \textsc{This text is in small caps.} Small caps is often used to convey prestige and stability. +Small caps is shorthand for ``small capitals'' and refers to text in which all the lower-case characters are substituted by their upper-case equivalents. \textsc{This Text is in Small Caps.} Small caps is often used to convey prestige and stability. I should also point out that small caps are not the same as using capital letters, and typesetting the first letter of a word in a larger size. (Notice that I said ``upper-case \textit{equivalents}'' above.) Small caps are a separate set of glyphs in which all the characters have the same stroke thickness. @@ -81,11 +81,11 @@ Almost all of the text you read is ``normal'' weight, but \textbf{this bit is in \subsection{Size} -Size is easy to figure out: it just refers to how large a bit of text appears, either on screen or on paper. In reality, a typeface's size is much more complicated than that. Font sizes are usually measured in \textbf{points}, the size of which has varied over the years. With digital printing, points are usually defined as being \nicefrac{1}{72} of an inch, or exactly $0.352\bar{7}$ millimeters. (I could go on at length about this, but I won't. If you are interested, you might want to read \kref{https://en.wikipedia.org/wiki/Point_(typography)}{https://en.wikipedia.org/wiki/Point\_(typography)}.\footnote{I'm not going to talk about type size here, because it's fairly straightforward in \LaTeX{} and I also mentioned how to get specific font sizes in issue \#4. I did not realize that I was touching the tip of the typographical iceberg, alas.} +Size is easy to figure out: it just refers to how large a bit of text appears, either on screen or on paper. In reality, a typeface's size is much more complicated than that. Font sizes are usually measured in \textbf{points}, the size of which has varied over the years. With digital printing, points are usually defined as being \nicefrac{1}{72} of an inch, or exactly $0.352\bar{7}$ millimeters. (I could go on at length about this, but I won't. If you are interested, you might want to read \kref{https://en.wikipedia.org/wiki/Point_(typography)}{https://en.wikipedia.org/wiki/Point\_(typography)}. I'm not going to talk about type size here, because it's fairly straightforward in \LaTeX{} and I also mentioned how to get specific font sizes in issue \#4. (I did not realize that I was touching the tip of the typographical iceberg, alas.) \section{Semantic Formatting} -``Semantic'' formatting means that your code should \textit{mean} something. In other words, you need to distinguish between when you are emphasizing something (i.e., ``This is \textit{very} good cake.'') or merely when you are marking something as italic or bold as a convention, such as book and movie titles or vocabulary words (i.e., \textit{The Grapes of Wrath}, \textit{Star Wars}, ``\textbf{mitosis} is the process of cell division'', etc.). +``Semantic'' formatting means that your code should \textit{mean} something. In other words, you need to distinguish between when you are emphasizing something (i.e., ``This is \textit{very} good cake.'') or when you are merely marking something as italic or bold as a convention, such as book and movie titles or vocabulary words (i.e., \textit{The Grapes of Wrath}, \textit{Star Wars}, ``\textbf{mitosis} is the process of cell division'', etc.). In \LaTeX{}, the command for emphasizing text is \verb|\emph{}|. This generally gets rendered as italic text, although not always. If you are working in a document class that formats \verb|\emph{}| in some way other than italic, you can always change it to italic by adding this to your preamble: @@ -95,14 +95,14 @@ In \LaTeX{}, the command for emphasizing text is \verb|\emph{}|. This gene \end{Verbatim} -\section{Commands and Environments} +\section{Commands and Switch Commands} \LaTeX{} has both switch commands that change \textit{all} the text following that command, and local commands that change the text only within the argument of that command. -\paragraph{Notes:} Most document classes (but not all) use a roman (that is, a serif) family by default; to set entire passages in a different shape, you can use one of the three shape \texttt{} switch commands. \verb|\textrm{}| can be used to return to a roman font in an extended passage of either sans-serif or monospace text, for example. - These commands are summarized in the following table. It's a lot easier to remember them when you know what characteristic (family, shape, series) you are targeting, and what the two-letter code (\texttt{rm}, \texttt{bf}, etc.) stands for. \textbf{Note:} An asterisk (*) indicates the typical default for most document classes. +Most document classes (but not all) use a roman (that is, a serif) family by default; to set entire passages in a different shape, you can use one of the three shape \texttt{} switch commands. \verb|\textrm{}| can be used to return to a roman font in an extended passage of either sans-serif or monospace text, for example. + \begin{longtblr} [ caption = {Summary of Text Formatting in \LaTeX{} }, diff --git a/006/codex-006.tex b/006/codex-006.tex index e4fa7f8..0428cb1 100644 --- a/006/codex-006.tex +++ b/006/codex-006.tex @@ -174,8 +174,6 @@ \input{chapters/basic_terminal_commands} -% \input{chapters/flash_cards} - \input{chapters/styling_text} \input{chapters/ada_lovelace}