Merge lp:~ubuntu-manual/ubuntu-manual/main into lp:~jflaker/ubuntu-manual/FixBug1358406

Proposed by Jeffrey Flaker
Status: Superseded
Proposed branch: lp:~ubuntu-manual/ubuntu-manual/main
Merge into: lp:~jflaker/ubuntu-manual/FixBug1358406
Diff against target: 1235736 lines (has conflicts)
Conflict adding file .bzrignore.  Moved existing file to .bzrignore.moved.
Conflict adding file Makefile.  Moved existing file to Makefile.moved.
Conflict adding file backmatter.  Moved existing file to backmatter.moved.
Conflict adding file frontmatter.  Moved existing file to frontmatter.moved.
Conflict adding file graphics.  Moved existing file to graphics.moved.
Conflict adding file installation.  Moved existing file to installation.moved.
Conflict adding file langcodes.txt.  Moved existing file to langcodes.txt.moved.
Conflict adding file learning-more.  Moved existing file to learning-more.moved.
Conflict adding file pkgs.  Moved existing file to pkgs.moved.
Conflict adding file po.  Moved existing file to po.moved.
Conflict adding file po4a.conf.  Moved existing file to po4a.conf.moved.
Conflict adding file screenshots.  Moved existing file to screenshots.moved.
Conflict adding file titlepage.  Moved existing file to titlepage.moved.
Conflict adding file troubleshooting.  Moved existing file to troubleshooting.moved.
Conflict adding file tufte-book.cls.  Moved existing file to tufte-book.cls.moved.
Conflict adding file tufte-common.def.  Moved existing file to tufte-common.def.moved.
Conflict adding file ubuntu-manual.cls.  Moved existing file to ubuntu-manual.cls.moved.
Conflict adding file um-arabic.clo.  Moved existing file to um-arabic.clo.moved.
Conflict adding file um-bengali.clo.  Moved existing file to um-bengali.clo.moved.
Conflict adding file um-czech.clo.  Moved existing file to um-czech.clo.moved.
Conflict adding file um-dutch.clo.  Moved existing file to um-dutch.clo.moved.
Conflict adding file um-farsi.clo.  Moved existing file to um-farsi.clo.moved.
Conflict adding file um-german.clo.  Moved existing file to um-german.clo.moved.
Conflict adding file um-greek.clo.  Moved existing file to um-greek.clo.moved.
Conflict adding file um-hebrew.clo.  Moved existing file to um-hebrew.clo.moved.
Conflict adding file um-hindi.clo.  Moved existing file to um-hindi.clo.moved.
Conflict adding file um-japanese.clo.  Moved existing file to um-japanese.clo.moved.
Conflict adding file um-marathi.clo.  Moved existing file to um-marathi.clo.moved.
Conflict adding file um-tamil.clo.  Moved existing file to um-tamil.clo.moved.
Conflict adding file um-telugu.clo.  Moved existing file to um-telugu.clo.moved.
Conflict adding file um-template.clo.  Moved existing file to um-template.clo.moved.
Conflict adding file um-thai.clo.  Moved existing file to um-thai.clo.moved.
Conflict adding file um-vietnamese.clo.  Moved existing file to um-vietnamese.clo.moved.
To merge this branch: bzr merge lp:~ubuntu-manual/ubuntu-manual/main
Reviewer Review Type Date Requested Status
Jeffrey Flaker Pending
Review via email: mp+232844@code.launchpad.net

Description of the change

there is a single place where "Ubuntu Software Center" was called "Ubuntu Software centre". To be consistent with many other mentions of Ubuntu Software Center, it was changed

To post a comment you must log in.

Unmerged revisions

935. By Kevin Godby

* Updating Galician translation.

934. By Kevin Godby

Dutch wrap-around cover:
* Fixed logo file path.
* Updated spine text.
* Generated PDF for Lulu.com.

933. By Kevin Godby

* Added code-page info to the langcodes.txt file.

932. By Kevin Godby

More work on the Dutch translation:
* Pulled in Hannie's quotation marks fixes.
* Fixed some index entries (removed duplicates).

931. By Kevin Godby

* Still working on the Dutch translation:
  * Fixed running head style.
  * Fixed some errors that Hannie found.

930. By thorwil

Dutch Lulu cover SVG ready.

929. By thorwil

Add Dutch Lulu cover SVG.

928. By Kevin Godby

* Adding half-title page to the Dutch translation (print version).

927. By Kevin Godby

* Rejiggered polyglossia and glossaries packages so that they work together better.
* Fixed the TOC entry for the Dutch glossary.

926. By Kevin Godby

