From b3f9b33053815b3417ac4fe8f0ad59903edb84fc Mon Sep 17 00:00:00 2001 From: Kenneth Odle Date: Sat, 28 Oct 2023 15:17:40 -0400 Subject: [PATCH] Updated troubleshooting section --- lbol.tex | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/lbol.tex b/lbol.tex index 6b43616..9b3ee50 100644 --- a/lbol.tex +++ b/lbol.tex @@ -1,6 +1,7 @@ \documentclass[twoside, 9pt]{extreport} \usepackage{extsizes} \usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} \usepackage{amsmath} \usepackage{amssymb} \usepackage{graphicx} @@ -155,7 +156,7 @@ All contents \copyright2023 Kenneth John Odle \chapter{Beginnings} -I am neither a mathematician nor a physicist, but I've been fascinated with typography for as long as I can remember. I finally decided to take the plunge and learn \LaTeX{}, but because I have a project-based mind, I needed a project to learn it. I ended up creating a zine about Linux, typeset entirely in \LaTeX{}. It's been a fun ongoing project, and I've learned a lot as a result. I finally decided that instead of keeping notes everywhere (mostly in the preambles the documents I've been working on) I decided to write a little book that recorded what I've learned to use as a reference guide. If I had something like this when I started, things probably would have gone much more smoothly for me. +I am neither a mathematician nor a physicist, but I've been fascinated with typography for as long as I can remember. I finally decided to take the plunge and learn \LaTeX{}, but because I have a project-based mind, I needed a project to learn it. I ended up creating a zine about Linux,\footnote{Which you can read about at \kref{https://just13.click/thecodex/}{https://just13.click/thecodex/}} typeset entirely in \LaTeX{}. It's been a fun ongoing project, and I've learned a lot as a result. I finally decided that instead of keeping notes everywhere (mostly in the preambles of the documents I've been working on) I decided to write a little book that recorded what I've learned to use as a reference guide. If I had something like this when I started, things probably would have gone much more smoothly for me. A lot of this material has been previously published in that zine, but there is quite a bit here which is new. \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. @@ -172,7 +173,7 @@ When (not \textit{if}) you have problems, please consult the ``Troubleshooting'' 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/little-book-of-LaTeX}{\texttt{https://git.kjodle.net/kjodle/little-book-of-LaTeX}}.) -\section{Other Sources of Help} +\section{Other Sources of Help}\label{othersources} These are listed roughly in the order of how often I consult them. @@ -421,7 +422,7 @@ For more information, see the section ``\nameref{codeexp}'' on page \pageref{cod \subsection{\texttt{hspace}} -\subsection{Phantoms} +\section{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. @@ -450,6 +451,8 @@ Your widely spaced text goes here. \end{spacing} \end{verbatim} +\section{Indents} + \chapter{Tables} @@ -557,7 +560,7 @@ In actual books, a ``part'' pages often contain some sort of epigraph. You can m 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. -\subsection{Include Page Numbers on ``Chapter'' Pages} +\subsection{Including Page Numbers on ``Chapter'' Pages} In most document classes, the ``chapter'' pages do not contain page numbers. If you would like them to have page numbers, add this to the preamble: @@ -1085,6 +1088,7 @@ But yeah, you should definitely resize your images before including them in any \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{Miscellaneous Things} \chapter{Troubleshooting} @@ -1112,8 +1116,33 @@ I now have 11 lines to deal with instead of the current 1,129 lines I have. This \section{\texttt{\}\%} is Your Best Friend} +If you are getting an error in a long line (long because it has a lot of commands in it), you can try commenting out the entire line by placing a \texttt{\%} at the beginning of it. If that clears up the problem, you can isolate which command is causing the issue by placing \texttt{\}\%} at the end of next to the last command and recompiling. If the error goes away then you know the problem lies in the last command. +If it doesn't, move the to the end of the second next to the last command and try again. In this way, you can determine which command is causing the problem. +Keep in mind that the error may not be in the line in question. The line where \LaTeX{} is indicating where it is stumbling. The error may be in a variable you called somewhere else, or in how you loaded the package in the preamble. + +\section{Learn How to Ask Good Questions} + +If you get serious about learning anything, you'll eventually find yourself with a problem which you can't solve, which means that you will need to ask for help, most likely in one of forums listed on page \pageref{othersources}. If you spend any amount of time on those forums, you will quickly learn (if you are observant) that there are good ways to ask questions and bad ways to ask a question. + +In general, a good question has three parts: + +\begin{enumerate}[noitemsep] + \item A statement of what you are trying to achieve. + \item What you have already done to achieve that. + \item What results you are actually getting. +\end{enumerate} + +\noindent{}Examples of bad question include: + +\begin{itemize}[noitemsep] + \item Questions without an MWE. + \item Saying ``it doesn't work'' but you not explaining what you were expecting and/or what results you are getting. + \item Homework questions that are basically ``how do you do \texttt{}?'' but for which it is quite apparent that you have done no actual research yourself, much less tried to do yourself. + \item Thinly disguised complaints about how \LaTeX{} works, or the structure of the forum, or how a package is documented, etc.\footnote{To be fair, not all packages are documented equally. \LaTeX{} has contributors from all over the globe, and the package documentation which \textit{you are reading in English} may well have been written by someone for whom English is a second, third, or fourth language. Asking for \textit{clarification} about something in the documentation is perfectly fine; \textit{complaining} about it is not.} + \item Questions which could be very easily answered by simply reading the package documentation. +\end{itemize} sample text~\cite{website:overleaf001} ~\cite{website:wikibooks001} ~\cite{website:stexc001}