Rearranged section on installing LaTeX

This commit is contained in:
Kenneth John Odle 2023-07-10 18:54:47 -04:00
parent 09932d5f3f
commit 3bfc9003be

View File

@ -391,9 +391,13 @@ For longer code examples, you will need to use the built-in environment \texttt{
\section{Vertical Space}
\subsection{\texttt{vspace}}
\section{Horizontal Space}
\section{Phantoms}
\subsection{\texttt{hspace}}
\subsection{Phantoms}
Sometimes you need to insert a blank space that is the width of a particular character or stretch of space. To do this, you will need to use the \texttt{phantom} command.
@ -671,34 +675,15 @@ and to use it, you would enter
This means less typing, but you are always restricted to using the same units.
\chapter{Installation}
\chapter{Miscellaneous}
\section{Installing \LaTeX{}}
\section{What I Learned About \LaTeX{} While Creating This Issue}
Nope. I'm not going to discuss this subject, because this would make this a very long book, and it would also quickly make it a quickly outdated and inaccurate book. Your best approach would be to do a web search for your operating system + ``\texttt{install latex}''. If you want a GUI (and who doesn't?), search for your operating system + ``\texttt{install latex gui}''.
\subsection{Image Sizes}
\section{Installing \LaTeX{} Packages on Ubuntu}
A few people have noted on Reddit that the images I include are far larger than I need them to be. This is true. I had a lot of things like this in issue \#2:
\begin{verbatim}
\includegraphics[scale=0.5]{paper_cutter}
\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 square of your scaling factor. But these are jpg files, which are lossy, so it's never exactly that amount.}
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}
\paragraph{Caveat:} This worked for me on Ubuntu 22.04. I cannot guarantee it will work for you. I cannot even guarantee that it will work for me again.
\subsubsection{Method 1}
@ -772,29 +757,50 @@ $ cp * ~/texmf
$ texhash ~/texmf
\end{verbatim}
Mischief managed!
\chapter{Miscellaneous}
\section{What I Learned About \LaTeX{} While Creating This Issue}
\subsection{Image Sizes}
A few people have noted on Reddit that the images I include are far larger than I need them to be. This is true. I had a lot of things like this in issue \#2:
\begin{verbatim}
\includegraphics[scale=0.5]{paper_cutter}
\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 square of your scaling factor. But these are jpg files, which are lossy, so it's never exactly that amount.}
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{Miscellaneous Things}
\begin{enumerate}[noitemsep]
\begin{itemize}[noitemsep]
\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.)
\item Notice that your footnotes are floating above the footer on some pages? Try adding \verb+\usepackage[bottom]{footmisc}+ to your preamble.
\end{enumerate}
\section{What I learned About \LaTeX{} While Creating Something Else}
\subsection{A Few Little Things}
\begin{itemize}[noitemsep]
\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}$
\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}
\chapter{Troubleshooting}
\section{Minimal Working Examples}
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{\texttt{\}\%} is Your Best Friend}
\end{document}