* Translated "License" to Dutch.
* Translated colophon text to Dutch.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file '.bzrignore'
2--- .bzrignore 1970-01-01 00:00:00 +0000
3+++ .bzrignore 2014-09-01 04:44:23 +0000
4@@ -0,0 +1,30 @@
5+*.aux
6+*.d
7+*.dvi
8+*.fls
9+*.glg
10+*.glo
11+*.gls
12+*.idx
13+*.ilg
14+*.ind
15+*.log
16+*.make
17+*.nav
18+*.out
19+*.pdf
20+*.ps
21+*.snm
22+*.toc
23+*.xdy
24+revision.tex
25+test-*.tex
26+titlepage/cover-proposal 2.svg
27+titlepage/preview.png
28+titlepage/renders
29+titlepage/trash
30+ubuntu-manual-*
31+ccicons
32+coverpage.pdf
33+*.tdo
34+titlepage/titlepage-*.svg
35
36=== renamed file '.bzrignore' => '.bzrignore.moved'
37=== added file '.gcfunctions'
38--- .gcfunctions 1970-01-01 00:00:00 +0000
39+++ .gcfunctions 2014-09-01 04:44:23 +0000
40@@ -0,0 +1,15 @@
41+make_translation:
42+ name: Make Translated PDF
43+ command: make show-mylang
44+ show-in: any
45+ offline: True
46+make_release:
47+ name: Make PDF
48+ command: make show
49+ show-in: any
50+ offline: True
51+make_clean:
52+ name: Make Clean
53+ command: make clean
54+ show-in: any
55+ offline: True
56
57=== added directory 'Help'
58=== added directory 'Help/godbyk'
59=== added directory 'Help/godbyk/latex-handout'
60=== added file 'Help/godbyk/latex-handout/Makefile'
61--- Help/godbyk/latex-handout/Makefile 1970-01-01 00:00:00 +0000
62+++ Help/godbyk/latex-handout/Makefile 2014-09-01 04:44:23 +0000
63@@ -0,0 +1,15 @@
64+all: latex-handout.pdf
65+
66+.PHONY: all clean show
67+
68+latex-handout.pdf: latex-handout.tex
69+ xelatex latex-handout
70+ xelatex latex-handout
71+ xelatex latex-handout
72+
73+show: latex-handout.pdf
74+ evince $< &
75+
76+clean:
77+ -for F in aux log dvi pdf out toc glo idx bbl blg; do rm -fr *.$${F}; done
78+
79
80=== added symlink 'Help/godbyk/latex-handout/graphics'
81=== target is u'../../../graphics/'
82=== added file 'Help/godbyk/latex-handout/latex-handout.tex'
83--- Help/godbyk/latex-handout/latex-handout.tex 1970-01-01 00:00:00 +0000
84+++ Help/godbyk/latex-handout/latex-handout.tex 2014-09-01 04:44:23 +0000
85@@ -0,0 +1,433 @@
86+\documentclass{ubuntu-manual}
87+
88+\hypersetup{colorlinks}
89+
90+\usepackage{booktabs}
91+\usepackage{hyphenat}
92+
93+\title{Ubuntu Manual: \protect\LaTeX{} for Authors and Translators}
94+\author{Kevin Godby}
95+
96+
97+\newcommand{\email}[1]{\href{mailto:#1}{#1}}
98+
99+\newcommand{\parg}[1]{$\langle$\textrm{\textit{#1}}$\rangle$}
100+\newcommand{\oarg}[1]{\texttt{[\parg{#1}]}}
101+\newcommand{\marg}[1]{\texttt{\{\parg{#1}\}}}
102+\newcommand{\cmd}[1]{\texttt{\textbackslash#1}}
103+\newcommand{\cs}[1]{\texttt{\textup{\textbackslash#1}}}
104+
105+\newcommand{\highlight}[1]{\textcolor{important}{#1}}
106+\newcommand{\tr}[1]{\textcolor{important}{#1}}
107+\newcommand{\ntr}[1]{#1}
108+\newcommand{\tmarg}[1]{\marg{\tr{#1}}}
109+\newcommand{\toarg}[1]{\oarg{\tr{#1}}}
110+\newcommand{\tparg}[1]{\parg{\tr{#1}}}
111+
112+
113+\newenvironment{example}{%
114+ \begin{quote}%
115+ \setlength{\parindent}{0pt}%
116+ \setlength{\parskip}{\baselineskip}%
117+ \raggedright\sloppy\language\langwohyphens
118+}{%
119+ \end{quote}%
120+}
121+
122+\begin{document}
123+
124+\maketitle
125+
126+\tableofcontents
127+
128+\chapter{Introduction}
129+
130+The \href{http://wiki.ubuntu.com/ubuntu-manual/}{Ubuntu Manual} project has set out to produce a beginner's guide for Ubuntu, covering everything from installation to commonly used applications. The manual will be provided in \smallcaps{PDF} format in a variety of languages and will be freely available. To generate the \smallcaps{PDF}s, we use \LaTeX.
131+
132+\LaTeX{} is a typesetting system that has been around for over twenty years. Since \LaTeX{} is a large (and sometimes complex) system this guide will only cover what you need to know to write, edit, and translate the contents of the Ubuntu Manual.
133+
134+If you have questions or run into any problems that this guide doesn't cover, feel free to email the Ubuntu Manual mailing list at \email{ubuntu-manual@lists.launchpad.net}.
135+
136+\chapter{The Basics}
137+
138+\section{Getting Started}\label{sec:getting-started}
139+
140+% Add pointers to getting the source code and using Rosetta.
141+
142+As an author or editor, you will be modifying the Ubuntu Manual source files directly. The source files for \LaTeX{} have a \texttt{.tex} extension. You can edit the source files using your favorite text editor such as emacs, vim, or GEdit. \LaTeX{} code is similar to \smallcaps{HTML} in that most of the ``code'' is simply the text of the manual with a few formatting commands sprinkled in.
143+
144+Translators should also familiarize themselves with the basics of \LaTeX{} formatting and read the special translator notes starting on page~\ref{sec:notes-for-translators}.
145+
146+\section{Organization of Files}
147+
148+Each of the chapters of the manual has its own subdirectory:
149+
150+\begin{center}
151+ \begin{tabular}{ll}
152+ \toprule
153+ Chapter & Directory name \\
154+ \midrule
155+ Prologue & \texttt{prologue} \\
156+ 1. Installation & \texttt{installation} \\
157+ 2. Around Your Desktop & \texttt{around-desktop} \\
158+ 3. Default Applications & \texttt{default-apps} \\
159+ 4. Preferences and Hardware & \texttt{prefs-hardware} \\
160+ 5. Software and Packaging & \texttt{software-packaging} \\
161+ 6. System Maintenance & \texttt{maintenance} \\
162+ 7. The Command Line & \texttt{command-line} \\
163+ 8. Security & \texttt{security} \\
164+ 9. Troubleshooting & \texttt{troubleshooting} \\
165+ 10. Learning More About Linux & \texttt{learning-more} \\
166+ \bottomrule
167+ \end{tabular}
168+\end{center}
169+
170+Once you've selected a chapter that you'd like to help write or edit, you will find a \texttt{.tex} file in that chapter's directory. Some chapters will have all of their text in that one file, while other chapters have split each section into its own file. If you see a bunch of \verb|\input| commands in the file, then you will have to look in the appropriate \texttt{.tex} file for the text of that section.
171+
172+
173+
174+
175+\chapter{Style Guide}\label{ch:style-guide}
176+
177+%\section{Writing Style}\label{sec:writing-style}% Not LaTeX-related
178+
179+
180+\section{Formatting Text}\label{sec:formatting-text}
181+\subsection{Punctuation}\label{sec:punctuation}
182+
183+\paragraph{Quotation marks} Quotation marks in \LaTeX{} are entered as \verb|``| and \verb|''|, \emph{not} as \verb|"|.
184+Single quotation marks are entered as \verb|`| and \verb|'|. Quotation marks for other languages are entered as their Unicode characters.% TODO This may change if we use csquotes.
185+
186+\paragraph{Indicating sudden breaks} To indicate a sudden break in thought---like this---use an em dash. To enter an em dash in the manual, use the \cmd{dash} command. This command will print an em dash without spaces---like this---for US English, but can be set to print an en dash with spaces\,--\,like this\,--\,for other languages such as UK English.
187+
188+\paragraph{Indicating a range} If you wish to indicate a range (such as: pages 37--40 or 2005--2007), use an en dash. An en dash is entered in \LaTeX{} as two hyphens: \verb|--|. Do not put spaces before of after the en dash when used to indicate a range.
189+
190+\paragraph{Special characters} There are a few characters that \LaTeX{} considers special (used for its own syntax). To typeset these characters, precede the character with a backslash (\texttt{\textbackslash}). The special characters are:
191+
192+\begin{example}
193+ \centering \$ \qquad \% \qquad \_ \qquad \{ \qquad \} \qquad \& \qquad \#
194+\end{example}
195+The above line was typed like this:
196+\begin{example}
197+ \centering \ttfamily \cmd{\$} \qquad \cmd{\%} \qquad \cmd{\_} \qquad \cmd{\{} \qquad \cmd{\}} \qquad \cmd{\&} \qquad \cmd{\#}
198+\end{example}
199+Finally, to type a backslash character, use the \cmd{textbackslash} command.
200+
201+\section{GUI Elements}
202+
203+\paragraph{Menu items} To give a sequence of menu items that should be selected, use the \verb|\menu| and \verb|\then| commands. For example:
204+\begin{example}
205+ To open the Calculator application, click \menu{Applications\then Accessories\then Calculator}.
206+\end{example}
207+is typeset by:
208+\begin{example}
209+ \ttfamily To open the Calculator application, click \string\menu\string{Applications\string\then\space Accessories\string\then\space Calculator\string}.
210+\end{example}
211+
212+Use the \cmd{menu} command for single menu items as well:
213+\begin{example}
214+ Pull down the \menu{File} menu and then click \menu{Quit}.
215+\end{example}
216+
217+\paragraph{Other \smallcaps{GUI} elements} There are commands for other \smallcaps{GUI} elements as well:
218+
219+\medskip
220+\begin{center}
221+ \begin{tabular}{lll}
222+ \toprule
223+ \smallcaps{GUI} element & Command & Appearance \\
224+ \midrule
225+ Button & \verb|button| & \button{Cancel} \\
226+ Tab & \verb|\tab| & \tab{Advanced} \\
227+ Drop-down list & \verb|\dropdown| & \dropdown{Country} \\
228+ Checkbox & \verb|\checkbox| & \checkbox{Remember my password} \\
229+ Window title & \verb|\window| & \checkbox{Preferences} \\
230+ Keyboard key(s) & \verb|\keystroke| & \keystroke{Ctrl+Q} \\
231+ Radio button & \verb|\radiobutton| & \radiobutton{Single click to open items} \\
232+ Text box & \verb|\textfield| & \textfield{Full name} \\
233+ \bottomrule
234+ \end{tabular}
235+\end{center}
236+
237+\paragraph{Application names} The names of applications should be typeset with the \verb|\application| command. This will add the application to the index automatically. For command-line--based applications, use the \verb|\commandlineapp| command instead.
238+
239+\paragraph{User input} When quoting what a user should type, use the \verb|\userinput| command. If you're just having the user press a key on the keyboard, use the \verb|\keystroke| command instead. For example:
240+\begin{quotation}
241+ \ttfamily Type \string\userinput\string{Hello, world!\string} and press \string\keystroke\string{Enter\string}.
242+\end{quotation}
243+is typeset as:
244+\begin{quotation}
245+ Type \userinput{Hello, world!} and press \keystroke{Enter}.
246+\end{quotation}
247+
248+\paragraph{Cross-referencing} In a manual of this size, it's often helpful to point the reader to another chapter or section for more information on a related topic. There are few commands that can help you do that. To cross-reference another chapter, use the \verb|\chaplink| command. Similarly, to cross-reference a section of a chapter, use the \verb|\seclink| command. The \verb|\chaplink| command will insert the text ``Chapter \parg{X}: \parg{Chapter Title}'' and link it to the beginning of that chapter. The \verb|\seclink| command will insert the name of the section and link it to that section.% TODO provide examples
249+
250+% TODO provide actual command references
251+
252+
253+\section{Graphics}\label{sec:graphics}
254+
255+If a screenshot should be added at some point, make a note of it using the \verb|\screenshotTODO| command. Provide a description of what the screenshot should depict. This will add a warning notice in the \smallcaps{PDF} and will add that screenshot to the to do list.
256+
257+\screenshotTODO{Firefox web browser window}
258+
259+% TODO Write about how to insert a screenshot into the document.
260+
261+\section{Other document elements}
262+
263+\paragraph{Paragraphs} To start a new paragraph in \LaTeX{}, just add a blank line. You don't need to indent the paragraphs as \LaTeX{} will take care of this for you.
264+
265+\paragraph{Margin notes} The manual uses margin notes to provide definitions, tips, and pointers to more information. To add a margin note, use the \cmd{marginnote} command:
266+\begin{example}
267+ \ttfamily \cmd{marginnote}\marg{Margin note text}
268+\end{example}
269+
270+\paragraph{Comments} If you want to add a note to yourself (or others) in the \texttt{.tex} file, just type a percent sign (\%) followed by your note. \LaTeX{}
271+ll ignore everything on the line after the percent sign.
272+\begin{example}
273+ \ttfamily This text will appear in the PDF. \% But this text won't!
274+\end{example}
275+
276+Remember, if you want a percent sign to actually appear in the \smallcaps{PDF}, you'll need to precede it with a backslash:
277+\begin{example}
278+ \ttfamily Linux users are 50\cmd{\%} smarter than non-Linux users.
279+\end{example}
280+
281+\paragraph{Terminal commands} There are also special commands for typesetting text that appears or is entered into a terminal. An example will illustrate the commands:
282+\begin{example}
283+ \parskip0pt\obeylines
284+ \ttfamily The \cmd{commandlineapp}\{fortune\} program works like this:
285+ \cmd{begin}\{terminal\}
286+ \cmd{prompt} \cmd{userinput}\{fortune\}
287+ What we have to learn to do we learn by doing.
288+ \ \ \ -- Aristotle, Ethica Nicomachea II (c. 325 BC)
289+ \cmd{end}\{terminal\}
290+\end{example}
291+The above generates the following output:
292+\begin{example}
293+ The \commandlineapp{fortune} program works like this:
294+ \begin{terminal}
295+ \prompt \userinput{fortune}
296+ What we have to learn to do we learn by doing.
297+ \ \ \ -- Aristotle, Ethica Nicomachea II (c. 325 BC)
298+ \end{terminal}
299+\end{example}
300+
301+The \cmd{prompt} command will print a \smallcaps{BASH}-style user prompt (\prompt). The \cmd{rootprompt} command will print a \smallcaps{BASH}-style root prompt (\rootprompt). The \cmd{userinput} command should contain any text that the user types in.
302+
303+While the \texttt{terminal} environment is handy for multiple lines of terminal input/output, if you want to put terminal text inline with your paragraph text, you can use the \cmd{userinput} and \cmd{code} commands.
304+
305+\paragraph{Warnings and notices for advanced instructions} While the instructions in this manual should be as safe as possible, we sometimes mention commands or programs that can potentially do damage if not used correctly. To draw attention to these rare circumstances, you can put a note in the \cmd{warning} command. This will set the text off so it's more eye-catching.
306+
307+Similarly, there is a \cmd{advanced} command for notes to advanced users.
308+
309+\paragraph{Lists} There are two types of lists that we use in the manual: numbered lists and bulleted lists. Both lists work the same way, they just have different names.
310+
311+ \begin{minipage}{0.4\textwidth}
312+ \parskip0.5\baselineskip
313+ \parindent0pt
314+ \begin{flushleft}
315+ \ttfamily
316+ \string\begin\{itemize\}\\
317+ \ \ \string\item\ First list item\\
318+ \ \ \string\item\ Second list item\\
319+ \ \ \string\item\ Third list item\\
320+ \string\end\{itemize\}
321+ \end{flushleft}
322+ produces:\\
323+ \begin{flushleft}
324+ \rmfamily
325+ \begin{itemize}
326+ \item First list item
327+ \item Second list item
328+ \item Third list item
329+ \end{itemize}
330+ \end{flushleft}
331+ \end{minipage}
332+ \hfill
333+ \begin{minipage}{0.4\textwidth}
334+ \parskip0.5\baselineskip
335+ \parindent0pt
336+ \begin{flushleft}
337+ \ttfamily
338+ \string\begin\{enumerate\}\\
339+ \ \ \string\item\ First list item\\
340+ \ \ \string\item\ Second list item\\
341+ \ \ \string\item\ Third list item\\
342+ \string\end\{enumerate\}
343+ \end{flushleft}
344+ produces:
345+ \begin{flushleft}
346+ \rmfamily
347+ \begin{enumerate}
348+ \item First list item
349+ \item Second list item
350+ \item Third list item
351+ \end{enumerate}
352+ \end{flushleft}
353+ \end{minipage}
354+
355+
356+\chapter{Notes for Translators}\label{sec:notes-for-translators}
357+
358+\LaTeX{} commands are preceded by a backslash character (\texttt{\textbackslash}). While the command names should not be translated, their arguments sometimes should be.
359+
360+In the following list of commands, the \tr{red} text should be translated and the black text should not be translated.
361+
362+\section{Document headings}
363+\begin{itemize}\ttfamily
364+ \item \cs{title}\tmarg{book title}
365+ \item \cs{author}\tmarg{book authors}
366+ \item \cs{part}\tmarg{part heading}
367+ \item \cs{chapter}\tmarg{chapter heading}
368+ \item \cs{section}\tmarg{section heading}
369+ \item \cs{subsection}\tmarg{subsection heading}
370+ \item \cs{subsubsection}\tmarg{subsubsection heading}
371+ \item \cs{paragraph}\tmarg{paragraph heading}
372+ \item \cs{subparagraph}\tmarg{subparagraph heading}
373+\end{itemize}
374+
375+\section{Formatting commands}
376+\begin{itemize}\ttfamily
377+ \item \cs{marginnote}\tmarg{margin note text}
378+ \item \cs{textbf}\tmarg{bold text}
379+ \item \cs{textit}\tmarg{italic text}
380+ \item \cs{emph}\tmarg{italic text}
381+ \item \cs{smallcaps}\tmarg{acronym}
382+ \item \cs{application}\tmarg{application name}
383+ \item \cs{commandlineapp}\tmarg{command-line application name}
384+ \item \cs{menu}\marg{\tparg{menu name} \cs{then} \tparg{submenu name} \cs{then} \tparg{menu item}}
385+ \item \cs{button}\tmarg{button name}
386+ \item \cs{checkbox}\tmarg{checkbox name}
387+ \item \cs{tab}\tmarg{tab name}
388+ \item \cs{dropdown}\tmarg{drop-down list name}
389+ \item \cs{window}\tmarg{window name}
390+ \item \cs{textfield}\tmarg{text box name}
391+ \item \cs{keystroke}\tmarg{Keyboard key names separated by \texttt{+}}
392+ \item \cs{userinput}\tmarg{stuff the user types}
393+ \item \cs{code}\tmarg{terminal output}
394+ \item \cs{begin}\marg{terminal} \tparg{output from the terminal} \cs{end}\marg{terminal}
395+ \item \cs{warning}\marg{warning text}
396+ \item \cs{advanced}\marg{advanced usage text}
397+ \item \cs{screenshot}\marg{filename}\marg{label}\tmarg{caption}
398+\end{itemize}
399+
400+\noindent The following formatting commands should \emph{not} be translated:
401+\begin{itemize}\ttfamily
402+ \item \cs{dash}
403+ \item \cs{url}\marg{URL}
404+ \item \cs{prompt}
405+ \item \cs{rootprompt}
406+\end{itemize}
407+
408+\section{Lists}
409+The only part of lists that need to be translated is the text of the list items themselves.
410+
411+\begingroup\ttfamily\parindent=0pt\parskip=0pt\noindent
412+\cs{begin}\marg{itemize}\quad\textit{or}\quad\cs{begin}\marg{enumerate}\par
413+\space\space\cs{item} \tparg{list item text}\par
414+\space\space\cs{item} \tparg{another list item}\par
415+\cs{end}\marg{itemize}\quad\textit{or}\quad\cs{begin}\marg{enumerate}\par
416+\endgroup
417+
418+\section{Author and editor notes}
419+Do not translate any of the following commands:
420+\begin{itemize}\ttfamily
421+ \item \cs{todo}\marg{notes to appear in PDF margin}
422+ \item \cs{screenshotTODO}\marg{description of screenshot}
423+ \item \cs{begin}\marg{comment} \parg{notes to authors/editors} \cs{end}\marg{command}
424+\end{itemize}
425+
426+
427+\section{Glossary-related commands}
428+
429+\begin{itemize}\ttfamily
430+ \item \cs{newglossaryentry}\marg{\ntr{keyword}}\{name=\marg{\tr{term}},description=\marg{\tr{definition}}\}
431+ \item \cs{gls}\marg{\ntr{keyword}}
432+ \item \cs{glspl}\marg{\ntr{keyword}}
433+ \item \cs{Gls}\marg{\ntr{keyword}}
434+ \item \cs{Glspl}\marg{\ntr{keyword}}
435+\end{itemize}
436+
437+\section{Cross-referencing commands}
438+Do not translate any of these commands:
439+\begin{itemize}\ttfamily
440+ \item \cs{label}\marg{label}
441+ \item \cs{ref}\marg{label}
442+ \item \cs{pageref}\marg{label}
443+ \item \cs{nameref}\marg{label}
444+ \item \cs{chaplink}\marg{label}
445+ \item \cs{seclink}\marg{label}
446+\end{itemize}
447+
448+\section{Other document commands}
449+Do not translate any of the following:
450+\begin{itemize}\ttfamily
451+ \item \cs{frontcover}
452+ \item \cs{mainmatter}
453+ \item \cs{appendix}
454+ \item \cs{backmatter}
455+ \item \cs{providecommand}\marg{command name}\marg{command definition}
456+ \item \cs{documentclass}\oarg{options}\marg{document type}
457+ \item \cs{include}\marg{file}
458+ \item \cs{begin}\marg{environment}
459+ \item \cs{end}\marg{environment}
460+ \item \cs{printglossaries}
461+ \item \cs{printindex}
462+ \item \cs{LoadLicenseFile}
463+\end{itemize}
464+
465+
466+\chapter{Notes for Editors}
467+
468+\section{Obsolete commands}
469+
470+There are a few commands that were used in the beginning of the project that have since been replaced. If you encounter any of these obsolete commands, please replace them with the updated command.
471+
472+\begin{description}
473+ \item[\cs{menuitem}] This command should be replaced by the \cs{menu} command.
474+ \item[\cs{nav}] This command should be replaced by the \cs{menu} command.
475+ \item[\texttt{-{}-{}-}] This em dash command should be replaced by the \cs{dash} command.
476+\end{description}
477+
478+
479+\chapter{Installing \protect\TeX{} Live 2009}
480+
481+We're using a number of features that require the latest version of \TeX{} Live (2009). Unfortunately, the version of \TeX{} Live that comes with Ubuntu 9.10 is \TeX{} Live 2007. To install \TeX{} Live 2009, follow these steps:
482+
483+\begin{enumerate}
484+ \item Uninstall all the Ubuntu TeX Live packages: \texttt{sudo apt-get remove texlive-*}
485+ \item Download the TeX Live 2009 install script: \url{http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz}
486+ \item Unpack the tarball: \texttt{tar -zxvf install-tl-unx.tar.gz}
487+ \item Change to the newly-unpacked directory: \texttt{cd install-tl-*}
488+ \item Run the script: \texttt{sudo ./install-tl}
489+ \item Select where you'd like to install everything, and any other options you prefer. I highly recommend enabling the ``create symlinks to standard directories'' option.
490+ \item To compile a translation, run: \texttt{make ubuntu-manual-\parg{lang}.pdf} where \parg{lang} is the language code (see the \texttt{po/} directory for a list of supported languages).
491+\end{enumerate}
492+
493+Note that not all languages are supported yet (especially those requiring non-Latin scripts).
494+
495+If you have any questions or run into any problems, feel free to contact me. I'm usually in \smallcaps{IRC} as ``godbyk'' and can, of course, be contacted via email.
496+
497+
498+\chapter{Word List}\label{ch:word-list}
499+
500+This chapter contains a list of words with their proper spelling and capitlization.
501+
502+\begin{multicols}{3}
503+\obeylines%
504+Bluetooth
505+dial-up
506+Ethernet
507+gedit
508+GNOME
509+GNU/Linux
510+KDE
511+Red Hat
512+session menu
513+shut down
514+Wi-Fi
515+\end{multicols}
516+
517+
518+\end{document}
519
520=== added symlink 'Help/godbyk/latex-handout/tufte-book.cls'
521=== target is u'../../../tufte-book.cls'
522=== added symlink 'Help/godbyk/latex-handout/tufte-common.def'
523=== target is u'../../../tufte-common.def'
524=== added symlink 'Help/godbyk/latex-handout/ubuntu-manual.cls'
525=== target is u'../../../ubuntu-manual.cls'
526=== added directory 'Help/godbyk/latex-slides'
527=== added file 'Help/godbyk/latex-slides/Makefile'
528--- Help/godbyk/latex-slides/Makefile 1970-01-01 00:00:00 +0000
529+++ Help/godbyk/latex-slides/Makefile 2014-09-01 04:44:23 +0000
530@@ -0,0 +1,15 @@
531+all: latex-slides.pdf
532+
533+.PHONY: all clean show
534+
535+latex-slides.pdf: latex-slides.tex
536+ xelatex latex-slides
537+ xelatex latex-slides
538+ xelatex latex-slides
539+
540+show: latex-slides.pdf
541+ evince $< &
542+
543+clean:
544+ -for F in aux log dvi pdf out toc glo idx bbl blg nav snm; do rm -fr *.$${F}; done
545+
546
547=== added file 'Help/godbyk/latex-slides/latex-slides.tex'
548--- Help/godbyk/latex-slides/latex-slides.tex 1970-01-01 00:00:00 +0000
549+++ Help/godbyk/latex-slides/latex-slides.tex 2014-09-01 04:44:23 +0000
550@@ -0,0 +1,388 @@
551+\documentclass[t,unicode,color={usenames,dvipsnames},xcolor={usenames,dvipsnames}]{beamer}
552+
553+\usepackage{xltxtra}
554+\usepackage{polyglossia}
555+\setromanfont[Mapping=tex-text,Numbers=OldStyle]{Linux Libertine O}
556+\setsansfont[Mapping=tex-text,Numbers=OldStyle]{Linux Biolinum O}
557+\setmonofont[Mapping=text-text,Scale=MatchLowercase]{DejaVu Sans Mono}
558+
559+
560+\usepackage{graphics}
561+%\usepackage{graphicx}
562+
563+\usepackage{xcolor}
564+
565+\hypersetup{
566+ colorlinks,
567+ pdftitle={LaTeX for Ubuntu Manual Authors and Translators},
568+ pdfauthor={Kevin Godby},
569+ pdfcreator={XeLaTeX},
570+ pdfkeywords={latex, ubuntu, ubuntu manual, authors, editors, translators, tex, xelatex}
571+}
572+
573+%\usepackage{handoutWithNotes}
574+%\pgfpagesuselayout{4 on 1 with notes}[letterpaper,border shrink=5mm]
575+
576+\mode<presentation>
577+{
578+ %\usetheme{Dresden}
579+ %\usetheme[
580+ % titlebackgroundimagefile=./images/title-background,
581+ % normalbackgroundimagefile=./images/main-background,
582+ % opacity=0
583+ %]{HCI}
584+ %\setbeamercovered{transparent}
585+}
586+
587+\setbeamertemplate{bibliography item}[article]
588+
589+\usepackage{pifont} % circles and boxes (for survey dingbats)
590+\usepackage{bbding} % circles and boxes (for survey dingbats)
591+
592+\usepackage[overlay]{textpos} % for absolute positioning
593+\setlength{\TPVertModule}{\the\paperheight}
594+\setlength{\TPHorizModule}{\the\paperwidth}
595+
596+\usepackage{ummacros}
597+
598+\title{\LaTeX{} for Ubuntu Manual Authors and Translators}
599+\author{Kevin Godby}
600+%\institute{HCI 522: Scientific Methods of Human--Computer Interaction\\Human--Computer Interaction Program\\Iowa State University}
601+\date{22--23 February 2010}
602+
603+\definecolor{important}{HTML}{980101}% same as accent deep red
604+\newcommand{\highlight}[1]{\textcolor{important}{#1}}
605+
606+\usepackage{textcase}
607+\newcommand{\smallcaps}[1]{\textsc{\MakeTextLowercase{#1}}}
608+
609+\renewenvironment{center}{\par\vskip-0.5\baselineskip\centering}{\par\vskip-0.5\baselineskip}
610+\renewenvironment{flushleft}{\par\vskip-0.5\baselineskip\raggedright}{\par\vskip-0.5\baselineskip}
611+\renewenvironment{flushright}{\par\vskip-0.5\baselineskip\raggedleft}{\par\vskip-0.5\baselineskip}
612+
613+\begin{document}
614+
615+\setlength{\parindent}{0pt}
616+\setlength{\parskip}{\baselineskip}
617+
618+\begin{frame}
619+ \titlepage
620+\end{frame}
621+
622+\begin{frame}
623+ \frametitle{Contents}
624+ \tableofcontents
625+\end{frame}
626+
627+\section{Introduction}
628+
629+\begin{frame}
630+ \frametitle{What is the Ubuntu Manual project about?}
631+ \textit{Getting Started with Ubuntu 10.04} aims to be a complete
632+ beginner's manual for Ubuntu, featuring comprehensive guides, how-tos and
633+ information on anything one needs to know after first installing Ubuntu.
634+
635+ Designed to be as user-friendly and easy-to-follow as possible, it will
636+ provide the first point of reference to any Ubuntu newcomer with lots of
637+ information in one easy-to-access \smallcaps{PDF}. Plus, every six months there will
638+ be a new revision released to coincide with each new release of Ubuntu.
639+\end{frame}
640+
641+\begin{frame}
642+ \frametitle{What is \LaTeX?}
643+ \LaTeX\ is the typesetting system we're using to create the manual's
644+ \smallcaps{PDF}. It's similar to \smallcaps{HTML} in that the text is marked
645+ up with special codes to denote the style of the text, but unlike
646+ \smallcaps{HTML} it's also a complete programming language.
647+
648+ As authors, editors, and translators, you won't have to worry about the
649+ programming side, just the markup side.
650+\end{frame}
651+
652+\section{\protect\LaTeX{} for Authors and Editors}
653+
654+\begin{frame}
655+ \frametitle{What does \LaTeX{} code look like?}
656+ All of the \LaTeX{} code is stored in \texttt{.tex} files. These files are
657+ regular text files that may be edited with your favorite text editor (e.g.,
658+ vim, emacs, gedit).
659+
660+ The markup commands in \LaTeX{} begin with a backslash (\textbackslash). For example,
661+ \begin{center}
662+ \ttfamily My name is \highlight{\string\textbf\string{Kevin\string}}.
663+ \end{center}
664+ will be typeset as:
665+ \begin{center}
666+ \rmfamily My name is \highlight{\textbf{Kevin}}.
667+ \end{center}
668+\end{frame}
669+
670+\begin{frame}
671+ \frametitle{What does \LaTeX{} code look like?}
672+ \vskip\baselineskip%
673+ \begin{center}
674+ \ttfamily My name is \highlight{\string\textbf\string{}Kevin\highlight{\string}}.
675+ \end{center}
676+ The \texttt{\string\textbf} command tells \LaTeX{} to print the text in
677+ \textbf{boldface} type. The braces (\texttt{\string{\string}}) tell \LaTeX{}
678+ when to start and stop using bold text.
679+
680+ We avoid using these low-level commands, however, preferring instead to use
681+ \emph{semantic markup.} Semantic markup means that, instead of telling
682+ \LaTeX{} how something should look, we tell it what something \emph{means}.
683+\end{frame}
684+
685+\begin{frame}
686+ \frametitle{Semantic Markup}
687+ For example, instead of typing:
688+ \begin{center}
689+ \ttfamily Pull down the \highlight{\string\textbf\string{Help\string}} menu and click \highlight{\string\textbf\string{About\string}}.
690+ \end{center}
691+ we would say:
692+ \begin{center}
693+ \ttfamily Pull down the \highlight{\string\menu\string{Help\string}} menu and click \highlight{\string\menu\string{About\string}}.
694+ \end{center}
695+ This ensures that all the menu items are formatted consistently throughout
696+ the manual and also allows us to modify the formatting of the menu items in
697+ one place, instead of editing each file.
698+
699+ We'll see a list of these semantic markup commands soon.
700+\end{frame}
701+
702+\begin{frame}
703+ \frametitle{Special Characters in \LaTeX{}}
704+ Most text can be typed just as you'd expect, and everything will work great. There are, however, a few characters that need special handling.
705+
706+ \LaTeX{} knows the difference between opening and closing quotation marks. So instead of using the normal quotation marks (\texttt{\string"}), you will need to use two acute accents (``backticks'') for opening quotation marks, and two apostrophes for closing quotation marks:
707+ \begin{center}
708+ \ttfamily Kevin said, \highlight{\string`\string`}Quotation marks are special.\highlight{\string'\string'}
709+ \end{center}
710+ To interrupt a sentence, use the \highlight{\ttfamily\string\dash} command. This allows us to automatically use the appropriate dash based on the language. (US English uses an em dash without space---like this---while UK English uses an en dash with space\,--\,like this.)
711+\end{frame}
712+
713+\begin{frame}
714+ \frametitle{More Special Characters in \LaTeX{}}
715+ There are a few more characters that \LaTeX{} considers special because it uses them in its programming language. They are:
716+ \begin{center}
717+ \ttfamily \$\qquad\%\qquad\_\qquad\{\qquad\}\qquad\&\qquad\#
718+ \end{center}
719+ If you want one of these characters to appear in the typeset document, put a backslash (\textbackslash) in front of that character. The above line was typed like this:
720+ \begin{center}
721+ \ttfamily \textbackslash\$\qquad\textbackslash\%\qquad\textbackslash\_\qquad\textbackslash\{\qquad\textbackslash\}\qquad\textbackslash\&\qquad\textbackslash\#
722+ \end{center}
723+ Finally, to type a backslash character, use the \texttt{\string\textbackslash} command.
724+\end{frame}
725+
726+\begin{frame}
727+ \frametitle{Document Structure}
728+ \textit{Getting Started} has two parts, over ten chapters, and a slew of sections and subsections. Each of these heading levels has its own \LaTeX{} command that formats the heading and automatically adds it to the table of contents.
729+
730+ \begin{tabular}{ll}
731+ \ttfamily\string\part & \ttfamily\string\chapter \\
732+ \ttfamily\string\section & \ttfamily\string\subsection \\
733+ \ttfamily\string\subsubsection
734+ \end{tabular}
735+
736+ If you want to add a new section on how to install Frozen Bubble, for example, you would write:
737+ \begin{center}
738+ \ttfamily \string\section\string{Frozen Bubble\string}
739+ \end{center}
740+ and \LaTeX{} would print the section heading and add it to the table of contents at the front of the manual.
741+\end{frame}
742+
743+\begin{frame}
744+ \frametitle{Paragraphs and margin notes}
745+ To start a new paragraph in \LaTeX{}, just add a blank line. You don't need to indent the paragraphs as \LaTeX{} will take care of this for you.
746+
747+ The manual uses margin notes to provide definitions, tips, and pointers to more information. To add a margin note, use the \texttt{\string\marginnote} command:
748+ \begin{flushleft}
749+ \ttfamily \highlight{\string\marginnote}\string{This text will appear in the\\
750+ \hspace{10em} margin of the manual.\string}
751+ \end{flushleft}
752+\end{frame}
753+
754+\begin{frame}
755+ \frametitle{Comments}
756+ If you want to add a note to yourself (or others) in the \texttt{.tex} file,
757+ just type a percent sign (\%) followed by your note. \LaTeX{} will ignore
758+ everything on the line after the percent sign.
759+ \begin{flushleft}
760+ \ttfamily This text will appear in the PDF.
761+ \highlight{\% But this text won't!}
762+ \end{flushleft}
763+
764+ Remember, if you want a percent sign to actually appear in the \smallcaps{PDF}, you'll need to precede it with a backslash:
765+ \begin{flushleft}
766+ \ttfamily Linux users are 50\highlight{\textbackslash\%} smarter than non-Linux users.
767+ \end{flushleft}
768+\end{frame}
769+
770+\begin{frame}
771+ \frametitle{GUI Elements}
772+ The instructions we write often contain the names of \smallcaps{GUI} elements
773+ such as menu items, buttons, check boxes, drop-down lists, etc. Each of
774+ these elements has its own special formatting. To simplify the formatting of
775+ these elements, we've created some new markup commands for them.
776+
777+ If you want to direct the user to choose a menu item, you would write:
778+ \begin{flushleft}
779+ \ttfamily
780+ Click \highlight{\string\menu\string{Applications\string\then\space Accessories\string\then\space Calculator\string}} to start the \highlight{\string\application\string{Calculator\string}} application.
781+ \end{flushleft}
782+ which produces:
783+ \begin{flushleft}
784+ \rmfamily
785+ Click \highlight{\menu{Applications\then Accessories\then Calculator}} to start the \highlight{\application{Calculator}} application.
786+ \end{flushleft}
787+\end{frame}
788+
789+\begin{frame}
790+ \frametitle{GUI Elements}
791+ The list of current commands for \smallcaps{GUI} elements follows:
792+
793+ \begingroup\ttfamily
794+ \begin{tabular}{ll}
795+ \string\button & \string\tab \\
796+ \string\dropdown & \string\checkbox \\
797+ \string\window & \string\keystroke \\
798+ \string\radiobutton & \string\textfield \\
799+ \string\application & \string\commandlineapp
800+ \end{tabular}
801+ \endgroup
802+
803+ There are a few antiquated commands used in the manual that should be updated if you see them:
804+
805+ Both \texttt{\string\menuitem} and \texttt{\string\nav} should be changed to \texttt{\string\menu}.
806+
807+ \texttt{\string\option} should be changed to \texttt{\string\checkbox}.
808+\end{frame}
809+
810+\begin{frame}
811+ \frametitle{Terminal Commands}
812+ There are also special commands for typesetting text that appears or is entered into a terminal. An example will illustrate the commands:
813+
814+ \begin{flushleft}
815+ \ttfamily
816+ The \string\commandlineapp\{fortune\} program works like this:\par
817+ \textbackslash begin\{terminal\}\\
818+ \space\space \textbackslash prompt\space\textbackslash userinput\{fortune\}\\
819+ What we have to learn to do we learn by doing.\\
820+ \ \ \ -- Aristotle, Ethica Nicomachea II (c. 325 BC)
821+ \textbackslash end\{terminal\}
822+ \end{flushleft}
823+
824+ The above generates the following output:
825+
826+ \begin{flushleft}
827+ \rmfamily
828+ The \commandlineapp{fortune} program works like this:\par
829+ \begingroup
830+ \parindent1em\parskip0pt\ttfamily\obeylines\obeyspaces
831+ \prompt \userinput{fortune}\par
832+ What we have to learn to do we learn by doing.\par
833+ \ \ \ -- Aristotle, Ethica Nicomachea II (c. 325 BC)
834+ \endgroup
835+ \end{flushleft}
836+\end{frame}
837+
838+\begin{frame}
839+ \frametitle{Lists}
840+ There are two types of lists that we use in the manual: numbered lists and bulleted lists. Both lists work the same way, they just have different names.
841+
842+ \begin{minipage}{0.4\textwidth}
843+ \parskip\baselineskip
844+ \parindent0pt
845+ \begin{flushleft}
846+ \ttfamily
847+ \string\begin\{itemize\}\\
848+ \ \ \string\item\ First list item\\
849+ \ \ \string\item\ Second list item\\
850+ \ \ \string\item\ Third list item\\
851+ \string\end\{itemize\}
852+ \end{flushleft}
853+
854+ produces:
855+
856+ \begin{flushleft}
857+ \rmfamily
858+ \begin{itemize}
859+ \item First list item
860+ \item Second list item
861+ \item Third list item
862+ \end{itemize}
863+ \end{flushleft}
864+ \end{minipage}
865+ \hfill
866+ \begin{minipage}{0.4\textwidth}
867+ \parskip\baselineskip
868+ \parindent0pt
869+ \begin{flushleft}
870+ \ttfamily
871+ \string\begin\{enumerate\}\\
872+ \ \ \string\item\ First list item\\
873+ \ \ \string\item\ Second list item\\
874+ \ \ \string\item\ Third list item\\
875+ \string\end\{enumerate\}
876+ \end{flushleft}
877+
878+ produces:
879+
880+ \begin{flushleft}
881+ \rmfamily
882+ \begin{enumerate}
883+ \item First list item
884+ \item Second list item
885+ \item Third list item
886+ \end{enumerate}
887+ \end{flushleft}
888+ \end{minipage}
889+\end{frame}
890+
891+\begin{frame}
892+ \frametitle{Cross-Referencing}
893+ You can refer the read to other chapters or sections for further information by using the \texttt{\string\chaplink} and \texttt{\string\seclink} commands.
894+
895+ \begin{flushleft}
896+ \ttfamily
897+ Please see \highlight{\string\chaplink\{ch:installation\}} for more information on installing Ubuntu.
898+ \end{flushleft}
899+
900+ generates:
901+
902+ \begin{flushleft}
903+ \rmfamily
904+ Please see \highlight{\textbf{Chapter 1: Installation}} for more information on installing Ubuntu.
905+ \end{flushleft}
906+
907+ The argument to the \texttt{\string\chaplink} and \texttt{\string\seclink} is a \emph{label}. The label is set using the \texttt{\string\label} command immediately after the \texttt{\string\chapter} or \texttt{\string\section} command.
908+\end{frame}
909+
910+\section{\protect\LaTeX{} for Translators}
911+
912+\begin{frame}
913+ \frametitle{Notes for Translators}
914+ \LaTeX{} commands are preceded by a backslash character (\texttt{\textbackslash}). While the command names should \emph{not} be translated, their arguments sometimes should be.
915+
916+ In the following example, the red text should be translated, but the black text should be left as is:
917+
918+ \begin{flushleft}
919+ \ttfamily
920+ \highlight{Click} \string\menu\{\highlight{Applications}\string\then\ \highlight{Accessories}\string\then\ \highlight{Calculator}\} \highlight{to start the} \string\application\{\highlight{Calculator}\} \highlight{application.}
921+ \end{flushleft}
922+
923+ The labels in the \texttt{\string\chaplink}, \texttt{\string\seclink}, and \texttt{\string\ref} commands should never be translated.
924+\end{frame}
925+
926+\section{For More Information}
927+
928+\begin{frame}
929+ \vfill
930+ \begin{center}
931+ \Huge Questions?
932+ \end{center}
933+ \vfill
934+\end{frame}
935+
936+\end{document}
937+
938+
939
940=== added file 'Help/godbyk/latex-slides/ummacros.sty'
941--- Help/godbyk/latex-slides/ummacros.sty 1970-01-01 00:00:00 +0000
942+++ Help/godbyk/latex-slides/ummacros.sty 2014-09-01 04:44:23 +0000
943@@ -0,0 +1,217 @@
944+%
945+% Idenfification
946+%
947+
948+\NeedsTeXFormat{LaTeX2e}[1994/06/01]
949+
950+\ProvidesClass{ummacros}[2010/02/21 v0.0.1 Ubuntu manual macros]
951+
952+%
953+% Load packages
954+%
955+
956+\RequirePackage{xifthen}
957+\RequirePackage[load=abbr,mode=text,alsoload=binary]{siunitx}% proper spacing and names for units
958+
959+% A command that prints an interrupting dash. Varies per language. (For example, US is ``---'' without spacing, UK is `` -- '' with space.)
960+\newcommand{\dash}{\unskip\penalty0---\ignorespaces}
961+
962+%
963+% Format the document style
964+%
965+
966+% Ubuntu color palette
967+\definecolor{UbuntuOrange} {HTML}{FF6309}% Ubuntu orange
968+\definecolor{UbuntuYellow} {HTML}{FFB515}% Ubuntu yellow
969+\definecolor{UbuntuRed} {HTML}{C90016}% Ubuntu red
970+\definecolor{OrangeHilight} {HTML}{EEC73E}% oranges
971+\definecolor{Orange} {HTML}{F0A513}
972+\definecolor{OrangeBase} {HTML}{FB8B00}
973+\definecolor{OrangeShadow} {HTML}{F44800}
974+\definecolor{AccentYellowHilight} {HTML}{FDFF99}% yellows
975+\definecolor{Yellow} {HTML}{FFFF00}
976+\definecolor{AccentYellowBase} {HTML}{FDCA01}
977+\definecolor{AccentYellowShadow} {HTML}{986601}
978+\definecolor{AccentOrange} {HTML}{F44800}% reds
979+\definecolor{AccentRed} {HTML}{FD3301}
980+\definecolor{AccentRedBase} {HTML}{D40000}
981+\definecolor{AccentDeepRed} {HTML}{980101}
982+\definecolor{HumanHighlight} {HTML}{FDD99B}% skin tones
983+\definecolor{Human} {HTML}{D9BB7A}
984+\definecolor{HumanBase} {HTML}{816647}
985+\definecolor{EnvironmentalShadow} {HTML}{565248}
986+\definecolor{EnvironmentalBlueHighlight}{HTML}{AACCEE}% environmental blues
987+\definecolor{EnvironmentalBlueMedium} {HTML}{6699CC}
988+\definecolor{EnvironmentalBlueBase} {HTML}{336699}
989+\definecolor{EnvironmentalBlueShadow} {HTML}{003366}
990+\definecolor{AccentBlueHighlight} {HTML}{B3DEFD}% accent blues
991+\definecolor{AccentBlue} {HTML}{0197FD}
992+\definecolor{AccentBlueBase} {HTML}{0169C9}
993+\definecolor{AccentBlueShadow} {HTML}{013397}
994+\definecolor{AccentGreenHiglight} {HTML}{CCFF99}% greens
995+\definecolor{AccentGreen} {HTML}{98FC66}
996+\definecolor{AccentGreenBase} {HTML}{339900}
997+\definecolor{AccentGreenShadow} {HTML}{015A01}
998+\definecolor{UbuntuToner} {HTML}{002B3D}% toner
999+\definecolor{AccentMagentHighlight} {HTML}{FF9BFF}% magentas
1000+\definecolor{AccentMagenta} {HTML}{FF00FF}
1001+\definecolor{AccentDarkViolet} {HTML}{6600CC}
1002+
1003+\definecolor{important}{HTML}{980101}% same as accent deep red
1004+
1005+%
1006+% Define useful macros
1007+%
1008+
1009+\newcommand{\notecallout}[2][Note]{%
1010+ \marginnote{\textbf{#1:} #2}
1011+}
1012+
1013+\newcommand{\marginnote}[1]
1014+{%
1015+ \marginpar{%
1016+ %\begin{minipage}{\marginparwidth}%
1017+ \raggedright\sffamily\footnotesize%
1018+ \hspace{0pt}#1%
1019+ %\end{minipage}%
1020+ }%
1021+}
1022+
1023+
1024+% An environment for displaying terminal output
1025+% po4a: environment terminal
1026+\newenvironment{terminal}{%
1027+ \begin{quotation}
1028+ \unskip\noindent\ttfamily\parskip0pt\parindent0pt\obeylines\ignorespaces%
1029+}{%
1030+ \end{quotation}%
1031+}
1032+
1033+% An environment to set the list of credits (names) in three columns.
1034+% po4a: environment credits
1035+\newenvironment{credits}[1][]{%
1036+ \begin{multicols}{3}[#1]%
1037+ \parskip0pt%
1038+ \parindent0pt%
1039+ \let\item\par%
1040+ \small%
1041+}{%
1042+ \end{multicols}%
1043+}
1044+
1045+% Macros to distinguish prompts and user input from program output in terminal displays
1046+\newcommand{\prompt}{\texttt{\$}~}
1047+\newcommand{\rootprompt}{\texttt{\#}~}
1048+\newcommand{\userinput}[1]{{\ttfamily\textcolor{AccentDeepRed}{#1}}}% FIXME we'll adjust this formatting later -- red for easy editing at the moment
1049+\newcommand{\code}[1]{{\ttfamily#1}}
1050+
1051+% Macro for advanced usage notes
1052+\newcommand{\advanced}[1]{%
1053+ \smallskip%
1054+ \begin{center}
1055+ \noindent%
1056+ \hspace{\parindent}%
1057+ \begin{minipage}[t]{0.25in}%
1058+ % FIXME \vspace{-\baselineskip}\includegraphics[width=0.25in]{warning.eps}\vspace{0pt}
1059+ \centering\Huge\textcolor{AccentDeepRed}{\textbf{!!}}
1060+ \end{minipage}%
1061+ \hfill%
1062+ \begin{minipage}[t]{\linewidth-0.5in}%
1063+ \vspace{-\baselineskip}\small\em#1%
1064+ \end{minipage}%
1065+ \hspace{\parindent}%
1066+ \end{center}
1067+ \smallskip\par%
1068+}
1069+
1070+% Macro for warning notes
1071+\newcommand{\warning}[1]{%
1072+ \smallskip%
1073+ \begin{center}
1074+ \noindent%
1075+ \hspace{\parindent}%
1076+ \begin{minipage}[t]{0.25in}%
1077+ % FIXME \vspace{-\baselineskip}\includegraphics[width=0.25in]{warning.eps}\vspace{0pt}
1078+ \centering\Huge\textcolor{AccentDeepRed}{\textbf{!}}
1079+ \end{minipage}%
1080+ \hfill%
1081+ \begin{minipage}[t]{\linewidth-0.5in}%
1082+ \vspace{-\baselineskip}\small\em#1%
1083+ \end{minipage}%
1084+ \hspace{\parindent}%
1085+ \end{center}
1086+ \smallskip\par%
1087+}
1088+
1089+
1090+% Macro for typesetting menu selection sequences.
1091+% \nav{Menu \then Submenu \then Subsubmenu} would generate text looking like
1092+% ``Menu --> Submenu --> Subsubmenu''.
1093+%\newcommand{\smallarrow}{\raisebox{0.333ex}{\scalebox{0.5}{\ding{228}}}}
1094+\@ifpackageloaded{fontspec}{%
1095+ \newcommand{\smallarrow}{‣}%
1096+}{%
1097+ \newcommand{\smallarrow}{\raisebox{0.250ex}{\scalebox{0.5}{\ding{228}}}}
1098+}
1099+\newcommand{\nav}[1]{%
1100+ \begingroup%
1101+ %\def\then{\unskip\ensuremath{\,\rightarrow\,}\ignorespaces}%
1102+ \def\then{\unskip\,\smallarrow\,\allowbreak\ignorespaces}%
1103+ \textbf{#1}%
1104+ \endgroup%
1105+}
1106+
1107+% Macro to format application names and index them
1108+\newcommand{\application}[1]{%
1109+ \textbf{#1}%
1110+ \index{#1}\index{applications!#1}%
1111+}
1112+
1113+% Macro to format command line programs and index them
1114+\newcommand{\commandlineapp}[1]{%
1115+ \textbf{#1}%
1116+ \index{#1}\index{command line!#1}%
1117+}
1118+
1119+% Macro to simplify linking to chapters
1120+\newcommand{\chaplink}[1]{%
1121+ % not using \autoref here because I don't want to fix the case of \chapterautorefname for individual languages --godbyk
1122+ \IfBeforeSubStringEmpty{ch:}{#1}{\hyperref[#1]{\@chapapp~}\ref{#1}\hyperref[#1]{: }\nameref{#1}}{\hyperref[ch:#1]{\@chapapp~}\ref{ch:#1}\hyperref[ch:#1]{: }\nameref{ch:#1}}%
1123+}
1124+
1125+% Macro to simplify linking to sections
1126+\newcommand{\seclink}[1]{%
1127+ %\IfBeforeSubStringEmpty{sec:}{#1}{\autoref{#1}\hyperref[#1]{: }\nameref{#1}}{\autoref{sec:#1}\hyperref[sec:#1]{: }\nameref{sec:#1}}%
1128+ \IfBeforeSubStringEmpty{sec:}{#1}{\nameref{#1}}{\nameref{sec:#1}}%
1129+}
1130+
1131+% Macros to format UI elements
1132+\newcommand{\button}[1]{\textbf{#1}}
1133+\newcommand{\tab}[1]{\textbf{#1}}
1134+\newcommand{\dropdown}[1]{\textbf{#1}}
1135+\newcommand{\checkbox}[1]{\textbf{#1}}
1136+\newcommand{\menuitem}[1]{\textbf{#1}}
1137+\newcommand{\window}[1]{``#1''}
1138+\newcommand{\keystroke}[1]{\texttt{#1}}
1139+\newcommand{\radiobutton}[1]{\textbf{#1}}
1140+\newcommand{\textfield}[1]{\textbf{#1}}
1141+\newcommand{\option}[1]{\enquote{#1}}
1142+\let\menu\nav
1143+
1144+% Screenshot placeholder
1145+\newcommand*{\screenshotslog}{screenshots.log}
1146+\newwrite\screenshots
1147+\newcommand{\screenshotTODO}[1]{%
1148+ \immediate\write\screenshots{Chapter \thechapter, page \thepage: #1}%
1149+ %\immediate\closeout\screenshots%
1150+ \par\noindent\parbox{\linewidth}{\begin{center}\sffamily\bfseries\color{important} M~I~S~S~I~N~G~~~S~C~R~E~E~N~S~H~O~T\par\medskip\footnotesize\normalcolor#1\end{center}}\par%
1151+}
1152+\AtBeginDocument{\immediate\openout\screenshots=\screenshotslog}% open the screenshots.log file
1153+\AtEndDocument{\immediate\closeout\screenshots}% close the screenshots.log file
1154+
1155+%
1156+% All done!
1157+%
1158+
1159+\endinput
1160+
1161
1162=== added file 'Help/groundcontrol.pdf'
1163Binary files Help/groundcontrol.pdf 1970-01-01 00:00:00 +0000 and Help/groundcontrol.pdf 2014-09-01 04:44:23 +0000 differ
1164=== added file 'Help/intro.pdf'
1165Binary files Help/intro.pdf 1970-01-01 00:00:00 +0000 and Help/intro.pdf 2014-09-01 04:44:23 +0000 differ
1166=== added file 'Help/launchpad.pdf'
1167Binary files Help/launchpad.pdf 1970-01-01 00:00:00 +0000 and Help/launchpad.pdf 2014-09-01 04:44:23 +0000 differ
1168=== added file 'Help/socialmedia.pdf'
1169Binary files Help/socialmedia.pdf 1970-01-01 00:00:00 +0000 and Help/socialmedia.pdf 2014-09-01 04:44:23 +0000 differ
1170=== added file 'Help/writingstyle.pdf'
1171Binary files Help/writingstyle.pdf 1970-01-01 00:00:00 +0000 and Help/writingstyle.pdf 2014-09-01 04:44:23 +0000 differ
1172=== added file 'Makefile'
1173--- Makefile 1970-01-01 00:00:00 +0000
1174+++ Makefile 2014-09-01 04:44:23 +0000
1175@@ -0,0 +1,242 @@
1176+LATEXFILE=main
1177+
1178+.PHONY: translations clean show all mylang show-mylang
1179+SHELL=/bin/bash
1180+
1181+all: $(LATEXFILE).pdf
1182+
1183+CHAPTERS=\
1184+ frontmatter/*.tex \
1185+ around-desktop/*.tex \
1186+ backmatter/*.tex \
1187+ command-line/*.tex \
1188+ credits/*.tex \
1189+ default-apps/*.tex \
1190+ installation/*.tex \
1191+ learning-more/*.tex \
1192+ maintenance/maintenance.tex \
1193+ prefs-hardware/*.tex \
1194+ prologue/*.tex \
1195+ security/*.tex \
1196+ software-packaging/*.tex \
1197+ troubleshooting/*.tex
1198+
1199+
1200+$(LATEXFILE).pdf: $(LATEXFILE).tex ubuntu-manual.cls $(CHAPTERS) revinfo
1201+ xelatex --output-driver="xdvipdfmx -V 5" $(LATEXFILE)
1202+ xelatex --output-driver="xdvipdfmx -V 5" $(LATEXFILE)
1203+ makeglossaries -L english $(LATEXFILE)
1204+ makeindex $(LATEXFILE)
1205+ xelatex --output-driver="xdvipdfmx -V 5" $(LATEXFILE)
1206+ makeglossaries -L english $(LATEXFILE)
1207+ xelatex --output-driver="xdvipdfmx -V 5" $(LATEXFILE)
1208+ xelatex --output-driver="xdvipdfmx -V 5" $(LATEXFILE)
1209+ xelatex --output-driver="xdvipdfmx -V 5" $(LATEXFILE)
1210+ $(color_tex) $(LATEXFILE).log
1211+
1212+check: $(LATEXFILE).pdf
1213+ $(color_tex) $(LATEXFILE).log
1214+
1215+style-guide.pdf: style-guide.tex ubuntu-manual.cls
1216+ xelatex --output-driver="xdvipdfmx -V 5" style-guide
1217+ xelatex --output-driver="xdvipdfmx -V 5" style-guide
1218+ makeglossaries -L english style-guide
1219+ makeindex style-guide
1220+ xelatex --output-driver="xdvipdfmx -V 5" style-guide
1221+ makeglossaries -L english style-guide
1222+ xelatex --output-driver="xdvipdfmx -V 5" style-guide
1223+ xelatex --output-driver="xdvipdfmx -V 5" style-guide
1224+ xelatex --output-driver="xdvipdfmx -V 5" style-guide
1225+ $(color_tex) style-guide.log
1226+
1227+
1228+# Handle translations
1229+TRANSLATIONS=$(shell for PO in po/*.po; do basename $$PO .po; done) # list of languages in the po/ dir
1230+TRANSLATIONS_TEX=$(foreach PO, $(TRANSLATIONS), ubuntu-manual-$(shell basename $(PO) .po).tex) # list of .tex files to be generated
1231+TRANSLATIONS_PDF=$(foreach PO, $(TRANSLATIONS), ubuntu-manual-$(shell basename $(PO) .po).pdf) # list of .pdf files to be generated
1232+
1233+# Default translation is en_US
1234+ubuntu-manual-en_US.pdf: $(LATEXFILE).pdf
1235+ cp $(LATEXFILE).pdf $@
1236+
1237+# Compile all translations at once
1238+translations: $(TRANSLATIONS_PDF) ubuntu-manual.cls
1239+
1240+LLANG=$(shell echo $${LANG} | sed -e 's/\..*$$//g')
1241+SLANG=$(shell echo $${LANG} | sed -e 's/_.*$$//g')
1242+MYLANG=$(shell for PO in ${TRANSLATIONS}; do if [ "$${PO}" == "${LLANG}" ]; then echo ${LLANG}; exit 0; elif [ "$${PO}" == "${SLANG}" ]; then echo ${SLANG}; exit 0; fi; done; echo "en_US")
1243+
1244+# Compile the pdf for the current system language (if there's an appropriate translation)
1245+mylang: ubuntu-manual-${MYLANG}.pdf
1246+
1247+%.tex: revinfo
1248+ po4a-translate --master-charset=utf8 -f latex -m main.tex -p $(subst .tex,.po,$(subst ubuntu-manual-,po/,$@)) -l $@ -k 0
1249+
1250+%.tex: %.po ubuntu-manual.cls revinfo
1251+ po4a-translate --master-charset=utf8 -f latex -m main.tex -p $< -l ubuntu-manual-$(shell basename $< .po).tex -k 0
1252+
1253+%.pdf: POLANG=$(shell basename $(subst ubuntu-manual-,,$<) .tex)
1254+%.pdf: TEXFILE=$(shell basename $< .tex)
1255+%.pdf: XINDYLANG=$(shell grep -v "^#" langcodes.txt | grep "^${POLANG}" | awk '{ print $$3 }' || echo -n "general")
1256+
1257+%.pdf: %.tex ubuntu-manual.cls revinfo
1258+ #$(call generate_titlepage,${POLANG})
1259+ xelatex --output-driver="xdvipdfmx -V 5" -interaction nonstopmode "\def\polang{${POLANG}}\input{${TEXFILE}}"
1260+ xelatex --output-driver="xdvipdfmx -V 5" -interaction nonstopmode "\def\polang{${POLANG}}\input{${TEXFILE}}"
1261+ makeglossaries -L ${XINDYLANG} ${TEXFILE}
1262+ #texindy -L ${XINDYLANG} -C utf8 ${TEXFILE}.idx
1263+ xindy -C utf8 -M texindy -L ${XINDYLANG} ${TEXFILE}.idx
1264+ xelatex --output-driver="xdvipdfmx -V 5" -interaction nonstopmode '\def\polang{$(POLANG)}\input{$(TEXFILE)}'
1265+ makeglossaries -L ${XINDYLANG} $(TEXFILE)
1266+ xelatex --output-driver="xdvipdfmx -V 5" -interaction nonstopmode '\def\polang{$(POLANG)}\input{$(TEXFILE)}'
1267+ xelatex --output-driver="xdvipdfmx -V 5" -interaction nonstopmode '\def\polang{$(POLANG)}\input{$(TEXFILE)}'
1268+ xelatex --output-driver="xdvipdfmx -V 5" -interaction nonstopmode '\def\polang{$(POLANG)}\input{$(TEXFILE)}'
1269+ $(color_tex) $(TEXFILE).log
1270+
1271+revinfo:
1272+ bzr version-info --custom --template="\\\noindent\\\revinfo{{revno}}{{date}}" > revision.tex
1273+
1274+
1275+generate_titlepage = \
1276+ inkscape --export-text-to-path --export-pdf=titlepage/titlepage-$(1).pdf titlepage/titlepage-$(1).svg
1277+
1278+#titlepage/titlepage-%.pdf: titlepage/titlepage-%.svg
1279+# inkscape --export-text-to-path --export-pdf=$(subst .svg,.pdf,$<) $<
1280+
1281+%.pdf: %.asy
1282+ asy -f pdf $<
1283+
1284+%.pdf: %.svg
1285+ inkscape --export-text-to-path --export-pdf=$@ $<
1286+ #pdfcrop $@ $@
1287+
1288+%.png: %.dot
1289+ dot -v -Tpng $< -o $@
1290+
1291+show: $(LATEXFILE).pdf
1292+ evince $<
1293+
1294+show-mylang: ubuntu-manual-${MYLANG}.pdf
1295+ evince $<
1296+
1297+clean:
1298+ -rm -fr $(LATEXFILE).aux $(LATEXFILE).log $(LATEXFILE).nav $(LATEXFILE).out $(LATEXFILE).pdf $(LATEXFILE).snm $(LATEXFILE).toc
1299+ -rm -fr $(LATEXFILE).idx $(LATEXFILE).ilg $(LATEXFILE).ind $(LATEXFILE).lof $(LATEXFILE).lot
1300+ -rm -fr $(LATEXFILE).glg $(LATEXFILE).glo $(LATEXFILE).gls $(LATEXFILE).xdy
1301+ -rm -f missfont.log
1302+ -rm -f */*.aux
1303+ -rm -f */*.log
1304+ -rm -f *.bbl *.blg */*.bbl */*.blg # biblio files
1305+ -rm -f *.ptc # titletoc
1306+ -rm -f ubuntu-manual-* # translated files
1307+
1308+
1309+#
1310+# From Chris Monson's LaTeX Makefile
1311+#
1312+
1313+SED ?= sed
1314+TPUT ?= tput
1315+
1316+tput = $(shell $(TPUT) $1)
1317+
1318+black := $(call tput,setaf 0)
1319+red := $(call tput,setaf 1)
1320+green := $(call tput,setaf 2)
1321+yellow := $(call tput,setaf 3)
1322+blue := $(call tput,setaf 4)
1323+magenta := $(call tput,setaf 5)
1324+cyan := $(call tput,setaf 6)
1325+white := $(call tput,setaf 7)
1326+bold := $(call tput,bold)
1327+uline := $(call tput,smul)
1328+reset := $(call tput,sgr0)
1329+
1330+#
1331+# User-settable definitions
1332+#
1333+LATEX_COLOR_WARNING ?= magenta
1334+LATEX_COLOR_ERROR ?= red
1335+LATEX_COLOR_INFO ?= green
1336+LATEX_COLOR_UNDERFULL ?= magenta
1337+LATEX_COLOR_OVERFULL ?= red bold
1338+LATEX_COLOR_PAGES ?= bold
1339+LATEX_COLOR_BUILD ?= blue
1340+LATEX_COLOR_GRAPHIC ?= yellow
1341+LATEX_COLOR_DEP ?= green
1342+LATEX_COLOR_SUCCESS ?= green bold
1343+LATEX_COLOR_FAILURE ?= red bold
1344+
1345+# Gets the real color from a simple textual definition like those above
1346+# $(call get-color,ALL_CAPS_COLOR_NAME)
1347+# e.g., $(call get-color,WARNING)
1348+get-color = $(subst $(space),,$(foreach c,$(LATEX_COLOR_$1),$($c)))
1349+
1350+#
1351+# STANDARD COLORS
1352+#
1353+C_WARNING := $(call get-color,WARNING)
1354+C_ERROR := $(call get-color,ERROR)
1355+C_INFO := $(call get-color,INFO)
1356+C_UNDERFULL := $(call get-color,UNDERFULL)
1357+C_OVERFULL := $(call get-color,OVERFULL)
1358+C_PAGES := $(call get-color,PAGES)
1359+C_BUILD := $(call get-color,BUILD)
1360+C_GRAPHIC := $(call get-color,GRAPHIC)
1361+C_DEP := $(call get-color,DEP)
1362+C_SUCCESS := $(call get-color,SUCCESS)
1363+C_FAILURE := $(call get-color,FAILURE)
1364+C_RESET := $(reset)
1365+
1366+
1367+
1368+color_tex := \
1369+ @$(SED) \
1370+ -e '$${' \
1371+ -e ' /^$$/!{' \
1372+ -e ' H' \
1373+ -e ' s/.*//' \
1374+ -e ' }' \
1375+ -e '}' \
1376+ -e '/^$$/!{' \
1377+ -e ' H' \
1378+ -e ' d' \
1379+ -e '}' \
1380+ -e '/^$$/{' \
1381+ -e ' x' \
1382+ -e ' s/^\n//' \
1383+ -e ' /Output written/{' \
1384+ -e ' s/.*(\([^)]\{1,\}\)).*/Success! Wrote \1/' \
1385+ -e ' s/[[:digit:]]\{1,\}/$(C_PAGES)&$(C_RESET)/g' \
1386+ -e ' s/Success!/$(C_SUCCESS)&$(C_RESET)/g' \
1387+ -e ' b end' \
1388+ -e ' }' \
1389+ -e ' /! *LaTeX Error:.*/{' \
1390+ -e ' s/.*\(! *LaTeX Error:.*\)/$(C_ERROR)\1$(C_RESET)/' \
1391+ -e ' b end' \
1392+ -e ' }' \
1393+ -e ' /.*Warning: Marginpar on page [0-9]\+ moved\./{' \
1394+ -e ' s//$(C_RESET)&$(C_RESET)/' \
1395+ -e ' b end' \
1396+ -e ' }' \
1397+ -e ' /.*Warning: Reference .*/{' \
1398+ -e ' s//$(C_ERROR)&$(C_RESET)/' \
1399+ -e ' b end' \
1400+ -e ' }' \
1401+ -e ' /.*Warning:.*/{' \
1402+ -e ' s//$(C_WARNING)&$(C_RESET)/' \
1403+ -e ' b end' \
1404+ -e ' }' \
1405+ -e ' /Underfull.*/{' \
1406+ -e ' s/.*\(Underfull.*\)/$(C_UNDERFULL)\1$(C_RESET)/' \
1407+ -e ' b end' \
1408+ -e ' }' \
1409+ -e ' /Overfull.*/{' \
1410+ -e ' s/.*\(Overfull.*\)/$(C_OVERFULL)\1$(C_RESET)/' \
1411+ -e ' b end' \
1412+ -e ' }' \
1413+ $(if $(VERBOSE),,-e ' d') \
1414+ -e ' :end' \
1415+ -e ' G' \
1416+ -e '}' \
1417+
1418
1419=== renamed file 'Makefile' => 'Makefile.moved'
1420=== added file 'Makefile.orig'
1421--- Makefile.orig 1970-01-01 00:00:00 +0000
1422+++ Makefile.orig 2014-09-01 04:44:23 +0000
1423@@ -0,0 +1,3142 @@
1424+# Copyright 2004 Chris Monson (shiblon@gmail.com)
1425+# Latest version available at http://www.bouncingchairs.net/oss
1426+#
1427+# This file is part of ``Chris Monson's Free Software''.
1428+#
1429+# ``Chris Monson's Free Software'' is free software; you can redistribute it
1430+# and/or modify it under the terms of the GNU General Public License as
1431+# published by the Free Software Foundation, Version 2.
1432+#
1433+# ``Chris Monson's Free Software'' is distributed in the hope that it will
1434+# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
1435+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
1436+# Public License for more details.
1437+#
1438+# You should have received a copy of the GNU General Public License along
1439+# with ``Chris Monson's Free Software''; if not, write to the Free Software
1440+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1441+#
1442+# It is also available on the web at http://www.gnu.org/copyleft/gpl.html
1443+#
1444+# Note that using this makefile to build your documents does NOT place them
1445+# under the GPL unless you, the author, specifically do so. In other words,
1446+# I, Chris Monson, the copyright holder and author of this makefile,
1447+# consider it impossible to ``link'' to this makefile in any way covered by
1448+# the GPL.
1449+#
1450+# TO OBTAIN INSTRUCTIONS FOR USING THIS FILE, RUN:
1451+# make help
1452+#
1453+fileinfo := LaTeX Makefile
1454+author := Chris Monson
1455+version := 2.1.40
1456+#
1457+# If you specify sources here, all other files with the same suffix
1458+# will be treated as if they were _include_ files.
1459+#onlysources.tex ?= main.tex
1460+#onlysources.tex.sh ?=
1461+#onlysources.rst ?=
1462+#onlysources.fig ?=
1463+#onlysources.gpi ?=
1464+#onlysources.dot ?=
1465+#onlysources.xvg ?=
1466+#onlysources.svg ?=
1467+#onlysources.eps.gz ?=
1468+#onlysources.eps ?=
1469+#
1470+# If you list files here, they will be treated as _include_ files
1471+#includes.tex ?= file1.tex file2.tex
1472+#includes.tex.sh ?=
1473+#includes.rst ?=
1474+#includes.fig ?=
1475+#includes.gpi ?=
1476+#includes.dot ?=
1477+#includes.xvg ?=
1478+#includes.svg ?=
1479+#includes.eps.gz ?=
1480+#includes.eps ?=
1481+#
1482+# If you list files or wildcards here, they will *not* be cleaned - default is
1483+# to allow everything to be cleaned.
1484+#neverclean ?= *.pdf
1485+#
1486+# Alternatively (recommended), you can add those lines to a Makefile.ini file
1487+# and it will get picked up automatically without your having to edit this
1488+# Makefile.
1489+-include Makefile.ini
1490+
1491+# TODO:
1492+# * Sometimes we get
1493+# "mv: cannot stat '*.dvi.1st.make': No such file or directory"
1494+# on the second build (if nothing triggered a .d rebuild, but
1495+# the .dvi rule fired anyway). To reproduce in the
1496+# dissertation directory:
1497+#
1498+# make clean
1499+# make byumsphd-example
1500+# make byumsphd-example
1501+#
1502+# KNOWN ISSUES:
1503+# * The following occurs:
1504+# file with: \usepackage{named}\bibliographystyle{named}
1505+# Compile
1506+# change to: \usepackage{apalike}\bibliographystyle{apalike}
1507+# Compile again -- BARF!
1508+#
1509+# The workaround: make clean-nographics; make
1510+#
1511+# Note that we may not be able to fix this. LaTeX itself barfs
1512+# on this, not the makefile. The very first invocation of LaTeX
1513+# (when something like this has happened) reads the existing .aux
1514+# file and discovers invalid commands like \citeauthoryear that
1515+# are only valid in the package that was just removed. It then
1516+# tries to parse them and explodes. It's not at all clear to me
1517+# how to fix this. I tried removing the .aux files on the first
1518+# run of LaTeX, but that necessarily requires more subsequent
1519+# rebuilds on common edits. There does not appear to be a
1520+# graceful solution to this issue.
1521+#
1522+# CHANGES:
1523+# Chris Monson (2009-12-01):
1524+# * Bumped version to 2.1.40
1525+# * issue 36: build all indices (for e.g., splitidx usage)
1526+# * issue 59: clean up all generated files (including indices)
1527+# Chris Monson (2009-11-23):
1528+# * Bumped version to 2.1.39
1529+# * issue 57: change ps2pdf invocations to just use gs directly
1530+# Chris Monson (2009-11-19):
1531+# * Bumped version to 2.1.38
1532+# * issue 57: Added some limited support for Cygwin (spaces in filenames)
1533+# Chris Monson (2009-11-15):
1534+# * Bumped version to 2.1.37
1535+# * Removed svninfo, since this is now managed by mercurial
1536+# * Fixed typo in changelist
1537+# * Issue 52: added jpg->eps conversion (thanks to brubakee)
1538+# * Issue 54: fix missing Overfull colorization due to lack of a blank
1539+# line preceding the first error.
1540+# * Issue 51: remove head.tmp and body.tmp in make clean invocation
1541+# * Issue 56: maintain multiple versions of log files (for debugging)
1542+# Chris Monson (2009-11-14):
1543+# * Bumped version to 2.1.36
1544+# * Issues 53 and 49: added .brf, .mtc, and .maf to the cleanables
1545+# Chris Monson (2009-11-05):
1546+# * Bumped version to 2.1.35
1547+# * Added nomenclature support (see issue 48)
1548+# Chris Monson (2009-10-29):
1549+# * Bumped version to 2.1.34
1550+# * Fixed _out_ creation bug introduced in 2.1.33 (it was always created)
1551+# * Fixed erroneous help output for $HOME in BINARY_TARGET_DIR
1552+# * Changed contact email address - bring on the spam!
1553+# Chris Monson (2009-10-21):
1554+# * Bumped version to 2.1.33
1555+# * Fixed issue 46, adding support for dot2tex (thanks to fdemesmay)
1556+# * Made all_files.* settable in Makefile.ini (using ?= instead of :=)
1557+# * Fixed issue 47, thanks to fdemesmay: add binary copy directory, copy
1558+# dvi, pdf, and ps if it exists
1559+# Chris Monson (2009-09-25):
1560+# * Bumped version to 2.1.32
1561+# * Fixed so that a changed lol file will cause a rebuild
1562+# * Added .lol files to the cleanable list
1563+# Chris Monson (2009-09-08):
1564+# * Bumped version to 2.1.31
1565+# * Closed issue 43: evince doesn't notice pdf change w/out touch
1566+# Chris Monson (2009-08-28):
1567+# * Bumped version to 2.1.30
1568+# * Closed issue 39: Capture multi-line log warnings/errors to output
1569+# Chris Monson (2009-08-26):
1570+# * Bumped version to 2.1.29
1571+# * Closed issue 42: add svg support using inkscape
1572+# Chris Monson (2009-08-17):
1573+# * Bumped version to 2.1.28
1574+# * Patch from paul.biggar for issue 38: package warnings are overlooked
1575+# Chris Monson (2009-08-07):
1576+# * Bumped version to 2.1.27
1577+# * Included patch for issue 37 - removes pdf/ps files before copying,
1578+# allowing some broken viewers to see changes properly.
1579+# Chris Monson (2009-05-15):
1580+# * Bumped version to 2.1.26
1581+# * Included patch for issue 9 from favonia - detects .fig changes for
1582+# pstex files during regular compilation, so long as the pstex
1583+# has been built at least once with make all-pstex.
1584+# Chris Monson (2009-03-27):
1585+# * Bumped version to 2.1.25
1586+# * Cleaned up a bunch of variable setting stuff - more stuff is now
1587+# settable from Makefile.ini
1588+# * Cleaned up documentation for various features, especially settable
1589+# variables.
1590+# * issue 28: support for png -> eps conversion (it even looks good!)
1591+# * issue 29: support for "neverclean" files in Makefile.ini
1592+# * issue 30: make ps2pdf14 the default - fall back when not there
1593+# Chris Monson (2009-03-09):
1594+# * Bumped version to 2.1.24
1595+# * issue 27: xmgrace support (thanks to rolandschulzhd)
1596+# Chris Monson (2008-10-23):
1597+# * Bumped version to 2.1.23
1598+# * issue 23: fixed _check_programs to not use bash string subs
1599+# Chris Monson (2008-09-02):
1600+# * Bumped version to 2.1.22
1601+# * Appled patch from Holger <yllohy@googlemail.com> to add include
1602+# sources and some documentation updates.
1603+# * Updated backup_patterns to be a bit more aggressive (also thanks to
1604+# Holger)
1605+# Chris Monson (2008-08-30):
1606+# * Bumped version to 2.1.21
1607+# * Added ability to specify onlysources.* variables to indicate the only
1608+# files that should *not* be considered includes. Thanks to Holger
1609+# <yllohy@googlemail.com> for this patch.
1610+# * Added an automatic include of Makefile.ini if it exists. Allows
1611+# settings to be made outside of this makefile.
1612+# Chris Monson (2008-05-21):
1613+# * Bumped version to 2.1.20
1614+# * Added manual pstex compilation support (run make all-pstex first)
1615+# * Removed all automatic pstex support. It was totally breaking
1616+# everything and is very hard to incorporate into the makefile
1617+# concept because it requires LaTeX to *fail* before it can
1618+# determine that it needs the files.
1619+# Chris Monson (2008-04-17):
1620+# * Bumped version to 2.1.19
1621+# * Changed the pstex build hack to be on by default
1622+# Chris Monson (2008-04-09):
1623+# * Bumped version to 2.1.18
1624+# * issue 16: fixed pstex build problems, seems nondeterministic. Added
1625+# gratuitious hack for testing: set PSTEX_BUILD_ALL_HACK=1.
1626+# Chris Monson (2008-04-09):
1627+# * Bumped version to 2.1.17
1628+# * issue 20: fixed accumulation of <pid>*.make files - wildcard was
1629+# refusing to work on files that are very recently created.
1630+# Chris Monson (2008-04-02):
1631+# * Bumped version to 2.1.16
1632+# * issue 19: Removed the use of "type" to fix broken "echo" settings
1633+# Chris Monson (2008-03-27):
1634+# * Bumped version to 2.1.15
1635+# * issue 18: Favors binary echo over builtin, as binary understands -n
1636+# * issue 16: Fixed handling of missing pstex_t files in the log
1637+# * issue 9: Added .SECONDARY target for .pstex files
1638+# Chris Monson (2008-03-21):
1639+# * Bumped version to 2.1.14
1640+# * Fixed broken aux file flattening, which caused included bibs to be
1641+# missed.
1642+# Chris Monson (2008-03-20):
1643+# * Bumped version to 2.1.13
1644+# * Changed error output colorization to show errors for missing files
1645+# that are not graphics files.
1646+# Chris Monson (2008-03-20):
1647+# * Bumped version to 2.1.12
1648+# * Fixed a regression introduced in r28 that makes bibtex fail when
1649+# there is no index file present
1650+# Chris Monson (2008-03-03):
1651+# * Bumped version to 2.1.11
1652+# * Fixed issue 11 (handle index files, reported by abachn)
1653+# * Cleaned up some comments and help text
1654+# Chris Monson (2008-01-24):
1655+# * Bumped version to 2.1.10
1656+# * Fixed to work when 'sh' is a POSIX shell like 'dash'
1657+# Chris Monson (2007-12-12):
1658+# * Bumped version to 2.1.9
1659+# * Fixed documentation and dependency graph for pstex files
1660+# Chris Monson (2007-12-12):
1661+# * Bumped version to 2.1.8
1662+# * Added basic pstex_t support for fig files (Issue 9 by favonia)
1663+# I still suggest that psfrag be used instead.
1664+# Chris Monson (2007-10-16):
1665+# * Bumped version to 2.1.7
1666+# * Removed todo item: allow other comment directives for rst conversion
1667+# * Added ability to use global rst style file _rststyle_._include_.tex
1668+# * Added help text to that effect
1669+# Chris Monson (2007-05-20):
1670+# * Bumped version to 2.1.6
1671+# * Changed default paper size for rst files
1672+# * Added todo item: fix paper size for rst files
1673+# * Added todo item: allow other comment directives for rst conversion
1674+# Chris Monson (2007-04-02):
1675+# * Bumped version to 2.1.5
1676+# * Addressed Issue 7, incorrect .gpi.d generation in subdirectories
1677+# Chris Monson (2007-03-28):
1678+# * Bumped version to 2.1.4
1679+# * Fixed syntax error in dot output
1680+# Chris Monson (2007-03-01):
1681+# * Bumped version to 2.1.3
1682+# * Added reST to the included documentation
1683+# * Fixed graphics and script generation to be settable in the
1684+# environment.
1685+# Chris Monson (2007-02-23):
1686+# * Bumped version to 2.1.2
1687+# * Added the ability to generate .tex files from .rst files
1688+# Chris Monson (2006-10-17):
1689+# * Bumped version to 2.1.1
1690+# * Fixed includes from subdirectories (sed-to-sed slash escape problem)
1691+# Chris Monson (2006-10-05):
1692+# * Bumped version to 2.1.0 (pretty serious new feature added)
1693+# * New feature: bib files can now be anywhere on the BIBINPUTS path
1694+# * New programs: kpsewhich (with tetex) and xargs (BSD)
1695+# Chris Monson (2006-09-28):
1696+# * Bumped version to 2.0.9
1697+# * Added ability to parse more than one bibliography
1698+# Chris Monson (2006-06-01):
1699+# * Bumped version to 2.0.8
1700+# * Added .vrb to the list of cleaned files
1701+# Chris Monson (2006-04-26):
1702+# * Bumped version to 2.0.7
1703+# * Fixed so that clean-nographics does not remove .gpi.d files
1704+# * Removed jpg -> eps hack (not working properly -- just pre-convert)
1705+# * Fixed so that postscript grayscale can be done with BSD sed
1706+# Chris Monson (2006-04-25):
1707+# * Bumped version to 2.0.6
1708+# * Fixed so that changed toc, lot, lof, or out causes a rebuild
1709+# Chris Monson (2006-04-17):
1710+# * Bumped version to 2.0.5
1711+# * Added jpg -> eps conversion target
1712+# Chris Monson (2006-04-12):
1713+# * Bumped version to 2.0.4
1714+# * Fixed BSD sed invocation to not use \| as a branch delimiter
1715+# * Added a comment section on what is and is not allowed in BSD sed
1716+# * Made paper size handling more robust while I was at it
1717+# * Fixed postscript RGB grayscale to use a weighted average
1718+# * Fixed postscript HSB grayscale to convert to RGB first
1719+# * Fixed a problem with rebuilding .bbl files
1720+# Chris Monson (2006-04-11):
1721+# * Bumped version to 2.0.3
1722+# * Fixed some BSD sed problems: can't use \n in substitutions
1723+# Chris Monson (2006-04-10):
1724+# * Bumped version to 2.0.2
1725+# * Once again removed ability to create .tex files from scripts
1726+# * \includeonly works again
1727+# Chris Monson (2006-04-09):
1728+# * Bumped version to 2.0.1
1729+# * Fixed grayscale postscript handling to be more robust
1730+# * Added ability to generate ._gray_. files from eps and eps.gz
1731+# * Added ability to clean ._gray_.eps files created from .eps files
1732+# Chris Monson (2006-04-07):
1733+# * Bumped version to 2.0.0
1734+# * Removed clunky ability to create included .tex files from scripts
1735+# * Added note in the help about included tex scripting not working
1736+# * Fixed the .eps generation to delete %.gpihead.make when finished
1737+# * Abandoned designs to use shell variables to create sed scripts
1738+# * Abandoned __default__.tex.sh idea: it causes recursion with %: .
1739+# * Removed web page to-do. All items are now complete.
1740+# * Added better grayscale conversion for dot figures (direct ps fixup).
1741+# * Include files can now be scripted (at the expense of \includeonly).
1742+# * Updated dependency graph to contain better node names.
1743+# Chris Monson (2006-04-06):
1744+# * Bumped version to 2.0b3
1745+# * Top level includes now fail if there is no rule to build them
1746+# * A helpful message is printed when they do fail
1747+# * Grayscale has been changed to be ._gray_, other phonies use _ now, too
1748+# * Grayscale handling has been completed
1749+# * Changed _include_stems target to _includes target.
1750+# * Fixed _includes target to be useful by itself.
1751+# * Removed the ability to specify clean and build targets at once
1752+# * Verified that epsfig works fine with current code
1753+# * Fixed included scripts so that they are added to the dep files
1754+# * Fixed so that graphics includes don't happen if they aren't for gpi
1755+# * Fixed dot output to allow grayscale.
1756+# Chris Monson (2006-04-05):
1757+# * Bumped version to 2.0b2
1758+# * Removed automatic -gray output. It needs fixing in a bad way.
1759+# * Revamped dependency creation completely.
1760+# * Fixed conditional inclusion to actually work (test.nobuild.d, test.d).
1761+# * Fixed clean target to remove log targets
1762+# * Added the 'monochrome' word for gray gpi output
1763+# * Added a _check_gpi_files target that checks for common problems
1764+# * Changed the _version target into the version target (no _)
1765+# * Added better handling of grayscale files. Use the .gray.pdf target.
1766+# * Fixed testing for rebuilds
1767+# Chris Monson (2006-04-04):
1768+# * Bumped version to 2.0b1
1769+# * Changed colorization of output
1770+# * Made .auxbbl and .auxtex .make files secondary targets
1771+# * Shortened and simplified the final latex invocation loop
1772+# * Added version-specific output ($$i vs. $$$$i) in latex loop
1773+# * Added a build message for the first .dvi run (Building .dvi (0))
1774+# * Removed some build messages that most people don't care about.
1775+# * Simplified procedure for user-set colors -- simple text specification
1776+# * Fixed diff output to...not output.
1777+# * Fixed rerun bug -- detect not only when preceded with LaTeX Warning
1778+# * Sped up gpi plotting
1779+# * Added error handling and colorized output for gpi failure
1780+# * Documented color changing stuff.
1781+# * Now sort the flattened aux file to avoid false recompilation needs
1782+# * Added clean-nographics target
1783+# * Don't remove self.dvi file if self.aux is missing in the log
1784+# * Clarified some code. Did some very minor adjusting.
1785+# Chris Monson (2006-04-03):
1786+# * Bumped version to 2.0a7
1787+# * Added .dvi and .ps files as secondary files.
1788+# * Fixed handling of multiple run detection when includeonly is in use.
1789+# * Added code to flatten .aux files.
1790+# * Added more files as .SECONDARY prerequisites to avoid recompilation.
1791+# * Fixed the inputs generation to be much simpler and to use pipes.
1792+# * Added the dependency graph directly into the makefile.
1793+# * Changed flatten-aux to remove \@writefile \relax \newlabel, etc.
1794+# * Undid pipe changes with sed usage (BSD sed doesn't know -f-).
1795+# * Added a _check_programs target that tells you what your system has.
1796+# * Fixed an error in colorization that made unnecessary errors appear
1797+# * Added view targets.
1798+# * Updated help text.
1799+# * Augmented cookies so that .aux can trigger .bbl and .dvi rebuilds
1800+# * Added more informative error handling for dvips and ps2pdf
1801+# Chris Monson (2006-04-02):
1802+# * Bumped version to 2.0a6
1803+# * Added indirection to .bbl dependencies to avoid rebuilding .bbl files
1804+# * Streamlined the diff invocation to eliminate an existence test
1805+# * Removed special shell quote escape variables
1806+# * Moved includes to a more prominent location
1807+# * Fixed .inputs.make to not contain .aux files
1808+# * Fixed embedding to use a file instead of always grepping.
1809+# * Added *.make.temp to the list of cleanable files
1810+# * Fixed Ruby. It should now be supported properly.
1811+# * Now differentiate between all, default, and buildable files.
1812+# * Fixed to bail out on serious errors.
1813+# * Revised the handling of includable files. Still working on it.
1814+# Chris Monson (2006-03-31):
1815+# * Bumped version to 2.0a5
1816+# * Fixed a bug with LaTeX error detection (there can be spaces)
1817+# * Added .bbl support, simplifying everything and making it more correct
1818+# * Refactored some tests that muddy the code
1819+# * Did a little cleanup of some shell loops that can safely be make loops
1820+# * Added support for graphviz .dot files
1821+# * Made _all_programs output easier to read
1822+# * Added the ruby support that has long been advertised
1823+# * Font embedding was screwed up for PostScript -- now implicit
1824+# * Changed the generation of -gray.gpi files to a single command
1825+# * Changed any make-generated file that is not included from .d to .make
1826+# Chris Monson (2006-03-30):
1827+# * Bumped version to 2.0a4
1828+# * Fixed a bug with very long graphics file names
1829+# * Added a todo entry for epsfig support
1830+# * Fixed a bug paper size bug: sometimes more than one entry appears
1831+# * Fixed DVI build echoing to display the number instead of process ID
1832+# * DVI files are now removed on first invocation if ANY file is missing
1833+# * Added a simple grayscale approach: if a file ends with -gray.gpi, it
1834+# is created from the corresponding .gpi file with a special
1835+# comment ##GRAY in its header, which causes coloring to be
1836+# turned off.
1837+# * Fixed a bug in the handling of .tex.sh files. For some reason I had
1838+# neglected to define file stems for scripted output.
1839+# * Removed a trailing ; from the %.graphics dependencies
1840+# * Added dvips embedding (I think it works, anyway)
1841+# Chris Monson (2006-03-29):
1842+# * Bumped version to 2.0a3
1843+# * Fixed error in make 3.79 with MAKEFILE_LIST usage
1844+# * Added the presumed filename to the _version output
1845+# * Added a vim macro for converting sed scripts to make commands
1846+# * Added gpi dependency support (plotting external files and loading gpi)
1847+# * Allow .gpi files to be ignored if called .include.gpi or .nobuild.gpi
1848+# * Fixed sed invocations where \+ was used. BSD sed uses \{1,\}.
1849+# Chris Monson (2006-03-28):
1850+# * Bumped version to 2.0a2
1851+# * Added SHELL_DEBUG and VERBOSE options
1852+# * Changed the default shell back to /bin/sh (unset, in other words)
1853+# * Moved .PHONY declarations closer to their targets
1854+# * Moved help text into its own define block to obtain better formatting
1855+# * Removed need for double-entry when adding a new program invocation
1856+# * Moved .SECONDARY declaration closer to its relevant occurrence
1857+# * Commented things more heavily
1858+# * Added help text about setting terminal and output in gnuplot
1859+# * Created more fine-grained clean targets
1860+# * Added a %.graphics target that generates all of %'s graphics
1861+# * Killed backward-compatible graphics generation (e.g., eps.gpi=gpi.eps)
1862+# * For now, we're just GPL 2, not 3. Maybe it will change later
1863+# * Made the version and svninfo into variables
1864+# Chris Monson (2006-03-27):
1865+# * Bumped version to 2.0a1
1866+# * Huge, sweeping changes -- automatic dependencies
1867+
1868+# IMPORTANT!
1869+#
1870+# When adding to the following list, do not introduce any blank lines. The
1871+# list is extracted for documentation using sed and is terminated by a blank
1872+# line.
1873+#
1874+# EXTERNAL PROGRAMS:
1875+# = ESSENTIAL PROGRAMS =
1876+# == Basic Shell Utilities ==
1877+CAT ?= cat
1878+CP ?= cp -f
1879+DIFF ?= diff
1880+ECHO ?= echo
1881+EGREP ?= egrep
1882+ENV ?= env
1883+MV ?= mv -f
1884+SED ?= sed
1885+SORT ?= sort
1886+TOUCH ?= touch
1887+UNIQ ?= uniq
1888+WHICH ?= which
1889+XARGS ?= xargs
1890+# == LaTeX (tetex-provided) ==
1891+BIBTEX ?= bibtex
1892+DVIPS ?= dvips
1893+LATEX ?= latex
1894+MAKEINDEX ?= makeindex
1895+KPSEWHICH ?= kpsewhich
1896+GS ?= gs
1897+# = OPTIONAL PROGRAMS =
1898+# == Makefile Color Output ==
1899+TPUT ?= tput
1900+# == TeX Generation ==
1901+RST2LATEX ?= rst2latex.py
1902+# == EPS Generation ==
1903+CONVERT ?= convert # ImageMagick
1904+DOT ?= dot # GraphViz
1905+DOT2TEX ?= dot2tex # dot2tex - add options (not -o) as needed
1906+FIG2DEV ?= fig2dev # XFig
1907+GNUPLOT ?= gnuplot # GNUplot
1908+INKSCAPE ?= inkscape # Inkscape (svg support)
1909+XMGRACE ?= xmgrace # XMgrace
1910+PNGTOPNM ?= pngtopnm # From NetPBM - step 1 for png -> eps
1911+PPMTOPGM ?= ppmtopgm # From NetPBM - (gray) step 2 for png -> eps
1912+PNMTOPS ?= pnmtops # From NetPBM - step 3 for png -> eps
1913+GUNZIP ?= gunzip # GZipped EPS
1914+# == Beamer Enlarged Output ==
1915+PSNUP ?= psnup
1916+# == Viewing Stuff ==
1917+VIEW_POSTSCRIPT ?= gv
1918+VIEW_PDF ?= evince
1919+VIEW_GRAPHICS ?= display
1920+
1921+# Command options for embedding fonts and postscript->pdf conversion
1922+PS_EMBED_OPTIONS ?= -dPDFSETTINGS=/printer -dEmbedAllFonts=true -dSubsetFonts=true -dMaxSubsetPct=100
1923+PS_COMPATIBILITY ?= 1.4
1924+
1925+# This ensures that even when echo is a shell builtin, we still use the binary
1926+# (the builtin doesn't always understand -n)
1927+FIXED_ECHO := $(if $(findstring -n,$(shell $(ECHO) -n)),$(shell which echo),$(ECHO))
1928+ECHO := $(if $(FIXED_ECHO),$(FIXED_ECHO),$(ECHO))
1929+
1930+# Directory into which we place "binaries" if it exists.
1931+# Note that this can be changed on the commandline or in Makefile.ini:
1932+#
1933+# Command line:
1934+# make BINARY_TARGET_DIR=$HOME/pdfs myfile.pdf
1935+#
1936+# Also, you can specify a relative directory (relative to the Makefile):
1937+# make BINARY_TARGET_DIR=pdfs myfile.pdf
1938+#
1939+# Or, you can use Makefile.ini:
1940+#
1941+# BINARY_TARGET_DIR := $(HOME)/bin_out
1942+#
1943+BINARY_TARGET_DIR ?= _out_
1944+
1945+# SH NOTES
1946+#
1947+# On some systems, /bin/sh, which is the default shell, is not linked to
1948+# /bin/bash. While bash is supposed to be sh-compatible when invoked as sh, it
1949+# just isn't. This section details some of the things you have to stay away
1950+# from to remain sh-compatible.
1951+#
1952+# * File pattern expansion does not work for {}
1953+# * [ "$x" = "$y" ] has to be [ x"$x" x"$y" ]
1954+# * &> for stderr redirection doesn't work, use 2>&1 instead
1955+#
1956+# BSD SED NOTES
1957+#
1958+# BSD SED is not very nice compared to GNU sed, but it is the most
1959+# commonly-invoked sed on Macs (being based on BSD), so we have to cater to
1960+# it or require people to install GNU sed. It seems like the GNU
1961+# requirement isn't too bad since this makefile is really a GNU makefile,
1962+# but apparently GNU sed is much less common than GNU make in general, so
1963+# I'm supporting it here.
1964+#
1965+# Sad experience has taught me the following about BSD sed:
1966+#
1967+# * \+ is not understood to mean \{1,\}
1968+# * \| is meaningless (does not branch)
1969+# * \n cannot be used as a substitution character
1970+# * ? does not mean \{0,1\}, but is literal
1971+# * a\ works, but only reliably for a single line if subsequent lines
1972+# have forward slashes in them (as is the case in postscript)
1973+#
1974+# For more info (on the Mac) you can consult
1975+#
1976+# man -M /usr/share/man re_format
1977+#
1978+# And look for the word "Obsolete" near the bottom.
1979+
1980+#
1981+# EXTERNAL PROGRAM DOCUMENTATION SCRIPT
1982+#
1983+
1984+# $(call output-all-programs,[<output file>])
1985+define output-all-programs
1986+ [ -f '$(this_file)' ] && \
1987+ $(SED) \
1988+ -e '/^[[:space:]]*#[[:space:]]*EXTERNAL PROGRAMS:/,/^$$/!d' \
1989+ -e '/EXTERNAL PROGRAMS/d' \
1990+ -e '/^$$/d' \
1991+ -e '/^[[:space:]]*#/i\ '\
1992+ -e 's/^[[:space:]]*#[[:space:]][^=]*//' \
1993+ $(this_file) $(if $1,> '$1',) || \
1994+ $(ECHO) "Cannot determine the name of this makefile."
1995+endef
1996+
1997+# If they misspell gray, it should still work.
1998+GRAY ?= $(call get-default,$(GREY),)
1999+
2000+#
2001+# Utility Functions and Definitions
2002+#
2003+
2004+# While not exactly a make function, this vim macro is useful. It takes a
2005+# verbatim sed script and converts each line to something suitable in a command
2006+# context. Just paste the script's contents into the editor, yank this into a
2007+# register (starting at '0') and run the macro once for each line of the
2008+# original script:
2009+#
2010+# 0i -e :s/\$/$$/eg
2011:s/'/'"'"'/eg
2012^Ela'A' \:noh
2013j
2014+
2015+# don't call this directly - it is here to avoid calling wildcard more than
2016+# once in remove-files.
2017+remove-files-helper = $(if $1,$(RM) $1,:)
2018+
2019+# $(call remove-files,file1 file2)
2020+remove-files = $(call remove-files-helper,$(wildcard $1))
2021+
2022+# Removes all cleanable files in the given list
2023+# $(call clean-files,file1 file2 file3 ...)
2024+# Works exactly like remove-files, but filters out files in $(neverclean)
2025+clean-files = \
2026+ $(call remove-files-helper,$(call cleanable-files,$(wildcard $1)))
2027+
2028+# Outputs all generated files to STDOUT, along with some others that are
2029+# created by these (e.g., .idx files end up producing .ilg and .ind files).
2030+# Discovered by reading *.fls OUTPUT lines and producing corresponding .ind
2031+# filenames as needed.
2032+#
2033+# $(call get-generated-names,<source recorder file (*.fls)>)
2034+define get-generated-names
2035+[ -f '$1' ] && \
2036+$(SED) \
2037+ -e '/^OUTPUT /{' \
2038+ -e ' s///' \
2039+ -e ' p' \
2040+ -e ' s/\.idx/\.ind/p' \
2041+ -e ' s/\.ind/\.ilg/p' \
2042+ -e '}' \
2043+ -e 'd' \
2044+ '$1' \
2045+| $(SORT) | $(UNIQ)
2046+endef
2047+
2048+# This removes files without checking whether they are there or not. This
2049+# sometimes has to be used when the file is created by a series of shell
2050+# commands, but there ends up being a race condition: make doesn't know about
2051+# the file generation as quickly as the system does, so $(wildcard ...) doesn't
2052+# work right. Blech.
2053+# $(call remove-temporary-files,filenames)
2054+remove-temporary-files = $(if $1,$(RM) $1,:)
2055+
2056+# Create an identifier from a file name
2057+# $(call cleanse-filename,filename)
2058+cleanse-filename = $(subst .,_,$(subst /,__,$1))
2059+
2060+# Escape dots
2061+# $(call escape-dots,str)
2062+escape-dots = $(subst .,\\.,$1)
2063+
2064+# Test that a file exists
2065+# $(call test-exists,file)
2066+test-exists = [ -e '$1' ]
2067+
2068+# Copy file1 to file2 only if file2 doesn't exist or they are different
2069+# $(call copy-if-different,sfile,dfile)
2070+copy-if-different = $(call test-different,$1,$2) && $(CP) '$1' '$2'
2071+copy-if-exists = $(call test-exists,$1) && $(CP) '$1' '$2'
2072+move-if-different = $(call test-different,$1,$2) && $(MV) '$1' '$2'
2073+replace-if-different-and-remove = \
2074+ $(call test-different,$1,$2) \
2075+ && $(MV) '$1' '$2' \
2076+ || $(call remove-files,'$1')
2077+
2078+# Note that $(DIFF) returns success when the files are the SAME....
2079+# $(call test-different,sfile,dfile)
2080+test-different = ! $(DIFF) -q '$1' '$2' >/dev/null 2>&1
2081+test-exists-and-different = \
2082+ $(call test-exists,$2) && $(call test-different,$1,$2)
2083+
2084+# Return value 1, or value 2 if value 1 is empty
2085+# $(call get-default,<possibly empty arg>,<default value if empty>)
2086+get-default = $(if $1,$1,$2)
2087+
2088+# Copy a file and log what's going on
2089+# $(call copy-with-logging,<source>,<target>)
2090+define copy-with-logging
2091+if [ -d '$2/' ]; then \
2092+ if $(CP) '$1' '$2/'; then \
2093+ $(ECHO) "$(C_INFO)Copied '$1' to '$2/'$(C_RESET)"; \
2094+ else \
2095+ $(ECHO) "$(C_ERROR)Failed to copy '$1' to '$2/'$(C_RESET)"; \
2096+ fi; \
2097+fi
2098+endef
2099+
2100+# Gives a reassuring message about the failure to find include files
2101+# $(call include-message,<list of include files>)
2102+define include-message
2103+$(strip \
2104+$(if $(filter-out $(wildcard $1),$1),\
2105+ $(shell $(ECHO) \
2106+ "$(C_INFO)NOTE: You may ignore warnings about the"\
2107+ "following files:" >&2;\
2108+ $(ECHO) >&2; \
2109+ $(foreach s,$(filter-out $(wildcard $1),$1),$(ECHO) ' $s' >&2;)\
2110+ $(ECHO) "$(C_RESET)" >&2)
2111+))
2112+endef
2113+# Characters that are hard to specify in certain places
2114+space := $(empty) $(empty)
2115+colon := \:
2116+comma := ,
2117+
2118+# Useful shell definitions
2119+sh_true := :
2120+sh_false := ! :
2121+
2122+# Clear out the standard interfering make suffixes
2123+.SUFFIXES:
2124+
2125+# Turn off forceful rm (RM is usually mapped to rm -f)
2126+ifdef SAFE_RM
2127+RM := rm
2128+endif
2129+
2130+# Turn command echoing back on with VERBOSE=1
2131+ifndef VERBOSE
2132+QUIET := @
2133+endif
2134+
2135+# Turn on shell debugging with SHELL_DEBUG=1
2136+# (EVERYTHING is echoed, even $(shell ...) invocations)
2137+ifdef SHELL_DEBUG
2138+SHELL += -x
2139+endif
2140+
2141+# Get the name of this makefile (always right in 3.80, often right in 3.79)
2142+# This is only really used for documentation, so it isn't too serious.
2143+ifdef MAKEFILE_LIST
2144+this_file := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
2145+else
2146+this_file := $(wildcard GNUmakefile makefile Makefile)
2147+endif
2148+
2149+# Terminal color definitions
2150+
2151+ifdef NO_COLOR
2152+tput =
2153+else
2154+tput = $(shell $(TPUT) $1)
2155+endif
2156+
2157+black := $(call tput,setaf 0)
2158+red := $(call tput,setaf 1)
2159+green := $(call tput,setaf 2)
2160+yellow := $(call tput,setaf 3)
2161+blue := $(call tput,setaf 4)
2162+magenta := $(call tput,setaf 5)
2163+cyan := $(call tput,setaf 6)
2164+white := $(call tput,setaf 7)
2165+bold := $(call tput,bold)
2166+uline := $(call tput,smul)
2167+reset := $(call tput,sgr0)
2168+
2169+#
2170+# User-settable definitions
2171+#
2172+LATEX_COLOR_WARNING ?= magenta
2173+LATEX_COLOR_ERROR ?= red
2174+LATEX_COLOR_INFO ?= green
2175+LATEX_COLOR_UNDERFULL ?= magenta
2176+LATEX_COLOR_OVERFULL ?= red bold
2177+LATEX_COLOR_PAGES ?= bold
2178+LATEX_COLOR_BUILD ?= blue
2179+LATEX_COLOR_GRAPHIC ?= yellow
2180+LATEX_COLOR_DEP ?= green
2181+LATEX_COLOR_SUCCESS ?= green bold
2182+LATEX_COLOR_FAILURE ?= red bold
2183+
2184+# Gets the real color from a simple textual definition like those above
2185+# $(call get-color,ALL_CAPS_COLOR_NAME)
2186+# e.g., $(call get-color,WARNING)
2187+get-color = $(subst $(space),,$(foreach c,$(LATEX_COLOR_$1),$($c)))
2188+
2189+#
2190+# STANDARD COLORS
2191+#
2192+C_WARNING := $(call get-color,WARNING)
2193+C_ERROR := $(call get-color,ERROR)
2194+C_INFO := $(call get-color,INFO)
2195+C_UNDERFULL := $(call get-color,UNDERFULL)
2196+C_OVERFULL := $(call get-color,OVERFULL)
2197+C_PAGES := $(call get-color,PAGES)
2198+C_BUILD := $(call get-color,BUILD)
2199+C_GRAPHIC := $(call get-color,GRAPHIC)
2200+C_DEP := $(call get-color,DEP)
2201+C_SUCCESS := $(call get-color,SUCCESS)
2202+C_FAILURE := $(call get-color,FAILURE)
2203+C_RESET := $(reset)
2204+
2205+#
2206+# PRE-BUILD TESTS
2207+#
2208+
2209+# Check that clean targets are not combined with other targets (weird things
2210+# happen, and it's not easy to fix them)
2211+hascleangoals := $(if $(sort $(filter clean clean-%,$(MAKECMDGOALS))),1)
2212+hasbuildgoals := $(if $(sort $(filter-out clean clean-%,$(MAKECMDGOALS))),1)
2213+ifneq "$(hasbuildgoals)" ""
2214+ifneq "$(hascleangoals)" ""
2215+$(error $(C_ERROR)Clean and build targets specified together$(C_RESET)))
2216+endif
2217+endif
2218+
2219+#
2220+# VARIABLE DECLARATIONS
2221+#
2222+
2223+# Names of sed scripts that morph gnuplot files -- only the first found is used
2224+GNUPLOT_SED := global-gpi.sed gnuplot.sed
2225+GNUPLOT_GLOBAL := global._include_.gpi gnuplot.global
2226+
2227+# Files of interest
2228+all_files.tex ?= $(wildcard *.tex)
2229+all_files.tex.sh ?= $(wildcard *.tex.sh)
2230+all_files.rst ?= $(wildcard *.rst)
2231+all_files.fig ?= $(wildcard *.fig)
2232+all_files.gpi ?= $(wildcard *.gpi)
2233+all_files.dot ?= $(wildcard *.dot)
2234+all_files.xvg ?= $(wildcard *.xvg)
2235+all_files.svg ?= $(wildcard *.svg)
2236+all_files.png ?= $(wildcard *.png)
2237+all_files.jpg ?= $(wildcard *.jpg)
2238+all_files.eps.gz ?= $(wildcard *.eps.gz)
2239+all_files.eps ?= $(wildcard *.eps)
2240+
2241+# Utility function for obtaining all files not specified in $(neverclean)
2242+# $(call cleanable-files,file1 file2 file3 ...)
2243+# Returns the list of files that is not in $(wildcard $(neverclean))
2244+cleanable-files = $(filter-out $(wildcard $(neverclean)), $1)
2245+
2246+# Utility function for getting all .$1 files that are to be ignored
2247+# * files listed in $(includes.$1)
2248+# * files not listed in $(onlysources.$1) if it is defined
2249+ignore_files = \
2250+ $(includes.$1) \
2251+ $(if $(onlysources.$1),$(filter-out $(onlysources.$1), $(all_files.$1)))
2252+
2253+# Patterns to never be allowed as source targets
2254+ignore_patterns := %._include_
2255+
2256+# Patterns allowed as source targets but not included in 'all' builds
2257+nodefault_patterns := %._nobuild_ $(ignore_patterns)
2258+
2259+# Utility function for getting targets suitable building
2260+# $(call filter-buildable,suffix)
2261+filter-buildable = \
2262+ $(filter-out $(call ignore_files,$1) \
2263+ $(addsuffix .$1,$(ignore_patterns)),$(all_files.$1))
2264+
2265+# Utility function for getting targets suitable for 'all' builds
2266+# $(call filter-default,suffix)
2267+filter-default = \
2268+ $(filter-out $(call ignore_files,$1) \
2269+ $(addsuffix .$1,$(nodefault_patterns)),$(all_files.$1))
2270+
2271+# Top level sources that can be built even when they are not by default
2272+files.tex := $(filter-out %._gray_.tex,$(call filter-buildable,tex))
2273+files.tex.sh := $(call filter-buildable,tex.sh)
2274+files.rst := $(call filter-buildable,rst)
2275+files.gpi := $(call filter-buildable,gpi)
2276+files.dot := $(call filter-buildable,dot)
2277+files.fig := $(call filter-buildable,fig)
2278+files.xvg := $(call filter-buildable,xvg)
2279+files.svg := $(call filter-buildable,svg)
2280+files.png := $(call filter-buildable,png)
2281+files.jpg := $(call filter-buildable,jpg)
2282+files.eps.gz := $(call filter-buildable,eps.gz)
2283+
2284+# Make all pstex targets secondary. The pstex_t target requires the pstex
2285+# target, and nothing else really depends on it, so it often gets deleted.
2286+# This avoids that by allowing *all* fig files to be pstex targets, which is
2287+# perfectly valid and causes no problems even if they're going to become eps
2288+# files in the end.
2289+.SECONDARY: $(patsubst %.fig,%.pstex,$(files.fig))
2290+.SECONDARY: $(patsubst %.fig,%._gray_.pstex,$(files.fig))
2291+
2292+# Top level sources that are built by default targets
2293+default_files.tex := $(filter-out %._gray_.tex,$(call filter-default,tex))
2294+default_files.tex.sh := $(call filter-default,tex.sh)
2295+default_files.rst := $(call filter-default,rst)
2296+default_files.gpi := $(call filter-default,gpi)
2297+default_files.dot := $(call filter-default,dot)
2298+default_files.fig := $(call filter-default,fig)
2299+default_files.xvg := $(call filter-default,xvg)
2300+default_files.svg := $(call filter-default,svg)
2301+default_files.png := $(call filter-default,png)
2302+default_files.jpg := $(call filter-default,jpg)
2303+default_files.eps.gz := $(call filter-default,eps.gz)
2304+
2305+# Utility function for creating larger lists of files
2306+# $(call concat-files,suffixes,[prefix])
2307+concat-files = $(foreach s,$1,$($(if $2,$2_,)files.$s))
2308+
2309+# Useful file groupings
2310+all_files_source := $(call concat-files,tex,all)
2311+all_files_scripts := $(call concat-files,tex.sh rst,all)
2312+all_files_graphics := $(call concat-files,fig gpi eps.gz xvg svg png jpg dot,all)
2313+
2314+default_files_source := $(call concat-files,tex,default)
2315+default_files_scripts := $(call concat-files,tex.sh rst,default)
2316+default_files_graphics := $(call concat-files,fig gpi eps.gz xvg svg png jpg dot,default)
2317+
2318+files_source := $(call concat-files,tex)
2319+files_scripts := $(call concat-files,tex.sh rst)
2320+files_graphics := $(call concat-files,fig gpi eps.gz xvg svg png jpg dot)
2321+
2322+# Utility function for obtaining stems
2323+# $(call get-stems,suffix,[prefix])
2324+get-stems = $(sort $($(if $2,$2_,)files.$1:%.$1=%))
2325+
2326+# List of all stems (including ._include_ and ._nobuild_ file stems)
2327+all_stems.tex := $(call get-stems,tex,all)
2328+all_stems.tex.sh := $(call get-stems,tex.sh,all)
2329+all_stems.rst := $(call get-stems,rst,all)
2330+all_stems.fig := $(call get-stems,fig,all)
2331+all_stems.gpi := $(call get-stems,gpi,all)
2332+all_stems.dot := $(call get-stems,dot,all)
2333+all_stems.xvg := $(call get-stems,xvg,all)
2334+all_stems.svg := $(call get-stems,svg,all)
2335+all_stems.png := $(call get-stems,png,all)
2336+all_stems.jpg := $(call get-stems,jpg,all)
2337+all_stems.eps.gz := $(call get-stems,eps.gz,all)
2338+all_stems.eps := $(call get-stems,eps,all)
2339+
2340+# List of all default stems (all default PDF targets):
2341+default_stems.tex := $(call get-stems,tex,default)
2342+default_stems.tex.sh := $(call get-stems,tex.sh,default)
2343+default_stems.rst := $(call get-stems,rst,default)
2344+default_stems.fig := $(call get-stems,fig,default)
2345+default_stems.gpi := $(call get-stems,gpi,default)
2346+default_stems.dot := $(call get-stems,dot,default)
2347+default_stems.xvg := $(call get-stems,xvg,default)
2348+default_stems.svg := $(call get-stems,svg,default)
2349+default_stems.png := $(call get-stems,png,default)
2350+default_stems.jpg := $(call get-stems,jpg,default)
2351+default_stems.eps.gz := $(call get-stems,eps.gz,default)
2352+
2353+# List of all stems (all possible bare PDF targets created here):
2354+stems.tex := $(call get-stems,tex)
2355+stems.tex.sh := $(call get-stems,tex.sh)
2356+stems.rst := $(call get-stems,rst)
2357+stems.fig := $(call get-stems,fig)
2358+stems.gpi := $(call get-stems,gpi)
2359+stems.dot := $(call get-stems,dot)
2360+stems.xvg := $(call get-stems,xvg)
2361+stems.svg := $(call get-stems,svg)
2362+stems.png := $(call get-stems,png)
2363+stems.jpg := $(call get-stems,jpg)
2364+stems.eps.gz := $(call get-stems,eps.gz)
2365+
2366+# Utility function for creating larger lists of stems
2367+# $(call concat-stems,suffixes,[prefix])
2368+concat-stems = $(sort $(foreach s,$1,$($(if $2,$2_,)stems.$s)))
2369+
2370+all_stems_source := $(call concat-stems,tex,all)
2371+all_stems_script := $(call concat-stems,tex.sh rst,all)
2372+all_stems_graphic := $(call concat-stems,fig gpi eps.gz xvg svg png jpg dot,all)
2373+all_stems_gray_graphic := $(addsuffix ._gray_,\
2374+ $(all_stems_graphic) $(all_stems.eps) \
2375+ )
2376+all_stems_gg := $(sort \
2377+ $(all_stems_graphic) $(all_stems_gray_graphic))
2378+all_stems_ss := $(sort $(all_stems_source) $(all_stems_script))
2379+all_stems_gray := $(addsuffix ._gray_,$(all_stems_ss))
2380+all_stems_sg := $(sort $(all_stems_script) $(all_stems_gray))
2381+all_stems_ssg := $(sort $(all_stems_ss) $(all_stems_gray))
2382+
2383+default_stems_source := $(call concat-stems,tex,default)
2384+default_stems_script := $(call concat-stems,tex.sh rst,default)
2385+default_stems_graphic := $(call concat-stems,fig gpi eps.gz xvg svg png jpg dot,default)
2386+default_stems_gray_graphic := $(addsuffix ._gray_,$(default_stems_graphic))
2387+default_stems_gg := $(sort \
2388+ $(default_stems_graphic) $(default_stems_gray_graphic))
2389+default_stems_ss := $(sort \
2390+ $(default_stems_source) $(default_stems_script))
2391+default_stems_gray := $(addsuffix ._gray_,$(default_stems_ss))
2392+default_stems_sg := $(sort $(default_stems_script) $(default_stems_gray))
2393+default_stems_ssg := $(sort $(default_stems_ss) $(default_stems_gray))
2394+
2395+stems_source := $(call concat-stems,tex)
2396+stems_script := $(call concat-stems,tex.sh rst)
2397+stems_graphic := $(call concat-stems,fig gpi eps.gz xvg svg png jpg dot)
2398+stems_gray_graphic := $(addsuffix ._gray_,\
2399+ $(stems_graphic) $(all_stems.eps))
2400+stems_gg := $(sort $(stems_graphic) $(stems_gray_graphic))
2401+stems_ss := $(sort $(stems_source) $(stems_script))
2402+stems_gray := $(addsuffix ._gray_,$(stems_ss))
2403+stems_sg := $(sort $(stems_script) $(stems_gray))
2404+stems_ssg := $(sort $(stems_ss) $(stems_gray))
2405+
2406+# Calculate names that can generate the need for an include file. We can't
2407+# really do this with patterns because it's too easy to screw up, so we create
2408+# an exhaustive list.
2409+allowed_source_suffixes := \
2410+ pdf \
2411+ ps \
2412+ dvi \
2413+ ind \
2414+ nls \
2415+ bbl \
2416+ aux \
2417+ aux.make \
2418+ d \
2419+ tex \
2420+ auxbbl.make \
2421+ _graphics \
2422+ _show
2423+allowed_source_patterns := $(addprefix %.,$(allowed_source_suffixes))
2424+
2425+allowed_graphic_suffixes := \
2426+ eps \
2427+ gpihead.make \
2428+ gpi.d
2429+allowed_graphic_patterns := $(addprefix %.,$(allowed_graphic_suffixes))
2430+
2431+# All targets allowed to build documents
2432+allowed_source_targets := \
2433+ $(foreach suff,$(allowed_source_suffixes),\
2434+ $(addsuffix .$(suff),$(stems_ssg)))
2435+
2436+# All targets allowed to build graphics
2437+allowed_graphic_targets := \
2438+ $(foreach suff,$(allowed_graphic_suffixes),\
2439+ $(addsuffix .$(suff),$(stems_gg)))
2440+
2441+# All targets that build multiple documents (like 'all')
2442+allowed_batch_source_targets := \
2443+ all \
2444+ all-pdf \
2445+ all-ps \
2446+ all-dvi \
2447+ all-bbl \
2448+ all-ind \
2449+ all-gls \
2450+ all-nls \
2451+ show
2452+
2453+# All targets that build multiple graphics (independent of document)
2454+allowed_batch_graphic_targets := \
2455+ all-graphics \
2456+ all-pstex \
2457+ all-dot2tex \
2458+ all-gray-pstex \
2459+ show-graphics
2460+
2461+# Now we figure out which stuff is available as a make target for THIS RUN.
2462+real_goals := $(call get-default,$(filter-out _includes,$(MAKECMDGOALS)),\
2463+ all)
2464+
2465+specified_source_targets := $(strip \
2466+ $(filter $(allowed_source_targets) $(stems_ssg),$(real_goals)) \
2467+ )
2468+
2469+specified_batch_source_targets := $(strip \
2470+ $(filter $(allowed_batch_source_targets),$(real_goals)) \
2471+ )
2472+
2473+specified_graphic_targets := $(strip \
2474+ $(filter $(allowed_graphic_targets),$(real_goals)) \
2475+ )
2476+
2477+specified_batch_graphic_targets := $(strip \
2478+ $(filter $(allowed_batch_graphic_targets),$(real_goals)) \
2479+ )
2480+
2481+specified_gpi_targets := $(patsubst %.gpi,%.eps,\
2482+ $(filter $(patsubst %.eps,%.gpi,$(specified_graphic_targets)),\
2483+ $(all_files.gpi)) \
2484+ )
2485+
2486+# Determine which .d files need including from the information gained above.
2487+# This is done by first checking whether a batch target exists. If it does,
2488+# then all *default* stems are used to create possible includes (nobuild need
2489+# not apply for batch status). If no batch targets exist, then the individual
2490+# targets are considered and appropriate includes are taken from them.
2491+source_stems_to_include := \
2492+ $(sort\
2493+ $(if $(specified_batch_source_targets),\
2494+ $(default_stems_ss),\
2495+ $(foreach t,$(specified_source_targets),\
2496+ $(foreach p,$(allowed_source_patterns),\
2497+ $(patsubst $p,%,$(filter $p $(stems_ssg),$t)) \
2498+ )) \
2499+ ))
2500+
2501+# Determine which .gpi.d files are needed using the above information. We
2502+# first check whether a batch target is specified, then check individual
2503+# graphics that may have been specified.
2504+graphic_stems_to_include := \
2505+ $(sort\
2506+ $(if $(specified_batch_graphic_targets),\
2507+ $(default_stems.gpi),\
2508+ $(foreach t,$(specified_gpi_targets),\
2509+ $(foreach p,$(allowed_graphic_patterns),\
2510+ $(patsubst $p,%,$(filter $p,$t)) \
2511+ )) \
2512+ ))
2513+
2514+# All dependencies for the 'all' targets
2515+all_pdf_targets := $(addsuffix .pdf,$(stems_ssg))
2516+all_ps_targets := $(addsuffix .ps,$(stems_ssg))
2517+all_dvi_targets := $(addsuffix .dvi,$(stems_ssg))
2518+all_tex_targets := $(addsuffix .tex,$(stems_sg))
2519+all_d_targets := $(addsuffix .d,$(stems_ssg))
2520+all_graphics_targets := $(addsuffix .eps,$(stems_gg))
2521+all_pstex_targets := $(addsuffix .pstex_t,$(stems.fig))
2522+all_gray_pstex_targets := $(addsuffix ._gray_.pstex_t,$(stems.fig))
2523+all_dot2tex_targets := $(addsuffix .dot_t,$(stems.dot))
2524+
2525+all_known_graphics := $(sort $(all_graphics_targets) $(wildcard *.eps))
2526+
2527+default_pdf_targets := $(addsuffix .pdf,$(default_stems_ss))
2528+default_ps_targets := $(addsuffix .ps,$(default_stems_ss))
2529+default_dvi_targets := $(addsuffix .dvi,$(default_stems_ss))
2530+
2531+# Extensions generated by LaTeX invocation that can be removed when complete
2532+rm_ext := \
2533+ log *.log aux dvi ps pdf blg bbl out nav snm toc lof lot lol pfg \
2534+ fls vrb idx ind ilg glg glo gls lox nls nlo nlg brf mtc maf
2535+backup_patterns := *~ *.bak *.backup body.tmp head.tmp
2536+
2537+graph_stem := _graph
2538+
2539+# All LaTeX-generated files that can be safely removed
2540+
2541+rm_tex := \
2542+ $(foreach e,$(rm_ext),$(addsuffix .$e,$(all_stems_source))) \
2543+ $(foreach e,$(rm_ext) tex,$(addsuffix .$e,$(all_stems_sg))) \
2544+ $(addsuffix .log,$(all_ps_targets) $(all_pdf_targets)) \
2545+ $(addsuffix .*.log,$(stems_graphic))
2546+
2547+# These are the files that will affect .gpi transformation for all .gpi files.
2548+#
2549+# Use only the first one found. Backward compatible values are at the end.
2550+# Note that we use foreach, even though wildcard also returns a list, to ensure
2551+# that the order in the uppercase variables is preserved. Directory listings
2552+# provide no such guarantee, so we avoid relying on them.
2553+gpi_sed := $(strip \
2554+ $(firstword $(foreach f,$(GNUPLOT_SED),$(wildcard $f))))
2555+gpi_global := $(strip \
2556+ $(firstword $(foreach f,$(GNUPLOT_GLOBAL),$(wildcard $f))))
2557+
2558+#
2559+# Functions used in generating output
2560+#
2561+
2562+# Outputs all source dependencies to stdout. The first argument is the file to
2563+# be parsed, the second is a list of files that will show up as dependencies in
2564+# the new .d file created here.
2565+#
2566+# NOTE: BSD sed does not understand \|, so we have to do something more
2567+# clunky to extract suitable extensions.
2568+#
2569+# Also, we do a little bit of funny rewriting up front (TARGETS=) to make sure
2570+# that we can properly backslash-escape spaces in file names (e.g, on Cygwin
2571+# for tex distributions that have "Program Files" in their name).
2572+#
2573+# $(call get-inputs,<parsed file>,<target files>)
2574+define get-inputs
2575+$(SED) \
2576+-e '/^INPUT/!d' \
2577+-e 's!^INPUT \(\./\)\{0,1\}!TARGETS=!' \
2578+-e 's/[[:space:]]/\\ /g' \
2579+-e 's/^TARGETS=/$2: /' \
2580+-e '/\.tex$$/p' \
2581+-e '/\.cls$$/p' \
2582+-e '/\.sty$$/p' \
2583+-e '/\.pstex_t$$/p' \
2584+-e '/\.dot_t$$/p' \
2585+-e 'd' \
2586+$1 | $(SORT) | $(UNIQ)
2587+endef
2588+
2589+# Outputs all of the graphical dependencies to stdout. The first argument is
2590+# the stem of the source file being built, the second is a list of suffixes
2591+# that will show up as dependencies in the generated .d file.
2592+#
2593+# Note that we try to escape spaces in filenames where possible. We have to do
2594+# it with three backslashes so that as the name percolates through the makefile
2595+# it eventually ends up with the proper escaping when the build rule is found.
2596+# Ugly, but it appears to work. Note that graphicx doesn't allow filenames
2597+# with spaces, so this could in many ways be moot unless you're using something
2598+# like grffile.
2599+#
2600+# $(call get-graphics,<parsed file>,<target files>)
2601+define get-graphics
2602+$(SED) \
2603+-e '/^File:/!d' \
2604+-e 'N' \
2605+-e 's/\n//g' \
2606+-e '/Graphic file/!d' \
2607+-e 's/^File: //' \
2608+-e 's/ Graphic.*$$//' \
2609+-e '/^\(.*\)\(\.[^.]*\)$$/{' \
2610+-e 's//TARGETS=\1\2/' \
2611+-e 's/[[:space:]]/\\\\\\&/g' \
2612+-e 's/^TARGETS=/$2: /' \
2613+-e 'p' \
2614+-e 's/[^:]*: \(.*\)\(\.[^.]*\)$$/-include \1.gpi.d/' \
2615+-e 'p' \
2616+-e 'd' \
2617+-e '}' \
2618+$1 | $(SORT) | $(UNIQ)
2619+endef
2620+
2621+# Checks for build failure due to pstex inclusion, and gives instructions.
2622+#
2623+# $(call die-on-pstexs,<parsed file>)
2624+define die-on-pstexs
2625+if $(EGREP) -q '^! LaTeX Error: File .*\.pstex.* not found' $1; then \
2626+ $(ECHO) "$(C_ERROR)Missing pstex_t file(s)$(C_RESET)"; \
2627+ $(ECHO) "$(C_ERROR)Please run$(C_RESET)"; \
2628+ $(ECHO) "$(C_ERROR) make all-pstex$(C_RESET)"; \
2629+ $(ECHO) "$(C_ERROR)before proceeding.$(C_RESET)"; \
2630+ exit 1; \
2631+fi
2632+endef
2633+
2634+# Checks for build failure due to dot2tex, and gives instructions.
2635+#
2636+# $(call die-on-dot2tex,<parsed file>)
2637+define die-on-dot2tex
2638+if $(EGREP) -q '^! LaTeX Error: File .*\.dot_t.* not found' $1; then \
2639+ $(ECHO) "$(C_ERROR)Missing dot_t file(s)$(C_RESET)"; \
2640+ $(ECHO) "$(C_ERROR)Please run$(C_RESET)"; \
2641+ $(ECHO) "$(C_ERROR) make all-dot2tex$(C_RESET)"; \
2642+ $(ECHO) "$(C_ERROR)before proceeding.$(C_RESET)"; \
2643+ exit 1; \
2644+fi
2645+endef
2646+
2647+# Outputs all index files to stdout. Arg 1 is the source file stem, arg 2 is
2648+# the list of targets for the discovered dependency.
2649+#
2650+# $(call get-log-index,<log file stem>,<target files>)
2651+define get-log-index
2652+$(SED) \
2653+-e 's/^No file \(.*\.ind\)\.$$/TARGETS=\1/' \
2654+-e 's/^No file \(.*\.[gn]ls\)\.$$/TARGETS=\1/' \
2655+-e 's/[[:space:]]/\\&/g' \
2656+-e '/^TARGETS=/{' \
2657+-e ' h' \
2658+-e ' s/^TARGETS=/$2: /p' \
2659+-e ' g' \
2660+-e ' s/^TARGETS=\(.*\)/\1: $1.tex/p' \
2661+-e '}' \
2662+-e 'd' \
2663+'$1.log' | $(SORT) | $(UNIQ)
2664+endef
2665+
2666+
2667+# Outputs all bibliography files to stdout. Arg 1 is the source stem, arg 2 is
2668+# a list of targets for each dependency found.
2669+#
2670+# The script kills all lines that do not contain bibdata. Remaining lines have
2671+# the \bibdata macro and delimiters removed to create a dependency list. A
2672+# trailing comma is added, then all adjacent commas are collapsed into a single
2673+# comma. Then commas are replaced with the string .bib[space], and the
2674+# trailing space is killed off. Finally, all filename spaces are escaped.
2675+# This produces a list of space-delimited .bib filenames, which is what the
2676+# make dep file expects to see.
2677+#
2678+# $(call get-bibs,<aux file>,<targets>)
2679+define get-bibs
2680+$(SED) \
2681+-e '/^\\bibdata/!d' \
2682+-e 's/\\bibdata{\([^}]*\)}/\1,/' \
2683+-e 's/,\{2,\}/,/g' \
2684+-e 's/[[:space:]]/\\&/g' \
2685+-e 's/,/.bib /g' \
2686+-e 's/ \{1,\}$$//' \
2687+$1 | $(XARGS) $(KPSEWHICH) | \
2688+$(SED) \
2689+-e 's/^/$2: /' | \
2690+\$(SORT) | $(UNIQ)
2691+endef
2692+
2693+# Makes a an aux file that only has stuff relevant to the dvi in it
2694+# $(call make-auxdvi-file,<flattened-aux>,<new-aux>)
2695+define make-auxdvi-file
2696+$(SED) \
2697+-e '/^\\newlabel/!d' \
2698+$1 > $2
2699+endef
2700+
2701+# Makes an aux file that only has stuff relevant to the bbl in it
2702+# $(call make-auxbbl-file,<flattened-aux>,<new-aux>)
2703+define make-auxbbl-file
2704+$(SED) \
2705+-e '/^\\newlabel/d' \
2706+$1 > $2
2707+endef
2708+
2709+# Makes a .gpi.d file from a .gpi file
2710+# $(call make-gpi-d,<.gpi>,<.gpi.d>)
2711+define make-gpi-d
2712+$(ECHO) '# vim: ft=make' > $2; \
2713+$(ECHO) 'ifndef INCLUDED_$(call cleanse-filename,$2)' >> $2; \
2714+$(ECHO) 'INCLUDED_$(call cleanse-filename,$2) = 1' >> $2; \
2715+$(call get-gpi-deps,$1,$(addprefix $(2:%.gpi.d=%).,eps gpi.d)) >> $2; \
2716+$(ECHO) 'endif' >> $2;
2717+endef
2718+
2719+# Parse .gpi files for data and loaded dependencies, output to stdout
2720+#
2721+# The sed script here tries to be clever about obtaining valid
2722+# filenames from the gpi file. It assumes that the plot command starts its own
2723+# line, which is not too difficult a constraint to satisfy.
2724+#
2725+# This command script also generates 'include' directives for every 'load'
2726+# command in the .gpi file. The load command must appear on a line by itself
2727+# and the file it loads must have the suffix .gpi. If you don't want it to be
2728+# compiled when running make graphics, then give it a suffix of ._include_.gpi.
2729+#
2730+# $(call get-gpi-deps,<gpi file>,<targets>)
2731+define get-gpi-deps
2732+$(SED) \
2733+-e '/^[[:space:]]*s\{0,1\}plot/,/[^\\]$$/{' \
2734+-e ' H' \
2735+-e ' /[^\\]$$/{' \
2736+-e ' s/.*//' \
2737+-e ' x' \
2738+-e ' s/\\\{0,1\}\n//g' \
2739+-e ' s/^[[:space:]]*s\{0,1\}plot[[:space:]]*\(\[[^]]*\][[:space:]]*\)*/,/' \
2740+-e ' s/[[:space:]]*\(['\''"][^'\''"]*['\''"]\)\{0,1\}[^,]*/\1/g' \
2741+-e ' s/,['\''"]-\{0,1\}['\''"]//g' \
2742+-e ' s/[,'\''"]\{1,\}/ /g' \
2743+-e ' s!.*!$2: &!' \
2744+-e ' p' \
2745+-e ' }' \
2746+-e ' d' \
2747+-e '}' \
2748+-e 's/^[[:space:]]*load[[:space:]]*['\''"]\([^'\''"]*\.gpi\)['\''"].*$$/-include \1.d/p' \
2749+-e 'd' \
2750+$1
2751+endef
2752+
2753+# Colorizes real, honest-to-goodness LaTeX errors that can't be overcome with
2754+# recompilation.
2755+#
2756+# Note that we only ignore file not found errors for things that we know how to
2757+# build, like graphics files.
2758+#
2759+# $(call colorize-latex-errors,<log file>)
2760+define colorize-latex-errors
2761+$(SED) \
2762+-e '/^! LaTeX Error: File .*eps'"'"' not found\.$$/d' \
2763+-e '/^! LaTeX Error: Cannot determine size/d' \
2764+-e '/^! /,/^$$/{' \
2765+-e ' H' \
2766+-e ' /^$$/{' \
2767+-e ' x' \
2768+-e ' s/^.*$$/$(C_ERROR)&$(C_RESET)/' \
2769+-e ' p' \
2770+-e ' }' \
2771+-e '}' \
2772+-e 'd' \
2773+$1
2774+endef
2775+
2776+# Colorize Makeindex errors
2777+define colorize-makeindex-errors
2778+$(SED) \
2779+-e '/^!! /{' \
2780+-e ' N' \
2781+-e ' s/^.*$$/$(C_ERROR)&$(C_RESET)/' \
2782+-e ' p' \
2783+-e '}' \
2784+-e 'd' \
2785+$1
2786+endef
2787+
2788+# Colorize GNUplot errors
2789+#
2790+# $(call colorize-gnuplot-errors,<log file>)
2791+define colorize-gnuplot-errors
2792+$(SED) \
2793+-e '/^gnuplot>/,/^$$/{' \
2794+-e ' s/^gnuplot.*/$(C_ERROR)&/' \
2795+-e ' s/^$$/$(C_RESET)/' \
2796+-e ' p' \
2797+-e '}' \
2798+-e 'd' \
2799+$1
2800+endef
2801+
2802+# Colorize GraphViz errors
2803+#
2804+# $(call colorize-dot-errors,<log file>)
2805+define colorize-dot-errors
2806+$(SED) \
2807+-e '/^Error:/,/context:/s/.*/$(C_ERROR)&$(C_RESET)/p' \
2808+-e 's/^Warning:.*/$(C_WARNING)&$(C_RESET)/p' \
2809+-e 'd' \
2810+'$1'
2811+endef
2812+
2813+# Get all important .aux files from the top-level .aux file and merges them all
2814+# into a single file, which it outputs to stdout.
2815+#
2816+# $(call flatten-aux,<toplevel aux>,<output file>)
2817+define flatten-aux
2818+$(SED) \
2819+-e '/\\@input{\(.*\)}/{' \
2820+-e 's//\1/' \
2821+-e 's![.:]!\\&!g' \
2822+-e 'h' \
2823+-e 's!.*!\\:\\\\@input{&}:{!' \
2824+-e 'p' \
2825+-e 'x' \
2826+-e 's/\\././g' \
2827+-e 's/.*/r &/p' \
2828+-e 's/.*/d/p' \
2829+-e 's/.*/}/p' \
2830+-e 'd' \
2831+-e '}' \
2832+-e 'd' \
2833+'$1' > "$1.$$$$.sed.make"; \
2834+$(SED) -f "$1.$$$$.sed.make" '$1' > "$1.$$$$.make"; \
2835+$(SED) \
2836+-e '/^\\relax/d' \
2837+-e '/^\\bibcite/d' \
2838+-e 's/^\(\\newlabel{[^}]\{1,\}}\).*/\1/' \
2839+"$1.$$$$.make" | $(SORT) > '$2'; \
2840+$(call remove-temporary-files,$1.$$$$.make $1.$$$$.sed.make)
2841+endef
2842+
2843+# Generate pdf from postscript
2844+#
2845+# Note that we don't just call ps2pdf, since there are so many versions of that
2846+# script on various systems. Instead, we call the postscript interpreter
2847+# directly.
2848+#
2849+# $(call ps2pdf,infile,outfile,[embed fonts])
2850+define ps2pdf
2851+ $(GS) \
2852+ -dSAFER -dCompatibilityLevel=$(PS_COMPATIBILITY) \
2853+ $(if $3,$(PS_EMBED_OPTIONS)) \
2854+ -q -dNOPAUSE -dBATCH \
2855+ -sDEVICE=pdfwrite -sstdout=%stderr \
2856+ '-sOutputFile=$2' \
2857+ -dSAFER -dCompatibilityLevel=$(PS_COMPATIBILITY) \
2858+ $(if $3,$(PS_EMBED_OPTIONS)) \
2859+ -c .setpdfwrite \
2860+ -f '$1'
2861+endef
2862+
2863+# Colorize LaTeX output.
2864+# This uses a neat trick from the Sed & Awk Book from O'Reilly:
2865+# 1) If a line has a single ending paren, delete it to make a blank line (so
2866+# that we catch the first error, which is not always preceded by a blank
2867+# line).
2868+# 2) Ensure that the last line of the file gets appended to the hold buffer,
2869+# and blank it out to trigger end-of-paragraph logic below.
2870+# 3) When encountering a blank line (LaTeX output helpfully breaks output on
2871+# newlines)
2872+# a) swap the hold buffer (containing the paragraph) into the pattern buffer (putting a blank line into the hold buffer),
2873+# b) remove the newline at the beginning (don't ask),
2874+# c) apply any colorizing substitutions necessary to ensure happiness.
2875+# d) get the newline out of the hold buffer and append it
2876+# e) profit! (print)
2877+# 4) Anything not colorized is deleted, unless in verbose mode.
2878+color_tex := \
2879+ $(SED) \
2880+ -e '$${' \
2881+ -e ' /^$$/!{' \
2882+ -e ' H' \
2883+ -e ' s/.*//' \
2884+ -e ' }' \
2885+ -e '}' \
2886+ -e '/^$$/!{' \
2887+ -e ' H' \
2888+ -e ' d' \
2889+ -e '}' \
2890+ -e '/^$$/{' \
2891+ -e ' x' \
2892+ -e ' s/^\n//' \
2893+ -e ' /Output written/{' \
2894+ -e ' s/.*(\([^)]\{1,\}\)).*/Success! Wrote \1/' \
2895+ -e ' s/[[:digit:]]\{1,\}/$(C_PAGES)&$(C_RESET)/g' \
2896+ -e ' s/Success!/$(C_SUCCESS)&$(C_RESET)/g' \
2897+ -e ' b end' \
2898+ -e ' }' \
2899+ -e ' /! *LaTeX Error:.*/{' \
2900+ -e ' s/.*\(! *LaTeX Error:.*\)/$(C_ERROR)\1$(C_RESET)/' \
2901+ -e ' b end' \
2902+ -e ' }' \
2903+ -e ' /.*Warning:.*/{' \
2904+ -e ' s//$(C_WARNING)&$(C_RESET)/' \
2905+ -e ' b end' \
2906+ -e ' }' \
2907+ -e ' /Underfull.*/{' \
2908+ -e ' s/.*\(Underfull.*\)/$(C_UNDERFULL)\1$(C_RESET)/' \
2909+ -e ' b end' \
2910+ -e ' }' \
2911+ -e ' /Overfull.*/{' \
2912+ -e ' s/.*\(Overfull.*\)/$(C_OVERFULL)\1$(C_RESET)/' \
2913+ -e ' b end' \
2914+ -e ' }' \
2915+ $(if $(VERBOSE),,-e ' d') \
2916+ -e ' :end' \
2917+ -e ' G' \
2918+ -e '}' \
2919+
2920+# Colorize BibTeX output.
2921+color_bib := \
2922+ $(SED) \
2923+ -e 's/^Warning--.*/$(C_WARNING)&$(C_RESET)/' -e 't' \
2924+ -e '/---/,/^.[^:]/{' \
2925+ -e ' H' \
2926+ -e ' /^.[^:]/{' \
2927+ -e ' x' \
2928+ -e ' s/\n\(.*\)/$(C_ERROR)\1$(C_RESET)/' \
2929+ -e ' p' \
2930+ -e ' s/.*//' \
2931+ -e ' h' \
2932+ -e ' d' \
2933+ -e ' }' \
2934+ -e ' d' \
2935+ -e '}' \
2936+ -e '/(.*error.*)/s//$(C_ERROR)&$(C_RESET)/' \
2937+ $(if $(VERBOSE),,-e 'd')
2938+
2939+
2940+# Make beamer output big enough to print on a full page. Landscape doesn't
2941+# seem to work correctly.
2942+enlarge_beamer = $(PSNUP) -l -1 -W128mm -H96mm -pletter
2943+
2944+# $(call test-run-again,<source stem>)
2945+test-run-again = $(EGREP) -q '^(.*Rerun .*|No file $1\.[^.]+\.)$$' $1.log
2946+
2947+# This tests whether the dvi target should be run at all, from viewing the log
2948+# file.
2949+# $(call test-log-for-need-to-run,<source stem>)
2950+define test-log-for-need-to-run
2951+$(SED) \
2952+-e '/^No file $(call escape-dots,$1)\.aux\./d' \
2953+$1.log \
2954+| $(EGREP) -q '^(.*Rerun .*|No file $1\.[^.]+\.|LaTeX Warning: File.*)$$'
2955+endef
2956+
2957+# LaTeX invocations
2958+#
2959+# $(call latex,<tex file>,[<extra LaTeX args>])
2960+run-latex = $(LATEX) --interaction=batchmode $(if $2,$2,) $1 > /dev/null
2961+
2962+# $(call latex-color-log,<LaTeX stem>)
2963+latex-color-log = $(color_tex) $1.log
2964+
2965+# $(call run-makeindex,<input>,<output>,<log>,<extra flags>)
2966+define run-makeindex
2967+success=1; \
2968+if ! $(MAKEINDEX) -q $1 -t $3 -o $2 $4 > /dev/null || $(EGREP) -q '^!!' $3; then \
2969+ $(call colorize-makeindex-errors,$3); \
2970+ success=0; \
2971+fi; \
2972+[ "$$success" = "1" ] && $(sh_true) || $(sh_false);
2973+endef
2974+
2975+# BibTeX invocations
2976+#
2977+# $(call run-bibtex,<tex stem>)
2978+run-bibtex = $(BIBTEX) $1 | $(color_bib)
2979+
2980+
2981+# $(call convert-gpi,<gpi file>,<eps file>,[gray])
2982+define convert-gpi
2983+$(ECHO) 'set terminal postscript enhanced eps' \
2984+$(call get-default,$(strip \
2985+$(firstword \
2986+ $(shell \
2987+ $(SED) \
2988+ -e 's/^\#\#FONTSIZE=\([[:digit:]]\{1,\}\)/\1/p' \
2989+ -e 'd' \
2990+ $1 $(strip $(gpi_global)) \
2991+ ) \
2992+) \
2993+),22) \
2994+$(strip $(if $3,monochrome,$(if \
2995+$(shell $(EGREP) '^\#\#[[:space:]]*GRAY[[:space:]]*$$' $< $(gpi_global)),\
2996+,color))) > $1head.make; \
2997+$(ECHO) 'set output "$2"' >> $1head.make; \
2998+$(if $(gpi_global),$(CAT) $(gpi_global) >> $1head.make;,) \
2999+fnames='$1head.make $1';\
3000+$(if $(gpi_sed),\
3001+ $(SED) -f '$(gpi_sed)' $$fnames > $1.temp.make; \
3002+ fnames=$1.temp.make;,\
3003+) \
3004+success=1; \
3005+if ! $(GNUPLOT) $$fnames 2>$1.log; then \
3006+ $(call colorize-gnuplot-errors,$1.log); \
3007+ success=0; \
3008+fi; \
3009+$(if $(gpi_sed),$(call remove-temporary-files,$1.temp.make);,) \
3010+$(call remove-temporary-files,$1head.make); \
3011+[ "$$success" = "1" ] && $(sh_true) || $(sh_false);
3012+endef
3013+
3014+# Creation of .eps files from .png files
3015+#
3016+# The intermediate step of PNM (using NetPBM) produces much nicer output than
3017+# ImageMagick's "convert" binary. I couldn't get the right combination of
3018+# flags to make it look nice, anyway.
3019+#
3020+# To handle gray scale conversion, we pipe things through ppmtopgm in the
3021+# middle.
3022+#
3023+# $(call convert-png,<png file>,<eps file>)
3024+define convert-png
3025+$(PNGTOPNM) "$1" \
3026+ $(if $3,| $(PPMTOPGM),) \
3027+ | $(PNMTOPS) -noturn \
3028+ > "$2"
3029+endef
3030+
3031+# Creation of .eps files from .jpg files
3032+#
3033+# Thanks to brubakee for this solution.
3034+#
3035+# Uses Postscript level 2 to avoid file size bloat
3036+# $(call convert-jpg,<jpg file>,<eps file>)
3037+define convert-jpg
3038+$(CONVERT) $(if $3,-type Grayscale,) '$1' eps2:'$2'
3039+endef
3040+
3041+# Creation of .eps files from .fig files
3042+# $(call convert-fig,<fig file>,<eps file>,[gray])
3043+convert-fig = $(FIG2DEV) -L eps $(if $3,-N,) $1 $2
3044+
3045+# Creation of .pstex files from .fig files
3046+# $(call convert-fig-pstex,<fig file>,<pstex file>)
3047+convert-fig-pstex = $(FIG2DEV) -L pstex $1 $2 > /dev/null 2>&1
3048+
3049+# Creation of .pstex_t files from .fig files
3050+# $(call convert-fig-pstex-t,<fig file>,<pstex file>,<pstex_t file>)
3051+convert-fig-pstex-t = $(FIG2DEV) -L pstex_t -p $3 $1 $2 > /dev/null 2>&1
3052+
3053+# Creation of .dot_t files from .dot files
3054+# #(call convert-dot-tex,<dot file>,<dot_t file>)
3055+convert-dot-tex = $(DOT2TEX) '$1' > '$2'
3056+
3057+# Creation of .tex files from .rst files
3058+# TODO: Fix paper size so that it can be specified in the file itself
3059+# $(call convert-rst,<rst file>,<tex file>)
3060+rst_style_file=$(wildcard _rststyle_._include_.tex)
3061+define convert-rst
3062+$(RST2LATEX) \
3063+ --documentoptions=letterpaper \
3064+ $(if $(rst_style_file),--stylesheet=$(rst_style_file),) \
3065+ $1 $2
3066+endef
3067+
3068+# Converts svg files into .eps files
3069+#
3070+# $(call convert-svg,<svg file>,<eps file>,[gray])
3071+convert-svg = $(INKSCAPE) --export-eps='$2' '$1'
3072+
3073+# Converts xvg files into .eps files
3074+#
3075+# $(call convert-xvg,<xvg file>,<eps file>,[gray])
3076+convert-xvg = $(XMGRACE) '$1' -printfile - -hardcopy -hdevice EPS $(if $3,| $(call kill-ps-color)) > '$2'
3077+
3078+# Converts .eps.gz files into .eps files
3079+#
3080+# $(call convert-epsgz,<eps.gz file>,<eps file>,[gray])
3081+convert-epsgz = $(GUNZIP) -c '$1' $(if $3,| $(call kill-ps-color)) > '$2'
3082+
3083+# Converts .eps files into .eps files (usually a no-op, but can make grayscale)
3084+#
3085+# $(call convert-eps,<in file>,<out file>,[gray])
3086+convert-eps = $(if $3,$(call kill-ps-color) $1 > $2)
3087+
3088+# The name of the file containing special postscript commands for grayscale
3089+gray_eps_file := gray.eps.make
3090+
3091+# Changes sethsbcolor and setrgbcolor calls in postscript to always produce
3092+# grayscale. In general, this is accomplished by writing new versions of those
3093+# functions into the user dictionary space, which is looked up before the
3094+# global or system dictionaries (userdict is one of the permanent dictionaries
3095+# in postscript and is not read-only like systemdict).
3096+#
3097+# For setrgbcolor, the weighted average of the triple is computed and the
3098+# triple is replaced with three copies of that average before the original
3099+# procedure is called: .299R + .587G + .114B
3100+#
3101+# For sethsbcolor, the color is first converted to RGB, then to grayscale by
3102+# the new setrgbcolor operator as described above. Why is this done?
3103+# Because simply using the value component will tend to make pure colors
3104+# white, a very undesirable thing. Pure blue should not translate to white,
3105+# but to some level of gray. Conversion to RGB does the right thing. It's
3106+# messy, but it works.
3107+#
3108+# From
3109+# http://en.wikipedia.org/wiki/HSV_color_space#Transformation_from_HSV_to_RGB,
3110+# HSB = HSV (Value = Brightness), and the formula used to convert to RGB is
3111+# as follows:
3112+#
3113+# Hi = int(floor(6 * H)) mod 6
3114+# f = 6 * H - Hi
3115+# p = V(1-S)
3116+# q = V(1-fS)
3117+# t = V(1-(1-f)S)
3118+# if Hi = 0: R G B <-- V t p
3119+# if Hi = 1: R G B <-- q V p
3120+# if Hi = 2: R G B <-- p V t
3121+# if Hi = 3: R G B <-- p q V
3122+# if Hi = 4: R G B <-- t p V
3123+# if Hi = 5: R G B <-- V p q
3124+#
3125+# The messy stack-based implementation is below
3126+# $(call create-gray-eps-file,filename)
3127+define create-gray-eps-file
3128+$(ECHO) -n -e '\
3129+/OLDRGB /setrgbcolor load def\n\
3130+/setrgbcolor {\n\
3131+ .114 mul exch\n\
3132+ .587 mul add exch\n\
3133+ .299 mul add\n\
3134+ dup dup\n\
3135+ OLDRGB\n\
3136+} bind def\n\
3137+/OLDHSB /sethsbcolor load def\n\
3138+/sethsbcolor {\n\
3139+ 2 index % H V S H\n\
3140+ 6 mul floor cvi 6 mod % Hi V S H\n\
3141+ 3 index % H Hi V S H\n\
3142+ 6 mul % 6H Hi V S H\n\
3143+ 1 index % Hi 6H Hi V S H\n\
3144+ sub % f Hi V S H\n\
3145+ 2 index 1 % 1 V f Hi V S H\n\
3146+ 4 index % S 1 V f Hi V S H\n\
3147+ sub mul % p f Hi V S H\n\
3148+ 3 index 1 % 1 V p f Hi V S H\n\
3149+ 6 index % S 1 V p f Hi V S H\n\
3150+ 4 index % f S 1 V p f Hi V S H\n\
3151+ mul sub mul % q p f Hi V S H\n\
3152+ 4 index 1 1 % 1 1 V q p f Hi V S H\n\
3153+ 5 index % f 1 1 V q p f Hi V S H\n\
3154+ sub % (1-f) 1 V q p f Hi V S H\n\
3155+ 8 index % S (1-f) 1 V q p f Hi V S H\n\
3156+ mul sub mul % t q p f Hi V S H\n\
3157+ 4 -1 roll pop % t q p Hi V S H\n\
3158+ 7 -2 roll pop pop % t q p Hi V\n\
3159+ 5 -2 roll % Hi V t q p\n\
3160+ dup 0 eq\n\
3161+ {1 index 3 index 6 index}\n\
3162+ {\n\
3163+ dup 1 eq\n\
3164+ {3 index 2 index 6 index}\n\
3165+ {\n\
3166+ dup 2 eq\n\
3167+ {4 index 2 index 4 index}\n\
3168+ {\n\
3169+ dup 3 eq\n\
3170+ {4 index 4 index 3 index}\n\
3171+ {\n\
3172+ dup 4 eq\n\
3173+ {2 index 5 index 3 index}\n\
3174+ {\n\
3175+ dup 5 eq\n\
3176+ {1 index 5 index 5 index}\n\
3177+ {0 0 0}\n\
3178+ ifelse\n\
3179+ }\n\
3180+ ifelse\n\
3181+ }\n\
3182+ ifelse\n\
3183+ }\n\
3184+ ifelse\n\
3185+ }\n\
3186+ ifelse\n\
3187+ }\n\
3188+ ifelse % B G R Hi V t q p\n\
3189+ setrgbcolor\n\
3190+ 5 {pop} repeat\n\
3191+} bind def\n'\
3192+> $1
3193+endef
3194+
3195+# This actually inserts the color-killing code into a postscript file
3196+# $(call kill-ps-color)
3197+define kill-ps-color
3198+$(SED) -e '/%%EndComments/r $(gray_eps_file)'
3199+endef
3200+
3201+# Converts graphviz .dot files into .eps files
3202+# Grayscale is not directly supported by dot, so we pipe it through fig2dev in
3203+# that case.
3204+# $(call convert-dot,<dot file>,<eps file>,<log file>,[gray])
3205+define convert-dot
3206+$(DOT) -Tps '$1' 2>'$3' $(if $4,| $(call kill-ps-color)) > $2; \
3207+$(call colorize-dot-errors,$3)
3208+endef
3209+
3210+# Convert DVI to Postscript
3211+# $(call make-ps,<dvi file>,<ps file>,<log file>,[<paper size>])
3212+make-ps = \
3213+ $(DVIPS) -o '$2' $(if $(filter-out BEAMER,$4),-t$(firstword $4),) '$1' \
3214+ $(if $(filter BEAMER,$4),| $(enlarge_beamer)) > $3 2>&1
3215+
3216+# Convert Postscript to PDF
3217+# $(call make-pdf,<ps file>,<pdf file>,<log file>,<embed file>)
3218+make-pdf = \
3219+ $(call ps2pdf,$1,$2,$(filter 1,$(shell $(CAT) '$4'))) > '$3' 2>&1
3220+
3221+# Display information about what is being done
3222+# $(call echo-build,<output file>,[<run number>])
3223+echo-build = $(ECHO) "$(C_BUILD)= $1 --> $2$(if $3, ($3),) =$(C_RESET)"
3224+echo-graphic = $(ECHO) "$(C_GRAPHIC)= $1 --> $2 =$(C_RESET)"
3225+echo-dep = $(ECHO) "$(C_DEP)= $1 --> $2 =$(C_RESET)"
3226+
3227+# Display a list of something
3228+# $(call echo-list,<values>)
3229+echo-list = for x in $1; do $(ECHO) "$$x"; done
3230+
3231+#
3232+# DEFAULT TARGET
3233+#
3234+
3235+.PHONY: all
3236+all: $(default_pdf_targets) ;
3237+
3238+.PHONY: all-pdf
3239+all-pdf: $(default_pdf_targets) ;
3240+
3241+.PHONY: all-ps
3242+all-ps: $(default_ps_targets) ;
3243+
3244+.PHONY: all-dvi
3245+all-dvi: $(default_dvi_targets) ;
3246+
3247+#
3248+# VIEWING TARGET
3249+#
3250+.PHONY: show
3251+show: all
3252+ $(QUIET)for x in $(default_pdf_targets); do \
3253+ [ -e "$$x" ] && $(VIEW_PDF) $$x & \
3254+ done
3255+
3256+#
3257+# INCLUDES
3258+#
3259+source_includes := $(addsuffix .d,$(source_stems_to_include))
3260+graphic_includes := $(addsuffix .gpi.d,$(graphic_stems_to_include))
3261+
3262+# Include only the dependencies used
3263+ifneq "" "$(source_includes)"
3264+include $(source_includes)$(call include-message,$(source_includes))
3265+endif
3266+ifneq "" "$(graphic_includes)"
3267+include $(graphic_includes)$(call include-message,$(graphic_includes))
3268+endif
3269+
3270+#
3271+# MAIN TARGETS
3272+#
3273+
3274+%: %.pdf ;
3275+
3276+# This builds and displays the wanted file.
3277+.PHONY: $(addsuffix ._show,$(stems_ssg))
3278+%._show: %.pdf
3279+ $(QUIET)$(VIEW_PDF) $< &
3280+
3281+.SECONDARY: $(all_pdf_targets)
3282+%.pdf: %.ps %.embed.make
3283+ $(QUIET)$(call echo-build,$<,$@)
3284+ $(QUIET)$(call make-pdf,$<,$@.temp,$@.log,$*.embed.make); \
3285+ if [ x"$$?" = x"0" ]; then \
3286+ $(if $(VERBOSE),$(CAT) $@.log,:); \
3287+ $(RM) -f '$@'; \
3288+ $(MV) '$@.temp' '$@'; \
3289+ $(TOUCH) '$@'; \
3290+ $(call copy-with-logging,$@,$(BINARY_TARGET_DIR)); \
3291+ else \
3292+ $(CAT) $@.log; \
3293+ $(call remove-temporary-files,'$@.temp'); \
3294+ $(sh_false); \
3295+ fi
3296+
3297+.SECONDARY: $(all_ps_targets)
3298+%.ps: %.dvi %.paper.make
3299+ $(QUIET)$(call echo-build,$<,$@)
3300+ $(QUIET)$(call make-ps,$<,$@.temp,$@.log,\
3301+ $(firstword $(shell $(CAT) $*.paper.make))); \
3302+ if [ x"$$?" = x"0" ]; then \
3303+ $(if $(VERBOSE),$(CAT) $@.log,:); \
3304+ $(RM) -f '$@'; \
3305+ $(MV) '$@.temp' '$@'; \
3306+ $(TOUCH) '$@'; \
3307+ $(call copy-with-logging,$@,$(BINARY_TARGET_DIR)); \
3308+ else \
3309+ $(CAT) $@.log; \
3310+ $(call remove-temporary-files,'$@.temp'); \
3311+ $(sh_false); \
3312+ fi
3313+
3314+# Build the final dvi file. This is a very tricky rule because of the way that
3315+# latex runs multiple times, needs graphics after the first run (or maybe
3316+# already has them), and relies on bibliographies or indices that may not exist.
3317+#
3318+# Check the log for fatal errors. If they exist, colorize and bail.
3319+#
3320+# Create the .auxdvi.cookie file. (Needed for next time if not present)
3321+#
3322+# If any of the following are true, we must rebuild at least one time:
3323+#
3324+# * the .bbl was recently rebuilt
3325+#
3326+# check a cookie, then delete it
3327+#
3328+# * any of several output files was created or changed:
3329+#
3330+# check $*.run.cookie, then delete it
3331+#
3332+# * the .aux file changed in a way that necessitates attention
3333+#
3334+# Note that if the .auxdvi.make file doesn't exist, this means
3335+# that we are doing a clean build, so it doesn't figure into the
3336+# test for running again.
3337+#
3338+# compare against .auxdvi.make
3339+#
3340+# move if different, remove if not
3341+#
3342+# * the .log file has errors or warnings requiring at least one more run
3343+#
3344+# We use a loop over a single item to simplify the process of breaking
3345+# out when we find one of the conditions to be true.
3346+#
3347+# If we do NOT need to run latex here, then we move the $@.1st.make file
3348+# over to $@ because the .dvi file has already been built by the first
3349+# dependency run and is valid.
3350+#
3351+# If we do, we delete that cookie file and do the normal multiple-runs
3352+# routine.
3353+#
3354+.SECONDARY: $(all_dvi_targets)
3355+%.dvi: %.bbl %.aux
3356+ $(QUIET)\
3357+ fatal=`$(call colorize-latex-errors,$*.log)`; \
3358+ if [ x"$$fatal" != x"" ]; then \
3359+ $(ECHO) "$$fatal"; \
3360+ exit 1; \
3361+ fi; \
3362+ $(call make-auxdvi-file,$*.aux.make,$*.auxdvi.cookie); \
3363+ run=0; \
3364+ for i in 1; do \
3365+ if $(call test-exists,$*.bbl.cookie); then \
3366+ run=1; \
3367+ break; \
3368+ fi; \
3369+ if $(call test-exists,$*.run.cookie); then \
3370+ run=1; \
3371+ break; \
3372+ fi; \
3373+ if $(call \
3374+ test-exists-and-different,$*.auxdvi.cookie,$*.auxdvi.make);\
3375+ then \
3376+ run=1; \
3377+ break; \
3378+ fi; \
3379+ if $(call test-log-for-need-to-run,$*); then \
3380+ run=1; \
3381+ break; \
3382+ fi; \
3383+ done; \
3384+ $(call remove-temporary-files,$*.bbl.cookie $*.run.cookie); \
3385+ $(MV) $*.auxdvi.cookie $*.auxdvi.make; \
3386+ if [ x"$$run" = x"1" ]; then \
3387+ $(call remove-files,$@.1st.make); \
3388+ for i in 2 3 4 5; do \
3389+ $(if $(findstring 3.79,$(MAKE_VERSION)),\
3390+ $(call echo-build,$*.tex,$@,$$$$i),\
3391+ $(call echo-build,$*.tex,$@,$$i)\
3392+ ); \
3393+ $(call run-latex,$*); \
3394+ $(CP) '$*.log' '$*.'$$i'.log'; \
3395+ $(call test-run-again,$*) || break; \
3396+ done; \
3397+ else \
3398+ $(MV) $@.1st.make $@; \
3399+ fi; \
3400+ $(call copy-with-logging,$@,$(BINARY_TARGET_DIR)); \
3401+ $(call latex-color-log,$*)
3402+
3403+# Build the .bbl file. When dependencies are included, this will (or will
3404+# not!) depend on something.bib, which we detect, acting accordingly. The
3405+# dependency creation also produces the %.auxbbl.make file. BibTeX is a bit
3406+# finicky about what you call the actual files, but we can rest assured that if
3407+# a .auxbbl.make file exists, then the .aux file does, as well. The
3408+# .auxbbl.make file is a cookie indicating whether the .bbl needs to be
3409+# rewritten. It only changes if the .aux file changes in ways relevant to .bbl
3410+# creation.
3411+#
3412+# Note that we do NOT touch the .bbl file if there is no need to
3413+# create/recreate it. We would like to leave existing files alone if they
3414+# don't need to be changed, thus possibly avoiding a rebuild trigger on the
3415+# .dvi side.
3416+%.bbl: %.auxbbl.make
3417+ $(QUIET)\
3418+ $(if $(filter %.bib,$^),\
3419+ $(call echo-build,$(filter %.bib,$?) $*.aux,$@); \
3420+ $(call run-bibtex,$*); \
3421+ $(TOUCH) $@.cookie; \
3422+ )
3423+
3424+# Create the index file - note that we do *not* depend on %.tex here, since
3425+# that unnecessarily restricts the kinds of indices that we can build to those
3426+# with exactly the same stem as the source file. Things like splitidx create
3427+# idx files with other names.
3428+#
3429+# Therefore, we add the .tex dependency in the sourcestem.d file in the call to
3430+# get index file dependencies from the logs.
3431+%.ind: %.idx
3432+ $(QUIET)$(call echo-build,$<,$@)
3433+ $(QUIET)$(call run-makeindex,$<,$@,$*.ilg)
3434+
3435+# Create the glossary file
3436+%.gls: %.glo %.tex
3437+ $(QUIET)$(call echo-build,$<,$@)
3438+ $(QUIET)$(call run-makeindex,$<,$@,$*.glg,-s nomencl.ist)
3439+
3440+# Create the nomenclature file
3441+%.nls: %.nlo %.tex
3442+ $(QUIET)$(call echo-build,$<,$@)
3443+ $(QUIET)$(call run-makeindex,$<,$@,$*.nlg,-s nomencl.ist)
3444+
3445+# SCRIPTED LaTeX TARGETS
3446+#
3447+.SECONDARY: $(all_tex_targets)
3448+%.tex: %.tex.sh
3449+ $(QUIET)$(call echo-build,$<,$@)
3450+ $(QUIET)$(SHELL) $< $@
3451+
3452+%.tex: %.rst $(rst_style_file)
3453+ $(QUIET)$(call echo-build,$<,$@)
3454+ $(QUIET)$(call convert-rst,$<,$@)
3455+
3456+#
3457+# GRAYSCALE LaTeX TARGETS
3458+#
3459+
3460+# Parse %.d to get all of the include files, then run sed to generate new files
3461+# for all of them that depend on _gray.
3462+%._gray_.tex: %.d %.tex
3463+ $(QUIET)$(call echo-build,$^,$@)
3464+ $(QUIET)\
3465+ texstems=`$(SED) \
3466+ -e 's/[^:]*:[[:space:]]*\(.*\)\.tex[[:space:]]*$$/\\1/p' \
3467+ -e 'd' \
3468+ $<`; \
3469+ for f in $$texstems; do \
3470+ $(SED) \
3471+ -e 's/\.eps/._gray_&/' \
3472+ -e 's/\.pstex/._gray_&/' \
3473+ -e 's/\.pstex_t/._gray_&/' \
3474+ -e 's/_include_/&._gray_/g' \
3475+ $$f.tex > $$f._gray_.tex; \
3476+ done;
3477+
3478+#
3479+# GRAPHICS TARGETS
3480+#
3481+.PHONY: all-graphics
3482+all-graphics: $(all_graphics_targets);
3483+
3484+.PHONY: all-pstex all-gray-pstex
3485+all-pstex: $(all_pstex_targets);
3486+all-gray-pstex: $(all_gray_pstex_targets);
3487+
3488+.PHONY: all-dot2tex
3489+all-dot2tex: $(all_dot2tex_targets);
3490+
3491+.PHONY: show-graphics
3492+show-graphics: all-graphics
3493+ $(VIEW_GRAPHICS) $(all_known_graphics)
3494+
3495+$(gray_eps_file):
3496+ $(QUIET)$(call echo-build,$^,$@)
3497+ $(QUIET)$(call create-gray-eps-file,$@)
3498+
3499+%._gray_.eps: %.gpi $(gpi_sed)
3500+ $(QUIET)$(call echo-graphic,$^,$@)
3501+ $(QUIET)$(call convert-gpi,$<,$@,1)
3502+
3503+%._gray_.eps: %.fig
3504+ $(QUIET)$(call echo-graphic,$^,$@)
3505+ $(QUIET)$(call convert-fig,$<,$@,1)
3506+
3507+%._gray_.eps: %.dot $(gray_eps_file)
3508+ $(QUIET)$(call echo-graphic,$^,$@)
3509+ $(QUIET)$(call convert-dot,$<,$@,$<.log,1)
3510+
3511+%._gray_.eps: %.xvg $(gray_eps_file)
3512+ $(QUIET)$(call echo-graphic,$^,$@)
3513+ $(QUIET)$(call convert-xvg,$<,$@,1)
3514+
3515+%._gray_.eps: %.svg $(gray_eps_file)
3516+ $(QUIET)$(call echo-graphic,$^,$@)
3517+ $(QUIET)$(call convert-svg,$<,$@,1)
3518+
3519+%._gray_.eps: %.jpg $(gray_jpg_file)
3520+ $(QUIET)$(call echo-graphic,$^,$@)
3521+ $(QUIET)$(call convert-jpg,$<,$@,1)
3522+
3523+%._gray_.eps: %.png $(gray_eps_file)
3524+ $(QUIET)$(call echo-graphic,$^,$@)
3525+ $(QUIET)$(call convert-png,$<,$@,1)
3526+
3527+%._gray_.eps: %.eps.gz $(gray_eps_file)
3528+ $(QUIET)$(call echo-graphic,$^,$@)
3529+ $(QUIET)$(call convert-epsgz,$<,$@,1)
3530+
3531+%._gray_.eps: %.eps $(gray_eps_file)
3532+ $(QUIET)$(call echo-graphic,$^,$@)
3533+ $(QUIET)$(call convert-eps,$<,$@,1)
3534+
3535+%._gray_.pstex: %.fig
3536+ $(QUIET)$(call echo-graphic,$^,$@)
3537+ $(QUIET)$(call convert-fig-pstex,$<,$@,1)
3538+
3539+%._gray_.pstex_t: %.fig %._gray_.pstex
3540+ $(QUIET)$(call echo-graphic,$^,$@)
3541+ $(QUIET)$(call convert-fig-pstex-t,$<,$@,$*._gray_.pstex,1)
3542+
3543+%.eps: %.gpi $(gpi_sed)
3544+ $(QUIET)$(call echo-graphic,$^,$@)
3545+ $(QUIET)$(call convert-gpi,$<,$@,$(GRAY))
3546+
3547+%.eps: %.fig
3548+ $(QUIET)$(call echo-graphic,$^,$@)
3549+ $(QUIET)$(call convert-fig,$<,$@,$(GRAY))
3550+
3551+%.eps: %.dot $(if $(GRAY),$(gray_eps_file))
3552+ $(QUIET)$(call echo-graphic,$^,$@)
3553+ $(QUIET)$(call convert-dot,$<,$@,$<.log,$(GRAY))
3554+
3555+%.eps: %.xvg $(if $(GRAY),$(gray_eps_file))
3556+ $(QUIET)$(call echo-graphic,$^,$@)
3557+ $(QUIET)$(call convert-xvg,$<,$@,$(GRAY))
3558+
3559+%.eps: %.svg $(if $(GRAY),$(gray_eps_file))
3560+ $(QUIET)$(call echo-graphic,$^,$@)
3561+ $(QUIET)$(call convert-svg,$<,$@,$(GRAY))
3562+
3563+%.eps: %.jpg $(if $(GRAY),$(gray_eps_file))
3564+ $(QUIET)$(call echo-graphic,$^,$@)
3565+ $(QUIET)$(call convert-jpg,$<,$@,$(GRAY))
3566+
3567+%.eps: %.png $(if $(GRAY),$(gray_eps_file))
3568+ $(QUIET)$(call echo-graphic,$^,$@)
3569+ $(QUIET)$(call convert-png,$<,$@,$(GRAY))
3570+
3571+%.eps: %.eps.gz $(if $(GRAY),$(gray_eps_file))
3572+ $(QUIET)$(call echo-graphic,$^,$@)
3573+ $(QUIET)$(call convert-epsgz,$<,$@,$(GRAY))
3574+
3575+%.pstex: %.fig
3576+ $(QUIET)$(call echo-graphic,$^,$@)
3577+ $(QUIET)$(call convert-fig-pstex,$<,$@,$(GRAY))
3578+
3579+%.pstex_t: %.fig %.pstex
3580+ $(QUIET)$(call echo-graphic,$^,$@)
3581+ $(QUIET)$(call convert-fig-pstex-t,$<,$@,$*.pstex,$(GRAY))
3582+
3583+%.dot_t: %.dot
3584+ $(QUIET)$(call echo-graphic,$^,$@)
3585+ $(QUIET)$(call convert-dot-tex,$<,$@)
3586+
3587+#
3588+# DEPENDENCY-RELATED TARGETS.
3589+#
3590+
3591+# Generate all of the information needed to get dependencies
3592+# As a side effect, this creates a .dvi file. We need to be sure to remove it
3593+# if there are errors. Errors can take several forms and all of them are found
3594+# within the log file:
3595+# * There was a LaTeX error
3596+# * A needed file was not found
3597+# * Cross references need adjustment
3598+#
3599+# Behavior:
3600+# This rule is responsible for generating the following:
3601+# %.aux
3602+# %.d
3603+# %.aux.make
3604+# %.dvi.1st.make (the .dvi file, moved)
3605+#
3606+# Steps:
3607+#
3608+# Run latex
3609+# Move .dvi somewhere else (make no judgements about success)
3610+# Flatten the .aux file into another file
3611+# Add source dependencies
3612+# Add graphic dependencies
3613+# Add bib dependencies
3614+#
3615+# Create cookies for various suffixes that may represent files that
3616+# need to be read by LaTeX in order for it to function properly.
3617+#
3618+%.d %.aux %.aux.make %.fls: %.tex
3619+ $(QUIET)$(call echo-build,$<,$*.d $*.dvi,1)
3620+ $(QUIET)\
3621+ $(call run-latex,$<,--recorder) || $(sh_true); \
3622+ $(CP) '$*.log' '$*.1.log'; \
3623+ $(call die-on-pstexs,$*.log); \
3624+ $(call die-on-dot2tex,$*.log); \
3625+ $(MV) $*.dvi $*.dvi.1st.make; \
3626+ $(call flatten-aux,$*.aux,$*.aux.make); \
3627+ $(ECHO) "# vim: ft=make" > $*.d; \
3628+ $(ECHO) ".PHONY: $*._graphics" >> $*.d; \
3629+ $(call get-inputs,$*.fls,$(addprefix $*.,aux aux.make d dvi)) >> $*.d; \
3630+ $(call get-graphics,$*.log,$(addprefix $*.,d dvi _graphics)) >> $*.d; \
3631+ $(call get-log-index,$*,$(addprefix $*.,d aux aux.make)) >> $*.d; \
3632+ $(call get-bibs,$*.aux.make,$(addprefix $*.,bbl aux aux.make)) >> $*.d; \
3633+ for s in toc out lot lof lol nav; do \
3634+ if [ -e "$*.$$s" ]; then \
3635+ if ! $(DIFF) -q $*.$$s $*.$$s.make 2>/dev/null; then \
3636+ $(TOUCH) $*.run.cookie; \
3637+ fi; \
3638+ $(CP) $*.$$s $*.$$s.make; \
3639+ fi; \
3640+ done
3641+
3642+# This is a cookie that is updated if the flattened aux file has changed in a
3643+# way that affects the bibliography generation.
3644+.SECONDARY: $(addsuffix .auxbbl.make,$(stems_ssg))
3645+%.auxbbl.make: %.aux.make
3646+ $(QUIET)\
3647+ $(call make-auxbbl-file,$<,$@.temp); \
3648+ $(call replace-if-different-and-remove,$@.temp,$@)
3649+
3650+# Build a dependency file for .gpi files. These often plot data files that
3651+# also reside in the directory, so if a data file changes, it's nice to know
3652+# about it. This also handles loaded .gpi files, whose filename should have
3653+# _include_. in it.
3654+%._gray_.gpi.d: %.gpi
3655+ $(QUIET)$(call echo-build,$<,$@)
3656+ $(QUIET)$(call make-gpi-d,$<,$@)
3657+
3658+%.gpi.d: %.gpi
3659+ $(QUIET)$(call echo-build,$<,$@)
3660+ $(QUIET)$(call make-gpi-d,$<,$@)
3661+
3662+# Store the paper size for this document -- note that if beamer is used we set
3663+# it to the special BEAMER paper size. We only do this, however, if the
3664+# special comment exists, in which case we enlarge the output with psnup.
3665+#
3666+# The paper size is extracted from a documentclass attribute.
3667+%.paper.make: %.tex
3668+ $(QUIET)$(SED) \
3669+ -e '/\\documentclass/,/}/{' \
3670+ -e ' s/%.*//' \
3671+ -e ' H' \
3672+ -e ' /}/{' \
3673+ -e ' s/.*//' \
3674+ -e ' x' \
3675+ -e ' /\\documentclass/!d' \
3676+ -e ' s/[\n[:space:]]*//g' \
3677+ -e ' s/\([,{[]\)\([[:alnum:]]\{1,\}\)paper\([],}]\)/\1%-\2-%\3/g' \
3678+ -e ' s/\([,{[]\)\(landscape\)\([],}]\)/\1%-\2-%\3/g' \
3679+ -e ' s/^[^%]*%-//' \
3680+ -e ' s/-%[^%]*$$//' \
3681+ -e ' s/-%[^%]%-/ /g' \
3682+ -e ' p' \
3683+ -e ' }' \
3684+ -e ' d' \
3685+ -e '}' \
3686+ -e 'd' \
3687+ $< > $@; \
3688+ $(EGREP) -q '^[^%]*\\documentclass[^{]*{beamer}' $< && \
3689+ (\
3690+ $(EGREP) -q '^%%[[:space:]]*BEAMER[[:space:]]*LARGE$$' $< && \
3691+ $(ECHO) "BEAMER" > $@ || \
3692+ : > $@ \
3693+ ) || $(sh_true)
3694+
3695+# Store embedding instructions for this document using a special comment
3696+%.embed.make: %.tex
3697+ $(QUIET)$(EGREP) '^%%[[:space:]]*NO[[:space:]]*EMBED[[:space:]]*$$' $< \
3698+ && $(ECHO) '' > $@ \
3699+ || $(ECHO) '1' > $@;
3700+
3701+#
3702+# HELPFUL PHONY TARGETS
3703+#
3704+
3705+.PHONY: _all_programs
3706+_all_programs:
3707+ $(QUIET)$(ECHO) "== All External Programs Used =="
3708+ $(QUIET)$(call output-all-programs)
3709+
3710+.PHONY: _check_programs
3711+_check_programs:
3712+ $(QUIET)$(ECHO) "== Checking Makefile Dependencies =="; $(ECHO)
3713+ $(QUIET) \
3714+ $(ECHO) hi; \
3715+ allprogs=`\
3716+ ($(call output-all-programs)) | \
3717+ $(SED) \
3718+ -e 's/^[[:space:]]*//' \
3719+ -e '/^#/d' \
3720+ -e 's/[[:space:]]*#.*//' \
3721+ -e '/^=/s/[[:space:]]/_/g' \
3722+ -e '/^[[:space:]]*$$/d' \
3723+ -e 's/^[^=].*=[[:space:]]*\([^[:space:]]\{1,\}\).*$$/\\1/' \
3724+ `; \
3725+ spaces=' '; \
3726+ for p in $${allprogs}; do \
3727+ case $$p in \
3728+ =*) $(ECHO); $(ECHO) "$$p";; \
3729+ *) \
3730+ $(ECHO) -n "$$p:$$spaces" | $(SED) -e 's/^\(.\{0,20\}\).*$$/\1/'; \
3731+ loc=`$(WHICH) $$p`; \
3732+ if [ x"$$?" = x"0" ]; then \
3733+ $(ECHO) "$(C_SUCCESS)Found:$(C_RESET) $$loc"; \
3734+ else \
3735+ $(ECHO) "$(C_FAILURE)Not Found$(C_RESET)"; \
3736+ fi; \
3737+ ;; \
3738+ esac; \
3739+ done
3740+
3741+.PHONY: _check_gpi_files
3742+_check_gpi_files:
3743+ $(QUIET)$(ECHO) "== Checking all .gpi files for common errors =="; \
3744+ $(ECHO); \
3745+ for f in $(files.gpi); do \
3746+ result=`$(EGREP) '^([^#]*set terminal |set output )' $$f`; \
3747+ $(ECHO) -n "$$f: "; \
3748+ if [ x"$$result" = x"" ]; then \
3749+ $(ECHO) "$(C_SUCCESS)Okay$(C_RESET)"; \
3750+ else \
3751+ $(ECHO) "$(C_FAILURE)Warning: Problematic commands:$(C_RESET)";\
3752+ $(ECHO) "$(C_ERROR)$$result$(C_RESET)"; \
3753+ fi; \
3754+ done; \
3755+ $(ECHO)
3756+
3757+.PHONY: _all_stems
3758+_all_stems:
3759+ $(QUIET)$(ECHO) "== All Stems =="
3760+ $(QUIET)$(call echo-list,$(sort $(all_stems)))
3761+
3762+.PHONY: _includes
3763+_includes:
3764+ $(QUIET)$(ECHO) "== Include Stems =="
3765+ $(QUIET)$(ECHO) "=== Sources ==="
3766+ $(QUIET)$(call echo-list,$(sort $(source_includes)))
3767+ $(QUIET)$(ECHO) "=== Graphics ==="
3768+ $(QUIET)$(call echo-list,$(sort $(graphic_includes)))
3769+
3770+.PHONY: _all_sources
3771+_all_sources:
3772+ $(QUIET)$(ECHO) "== All Sources =="
3773+ $(QUIET)$(call echo-list,$(sort $(all_files.tex)))
3774+
3775+.PHONY: _dependency_graph
3776+_dependency_graph:
3777+ $(QUIET)$(ECHO) "/* LaTeX Dependency Graph */"
3778+ $(QUIET)$(call output-dependency-graph)
3779+
3780+.PHONY: _show_dependency_graph
3781+_show_dependency_graph:
3782+ $(QUIET)$(call output-dependency-graph,$(graph_stem).dot)
3783+ $(QUIET)$(DOT) -Tps -o $(graph_stem).eps $(graph_stem).dot
3784+ $(QUIET)$(VIEW_POSTSCRIPT) $(graph_stem).eps
3785+ $(QUIET)$(call remove-temporary-files,$(graph_stem).*)
3786+
3787+.PHONY: _sources
3788+_sources:
3789+ $(QUIET)$(ECHO) "== Sources =="
3790+ $(QUIET)$(call echo-list,$(sort $(files.tex)))
3791+
3792+.PHONY: _scripts
3793+_scripts:
3794+ $(QUIET)$(ECHO) "== Scripts =="
3795+ $(QUIET)$(call echo-list,$(sort $(files_scripts)))
3796+
3797+.PHONY: _graphic_outputs
3798+_graphic_outputs:
3799+ $(QUIET)$(ECHO) "== Graphic Outputs =="
3800+ $(QUIET)$(call echo-list,$(sort $(all_graphics_targets)))
3801+
3802+.PHONY: _graphic_sources
3803+_graphic_sources:
3804+ $(QUIET)$(ECHO) "== Graphic Sources =="
3805+ $(QUIET)$(call echo-list,$(sort $(files_graphics)))
3806+
3807+.PHONY: _env
3808+_env:
3809+ifdef .VARIABLES
3810+ $(QUIET)$(ECHO) "== MAKE VARIABLES =="
3811+ $(QUIET)$(call echo-list,$(foreach var,$(sort $(.VARIABLES)),'$(var)'))
3812+endif
3813+ $(QUIET)$(ECHO) "== ENVIRONMENT =="
3814+ $(QUIET)$(ENV)
3815+
3816+#
3817+# CLEAN TARGETS
3818+#
3819+# clean-generated is somewhat unique - it relies on the .fls file being
3820+# properly built so that it can determine which of the files was generated, and
3821+# which was not. Expect it to silently fail if the .fls file is missing.
3822+#
3823+# This is used to, e.g., clean up index files that are generated by the LaTeX.
3824+.PHONY: clean-generated
3825+clean-generated:
3826+ $(QUIET)$(call clean-files,$(foreach e,$(addsuffix .fls,$(all_stems_source)),\
3827+ $(shell $(call get-generated-names,$e))))
3828+
3829+.PHONY: clean-deps
3830+clean-deps:
3831+ $(QUIET)$(call clean-files,$(all_d_targets) *.make *.make.temp *.cookie)
3832+
3833+.PHONY: clean-tex
3834+clean-tex: clean-deps
3835+ $(QUIET)$(call clean-files,$(rm_tex))
3836+
3837+.PHONY: clean-graphics
3838+# TODO: This *always* deletes pstex files, even if they were not generated by
3839+# anything.... In other words, if you create a pstex and pstex_t pair by hand
3840+# an drop them in here without the generating fig file, they will be deleted
3841+# and you won't get them back. It's a hack put in here because I'm not sure we
3842+# even want to keep pstex functionality, so my motivation is not terribly high
3843+# for doing it right.
3844+clean-graphics:
3845+ $(QUIET)$(call clean-files,$(all_graphics_targets) *.gpi.d *.pstex *.pstex_t *.dot_t)
3846+
3847+.PHONY: clean-backups
3848+clean-backups:
3849+ $(QUIET)$(call clean-files,$(backup_patterns) *.temp)
3850+
3851+.PHONY: clean-auxiliary
3852+clean-auxiliary:
3853+ $(QUIET)$(call clean-files,$(graph_stem).*)
3854+
3855+.PHONY: clean-nographics
3856+clean-nographics: clean-tex clean-deps clean-backups clean-auxiliary ;
3857+
3858+.PHONY: clean
3859+clean: clean-generated clean-tex clean-graphics clean-deps clean-backups clean-auxiliary
3860+
3861+#
3862+# HELP TARGETS
3863+#
3864+
3865+.PHONY: help
3866+help:
3867+ $(help_text)
3868+
3869+.PHONY: version
3870+version:
3871+ $(QUIET)\
3872+ $(ECHO) "$(fileinfo) Version $(version)"; \
3873+ $(ECHO) "by $(author)"; \
3874+
3875+#
3876+# HELP TEXT
3877+#
3878+
3879+define help_text
3880+# $(fileinfo) Version $(version)
3881+#
3882+# by $(author)
3883+#
3884+# Generates a number of possible output files from a LaTeX document and its
3885+# various dependencies. Handles .bib files, \include and \input, and .eps
3886+# graphics. All dependencies are handled automatically by running LaTeX over
3887+# the source.
3888+#
3889+# USAGE:
3890+#
3891+# make [GRAY=1] [VERBOSE=1] [SHELL_DEBUG=1] <target(s)>
3892+#
3893+# STANDARD OPTIONS:
3894+# GRAY:
3895+# Setting this variable forces all recompiled graphics to be grayscale.
3896+# It is useful when creating a document for printing. The default is
3897+# to allow colors. Note that it only changes graphics that need to be
3898+# rebuilt! It is usually a good idea to do a 'make clean' first.
3899+#
3900+# There is another facility for creating grayscale documents that is
3901+# better when you can use it (it has some small limitations not shared
3902+# by this approach). See the section on %._gray_ targets below.
3903+#
3904+# VERBOSE:
3905+# This turns off all @ prefixes for commands invoked by make. Thus,
3906+# you get to see all of the gory details of what is going on.
3907+#
3908+# SHELL_DEBUG:
3909+# This enables the -x option for sh, meaning that everything it does is
3910+# echoed to stderr. This is particularly useful for debugging
3911+# what is going on in $$(shell ...) invocations. One of my favorite
3912+# debugging tricks is to do this:
3913+#
3914+# make -d SHELL_DEBUG=1 VERBOSE=1 2>&1 | less
3915+#
3916+# STANDARD AUXILIARY FILES:
3917+#
3918+# Makefile.ini
3919+#
3920+# This file can contain variable declarations that override various
3921+# aspects of the makefile. For example, one might specify
3922+#
3923+# neverclean := *.pdf *.ps
3924+# onlysources.tex := main.tex
3925+# LATEX_COLOR_WARNING := 'bold red uline'
3926+#
3927+# And this would override the neverclean setting to ensure that pdf
3928+# and ps files always remain behind, set the makefile to treat all
3929+# .tex files that are not "main.tex" as includes (and therefore not
3930+# default targets). It also changes the LaTeX warning output to be
3931+# red, bold, and underlined.
3932+#
3933+# There are numerous variables in this file that can be overridden in
3934+# this way. Search for '?=' to find them all.
3935+#
3936+# Also, you can put arbitrary targets into it if, for example, you
3937+# want your source built from something else, e.g.:
3938+#
3939+# generated.tex: generating_script.weird_lang depA depB
3940+# ./generating_script.weird_lang > $$@
3941+#
3942+# The Makefile.ini is imported before anything else is done, so go
3943+# wild with your ideas for changes to this makefile in there. It
3944+# makes it easy to test them before submitting patches.
3945+#
3946+# STANDARD ENVIRONMENT VARIABLES:
3947+#
3948+# LATEX_COLOR_WARNING '$(LATEX_COLOR_WARNING)'
3949+# LATEX_COLOR_ERROR '$(LATEX_COLOR_ERROR)'
3950+# LATEX_COLOR_UNDERFULL '$(LATEX_COLOR_UNDERFULL)'
3951+# LATEX_COLOR_OVERFULL '$(LATEX_COLOR_OVERFULL)'
3952+# LATEX_COLOR_PAGES '$(LATEX_COLOR_PAGES)'
3953+# LATEX_COLOR_BUILD '$(LATEX_COLOR_BUILD)'
3954+# LATEX_COLOR_GRAPHIC '$(LATEX_COLOR_GRAPHIC)'
3955+# LATEX_COLOR_DEP '$(LATEX_COLOR_DEP)'
3956+# LATEX_COLOR_SUCCESS '$(LATEX_COLOR_SUCCESS)'
3957+# LATEX_COLOR_FAILURE '$(LATEX_COLOR_FAILURE)'
3958+#
3959+# These may be redefined in your environment to be any of the following:
3960+#
3961+# black
3962+# red
3963+# green
3964+# yellow
3965+# blue
3966+# magenta
3967+# cyan
3968+# white
3969+#
3970+# Bold or underline may be used, as well, either alone or in combination
3971+# with colors:
3972+#
3973+# bold
3974+# uline
3975+#
3976+# Order is not important. You may want, for example, to specify:
3977+#
3978+# export LATEX_COLOR_SUCCESS='bold blue uline'
3979+#
3980+# in your .bashrc file. I don't know why, but you may want to.
3981+#
3982+# STANDARD TARGETS:
3983+#
3984+# all:
3985+# Make all possible documents in this directory. The documents are
3986+# determined by scanning for .tex and .tex.sh (described in more detail
3987+# later) and omitting any file that ends in ._include_.tex or
3988+# ._nobuild_.tex. The output is a set of .pdf files.
3989+#
3990+# If you wish to omit files without naming them with the special
3991+# underscore names, set the following near the top of the Makefile,
3992+# or (this is recommended) within a Makefile.ini in the same directory:
3993+#
3994+# includes.tex := file1.tex file2.tex
3995+#
3996+# This will cause the files listed to be considered as include files.
3997+#
3998+# If you have only few source files, you can set
3999+#
4000+# onlysources.tex := main.tex
4001+#
4002+# This will cause only the source files listed to be considered in
4003+# dependency detection. All other .tex files will be considered as
4004+# include files. Note that these options work for *any* source type,
4005+# so you could do something similar with includes.gpi, for example.
4006+# Note that this works for *any valid source* target. All of the
4007+# onlysources.* variables are commented out in the shipping version of
4008+# this file, so it does the right thing when they simply don't exist.
4009+# The comments are purely documentation. If you know, for example, that
4010+# file.mycoolformat is supported by this Makefile, but don't see the
4011+# "onlysources.mycoolformat" declared in the comments, that doesn't mean
4012+# you can't use it. Go ahead and set "onlysources.mycoolformat" and it
4013+# should do the right thing.
4014+#
4015+# show:
4016+# Builds and displays all documents in this directory. It uses the
4017+# environment-overridable value of VIEW_PDF (currently $(VIEW_PDF)) to
4018+# do its work.
4019+#
4020+# all-graphics:
4021+# Make all of the graphics in this directory.
4022+#
4023+# all-pstex:
4024+# Build all fig files into pstex and pstex_t files. Gray DOES NOT WORK.
4025+#
4026+# all-gray-pstex:
4027+# Build all fig files into grayscale pstex and pstex_t files.
4028+#
4029+# all-dot2tex:
4030+# Build all dot files into tex files.
4031+#
4032+# show-graphics:
4033+# Builds and displays all graphics in this directory. Uses the
4034+# environment-overridable value of VIEW_GRAPHICS (currently
4035+# $(VIEW_GRAPHICS)) to do its work.
4036+#
4037+# clean:
4038+# Remove ALL generated files, leaving only source intact.
4039+# This will *always* skip files mentioned in the "neverclean" variable,
4040+# either in this file or specified in Makefile.ini:
4041+#
4042+# neverclean := *.pdf *.ps
4043+#
4044+# The neverclean variable works on all "clean" targets below, as well.
4045+#
4046+# clean-graphics:
4047+# Remove all generated graphics files.
4048+#
4049+# clean-backups:
4050+# Remove all backup files: $(backup_patterns)
4051+# (XFig and other editors have a nasty habit of leaving them around)
4052+# Also removes Makefile-generated .temp files
4053+#
4054+# clean-tex:
4055+# Remove all files generated from LaTeX invocations except dependency
4056+# information. Leaves graphics alone.
4057+#
4058+# clean-deps:
4059+# Removes all auto-generated dependency information.
4060+#
4061+# clean-auxiliary:
4062+# Removes extra files created by various targets (like the dependency
4063+# graph output).
4064+#
4065+# clean-nographics:
4066+# Cleans everything *except* the graphics files.
4067+#
4068+# help:
4069+# This help text.
4070+#
4071+# version:
4072+# Version information about this LaTeX makefile.
4073+#
4074+# DEBUG TARGETS:
4075+#
4076+# _all_programs:
4077+# A list of the programs used by this makefile.
4078+#
4079+# _check_programs:
4080+# Checks your system for the needed software and reports what it finds.
4081+#
4082+# _check_gpi_files:
4083+# Checks the .gpi files in the current directory for common errors, such
4084+# as specification of the terminal or output file inside of the gpi file
4085+# itself.
4086+#
4087+# _dependency_graph:
4088+# Outputs a .dot file to stdout that represents a graph of LaTeX
4089+# dependencies. To see it, use the _show_dependency_graph target or
4090+# direct the output to a file, run dot on it, and view the output, e.g.:
4091+#
4092+# make _dependency_graph > graph.dot
4093+# dot -T ps -o graph.eps graph.dot
4094+# gv graph.eps
4095+#
4096+# _show_dependency_graph:
4097+# Makes viewing the graph simple: extracts, builds and displays the
4098+# dependency graph given in the _dependency_graph target using the value
4099+# of the environment-overridable VIEW_POSTSCRIPT variable (currently set
4100+# to $(VIEW_POSTSCRIPT)). The postscript viewer is used because it
4101+# makes it easier to zoom in on the graph, a critical ability for
4102+# something so dense and mysterious.
4103+#
4104+# _all_sources:
4105+# List all .tex files in this directory.
4106+#
4107+# _sources:
4108+# Print out a list of all compilable sources in this directory. This is
4109+# useful for determining what make thinks it will be using as the
4110+# primary source for 'make all'.
4111+#
4112+# _scripts:
4113+# Print out a list of scripts that make knows can be used to generate
4114+# .tex files (described later).
4115+#
4116+# _all_stems:
4117+# Print a list of stems. These represent bare targets that can be
4118+# executed. Listing <stem> as a bare target will produce <stem>.pdf.
4119+#
4120+# _includes:
4121+# A list of .d files that would be included in this run if _includes
4122+# weren't specified. This target may be used alone or in conjunction
4123+# with other targets.
4124+#
4125+# _graphic_sources:
4126+# A list of all files that can create .eps files
4127+#
4128+# _graphic_outputs:
4129+# A list of all generated .eps files
4130+#
4131+# _env:
4132+# A list of environment variables and their values. If supported by
4133+# your version of make, also a list of variables known to make.
4134+#
4135+# FILE TARGETS:
4136+#
4137+# %, %.pdf:
4138+# Build a PDF file from the corresponding %.tex file. This is
4139+# done using dvips and ps2pdf. Some may object to this idea,
4140+# saying that pdflatex is a better approach, but I disagree for
4141+# two major reasons:
4142+#
4143+# * Postscript can be a very nice thing to have directly from the LaTeX
4144+# file, especially when printing.
4145+#
4146+# * One word: psfrag. If you don't know this wonderful package, get to
4147+# know it. It is a workhorse for making graphs pretty.
4148+#
4149+# %._show:
4150+# A phony target that builds the pdf file and then displays it using the
4151+# environment-overridable value of VIEW_PDF ($(VIEW_PDF)).
4152+#
4153+# %._graphics:
4154+# A phony target that generates all graphics on which %.dvi
4155+# depends.
4156+#
4157+# %.ps:
4158+# Build a Postscript file from the corresponding %.tex file.
4159+# This is done using dvips. Paper size is automatically
4160+# extracted from the declaration
4161+#
4162+# \documentclass[<something>paper]
4163+#
4164+# or it is the system default.
4165+#
4166+# If using beamer (an excellent presentation class), the paper
4167+# size is ignored. More on this later.
4168+#
4169+# %.dvi:
4170+# Build the DVI file from the corresponding %.tex file.
4171+#
4172+# %.ind:
4173+# Build the index for this %.tex file.
4174+#
4175+# %.gls:
4176+# Build the nomenclature glossary for this %.tex file.
4177+#
4178+# %.nls:
4179+# Build the (newer) nomenclature file for this %.tex file.
4180+#
4181+# %.eps:
4182+# Build an eps file from one of the following file types:
4183+#
4184+# .dot : graphviz
4185+# .gpi : gnuplot
4186+# .fig : xfig
4187+# .xvg : xmgrace
4188+# .svg : scalable vector graphics (goes through inkscape)
4189+# .png : png (goes through NetPBM)
4190+# .jpg : jpeg (goes through ImageMagick)
4191+# .eps.gz : gzipped eps
4192+#
4193+# The behavior of this makefile with each type is described in
4194+# its own section below.
4195+#
4196+# %.pstex{,_t}:
4197+# Build a .pstex_t file from a .fig file.
4198+#
4199+# All targets have a corresponding %._gray_.suffix form, which creates
4200+# everything in monochrome. This is useful for creating both color and
4201+# grayscale versions of the same document, and they can coexist happily in
4202+# the same directory. Examples:
4203+#
4204+# make test._gray_._graphics # Build all grayscale graphics
4205+# make test._gray_ # Build a grayscale document
4206+#
4207+# The use of a ._gray_ target creates ._gray_.tex files (not forgetting the
4208+# included files!) with appropriate dependencies on ._gray_.eps graphics.
4209+# This approach is in many ways superior to specifying GRAY=1 on the command
4210+# line, but has some limitations. Because a new .tex file must be created,
4211+# this means that the original .tex file must be parsed and all references
4212+# to graphics and include files must be transformed. This can be a brittle
4213+# operation in a macro-based language like LaTeX, since it is very easy to
4214+# define macros that call \include or \input indirectly.
4215+#
4216+# Here the naming strategy for include files comes into play. They all have
4217+# ._include_. in their name, and are therefore fairly easy to search out.
4218+# That sequence is unlikely to appear in text, so it is fairly safe to
4219+# replace it. Anything ending in .eps is also replaced to end with
4220+# ._gray_.eps, and is subject to the same issues.
4221+#
4222+# In short, if your file contains _include_ when not referencing a file, or
4223+# it says .eps when not referencing a graphic, this approach is probably not
4224+# for you. I imagine that these cases are fairly rare, however, so it
4225+# should work most of the time. When a doubt arises, you can be sure that
4226+# GRAY=1 will do the right thing, provided you precede it with a 'make
4227+# clean'.
4228+#
4229+# FEATURES:
4230+#
4231+# Optional Binary Directory:
4232+# If you create the _out_ directory in the same place as the makefile,
4233+# it will automatically be used as a dumping ground for .dvi, .ps, and
4234+# .pdf output files.
4235+#
4236+# Alternatively, you can set the BINARY_TARGET_DIR variable, either as a
4237+# make argument or in Makefile.ini, to point to your directory of
4238+# choice. Note that no pathname wildcard expansion is done in the
4239+# makefile, so make sure that the path is complete before going in
4240+# there. E.g., if you want to specify something in your home directory,
4241+# use $$HOME/ instead of ~/ so that the shell expands it before it gets
4242+# to the makefile.
4243+#
4244+# External Program Dependencies:
4245+# Every external program used by the makefile is represented by an
4246+# ALLCAPS variable at the top of this file. This should allow you to
4247+# make judgments about whether your system supports the use of this
4248+# makefile. The list is available in the ALL_PROGRAMS variable and,
4249+# provided that you are using GNU make 3.80 or later (or you haven't
4250+# renamed this file to something weird like "mylatexmakefile" and like
4251+# invoking it with make -f) can be viewed using
4252+#
4253+# make _all_programs
4254+#
4255+# Additionally, the availability of these programs can be checked
4256+# automatically for you by running
4257+#
4258+# make _check_programs
4259+#
4260+# The programs are categorized according to how important they are and
4261+# what function they perform to help you decide which ones you really
4262+# need.
4263+#
4264+# Colorized Output:
4265+# The output of commands is colorized to highlight things that are often
4266+# important to developers. This includes {underfull,overfull}
4267+# {h,v}boxes, general LaTeX Errors, each stage of document building, and
4268+# the number of pages in the final document. The colors are obtained
4269+# using 'tput', so colorization should work pretty well on any terminal.
4270+#
4271+# The colors can be customized very simply by setting any of the
4272+# LATEX_COLOR_<CONTEXT> variables in your environment (see above).
4273+#
4274+# Predecessors to TeX Files:
4275+# Given a target <target>, if no <target>.tex file exists but a
4276+# corresponding script or predecessor file exists, then appropriate
4277+# action will be taken to generate the tex file.
4278+#
4279+# Currently supported script or predecessor languages are:
4280+#
4281+# sh: %.tex.sh
4282+#
4283+# Calls the script using sh, assuming that its output is a .tex
4284+# file. Of course, your .sh file can call another script to do
4285+# its work. Go wild!
4286+#
4287+# The script is called thus:
4288+#
4289+# <interpreter> <script file name> <target tex file>
4290+#
4291+# and therefore sees exactly one parameter: the name of the .tex
4292+# file that it is to create.
4293+#
4294+# Why does this feature exist? I ran into this while working on
4295+# my paper dissertation. I wrote a huge bash script that used a
4296+# lot of sed to bring together existing papers in LaTeX. It
4297+# would have been nice had I had something like this to make my
4298+# life easier, since as it stands I have to run the script and
4299+# then build the document with make. This feature provides hooks
4300+# for complicated stuff that you may want to do, but that I have
4301+# not considered.
4302+#
4303+# This approach does not work for included .tex files. If you
4304+# want to do something special with those, you should wrap all of
4305+# that functionality into a top-level source script that creates
4306+# the necessary includes as well.
4307+#
4308+# reST: %.rst
4309+#
4310+# Runs the reST to LaTeX converter to generate a .tex file
4311+# If it finds a file names _rststyle_._include_.tex, uses it as
4312+# the "stylesheet" option to rst2latex.
4313+#
4314+# Dependencies:
4315+#
4316+# In general, dependencies are extracted directly from LaTeX output on
4317+# your document. This includes
4318+#
4319+# * Bibliography information
4320+# * \include or \input files (honoring \includeonly, too)
4321+# * Graphics files inserted by the graphicx package
4322+#
4323+# Where possible, all of these are built correctly and automatically.
4324+# In the case of graphics files, these are generated from the following
4325+# file types:
4326+#
4327+# GraphViz: .dot
4328+# GNUPlot: .gpi
4329+# XFig: .fig
4330+# XMgrace: .xvg
4331+# SVG: .svg
4332+# PNG: .png
4333+# JPEG: .jpg
4334+# GZipped EPS: .eps.gz
4335+#
4336+# If the file exists as a .eps already, it is merely used (and will not
4337+# be deleted by 'clean'!).
4338+#
4339+# LaTeX and BibTeX are invoked correctly and the "Rerun to get
4340+# cross-references right" warning is heeded a reasonable number of
4341+# times. In my experience this is enough for even the most troublesome
4342+# documents, but it can be easily changed (if LaTeX has to be run after
4343+# BibTeX more than three times, it is likely that something is moving
4344+# back and forth between pages, and no amount of LaTeXing will fix
4345+# that).
4346+#
4347+# \includeonly is honored by this system, so files that are not
4348+# specified there will not trigger a rebuild when changed.
4349+#
4350+# Beamer:
4351+# A special TeX source comment is recognized by this makefile:
4352+#
4353+# %%[[:space:]]*BEAMER[[:space:]]*LARGE
4354+#
4355+# The presence of this comment forces the output of dvips through psnup
4356+# to enlarge beamer slides to take up an entire letter-sized page. This
4357+# is particularly useful when printing transparencies or paper versions
4358+# of the slides. For some reason landscape orientation doesn't appear
4359+# to work, though.
4360+#
4361+# If you want to put multiple slides on a page, use this option and then
4362+# print using mpage, a2ps, or psnup to consolidate slides. My personal
4363+# favorite is a2ps, but your mileage may vary.
4364+#
4365+# When beamer is the document class, dvips does NOT receive a paper size
4366+# command line attribute, since beamer does special things with sizes.
4367+#
4368+# GNUPlot Graphics:
4369+# When creating a .gpi file, DO NOT INCLUDE the "set terminal" or "set
4370+# output" commands! The makefile will include terminal information for
4371+# you. Besides being unnecessary and potentially harmful, including the
4372+# terminal definition in the .gpi file makes it harder for you, the one
4373+# writing the document, to preview your graphics, e.g., with
4374+#
4375+# gnuplot -persist myfile.gpi
4376+#
4377+# so don't do specify a terminal or an output file in your .gpi files.
4378+#
4379+# When building a gpi file into an eps file, there are several features
4380+# available to the document designer:
4381+#
4382+# Global Header:
4383+# The makefile searches for the files in the variable GNUPLOT_GLOBAL
4384+# in order:
4385+#
4386+# ($(GNUPLOT_GLOBAL))
4387+#
4388+# Only the first found is used. All .gpi files in the directory are
4389+# treated as though the contents of GNUPLOT_GLOBAL were directly
4390+# included at the top of the file.
4391+#
4392+# NOTE: This includes special comments! (see below)
4393+#
4394+# Font Size:
4395+# A special comment in a .gpi file (or a globally included file) of
4396+# the form
4397+#
4398+# ## FONTSIZE=<number>
4399+#
4400+# will change the font size of the GPI output. If font size is
4401+# specified in both the global file and the GPI file, the
4402+# specification in the individual GPI file is used.
4403+#
4404+# Grayscale Output:
4405+# GNUplot files also support a special comment to force them to be
4406+# output in grayscale *no matter what*:
4407+#
4408+# ## GRAY
4409+#
4410+# This is not generally advisable, since you can always create a
4411+# grayscale document using the forms mentioned above. But, if your
4412+# plot simply must be grayscale even in a document that allows
4413+# colors, this is how you do it.
4414+#
4415+# XFig Graphics:
4416+# No special handling is done with XFig, except when a global
4417+# grayscale method is used, e.g.
4418+#
4419+# make document._gray_
4420+# or
4421+# make GRAY=1 document
4422+#
4423+# In these cases the .eps files is created using the -N switch to
4424+# fig2dev to turn off color output. (Only works with eps, not
4425+# pstex output!)
4426+#
4427+# GraphVis Graphics:
4428+# Color settings are simply ignored here. The 'dot' program is used
4429+# to transform a .dot file into a .eps file.
4430+#
4431+# If you want, you can use the dot2tex program to convert dot files
4432+# to tex graphics. The default is to just call dot2tex with no
4433+# arguments, but you can change the DOT2TEX definition to include
4434+# options as needed (in your Makefile.ini).
4435+#
4436+# Note that, like pstex, the makefile cannot use latex's own output
4437+# to discover all missing dot_t (output) files, since anytime TeX
4438+# includes TeX, it has to bail when it can't find the include file.
4439+# It can therefore only stop on the first missing file it discovers,
4440+# and we can't get a large list of them out easily.
4441+#
4442+# So, the makefile errors out if it's missing an included dot_t
4443+# file, then prompts the user to run this command manually:
4444+#
4445+# make all-dot2tex
4446+#
4447+# GZipped EPS Graphics:
4448+#
4449+# A .eps.gz file is sometimes a nice thing to have. EPS files can get
4450+# very large, especially when created from bitmaps (don't do this if you
4451+# don't have to). This makefile will unzip them (not in place) to
4452+# create the appropriate EPS file.
4453+#
4454+endef
4455+
4456+#
4457+# DEPENDENCY CHART:
4458+#
4459+#digraph "g" {
4460+# rankdir=TB
4461+# size="9,9"
4462+# edge [fontsize=12 weight=10]
4463+# node [shape=box fontsize=14 style=rounded]
4464+#
4465+# eps [
4466+# shape=Mrecord
4467+# label="{{<gpi> GNUplot|<epsgz> GZip|<dot> Dot|<fig> XFig}|<eps> eps}"
4468+# ]
4469+# pstex [label="%.pstex"]
4470+# pstex_t [label="%.pstex_t"]
4471+# tex_outputs [shape=point]
4472+# extra_tex_files [shape=point]
4473+# gpi_data [label="<data>"]
4474+# gpi_includes [label="_include_.gpi"]
4475+# aux [label="%.aux"]
4476+# fls [label="%.fls"]
4477+# idx [label="%.idx"]
4478+# glo [label="%.glo"]
4479+# ind [label="%.ind"]
4480+# log [label="%.log"]
4481+# tex_sh [label="%.tex.sh"]
4482+# rst [label="%.rst"]
4483+# tex [
4484+# shape=record
4485+# label="<tex> %.tex|<include> _include_.tex"
4486+# ]
4487+# include_aux [label="_include_.aux"]
4488+# file_bib [label=".bib"]
4489+# bbl [label="%.bbl"]
4490+# dvi [label="%.dvi"]
4491+# ps [label="%.ps"]
4492+# pdf [label="%.pdf"]
4493+# fig [label=".fig"]
4494+# dot [label=".dot"]
4495+# gpi [label=".gpi"]
4496+# eps_gz [label=".eps.gz"]
4497+#
4498+# gpi_files [shape=point]
4499+#
4500+# rst -> tex:tex [label="reST"]
4501+# tex_sh -> tex:tex [label="sh"]
4502+# tex -> tex_outputs [label="latex"]
4503+# tex_outputs -> dvi
4504+# tex_outputs -> aux
4505+# tex_outputs -> log
4506+# tex_outputs -> fls
4507+# tex_outputs -> idx
4508+# tex_outputs -> include_aux
4509+# aux -> bbl [label="bibtex"]
4510+# file_bib -> bbl [label="bibtex"]
4511+# idx -> ind [label="makeindex"]
4512+# glo -> gls [label="makeindex"]
4513+# nlo -> nls [label="makeindex"]
4514+# gls -> extra_tex_files
4515+# nls -> extra_tex_files
4516+# ind -> extra_tex_files
4517+# bbl -> extra_tex_files
4518+# eps -> extra_tex_files
4519+# extra_tex_files -> dvi [label="latex"]
4520+# gpi_files -> eps:gpi [label="gnuplot"]
4521+# gpi -> gpi_files
4522+# gpi_data -> gpi_files
4523+# gpi_includes -> gpi_files
4524+# eps_gz -> eps:epsgz [label="gunzip"]
4525+# fig -> eps:fig [label="fig2dev"]
4526+# fig -> pstex [label="fig2dev"]
4527+# fig -> pstex_t [label="fig2dev"]
4528+# pstex -> pstex_t [label="fig2dev"]
4529+# dot -> eps:dot [label="dot"]
4530+# dvi -> ps [label="dvips"]
4531+# include_aux -> bbl [label="bibtex"]
4532+# ps -> pdf [label="ps2pdf"]
4533+#
4534+# edge [ color=blue label="" style=dotted weight=1 fontcolor=blue]
4535+# fls -> tex:include [label="INPUT: *.tex"]
4536+# fls -> file_bib [label="INPUT: *.aux"]
4537+# aux -> file_bib [label="\\bibdata{...}"]
4538+# include_aux -> file_bib [label="\\bibdata{...}"]
4539+# log -> gpi [label="Graphic file"]
4540+# log -> fig [label="Graphic file"]
4541+# log -> eps_gz [label="Graphic file"]
4542+# log -> dot [label="Graphic file"]
4543+# log -> idx [label="No file *.ind"]
4544+# log -> glo [label="No file *.gls"]
4545+# log -> nlo [label="No file *.nls"]
4546+# gpi -> gpi_data [label="plot '...'"]
4547+# gpi -> gpi_includes [label="load '...'"]
4548+# tex:tex -> ps [label="paper"]
4549+# tex:tex -> pdf [label="embedding"]
4550+#}
4551+
4552+#
4553+# DEPENDENCY CHART SCRIPT
4554+#
4555+# $(call output_dependency_graph,[<output file>])
4556+define output-dependency-graph
4557+ if [ -f '$(this_file)' ]; then \
4558+ $(SED) \
4559+ -e '/^[[:space:]]*#[[:space:]]*DEPENDENCY CHART:/,/^$$/!d' \
4560+ -e '/DEPENDENCY CHART/d' \
4561+ -e '/^$$/d' \
4562+ -e 's/^[[:space:]]*#//' \
4563+ $(this_file) $(if $1,> '$1',); \
4564+ else \
4565+ $(ECHO) "Cannot determine the name of this makefile."; \
4566+ fi
4567+endef
4568+# vim: noet sts=0 sw=8 ts=8
4569
4570=== added directory 'Planet Stuff'
4571=== added file 'Planet Stuff/READ THIS FIRST!!'
4572--- Planet Stuff/READ THIS FIRST!! 1970-01-01 00:00:00 +0000
4573+++ Planet Stuff/READ THIS FIRST!! 2014-09-01 04:44:23 +0000
4574@@ -0,0 +1,5 @@
4575+It's mainly all set up, all you have to do is follow these instructions to add feeds and then create a cron job to update it every 15 mins or so.
4576+
4577+https://wiki.ubuntu.com/LoCoCreatingPlanet
4578+
4579+I've downloaded the latest version of planet and extracted here. It's in /planet-2.0
4580
4581=== added file 'Planet Stuff/README'
4582--- Planet Stuff/README 1970-01-01 00:00:00 +0000
4583+++ Planet Stuff/README 2014-09-01 04:44:23 +0000
4584@@ -0,0 +1,11 @@
4585+This is the planet.ubuntu.ro new PlanetPlanet theme. Code is a modified moinmoin
4586+design, containing also code from ubuntu.com drupal theme.
4587+
4588+You are free to use this theme on other ubuntu planets.
4589+
4590+For instalation, css/, img/ and planet.css must be copied into planetplanet's
4591+output directory. The links shall be changed in index.html.tmpl. The logo is
4592+in img/ as logo.png
4593+
4594+Any further information available upon request from alexef@softwareliber.ro or
4595+alex@eftimie.ro.
4596
4597=== added directory 'Planet Stuff/css'
4598=== added directory 'Planet Stuff/css/.ssh'
4599=== added file 'Planet Stuff/css/.ssh/authorized_keys'
4600--- Planet Stuff/css/.ssh/authorized_keys 1970-01-01 00:00:00 +0000
4601+++ Planet Stuff/css/.ssh/authorized_keys 2014-09-01 04:44:23 +0000
4602@@ -0,0 +1,2 @@
4603+ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAtRP0Iisni0A4mkqLkdxlwEswZb9YOxsAj9eu3vBYu9OWW2CBK/Spz5v0aAVbqOd2f1jG1rC+KMWdA7Dpe0ZvofSM4EXN8mNXChv0awUN0ENURMurKtfq1QxarCz9U+ErDhi1k5CoebszjtuWvR3AntPtTzyISY7f2mwc0PU50kOiayJf4dE1hutvRzTqcSVj00ZMgF5L/G1xIyu+sHPOHcEEC+JA9f91iX4E364AZgv5lp9QUZ7byrlf2MUBnvLI2jxz2BRCtysxR/6Af/2UpwLUEs9bcjPj4ZC36P1tdUvgw2p3lLVGNG0RdkQoGEdwZ9k7AEFVZwJfPl77V+8EcQ== alex@soleares
4604+
4605
4606=== added file 'Planet Stuff/css/bg-page.png'
4607Binary files Planet Stuff/css/bg-page.png 1970-01-01 00:00:00 +0000 and Planet Stuff/css/bg-page.png 2014-09-01 04:44:23 +0000 differ
4608=== added file 'Planet Stuff/css/bullet-triangle.png'
4609Binary files Planet Stuff/css/bullet-triangle.png 1970-01-01 00:00:00 +0000 and Planet Stuff/css/bullet-triangle.png 2014-09-01 04:44:23 +0000 differ
4610=== added file 'Planet Stuff/css/common.css'
4611--- Planet Stuff/css/common.css 1970-01-01 00:00:00 +0000
4612+++ Planet Stuff/css/common.css 2014-09-01 04:44:23 +0000
4613@@ -0,0 +1,367 @@
4614+/* common.css - MoinMoin Default Styles
4615+Copyright (c) 2001, 2002, 2003 by Juergen Hermann
4616+*/
4617+
4618+/* Links */
4619+
4620+a {
4621+ color: #D90D19;
4622+}
4623+
4624+a:hover {
4625+ color: #800000;
4626+}
4627+
4628+/* Headings */
4629+
4630+#pagelocation li {
4631+ display: inline;
4632+}
4633+
4634+#pagelocation {
4635+ margin: 0;
4636+ padding: 0;
4637+ color: #6d4c07; /* ubuntu dark brown */
4638+ font-size: 1.8em;
4639+ font-weight: bold;
4640+ line-height: 1.2em;
4641+ border-bottom: 3px solid #6d4c07; /* ubuntu dark brown */
4642+}
4643+
4644+#pagelocation a {
4645+ text-decoration: none;
4646+ color: #6d4c07; /* ubuntu dark brown */
4647+}
4648+
4649+h1, h2, h3, h4, h5, h6
4650+{
4651+ margin: 0;
4652+ /* AE: conflicts with bubbles padding: 2px 0;*/
4653+ font-weight: normal;
4654+ color: #5A3320;
4655+ line-height: 1.2em;
4656+}
4657+
4658+h1
4659+{
4660+ font-size: 1.6em;
4661+ border-bottom: 1px solid #6d4c07; /* ubuntu dark brown */
4662+}
4663+
4664+h2
4665+{
4666+ font-size: 1.3em;
4667+}
4668+
4669+h3 {font-size: 1.1em;}
4670+h4, h5, h6 {font-size: 1em;}
4671+
4672+li p {
4673+ margin: .25em 0;
4674+}
4675+
4676+li.gap {
4677+ margin-top: 0.5em;
4678+}
4679+
4680+/* from ubuntu_styles; sizes changed to em */
4681+dt
4682+{
4683+ margin-top: 1.2em;
4684+ margin-bottom: 0.3em;
4685+ font-size: 1.2em;
4686+ border-bottom: 1px solid #6D4C07;
4687+}
4688+
4689+dd {
4690+ margin-top: 0;
4691+ margin-bottom: 0;
4692+}
4693+
4694+dd p {
4695+ margin: 0.25em 0;
4696+}
4697+
4698+a, img, img.drawing {
4699+ border: 0;
4700+}
4701+
4702+pre
4703+{
4704+ border: 1px dashed #C1B496; /* ubuntu dark tan */
4705+ background-color: #f0eee6; /* ubuntu light salmon */
4706+ padding: 4pt;
4707+ font-family: courier, monospace;
4708+ white-space: pre;
4709+ /* begin css 3 or browser specific rules - do not remove!
4710+ see: http://forums.techguy.org/archive/index.php/t-249849.html */
4711+ white-space: pre-wrap;
4712+ word-wrap: break-word;
4713+ white-space: -moz-pre-wrap;
4714+ white-space: -pre-wrap;
4715+ white-space: -o-pre-wrap;
4716+ /* end css 3 or browser specific rules */
4717+}
4718+
4719+table
4720+{
4721+ margin: 0.5em 0;
4722+ border-collapse: collapse;
4723+}
4724+
4725+td
4726+{
4727+ padding: 0.25em;
4728+ border: 1pt solid #C1B496; /* ubuntu dark tan */
4729+}
4730+
4731+td p {
4732+ margin: 0;
4733+ padding: 0;
4734+}
4735+
4736+.footnotes div {
4737+ width: 5em;
4738+ border-top: 1pt solid #C1B496; /* ubuntu dark tan */
4739+}
4740+
4741+.footnotes ul {
4742+ padding: 0 2em;
4743+ margin: 0 0 1em;
4744+ list-style: none;
4745+}
4746+
4747+.footnotes li {
4748+}
4749+
4750+.info {
4751+ font-size: 0.85em;
4752+ color: #C1B496; /* ubuntu dark tan */
4753+}
4754+
4755+#pageinfo {
4756+ margin-top: 2em;
4757+}
4758+
4759+.seperator {
4760+ color: #C1B496; /* ubuntu dark tan */
4761+}
4762+
4763+#pagebottom {clear: both;}
4764+
4765+/* standard rule ---- */
4766+hr {
4767+ height: 1pt;
4768+ background-color: #C1B496; /* ubuntu dark tan */
4769+ border: 0;
4770+}
4771+
4772+/* custom rules ----- to ---------- */
4773+.hr1 {height: 2pt;}
4774+.hr2 {height: 3pt;}
4775+.hr3 {height: 4pt;}
4776+.hr4 {height: 5pt;}
4777+.hr5 {height: 6pt;}
4778+.hr6 {height: 7pt;}
4779+
4780+/* Replacement for html 3 u tag */
4781+.u {text-decoration: underline;}
4782+
4783+/* eye catchers */
4784+.warning
4785+{
4786+ color: red;
4787+}
4788+
4789+.error
4790+{
4791+ color: red;
4792+}
4793+
4794+strong.highlight
4795+{
4796+ background-color: #edddba; /* ubuntu pale orange */
4797+ padding: 1pt;
4798+}
4799+
4800+
4801+/* Recent changes */
4802+
4803+.rcrss {
4804+ float: right;
4805+ margin: 0;
4806+}
4807+
4808+.recentchanges[dir="rtl"] .rcrss {
4809+ float: left;
4810+}
4811+
4812+.recentchanges table {
4813+ clear: both;
4814+}
4815+
4816+.recentchanges td {
4817+ vertical-align: top;
4818+ border: none;
4819+ border-bottom: 1pt solid #C1B496; /* ubuntu dark tan */
4820+ background: white;
4821+}
4822+
4823+.rcdaybreak td {
4824+ background: #EDD097; /* classic: deep yellow */
4825+ border: none;
4826+}
4827+
4828+.rcdaybreak td a {
4829+ font-size: 0.88em;
4830+}
4831+
4832+.rcicon1, .rcicon2 {
4833+ text-align: center;
4834+}
4835+
4836+.rcpagelink {
4837+ width: 33%;
4838+}
4839+
4840+.rctime {
4841+ font-size: 0.88em;
4842+ white-space: nowrap;
4843+}
4844+
4845+.rceditor {
4846+ white-space: nowrap;
4847+ font-size: 0.88em;
4848+}
4849+
4850+.rccomment {
4851+ width: 66%;
4852+ color: #C1B496; /* ubuntu dark tan */
4853+ font-size: 0.88em;
4854+ font-weight: bold;
4855+}
4856+
4857+
4858+/* User Preferences */
4859+
4860+.userpref table, .userpref td {
4861+ border: none;
4862+}
4863+
4864+/* CSS for new code_area markup used by Colorizer and ParserBase */
4865+
4866+div.codearea { /* the div makes the border */
4867+ margin: 4pt 0;
4868+ padding: 0;
4869+ border: 1pt solid #C1B496; /* ubuntu dark tan */
4870+/* background-color: #F3F5F7; * light grey */
4871+ background-color: #edddba; /* ubuntu pale orange */
4872+ color: black;
4873+}
4874+
4875+div.codearea pre { /* the pre has no border and is inside the div */
4876+ margin: 0;
4877+ padding: 4pt;
4878+ border: none;
4879+}
4880+
4881+a.codenumbers { /* format of the line numbering link */
4882+ margin: 0 4pt;
4883+ font-size: 0.85em;
4884+ color: #6d4c07; /* ubuntu dark brown */
4885+}
4886+
4887+/* format of certain syntax spans */
4888+div.codearea pre span.LineNumber {color: gray;}
4889+div.codearea pre span.ID {color: #000000;}
4890+div.codearea pre span.Operator {color: #0000C0;}
4891+div.codearea pre span.Char {color: #004080;}
4892+div.codearea pre span.Comment {color: #008000;}
4893+div.codearea pre span.Number {color: #0080C0;}
4894+div.codearea pre span.String {color: #004080;}
4895+div.codearea pre span.SPChar {color: #0000C0;}
4896+div.codearea pre span.ResWord {color: #A00000;}
4897+div.codearea pre span.ConsWord {color: #008080; font-weight: bold;}
4898+div.codearea pre span.Error {color: #FF8080; border: solid 1.5pt #FF0000;}
4899+div.codearea pre span.ResWord2 {color: #0080ff; font-weight: bold;}
4900+div.codearea pre span.Special {color: #0000ff;}
4901+div.codearea pre span.Preprc {color: #803999;}
4902+
4903+
4904+/* Search results */
4905+
4906+.searchresults dt {
4907+ margin-top: 1em;
4908+ font-weight: normal;
4909+}
4910+
4911+.searchresults dd {
4912+ font-size: 0.85em;
4913+}
4914+
4915+/* MonthCalendar css */
4916+
4917+/* days without and with pages linked to them */
4918+a.cal-emptyday {
4919+ color: #777777;
4920+ text-align: center;
4921+}
4922+a.cal-usedday {
4923+ color: #000000;
4924+ font-weight: bold;
4925+ text-align: center;
4926+}
4927+/* general stuff: workdays, weekend, today */
4928+td.cal-workday {
4929+ background-color: #F1F1ED; /* ubuntu near-white */
4930+ text-align: center;
4931+}
4932+td.cal-weekend {
4933+ background-color: #edddba; /* ubuntu pale orange */
4934+ text-align: center;
4935+}
4936+td.cal-today {
4937+ background-color: #DBBA75; /* ubuntu orange */
4938+ border-style: solid;
4939+ border-width: 2pt;
4940+ text-align: center;
4941+}
4942+/* invalid places on the monthly calendar sheet */
4943+td.cal-invalidday {
4944+ background-color: #CCCCCC;
4945+}
4946+/* links to prev/next month/year */
4947+a.cal-link {
4948+ color: #F1F1ED; /* ubuntu near-white */
4949+ text-decoration: none;
4950+}
4951+th.cal-header {
4952+ background-color: #6d4c07; /* ubuntu dark brown */
4953+ color: white;
4954+ text-align: center;
4955+}
4956+
4957+/* for MonthCalendar mouseover info boxes */
4958+TABLE.tip {
4959+ color: black;
4960+ border: 1px solid #C1B496; /* ubuntu dark tan */
4961+ background-color: #f0eee6; /* ubuntu light salmon */
4962+ font-size: small;
4963+ font-weight: normal;
4964+}
4965+
4966+TH.tip {
4967+ background-color: #DBBA75; /* ubuntu orange */
4968+ font-weight: bold;
4969+ text-align: center;
4970+}
4971+
4972+TD.tip {
4973+ text-align: left;
4974+}
4975+*[dir="rtl"] TD.tip {
4976+ text-align: right;
4977+}
4978+
4979+/* end MonthCalendar stuff */
4980+
4981
4982=== added file 'Planet Stuff/css/screen.css'
4983--- Planet Stuff/css/screen.css 1970-01-01 00:00:00 +0000
4984+++ Planet Stuff/css/screen.css 2014-09-01 04:44:23 +0000
4985@@ -0,0 +1,434 @@
4986+/* screen.css - MoinMoin Default Styles
4987+
4988+Copyright (c) 2001, 2002, 2003 by Juergen Hermann
4989+Modified by Nir Soffer (technical theme), Mauricio Hernandez (ruleta theme)
4990+Heather Stern (ubuntu theme), Alex Eftimie (planet ubuntu theme)
4991+*/
4992+
4993+body {
4994+ background: #d3caaa url(bg-page.png) repeat-x top;
4995+ margin: 20px;
4996+ font-size: 90%;
4997+ font-family: Arial, Verdana, Arial, sans-serif;
4998+}
4999+
5000+img.ubuntulogo {
The diff has been truncated for viewing.