Typofixes; added how to use macro in 6.3.3
This commit is contained in:
parent
01a92bfb5a
commit
2ca353b1e6
BIN
images/part.png
Normal file
BIN
images/part.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.2 KiB |
47
lbol.tex
47
lbol.tex
@ -169,7 +169,9 @@ I may do a second volume of this, or I may simply do a second edition. If I do,
|
||||
|
||||
\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,\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.
|
||||
\section{About the Author}
|
||||
|
||||
I am neither a mathematician nor a physicist, but I've been fascinated with typography for as long as I can remember.\footnote{I majored in biology and English, so poking around in old books probably had a lot to do with it.} 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.
|
||||
|
||||
@ -177,14 +179,14 @@ Second, some things will look differently and behave differently for you dependi
|
||||
|
||||
\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 bad.
|
||||
\item A willingness to experiment is your best guide.
|
||||
\item Practice doesn't make perfect, but it does make things less shitty.
|
||||
\item A willingness to experiment is your best guide. Be sure to document your experiments.
|
||||
\item You will get errors as part of the learning process. Your goal should always be to get better errors.
|
||||
\end{enumerate}
|
||||
|
||||
When (not \textit{if}) you have problems, please consult the ``Troubleshooting'' chapter. It's not going to solve all, if any, of your problems, but it will suggest a general problem-shooting algorithm that will help you figure out where things are going wrong.
|
||||
|
||||
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}}.)
|
||||
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 book 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}\label{othersources}
|
||||
|
||||
@ -192,10 +194,10 @@ These are listed roughly in the order of how often I consult them.
|
||||
|
||||
\begin{itemize}[noitemsep]
|
||||
\item \textbf{TeX - LaTeX Stack Exchange} — \kref{https://tex.stackexchange.com/}{https://tex.stackexchange.com/}
|
||||
\item \textbf{Overleaf} — Overleaf is an online \LaTeX{} editor. They have both free and paid options. They have excellent documentation at\\ \kref{https://www.overleaf.com/learn}{https://www.overleaf.com/learn} and free templates at\\ \kref{https://www.overleaf.com/latex/templates}{https://www.overleaf\\.com/latex/templates}
|
||||
\item \textbf{Overleaf} — Overleaf is an online \LaTeX{} editor. They have both free and paid options. They have excellent documentation at \kref{https://www.overleaf.com/learn}{https://www.overleaf.com/\\learn} and free templates at \kref{https://www.overleaf.com/latex/templates}{https://www.overleaf.com/latex/templates}
|
||||
\item The \textbf{\LaTeX{} Community} has a helpful forum at \kref{https://latex.org/forum/}{https://latex.org/forum/}
|
||||
\item \textbf{texblog — because \LaTeX{} matters} has a number of useful articles but hasn't been updated in a while. You can read it at\\ \kref{https://texblog.org/}{https://texblog.org/}
|
||||
\item \textbf{CTAN — Comprehensive \TeX{} Archive Network} — \kref{https://ctan.org/}{https://ctan.o\\rg/} has lots of good information. This is where I go to find information about packages.
|
||||
\item \textbf{texblog — because \LaTeX{} matters} has a number of useful articles but hasn't been updated in a while. You can read it at \kref{https://texblog.org/}{https://texblog.org/}
|
||||
\item \textbf{CTAN — Comprehensive \TeX{} Archive Network} — \kref{https://ctan.org/}{https://ctan.org/} has lots of good information. This is where I go to find information about packages.
|
||||
\item \textbf{LaTeX Wikibook} — \kref{https://en.wikibooks.org/wiki/LaTeX}{https://en.wikibooks.org/wiki/LaTeX}
|
||||
\item \textbf{Dickimaw Books — \LaTeX{} Resources} — A website by a retired math professor with some useful information.\\ \kref{https://www.dickimaw-books.com/latexresources.html}{https://www.dickimaw-books.com/latexresources.html}
|
||||
\item \textbf{\TeX{} FAQ} — \kref{https://texfaq.org/}{https://texfaq.org/}
|
||||
@ -213,7 +215,7 @@ In this book, I use the word \textit{file} to refer to the \texttt{.tex} file yo
|
||||
|
||||
\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. You can use any text editor, although a GUI is available for most operating systems.
|
||||
\LaTeX{} uses plain text files with a file extension of \texttt{.tex}. That's it! They contain plain text only and no binary codes or hidden formatting extensions. You can use any text editor, although a GUI is available for most operating systems.
|
||||
|
||||
\section{File Structure}
|
||||
|
||||
@ -357,7 +359,7 @@ If the use of \verb|\iffalse| and \verb|\fi| is not intuitive to you, you can al
|
||||
|
||||
\texttt{enumerate} and \texttt{itemize} are used for creating lists. See the chapter ``\nameref{listenv}'' on page \pageref{listenv} for more information.
|
||||
|
||||
Many packages introduce additional environments. For other useful environments that do not require additional packages, please see the chapter ``\nameref{specenv}'' on page \pageref{specenv} for more information.
|
||||
Many packages introduce additional environments. For other useful environments that do not require additional packages (but which can easily be expanded upon by other packages), please see the chapter ``\nameref{specenv}'' on page \pageref{specenv} for more information.
|
||||
|
||||
\chapter{Formatting Words}
|
||||
|
||||
@ -389,7 +391,7 @@ Many packages introduce additional environments. For other useful environments t
|
||||
\hline
|
||||
Small Caps & \verb+\textsc{Small Caps}+ & \textsc{Small Caps} \\
|
||||
\hline
|
||||
Sans Serif & \verb+textsf{Sans Serif}+ & \textsf{Sans Serif} \\
|
||||
Sans Serif & \verb+\textsf{Sans Serif}+ & \textsf{Sans Serif} \\
|
||||
\hline
|
||||
\end{tabular}
|
||||
\end{table}
|
||||
@ -404,7 +406,7 @@ It is possible to combine these. For example, to write \textit{\textsc{Italic te
|
||||
|
||||
\paragraph{Deprecated Code} — Note that in \LaTeX2e{} code such as \verb+{\it some text}+ and \verb+{\bf some text}+ are deprecated.
|
||||
%\footnote{(See ~\cite{website:stexc002} and ~\cite{website:stexc003}.)}
|
||||
\footnote{See \kref{https://tex.stackexchange.com/questions/41681/correct-way-to-bold-italicize-text}{https://tex.stackexchange.com/questions/41681/correct-way-to-bold-italicize-text} and \kref{https://tex.stackexchange.com/questions/516/does-it-matter-if-i-use-textit-or-it-bfseries-or-bf-etc}{https://tex.stackexchange.com/questions/516/does-it-matter-if-i-use-textit-or-it-bfseries-or-bf-etc} for more information.}
|
||||
\footnote{See \kref{https://tex.stackexchange.com/questions/41681/correct-way-to-bold-italicize-text}{https://tex.stackexchange.com/questions/41681/correct-way-to-bold-italicize-text} and \kref{https://tex.stackexchange.com/questions/516/does-it-matter-if-i-use-textit-or-it-bfseries-or-bf-etc}{https://tex.stackexchange.com/questions/516/does-it-matter-if-i-use-textit-or-it-bfs\\eries-or-bf-etc} for more information.}
|
||||
|
||||
\section{Size Variations}
|
||||
|
||||
@ -546,7 +548,7 @@ You can add options in the usual way:
|
||||
|
||||
\subsection{Omitting Headers and Footers on a Page}
|
||||
|
||||
To \textit{omit} the headers and footers on a given page, include the \texttt{titlesec} and package in the preamble, and add this somewhere \textit{after} the start of the page.
|
||||
To \textit{omit} the headers and footers on a given page, include the \texttt{titlesec} package in the preamble, and add this somewhere \textit{after} the start of the page.
|
||||
|
||||
\begin{verbatim}
|
||||
\thispagestyle{empty}
|
||||
@ -569,7 +571,26 @@ In actual books, a ``part'' pages often contain some sort of epigraph. You can m
|
||||
\makeatother
|
||||
\end{verbatim}
|
||||
|
||||
\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}}}
|
||||
To use this, add whatever text you want on the part page in square brackets:
|
||||
|
||||
\begin{Verbatim}[frame=lines, framesep=6mm, breaklines=true, label=\fbox{Text on Part Pages Example}]
|
||||
\part[TOC Title]{A New Hope…}[
|
||||
\vspace{3em}
|
||||
\begin{center}
|
||||
\textit{A long time ago, in a galaxy far, far away…}
|
||||
\end{center}
|
||||
]
|
||||
\end{Verbatim}
|
||||
|
||||
Which gives us something like this:
|
||||
|
||||
\begin{center}
|
||||
\fbox{\includegraphics[scale=0.8]{part}}
|
||||
\end{center}
|
||||
|
||||
Note that everything gets wrapped in a \texttt{quote} environment, but that environment accepts additional commands and environments which will give you a great deal of control over how this text is displayed.
|
||||
|
||||
\paragraph{If you are wondering how this works…}\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 book.\par{} 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/tugindia/2002-Jan\\uary/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}}}
|
||||
|
||||
\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''.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user