diff --git a/chapters/ch01-images.tex b/chapters/ch01-images.tex index 18e57bd..df93096 100644 --- a/chapters/ch01-images.tex +++ b/chapters/ch01-images.tex @@ -1,6 +1,6 @@ \chapter{Images} -\section{To Convert a PDF to an Image} +\section{To Convert a PDF to an Image}\index[concepts]{pdf documents}\index[concepts]{pdf documents!converting to images} \lettrine[]{U}{se} the \texttt{pdftoppm}\index{pdftoppm} command (from the \label{poppler-utils} \texttt{poppler-utils}\index{poppler-utils} package) to convert part or all of a pdf to an image. For example, to convert a pdf to a png: @@ -30,15 +30,11 @@ Doubling the resolution along both axes will increase the file size by an approx \ktcbox{When creating \LaTeX{} tutorials for the web, I will generally use the \texttt{standalone} class and then convert the resulting pdf to a png image for use with html.} -\section{To Extract Images from a PDF File} +\section{To Extract Images from a PDF File}\index[concepts]{images!extracting}\index[concepts]{pdf documents!extracting images from} -\lettrine[findent=0mm]{T}{o} extract images from a pdf file, use the \texttt{pdfimages}\index{pdfimages} command (also from the same package\index{poppler-utils} mentioned in \S \ref{poppler-utils} ). As before, the \texttt{-f} flag denotes the first page you want to extract image files from and the \texttt{-l} flag denotes the last page to extract image files from. Omitting them both will extract images from all pages. +\lettrine[findent=0mm]{T}{o} extract images from a pdf file, use the \texttt{pdfimages}\index{pdfimages} command (also from the same package\index{poppler-utils} mentioned in \S \ref{poppler-utils} ). As before, the \texttt{-f} flag denotes the first page you want to extract image files from and the \texttt{-l} flag denotes the last page to extract image files from. Omitting them both will extract images from all pages.\index[concepts]{images} -By default, images are saved as PBM (for monochrome images), PGM (for grayscale images), or PPM (for color images) files. Use the \texttt{-j} flag to save them as \texttt{jpeg} files or the \texttt{-J} flag to save them as \texttt{jpeg 2000} files. +By default, images are saved as PBM (for monochrome images),\index[concepts]{images!monochrome} PGM (for grayscale images),\index[concepts]{images!grayscale} or PPM (for color images)\index[concepts]{images!color} files. Use the \texttt{-j} flag to save them as \texttt{jpeg} files or the \texttt{-J} flag to save them as \texttt{jpeg 2000}\index[concepts]{images!jpeg 2000} files. The \texttt{-list} flag will send a list of image information to \texttt{stdout} including the image file name, the page number, the image dimensions and resolution, the color space type, and the color depth\index[concepts]{color depth}\index[concepts]{bits per component} (i.e., bits per component). If needed, this can redirected to a text file. To generate the list without generating any images, use the \texttt{-listonly} flag. - -\section{This is just a test} - -And this is just some text. \ No newline at end of file diff --git a/chapters/ch03-files.tex b/chapters/ch03-files.tex index bdd97db..2e18c89 100644 --- a/chapters/ch03-files.tex +++ b/chapters/ch03-files.tex @@ -1,6 +1,6 @@ -\chapter{Files} +\chapter{Files}\index[concepts]{files} -\section{Remove Part of a Filename from Multiple Files} +\section{Remove Part of a Filename from Multiple Files}\index[concepts]{files!manipulating names} \lettrine{S}{ome} applications can produce files that are similarly named, and for whatever reason, you want to remove the repetitive bits. You can use the \texttt{mmv}\index{mmv} package to do this. Assume you have a list of files that all start with ``foo'': @@ -51,13 +51,13 @@ foor83.txt \lettrine{T}{his} can also be accomplished by using the \textbf{rename}\index{rename} command. -\section{Obtain a List of Files and their Paths} +\section{Obtain a List of Files and their Paths}\index[concepts]{files!list of with paths} \lettrine{T}{he} \texttt{find} command has options to obtain this list. To obtain this list with the full path, use: \input{bits/find_PWD} -To obtain this list with a relative path, use: +To obtain this list with a relative path, use:\index[concepts]{path, relative} \begin{Verbatim}[frame=single, breaklines=true] find . diff --git a/chapters/ch04-system.tex b/chapters/ch04-system.tex index 63ea4f4..4787449 100644 --- a/chapters/ch04-system.tex +++ b/chapters/ch04-system.tex @@ -2,7 +2,7 @@ \section{To Reload Your \texttt{.bashrc} File} -\lettrine{S}{ometimes} you add something to your \texttt{.bashrc} file (such as a new bash alias)\index[concepts]{bash alias} and you need to reload it. Of course, this file is reloaded every time you log in, but you may not wish to log out and then log back in if you are in the middle of important work. There are few different ways to do this: +\lettrine{S}{ometimes} you add something to your \texttt{.bashrc}\index[concepts]{.bashrc}[concepts]\index[concepts]{bashrc} file (such as a new bash alias)\index[concepts]{bash alias} and you need to reload it. Of course, this file is reloaded every time you log in, but you may not wish to log out and then log back in if you are in the middle of important work. There are few different ways to do this: \begin{Verbatim}[frame=single, breaklines=true] source ~/.bashrc @@ -15,13 +15,14 @@ and of course a shorter way: . ~/.bashrc \end{Verbatim} -\section{To See if a Package Exists in the \texttt{apt} Repository} +\section{To See if a Package Exists in the \texttt{apt} Repository}\index[concepts]{repositories} \lettrine{W}{hile} there are many ways to install software on a Linux system, the easiest way is usually through the package manager, which on Ubuntu is \texttt{apt}. \index{apt} To see if a package is available in that repo, we can use \begin{Verbatim}[frame=single, breaklines=true] apt search \end{Verbatim} +\index{apt!search} As an example, searching for the Okular document viewer in \texttt{apt} returns the following: @@ -41,6 +42,7 @@ This does not tell us which version is available however. We have a couple of op \begin{Verbatim}[frame=single, breaklines=true] apt policy \end{Verbatim} +\index{apt!policy} Using that for Okular returns the following: @@ -59,6 +61,7 @@ We can also use: \begin{Verbatim}[frame=single, breaklines=true] apt search \end{Verbatim} +\index{apt!search} Which gives a more detailed listing with the available versions of all related packages: @@ -149,6 +152,7 @@ Description: universal document viewer \begin{Verbatim}[frame=single] apt list --installed \end{Verbatim} +\index{apt!list} This will give output like this: @@ -183,9 +187,9 @@ If necessary, you can redirect this information to a file using apt list --installed > app_list.txt \end{Verbatim} -Which will produce a warning: ``\texttt{WARNING: apt does not have a stable CLI interface. Use with caution in scripts.}'' What that means is that the \texttt{apt} command is meant to be used in an interactive mode (it includes things like progress bars when downloading and installing software, for example) and its output is not really able to be parsed in a script. (These commands work fine, however, as the output has a simple structure.) For scripting purposes, you really want to use \texttt{apt-get} and \texttt{apt-cache}. +Which will produce a warning: ``\texttt{WARNING: apt does not have a stable CLI interface. Use with caution in scripts.}'' What that means is that the \texttt{apt} command is meant to be used in an interactive mode (it includes things like progress bars when downloading and installing software, for example) and its output is not really able to be parsed in a script. (These commands work fine, however, as the output has a simple structure.) For scripting purposes, you really want to use \texttt{apt-get}\index{apt-get} and \texttt{apt-cache}\index{apt-cache}.\index[concepts]{apt stable CLI interface} -\section{Redirecting \texttt{stdout} and \texttt{stderr} Somewhere Else} +\section{Redirecting \texttt{stdout} and \texttt{stderr} Somewhere Else}\index[concepts]{redirection} \lettrine{E}{very} command in Linux has three components: @@ -193,7 +197,7 @@ Which will produce a warning: ``\texttt{WARNING: apt does not have a stable CLI \item Something to work on (that is, input) which we call \texttt{stdin} \item Something it spits out (that is, output) which we call \texttt{stdout} \item Error messages if something isn't right, which we call \texttt{stderr} -\end{enumerate} +\end{enumerate}\index[concepts]{stdin}\index[concepts]{stdout}\index[concepts]{sterr} \noindent{}To redirect \texttt{stdout} to a file, you can use diff --git a/parts/index_style.ist b/parts/index_style.ist index ea759ff..3b193e6 100644 --- a/parts/index_style.ist +++ b/parts/index_style.ist @@ -1,10 +1,10 @@ headings_flag 1 heading_prefix "\n\\centering\\large\\Fontlukas\\bfseries% -\\noindent\\textbf{"heading_suffix "}\\par\\nopagebreak\\normalfont\n" +\\noindent\\textbf{"heading_suffix "}\\par\\nopagebreak\\vspace{2mm}\\normalfont\n" item_0 "\n \\item \\small " delim_0 " \\dotfill " -delim_1 " \\hfill " -delim_2 " \\hfill " \ No newline at end of file +delim_1 " \\dotfill " +delim_2 " \\dotfill " \ No newline at end of file