Numerous styling changes

This commit is contained in:
Kenneth John Odle 2026-07-24 18:25:23 -04:00
parent 7dd516b494
commit d8b0603d8c
7 changed files with 77 additions and 14 deletions

View File

@ -8,7 +8,7 @@
\noindent{}{\color{green5}\rule[2mm]{\textwidth}{0.5pt}}
\vspace{2mm}
{\large SUBTITLE}
{\large \textit{A Grimoire of Command Line Magic}}
\vspace{5mm}
Issue \#\kissue{}

13
chapters/ch00-intro.tex Normal file
View File

@ -0,0 +1,13 @@
\chapter{Introduction}
What follows here is a compendium of commands and their options that I have found useful while using Linux on the command line. That is all. This started out as notes to myself and I decided to make it a zine, based on the good feedback I got from my hand-written zine \textit{Do it in the Terminal}. I have intended to make a sequel to that one for some time, but because the amount of information I can contain in a zine of that size is limited, I decided to go with one set in \LaTeX{} instead.
\paragraph{Organization} This zine is organized by the \textit{output}. For example, if you want to get images out of a pdf file, you would look in the ``Images'' chapter. If you want to get text out of a pdf, you would look in the ``Text'' chapter. If you want to \textit{convert} something to a pdf, or you want to combine pdf files into one (or separate one into many), then you would look in the ``PDF'' chapter.
\paragraph{Installation} Many, but not all, of these packages are included by default in many (but again, not all) Linux distros. If they are not included in your distro, you will need to install them. I have not included installation information for two main reasons. First, it would simply take up too much space, especially for something that generally can be easily found at the other end of a web search. Second, these methods may change over time, rendering the information contained here obsolete.
\paragraph{``Why didn't you include information about command \textit{X}?''} Probably because I have never used it and am thus not familiar with it, or don't use it often enough to warrant inclusion here. But I may possibly include it in a future issue.
\paragraph{``How can I send you corrections or suggestions for future issues?''} My contact information is listed in the ``Impressum'' on page ii.
\paragraph{Filenames} To keep things simple, the input file will always be ``input'' in the example code, and likewise, the output file name will always be ``output''. If a file extension is not required, it will not be included. For example ``input.pdf'' means the input \textit{must} be a pdf file, whereas ``input'' means it can be any type of file the application can handle.

37
chapters/ch01-images.tex Normal file
View File

@ -0,0 +1,37 @@
\chapter{Images}
\section{To Convert a PDF to an Image}
\lettrine[]{U}{se} the \texttt{pdftoppm} command (from the \label{poppler-utils} \texttt{poppler-utils} package) to convert part or all of a pdf to an image. For example, to convert a pdf to a png:
\begin{Verbatim}[]
pdftoppm input.pdf output -png
\end{Verbatim}
This will convert each page in the pdf to a png using the format ``output-01.png'' where ``01'' is the page number. To convert a single page of a multipage pdf, use the \texttt{-f} flag to specify which page to use. For example, this will convert page 5 to a png:
\begin{Verbatim}[]
pdftoppm input.pdf output -png -f 5 -singlefile
\end{Verbatim}
To convert a range of pages, use the \texttt{-f} flag to specify the first page to convert and use the \texttt{-l} flag to specify the last page of the range:
\begin{Verbatim}[]
pdftoppm input.pdf output -png -f 5 \l 10 -singlefile
\end{Verbatim}
The default resolution is 150 dpi. To change this, use the \texttt{-rx} flag to specify the resolution along the x-axis, and the \texttt{-ry} flag to specify the resolution along the y-axis;
\begin{Verbatim}[]
pdftoppm input.pdf output -png -rx 300 -ry 300
\end{Verbatim}
Doubling the resolution along both axes will increase the file size by an approximate factor of four, and will also increase the amount of detail in the image.
\section{To Extract Images from a PDF File}
\lettrine[findent=0mm]{T}{o} extract images from a pdf file, use the \texttt{pdfimages} command (also from package mention in \S \ref{poppler-utils} ).
\section{This is just a test}
And this is just some text.

View File

@ -1,5 +1,6 @@
%% Generic packages
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{ninecolors}
\usepackage{lettrine} % Drop caps
\usepackage[object=vectorian]{pgfornament}
@ -9,5 +10,11 @@
\usepackage{wrapfig}
\usepackage{float} % Allow floats in multicol environments
\usepackage{tcolorbox}
\usepackage{fancyvrb}
\usepackage{aurical} % Font for section titles
%\usepackage{libertinus} % Font for section titles
%\usepackage{uncial} % Font for section titles
%\usepackage{Zallman} % Font for drop caps
\usepackage{EileenBl} % Font for drop caps
\usepackage[hidelinks]{hyperref}

View File

@ -6,6 +6,9 @@
\setlrmarginsandblock{12mm}{15mm}{*}
\setulmarginsandblock{22mm}{20mm}{*}
% Command for uncial font
% \newcommand{\kfont}{\fontfamily{uncial}\selectfont}
%%% Chapter titles %% Specific to Memoir class
\makechapterstyle{kchap}{
\renewcommand*{\chapterheadstart}{\vspace*{\beforechapskip}}
@ -22,6 +25,7 @@
\setlength{\beforechapskip}{0mm}
\setlength{\midchapskip}{2mm}
\setlength{\afterchapskip}{10mm}
\setsecheadstyle{\Fontlukas\slshape\bfseries\large}% Set \section style
}
\makechapterstyle{kfront}{

View File

@ -18,7 +18,7 @@
%%% Text decorations
\newcommand{\kdec}{
\noindent{}\begin{center}
\pgfornament[scale=0.25,color=green6]{85}
\pgfornament[scale=0.1]{85}
\end{center}
}
@ -48,3 +48,8 @@
boxrule=0.75pt,
colframe=gray8,
}
% Lettrine options
%\renewcommand{\LettrineFontHook}{\Zallmanfamily} %\color{green5}} % Initial font and color
\renewcommand{\LettrineFontHook}{\EileenBlfamily} %\color{green5}} % Initial font and color
%\renewcommand*{\DefaultLhang}{0.5} % Default lhang value

View File

@ -21,9 +21,11 @@
\tableofcontents
\clearpage % Delete if TOC runs to 2n pages
\iffalse % Comment out the list of figures
\pagestyle{empty}
\listoffigures
\clearpage
\fi
%%% Begin Contents
@ -32,18 +34,13 @@
\pagestyle{kpage}
\chapterstyle{kchap}
% Chapter 0 is the introduction
\setcounter{chapter}{-1}
%%% Input chapters here
% \input{chapters/ch01}
\input{chapters/ch00-intro}
\input{chapters/ch01-images}
% \input{chapters/ch02}
% \input{chapters/ch03}
\end{document}
%%% Chapter template
\chapter{}
\begin{multicols*}{2}
\lettrine[lraise=0.0, nindent=-0pt]{}{}
\end{multicols*}