Compare commits

..

1 commit

Author SHA1 Message Date
Kenneth Moreland
9651b77ca6 Copied remotely 2008-03-13 19:31:49 +00:00
74 changed files with 639 additions and 4634 deletions

3
.gitignore vendored
View file

@ -1,3 +0,0 @@
*.swp
*~

View file

@ -1,13 +1,11 @@
cmake_minimum_required(VERSION 2.8.4)
PROJECT(UseLATEX_DOC NONE)
project(UseLATEX_DOC NONE)
INCLUDE(UseLATEX.cmake)
include(UseLATEX.cmake)
# Note that normally CMakeLists.txt would not be considered an
# input to the document, but in this special case of documenting
# UseLATEX.cmake the contents of this file is actually included
# in the document.
add_latex_document(UseLATEX.tex
INPUTS CMakeLists.txt
# Note that normally neither CMakeLists.txt nor UseLATEX.cmake
# would be considered inputs to the document, but in this
# special case (of documenting UseLATEX.cmake) the contents of
# these files are actually included in the document.
ADD_LATEX_DOCUMENT(UseLATEX.tex
INPUTS CMakeLists.txt UseLATEX.cmake
)

View file

@ -1,42 +0,0 @@
Compiling LaTeX files into readable documents is actually a very involved
process. Although CMake comes with FindLATEX.cmake, it does nothing for you
other than find the commands associated with LaTeX. I like using CMake to
build my LaTeX documents, but creating targets to do it is actually a pain.
Thus, I've compiled a bunch of macros that help me create targets in CMake
into a file I call [UseLATEX.cmake](UseLATEX.cmake). Here are some of the
things [UseLATEX.cmake](UseLATEX.cmake) handles:
* Runs LaTeX multiple times to resolve links.
* Can run bibtex, makeindex, and makeglossaries to make bibliographies,
indexes, and/or glossaries.
* Optionally runs configure on your latex files to replace `@VARIABLE@`
with the equivalent CMake variable.
* Automatically finds png, jpeg, eps, and pdf files and converts them to
formats latex and pdflatex understand.
## Download
The files can be downloaded directly from the UseLATEX project page. If you
are viewing this from a web page, you can follow the following links.
* Click here to get a copy of [UseLATEX.cmake](https://gitlab.kitware.com/kmorel/UseLATEX/raw/master/UseLATEX.cmake).
* Click here to get the documentation [UseLATEX.pdf](https://gitlab.kitware.com/kmorel/UseLATEX/raw/master/UseLATEX.pdf).
## Repository
This repository contains the CMake macros in the
[UseLATEX.cmake](UseLATEX.cmake) file. To get started, copy this file to
your own LaTeX project and include it in your build process.
You will also find a LaTeX document, [UseLATEX.tex](UseLATEX.tex), that
contains all of the documentation for [UseLATEX.cmake](UseLATEX.cmake). You
will also find a CMake build file, [CMakeLists.txt](CMakeLists.txt), that
uses [UseLATEX.cmake](UseLATEX.cmake) to build
[UseLATEX.tex](UseLATEX.tex). It also serves as a good example for using
[UseLATEX.cmake](UseLATEX.cmake).
There has been some requests to incorporate UseLATEX.cmake into the CMake
repository and distribution. Nobody thinks this is a bad idea, but it
hasn't yet happened mostly out of laziness. Keep bugging me to show
interest in moving UseLATEX.cmake. (See the author contact information at
the top of [UseLATEX.cmake](UseLATEX.cmake).)

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

View file

@ -1,183 +0,0 @@
#!/bin/bash
#
# Checks to make sure that the version number is consistent across all
# files, then issues the git commands to tag the version.
# A simple function to ask the user if they want to continue.
function ask_keep_going {
read -ep "Are you sure you want to continue? [y/N] " keep_going
if [ "$keep_going" != "y" -a "$keep_going" != "Y" ]
then
echo "Aborting"
exit 1
fi
echo
}
# Run in repo base directory
cd `dirname $0`/..
echo "Fetching origin..."
git fetch origin
echo
# Extract the version number from UseLATEX.cmake
version_line=`head -n 3 UseLATEX.cmake | tail -n 1`
version=`echo $version_line | sed -n 's/# Version: \([0-9]*\.[0-9]*\.[0-9]*\)/\1/p'`
if [ -z $version ]
then
echo "Could not extract version number from UseLATEX.cmake."
echo "The third line should be of the form '# Version: X.X.X'."
exit 1
fi
echo "Found version $version in UseLATEX.cmake"
echo
echo -n "Checking for $version in UseLATEX.tex..."
if fgrep -q '\newcommand{\UseLATEXVersion}{'$version'}' UseLATEX.tex
then
echo "OK"
else
echo "FAIL"
echo
echo "Could not find $version in UseLATEX.tex."
echo "There should be a line in UseLATEX.tex like the following:"
echo ' \newcommand{\UseLATEXVersion}{'$version'}'
echo "Add it."
exit 1
fi
echo -n "Checking for $version in UseLATEX.pdf..."
if pdftotext UseLATEX.pdf - | grep -q 'Version *'$version
then
echo "OK"
else
echo "FAIL"
echo
echo "Could not find $version in UseLATEX.pdf (using pdftotext)."
echo "Rebuild the pdf documentation and copy it to the working repo."
exit 1
fi
git_version_tag="Version$version"
echo -n "Checking for git tag $git_version_tag..."
if git rev-list $git_version_tag.. > /dev/null 2>&1
then
echo "FAIL"
echo
echo "Version tag $git_version_tag already exists in git repository."
echo "Either change the version in UseLATEX.cmake or remove the version"
echo "tag (with 'git tag -d $git_version_tag')."
exit 1
else
echo "OK"
fi
echo -n "Checking for tabs in UseLATEX.cmake..."
if fgrep -q "$(printf '\t')" UseLATEX.cmake
then
echo "FAIL"
echo
echo "Tab characters were found in UseLATEX.cmake. For consistent style"
echo "replace all tab characters with spaces to the desired column."
exit 1
else
echo "OK"
fi
echo -n "Extracting notes for $version..."
version_notes=`sed -n "/# $version/,/# [0-9]/{
s/^# $version *//
/^# [0-9]/d
s/^# *//
p
}" UseLATEX.cmake`
if [ \( $? -eq 0 \) -a \( -n "$version_notes" \) ]
then
echo "OK"
else
echo "FAIL"
echo
echo "Could not find the notes for this release in the History list."
echo "Make sure an item has been added to the release history."
ask_keep_going
fi
version_notes="
$version_notes"
echo -n "Checking that the working directory is clean..."
if [ -z "`git status --porcelain`" ]
then
echo "OK"
else
echo "FAIL"
echo
echo "There are uncommitted changes to your repository. Make sure that the"
echo "working directory is clean before running this script."
exit 1
fi
echo -n "Checking that we are on the master branch..."
if [ "`git rev-parse --abbrev-ref HEAD`" = "master" ]
then
echo "OK"
else
echo "FAIL"
echo
echo "Not currently on the master branch."
ask_keep_going
fi
echo -n "Checking that we are up to date on master..."
if git merge-base --is-ancestor origin/master HEAD
then
echo "OK"
else
echo "FAIL"
echo
echo "The local repository does not have the latest version from the"
echo "central repository. This is OK if you are retroactively tagging"
echo "a version but might be in error if you are tagging new changes."
ask_keep_going
fi
echo -n "Checking that master is up to date on origin..."
if git merge-base --is-ancestor HEAD origin/master
then
echo "OK"
else
echo "FAIL"
echo
echo "Your latest changes do not appear to be in the central repository."
echo "It is recommended to update the remote repository before tagging"
echo "a version."
ask_keep_going
fi
# We are finished with all the checks. Do the tag.
echo -n "Tagging with $git_version_tag..."
if git tag --annotate --edit --message="UseLATEX.cmake Release $version
$version_notes
# Write a message for tag:
# $git_version_tag
# Lines starting with '#' will be ignored.
" $git_version_tag
then
echo "OK"
else
echo "FAIL"
echo
echo "Could not tag repository for some reason."
exit 1
fi
echo
echo "Finished tagging to version $version."
echo "To push the tags to the remote repository, execute"
echo
echo " git push --tags"
echo

View file

@ -1,14 +0,0 @@
cmake_minimum_required(VERSION 2.8.4)
project(Bibliography NONE)
include(../../UseLATEX.cmake)
add_latex_document(DocWithBib.tex
BIBFILES References.bib
)
add_latex_document(DocWithBibLatex.tex
BIBFILES References.bib
USE_BIBLATEX
)

View file

@ -1,10 +0,0 @@
\documentclass{article}
\begin{document}
This document tests citations such as these \cite{Moreland2008}.
\bibliographystyle{plain}
\bibliography{References}
\end{document}

View file

@ -1,14 +0,0 @@
\documentclass{article}
\usepackage[backend=biber]{biblatex}
\addbibresource{References.bib}
\begin{document}
This document tests citations through the biblatex package such as these
\cite{Moreland2008}.
\printbibliography
\end{document}

View file

@ -1,4 +0,0 @@
This test exercises the ability to build documents with bibliographies
built from bib files. There are two documents. The first builds the
bibliography with the typical bibtex program. The second uses the
biblatex package and builds the bibliography with biber.

View file

@ -1,7 +0,0 @@
@techreport{Moreland2008,
Author = {Kenneth Moreland},
Title = {{UseLATEX.cmake}: {\LaTeX} Document Building Made Easy},
Institution = {Sandia National Laboratories},
Number = {SAND 2008-2743P},
Year = {2008}
}

View file

@ -1,10 +0,0 @@
cmake_minimum_required(VERSION 2.8.4)
project(DefaultTargets NONE)
include(../../UseLATEX.cmake)
add_latex_document(DefaultDvi.tex IMAGE_DIRS images FORCE_DVI)
add_latex_document(DefaultPdf.tex IMAGE_DIRS images FORCE_PDF)
add_latex_document(DefaultHtml.tex IMAGE_DIRS images FORCE_HTML)
add_latex_document(NoDefault.tex IMAGE_DIRS images EXCLUDE_FROM_ALL)

View file

@ -1,15 +0,0 @@
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\Large
\noindent
This document builds \textbf{\Huge dvi} by default.
\includegraphics[width=2in]{images/Circles_pdf}
\includegraphics[width=2in]{images/Circles_eps}
\includegraphics[width=2in]{images/Cool2WarmBar}
\end{document}

View file

@ -1,15 +0,0 @@
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\Large
\noindent
This document builds \textbf{\Huge html} by default.
\includegraphics[width=2in]{images/Circles_pdf}
\includegraphics[width=2in]{images/Circles_eps}
\includegraphics[width=2in]{images/Cool2WarmBar}
\end{document}

View file

@ -1,15 +0,0 @@
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\Large
\noindent
This document builds \textbf{\Huge pdf} by default.
\includegraphics[width=2in]{images/Circles_pdf}
\includegraphics[width=2in]{images/Circles_eps}
\includegraphics[width=2in]{images/Cool2WarmBar}
\end{document}

View file

@ -1,15 +0,0 @@
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\Large
\noindent
This document should \emph{\Huge not} be built by default.
\includegraphics[width=2in]{images/Circles_pdf}
\includegraphics[width=2in]{images/Circles_eps}
\includegraphics[width=2in]{images/Cool2WarmBar}
\end{document}

View file

@ -1,18 +0,0 @@
This test checks to make sure that the appropriate targets are being made
by default for LaTeX documents with forced builds.
The following documents exist and the default targets (made with no
arguments to make) should create the following files (in addition to the
standard auxileary files). This is assuming LATEX_DEFAULT_BUILD is not set
to Ps or SafePdf.
NoDefault.tex: -nothing-
DefaultDvi.tex: DefaultDvi.dvi
DefaultPdf.tex: DefaultPdf.pdf
DefaultHtml.tex: DefaultHtml.html DefaultHtml.dvi
Looking at the transpose, here are the files expected per extention.
*.dvi: DefaultDvi.dvi DefaultHtml.dvi
*.pdf: DefaultPdf.pdf
*.html: DefaultHtml.html

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

View file

@ -1,8 +0,0 @@
cmake_minimum_required(VERSION 2.8.4)
project(FileNameSpaces NONE)
include(../../UseLATEX.cmake)
add_latex_document("My Document.tex"
)

View file

@ -1,9 +0,0 @@
\documentclass{article}
\usepackage{graphicx}
\begin{document}
This is some text.
\end{document}

View file

@ -1,4 +0,0 @@
This test checks to make sure there are no problems with compiling a LaTeX
file in a directory with spaces in the name or a file with spaces in the
name. LaTeX itself is pretty intolerant about including files with spaces
in the name, but our CMake code should not be.

View file

@ -1,15 +0,0 @@
cmake_minimum_required(VERSION 2.8.4)
project(FindWarnings NONE)
include(../../UseLATEX.cmake)
add_latex_document(UndefinedReference.tex)
add_latex_document(UndefinedReferenceLong.tex)
add_latex_document(Natbib.tex)
add_latex_document(Overfull.tex)
add_latex_document(DuplicateLabel.tex)

View file

@ -1,9 +0,0 @@
\documentclass{article}
\begin{document}
Define the label once. \label{DefinedTwice}
Define the label again. \label{DefinedTwice}
\end{document}

View file

@ -1,9 +0,0 @@
\documentclass{article}
\usepackage{natbib}
\begin{document}
This is an undefined citation: \cite{NoSuchCite}.
\end{document}

View file

@ -1,7 +0,0 @@
\documentclass{article}
\begin{document}
This is an overfull box: \framebox[14in]{Box too big.}
\end{document}

View file

@ -1,4 +0,0 @@
This test exercises the ability for UseLATEX.cmake to make sure that
important warnings from LaTeX are printed (whereas unimportant are
suppressed). Each of the documents should compile successfully, but they
all have a warning that should be reported clearly in the build.

View file

@ -1,7 +0,0 @@
\documentclass{article}
\begin{document}
This is an undefined reference: \ref{sec:DoesNotExist}.
\end{document}

View file

@ -1,7 +0,0 @@
\documentclass{article}
\begin{document}
This is an undefined reference: \ref{sec:AVeryLongReferenceNameThatCausesTheWarningLineToBreakAcrossLines}.
\end{document}

View file

@ -1,9 +0,0 @@
cmake_minimum_required(VERSION 2.8.4)
project(ImageTypes NONE)
include(../../UseLATEX.cmake)
add_latex_document(ImageTypes.tex
IMAGE_DIRS images
)

View file

@ -1,29 +0,0 @@
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\fbox{\includegraphics[width=2in]{images/Circles_svg}}
SVG
\fbox{\includegraphics[width=2in]{images/Circles_pdf}}
PDF
\fbox{\includegraphics[width=2in]{images/Circles_eps}}
EPS
\fbox{\includegraphics[width=2in]{images/RainbowBar}}
TIFF
\fbox{\includegraphics[width=2in]{images/Cool2WarmBar}}
GIF
\fbox{\includegraphics[width=2in]{images/Blue2TanBar}}
BMP
\fbox{\includegraphics[width=2in]{images/Green2RedDivBar}}
PPM
\end{document}

View file

@ -1,5 +0,0 @@
This test exercises the ability to convert images of various types to those
that LaTeX understands. In particular, the more obscure image types should
be placed here to make sure the conversion does not regress.
It is also good to check that the LATEX_SMALL_IMAGES feature is working.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

File diff suppressed because one or more lines are too long

View file

@ -1,7 +0,0 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg width="362" height="218">
<circle cx="109" cy="109" r="109" fill="red"/>
<circle cx="253" cy="109" r="109" fill="blue"/>
</svg>

Before

Width:  |  Height:  |  Size: 289 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

File diff suppressed because one or more lines are too long

View file

@ -1,16 +0,0 @@
cmake_minimum_required(VERSION 2.8.4)
project(IncludeDirectory NONE)
include(../../UseLATEX.cmake)
set(UseLATEX_TEST_NAME "adding include directories")
add_latex_document(IncludeStuff.tex
INPUTS CopiedInput.tex copied-subdir/CopiedInSubdir.tex
INCLUDE_DIRECTORIES
copied-subdir
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/uncopied-subdir
CONFIGURE IncludeStuff.tex CopiedInput.tex copied-subdir/CopiedInSubdir.tex
)

View file

@ -1,4 +0,0 @@
% -*- latex -*-
% This should only compile if working with the "copied" version of the latex file.
This is a copied input for @UseLATEX_TEST_NAME@.

View file

@ -1,22 +0,0 @@
% -*- latex -*-
\documentclass{article}
\begin{document}
% Make a line that will get a parse error if this file is not configured. This makes sure that the configured file is read first.
Running tests for @UseLATEX_TEST_NAME@.
Included from CopiedInput:
\input{CopiedInput}
Included from copied-subdir/CopiedInSubdir:
\input{CopiedInSubdir}
Included from source dir:
\input{UncopiedInput}
Included from source subdirectory:
\input{UncopiedInSubdir}
\end{document}

View file

@ -1,3 +0,0 @@
This test makes sure that the INCLUDE_DIRECTORIES option works correctly.
It tests to make sure that it works against directories that are copied to
the build directory and those that remain in the source directory.

View file

@ -1,3 +0,0 @@
% -*- latex -*-
This comes from a file in the source directory.

View file

@ -1,4 +0,0 @@
% -*- latex -*-
% This should only compile if working with the "copied" version of the latex file.
This is a copied input for @UseLATEX_TEST_NAME@.

View file

@ -1,3 +0,0 @@
% -*- latex -*-
This comes from a file in a source subdirectory.

View file

@ -1,7 +0,0 @@
cmake_minimum_required(VERSION 2.8.4)
project(MultiDocuments NONE)
add_subdirectory(subdir1)
add_subdirectory(subdir2)
add_subdirectory(subdir2_2)

View file

@ -1,10 +0,0 @@
This tests appropriate behavior when a project (or multi-project) tries to
create multiple documents with multiple add_latex_document calls. It also
creates them in separate subdirectories, with each subdirectory
independently loading UseLATEX.cmake. This is typical in a large project
that might bring in several subprojects.
When running this project, 3 documents should be built, one in each
subdirectory. You should not get errors or warnings about a target being
defined multiple times. You should be able to build using the pdf, dvi, ps,
and safepdf targets.

View file

@ -1,6 +0,0 @@
include(../../../UseLATEX.cmake)
add_latex_document(Subdirectory1.tex
IMAGE_DIRS images
INPUTS IncludedFile.tex
)

View file

@ -1 +0,0 @@
This text comes from an included file.

View file

@ -1,15 +0,0 @@
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\textbf{Document from subdirectory 1}
Here is an image:
\fbox{\includegraphics[width=2in]{images/Cool2WarmBar}}
This included file should show up on the next page.
\include{IncludedFile}
\end{document}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

View file

@ -1,3 +0,0 @@
include(../../../UseLATEX.cmake)
add_latex_document(Subdirectory2.tex)

View file

@ -1,7 +0,0 @@
\documentclass{article}
\begin{document}
\textbf{Document from subdirectory 2}
\end{document}

View file

@ -1,5 +0,0 @@
include(../../../UseLATEX.cmake)
add_latex_document(Subdirectory2.tex
TARGET_NAME RenamedTargetForSubdirectory2_2
)

View file

@ -1,7 +0,0 @@
\documentclass{article}
\begin{document}
\textbf{Document from subdirectory 2\_2}
\end{document}

View file

@ -1,10 +0,0 @@
cmake_minimum_required(VERSION 2.8.4)
project(MultiDotFilename NONE)
include(../../UseLATEX.cmake)
add_latex_document(multi.dot.filename.tex
BIBFILES multi.dot.filename.bib
IMAGES my.image.eps
)

View file

@ -1,11 +0,0 @@
This test exercises problems with filenames containing multiple periods.
The tex, bib, and image files all have more than one dot. The tex and bib
files should be handled properly. In general, the image file is not.
CMake should handle this image correctly in that it is correctly
copied/converted to the build directory. However, many distributions of
LaTeX do not handle these images correctly.
The tex file links in the image using its full name as an eps file. That
seems to work for my distribution, which has been picky about all other
configurations, when making a dvi file. If the LaTeX build fails, that may
not be an actual problem with UseLATEX.cmake.

View file

@ -1,4 +0,0 @@
@book(foo,
author = "Hero Protagonist",
title = "The Life of Foo"
)

View file

@ -1,16 +0,0 @@
\documentclass{article}
\usepackage{graphicx}
\begin{document}
Here is an image.
\includegraphics{my.image.eps}
\cite{foo}
\bibliographystyle{plain}
\bibliography{multi.dot.filename}
\end{document}

View file

@ -1,500 +0,0 @@
%!PS-Adobe-3.0 EPSF-3.0
%Produced by poppler pdftops version: 0.18.4 (http://poppler.freedesktop.org)
%%Creator: Adobe Illustrator CS3
%%LanguageLevel: 2
%%DocumentSuppliedResources: (atend)
%%BoundingBox: 0 0 144 144
%%DocumentSuppliedResources: (atend)
%%EndComments
%%BeginProlog
%%BeginResource: procset xpdf 3.00 0
%%Copyright: Copyright 1996-2004 Glyph & Cog, LLC
/xpdf 75 dict def xpdf begin
% PDF special state
/pdfDictSize 15 def
/pdfSetup {
3 1 roll 2 array astore
/setpagedevice where {
pop 3 dict begin
/PageSize exch def
/ImagingBBox null def
/Policies 1 dict dup begin /PageSize 3 def end def
{ /Duplex true def } if
currentdict end setpagedevice
} {
pop pop
} ifelse
} def
/pdfStartPage {
pdfDictSize dict begin
/pdfFillCS [] def
/pdfFillXform {} def
/pdfStrokeCS [] def
/pdfStrokeXform {} def
/pdfFill [0] def
/pdfStroke [0] def
/pdfFillOP false def
/pdfStrokeOP false def
/pdfLastFill false def
/pdfLastStroke false def
/pdfTextMat [1 0 0 1 0 0] def
/pdfFontSize 0 def
/pdfCharSpacing 0 def
/pdfTextRender 0 def
/pdfPatternCS false def
/pdfTextRise 0 def
/pdfWordSpacing 0 def
/pdfHorizScaling 1 def
/pdfTextClipPath [] def
} def
/pdfEndPage { end } def
% PDF color state
/cs { /pdfFillXform exch def dup /pdfFillCS exch def
setcolorspace } def
/CS { /pdfStrokeXform exch def dup /pdfStrokeCS exch def
setcolorspace } def
/sc { pdfLastFill not { pdfFillCS setcolorspace } if
dup /pdfFill exch def aload pop pdfFillXform setcolor
/pdfLastFill true def /pdfLastStroke false def } def
/SC { pdfLastStroke not { pdfStrokeCS setcolorspace } if
dup /pdfStroke exch def aload pop pdfStrokeXform setcolor
/pdfLastStroke true def /pdfLastFill false def } def
/op { /pdfFillOP exch def
pdfLastFill { pdfFillOP setoverprint } if } def
/OP { /pdfStrokeOP exch def
pdfLastStroke { pdfStrokeOP setoverprint } if } def
/fCol {
pdfLastFill not {
pdfFillCS setcolorspace
pdfFill aload pop pdfFillXform setcolor
pdfFillOP setoverprint
/pdfLastFill true def /pdfLastStroke false def
} if
} def
/sCol {
pdfLastStroke not {
pdfStrokeCS setcolorspace
pdfStroke aload pop pdfStrokeXform setcolor
pdfStrokeOP setoverprint
/pdfLastStroke true def /pdfLastFill false def
} if
} def
% build a font
/pdfMakeFont {
4 3 roll findfont
4 2 roll matrix scale makefont
dup length dict begin
{ 1 index /FID ne { def } { pop pop } ifelse } forall
/Encoding exch def
currentdict
end
definefont pop
} def
/pdfMakeFont16 {
exch findfont
dup length dict begin
{ 1 index /FID ne { def } { pop pop } ifelse } forall
/WMode exch def
currentdict
end
definefont pop
} def
% graphics state operators
/q { gsave pdfDictSize dict begin } def
/Q {
end grestore
/pdfLastFill where {
pop
pdfLastFill {
pdfFillOP setoverprint
} {
pdfStrokeOP setoverprint
} ifelse
} if
} def
/cm { concat } def
/d { setdash } def
/i { setflat } def
/j { setlinejoin } def
/J { setlinecap } def
/M { setmiterlimit } def
/w { setlinewidth } def
% path segment operators
/m { moveto } def
/l { lineto } def
/c { curveto } def
/re { 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto
neg 0 rlineto closepath } def
/h { closepath } def
% path painting operators
/S { sCol stroke } def
/Sf { fCol stroke } def
/f { fCol fill } def
/f* { fCol eofill } def
% clipping operators
/W { clip newpath } def
/W* { eoclip newpath } def
/Ws { strokepath clip newpath } def
% text state operators
/Tc { /pdfCharSpacing exch def } def
/Tf { dup /pdfFontSize exch def
dup pdfHorizScaling mul exch matrix scale
pdfTextMat matrix concatmatrix dup 4 0 put dup 5 0 put
exch findfont exch makefont setfont } def
/Tr { /pdfTextRender exch def } def
/Tp { /pdfPatternCS exch def } def
/Ts { /pdfTextRise exch def } def
/Tw { /pdfWordSpacing exch def } def
/Tz { /pdfHorizScaling exch def } def
% text positioning operators
/Td { pdfTextMat transform moveto } def
/Tm { /pdfTextMat exch def } def
% text string operators
/cshow where {
pop
/cshow2 {
dup {
pop pop
1 string dup 0 3 index put 3 index exec
} exch cshow
pop pop
} def
}{
/cshow2 {
currentfont /FontType get 0 eq {
0 2 2 index length 1 sub {
2 copy get exch 1 add 2 index exch get
2 copy exch 256 mul add
2 string dup 0 6 5 roll put dup 1 5 4 roll put
3 index exec
} for
} {
dup {
1 string dup 0 3 index put 3 index exec
} forall
} ifelse
pop pop
} def
} ifelse
/awcp {
exch {
false charpath
5 index 5 index rmoveto
6 index eq { 7 index 7 index rmoveto } if
} exch cshow2
6 {pop} repeat
} def
/Tj {
fCol
1 index stringwidth pdfTextMat idtransform pop
sub 1 index length dup 0 ne { div } { pop pop 0 } ifelse
pdfWordSpacing pdfHorizScaling mul 0 pdfTextMat dtransform 32
4 3 roll pdfCharSpacing pdfHorizScaling mul add 0
pdfTextMat dtransform
6 5 roll Tj1
} def
/Tj16 {
fCol
2 index stringwidth pdfTextMat idtransform pop
sub exch div
pdfWordSpacing pdfHorizScaling mul 0 pdfTextMat dtransform 32
4 3 roll pdfCharSpacing pdfHorizScaling mul add 0
pdfTextMat dtransform
6 5 roll Tj1
} def
/Tj16V {
fCol
2 index stringwidth pdfTextMat idtransform exch pop
sub exch div
0 pdfWordSpacing pdfTextMat dtransform 32
4 3 roll pdfCharSpacing add 0 exch
pdfTextMat dtransform
6 5 roll Tj1
} def
/Tj1 {
0 pdfTextRise pdfTextMat dtransform rmoveto
currentpoint 8 2 roll
pdfTextRender 1 and 0 eq pdfPatternCS not and {
6 copy awidthshow
} if
pdfTextRender 3 and dup 1 eq exch 2 eq or {
7 index 7 index moveto
6 copy
currentfont /FontType get 3 eq { fCol } { sCol } ifelse
false awcp currentpoint stroke moveto
} if
pdfTextRender 4 and 0 ne pdfPatternCS or {
8 6 roll moveto
false awcp
/pdfTextClipPath [ pdfTextClipPath aload pop
{/moveto cvx}
{/lineto cvx}
{/curveto cvx}
{/closepath cvx}
pathforall ] def
currentpoint newpath moveto
} {
8 {pop} repeat
} ifelse
0 pdfTextRise neg pdfTextMat dtransform rmoveto
} def
/TJm { pdfFontSize 0.001 mul mul neg 0
pdfTextMat dtransform rmoveto } def
/TJmV { pdfFontSize 0.001 mul mul neg 0 exch
pdfTextMat dtransform rmoveto } def
/Tclip { pdfTextClipPath cvx exec clip newpath
/pdfTextClipPath [] def } def
/Tclip* { pdfTextClipPath cvx exec eoclip newpath
/pdfTextClipPath [] def } def
% Level 2 image operators
/pdfImBuf 100 string def
/pdfIm {
image
{ currentfile pdfImBuf readline
not { pop exit } if
(%-EOD-) eq { exit } if } loop
} def
/pdfImM {
fCol imagemask
{ currentfile pdfImBuf readline
not { pop exit } if
(%-EOD-) eq { exit } if } loop
} def
/pr { 2 index 2 index 3 2 roll putinterval 4 add } def
/pdfImClip {
gsave
0 2 4 index length 1 sub {
dup 4 index exch 2 copy
get 5 index div put
1 add 3 index exch 2 copy
get 3 index div put
} for
pop pop rectclip
} def
/pdfImClipEnd { grestore } def
% shading operators
/colordelta {
false 0 1 3 index length 1 sub {
dup 4 index exch get 3 index 3 2 roll get sub abs 0.004 gt {
pop true
} if
} for
exch pop exch pop
} def
/funcCol { func n array astore } def
/funcSH {
dup 0 eq {
true
} {
dup 6 eq {
false
} {
4 index 4 index funcCol dup
6 index 4 index funcCol dup
3 1 roll colordelta 3 1 roll
5 index 5 index funcCol dup
3 1 roll colordelta 3 1 roll
6 index 8 index funcCol dup
3 1 roll colordelta 3 1 roll
colordelta or or or
} ifelse
} ifelse
{
1 add
4 index 3 index add 0.5 mul exch 4 index 3 index add 0.5 mul exch
6 index 6 index 4 index 4 index 4 index funcSH
2 index 6 index 6 index 4 index 4 index funcSH
6 index 2 index 4 index 6 index 4 index funcSH
5 3 roll 3 2 roll funcSH pop pop
} {
pop 3 index 2 index add 0.5 mul 3 index 2 index add 0.5 mul
funcCol sc
dup 4 index exch mat transform m
3 index 3 index mat transform l
1 index 3 index mat transform l
mat transform l pop pop h f*
} ifelse
} def
/axialCol {
dup 0 lt {
pop t0
} {
dup 1 gt {
pop t1
} {
dt mul t0 add
} ifelse
} ifelse
func n array astore
} def
/axialSH {
dup 0 eq {
true
} {
dup 8 eq {
false
} {
2 index axialCol 2 index axialCol colordelta
} ifelse
} ifelse
{
1 add 3 1 roll 2 copy add 0.5 mul
dup 4 3 roll exch 4 index axialSH
exch 3 2 roll axialSH
} {
pop 2 copy add 0.5 mul
axialCol sc
exch dup dx mul x0 add exch dy mul y0 add
3 2 roll dup dx mul x0 add exch dy mul y0 add
dx abs dy abs ge {
2 copy yMin sub dy mul dx div add yMin m
yMax sub dy mul dx div add yMax l
2 copy yMax sub dy mul dx div add yMax l
yMin sub dy mul dx div add yMin l
h f*
} {
exch 2 copy xMin sub dx mul dy div add xMin exch m
xMax sub dx mul dy div add xMax exch l
exch 2 copy xMax sub dx mul dy div add xMax exch l
xMin sub dx mul dy div add xMin exch l
h f*
} ifelse
} ifelse
} def
/radialCol {
dup t0 lt {
pop t0
} {
dup t1 gt {
pop t1
} if
} ifelse
func n array astore
} def
/radialSH {
dup 0 eq {
true
} {
dup 8 eq {
false
} {
2 index dt mul t0 add radialCol
2 index dt mul t0 add radialCol colordelta
} ifelse
} ifelse
{
1 add 3 1 roll 2 copy add 0.5 mul
dup 4 3 roll exch 4 index radialSH
exch 3 2 roll radialSH
} {
pop 2 copy add 0.5 mul dt mul t0 add
radialCol sc
encl {
exch dup dx mul x0 add exch dup dy mul y0 add exch dr mul r0 add
0 360 arc h
dup dx mul x0 add exch dup dy mul y0 add exch dr mul r0 add
360 0 arcn h f
} {
2 copy
dup dx mul x0 add exch dup dy mul y0 add exch dr mul r0 add
a1 a2 arcn
dup dx mul x0 add exch dup dy mul y0 add exch dr mul r0 add
a2 a1 arcn h
dup dx mul x0 add exch dup dy mul y0 add exch dr mul r0 add
a1 a2 arc
dup dx mul x0 add exch dup dy mul y0 add exch dr mul r0 add
a2 a1 arc h f
} ifelse
} ifelse
} def
end
%%EndResource
%%EndProlog
%%BeginSetup
xpdf begin
%%EndSetup
pdfStartPage
[] 0 d
1 i
0 j
0 J
10 M
1 w
/DeviceGray {} cs
[0] sc
/DeviceGray {} CS
[0] SC
false op
false OP
{} settransfer
q
q
0 0 144 144 re
W
/DeviceCMYK {} cs
[0.05 0 0.9 0] sc
false op
false OP
q
[1 0 0 1 135 72] cm
0 0 m
0 -34.793 -28.205 -63 -63 -63 c
-97.793 -63 -126 -34.793 -126 0 c
-126 34.793 -97.793 63 -63 63 c
-28.205 63 0 34.793 0 0 c
f
Q
/DeviceCMYK {} CS
[0 0 0 1] SC
4 M
q
[1 0 0 1 135 72] cm
0 0 m
0 -34.793 -28.205 -63 -63 -63 c
-97.793 -63 -126 -34.793 -126 0 c
-126 34.793 -97.793 63 -63 63 c
-28.205 63 0 34.793 0 0 c
h
S
Q
q
[1 0 0 1 38 56.4189] cm
0 0 m
0 -17.334 23.333 -24 32 -24 c
S
Q
q
[1 0 0 1 102 56.4189] cm
0 0 m
0 -17.334 -23.334 -24 -32 -24 c
S
Q
/DeviceCMYK {} cs
[0 0 0 1] sc
q
[1 0 0 1 60.3335 94] cm
0 0 m
0 -5.891 -4.775 -10.667 -10.667 -10.667 c
-16.558 -10.667 -21.333 -5.891 -21.333 0 c
-21.333 5.891 -16.558 10.667 -10.667 10.667 c
-4.775 10.667 0 5.891 0 0 c
f
Q
q
[1 0 0 1 98.667 94] cm
0 0 m
0 -5.891 -4.775 -10.667 -10.667 -10.667 c
-16.559 -10.667 -21.333 -5.891 -21.333 0 c
-21.333 5.891 -16.559 10.667 -10.667 10.667 c
-4.775 10.667 0 5.891 0 0 c
f
Q
Q
Q
showpage
%%PageTrailer
pdfEndPage
%%Trailer
end
%%DocumentSuppliedResources:
%%EOF

View file

@ -1,14 +0,0 @@
cmake_minimum_required(VERSION 2.8.4)
project(MultiIndex NONE)
include(../../UseLATEX.cmake)
add_latex_document(SingleIndex.tex
USE_INDEX
)
add_latex_document(MultiIndex.tex
USE_INDEX
INDEX_NAMES terms people
)

View file

@ -1,25 +0,0 @@
\documentclass{article}
\usepackage{blindtext}
\usepackage{multind}
\makeindex{terms}
\makeindex{people}
\begin{document}
\index{terms}{foo}
\index{terms}{bar}
\index{terms}{baz}
\index{people}{Homer}
\index{people}{Marge}
\index{people}{Bart}
\index{people}{Lisa}
\index{people}{Maggie}
\blindtext
\printindex{terms}{Term Index}
\printindex{people}{People Index}
\end{document}

View file

@ -1,4 +0,0 @@
This test exercises the building of files that use multiple indices with
the multind package. For completeness, making a single index with the
makeindex package is also tested. If both documents builds, then the test
passes.

View file

@ -1,18 +0,0 @@
\documentclass{article}
\usepackage{blindtext}
\usepackage{makeidx}
\makeindex
\begin{document}
\index{foo}
\index{bar}
\index{baz}
\blindtext
\printindex
\end{document}

View file

@ -1,65 +0,0 @@
% indexes document style option for producing multiple indexes
% for use with the modified bbok style, CHbook.sty
% Written by F.W. Long, Version 1.1, 12 August 1991.
% Modified by F.W. Long, Version 1.1a, 29 August 1991
% to get the index heading correctly spaced.
% Modified by F.W. Long, Version 1.1b, 31 August 1991
% to remove the abbreviation \ix (which should be in the document, not here).
% Modified \makeindex and \index commands to allow multiple indexes
% in both cases the first parameter is the index name.
% They now work more like \@starttoc and \addcontentsline.
% \index is no longer defined inside \makeindex but determines
% whether the appropriate file is defined before writing to it.
\def\makeindex#1{\begingroup
\makeatletter
\if@filesw \expandafter\newwrite\csname #1@idxfile\endcsname
\expandafter\immediate\openout \csname #1@idxfile\endcsname #1.idx\relax
\typeout{Writing index file #1.idx }\fi \endgroup}
\def\index#1{\@bsphack\begingroup
\def\protect##1{\string##1\space}\@sanitize
\@wrindex{#1}}
% \@wrindex now checks that the appropriate file is defined.
\def\@wrindex#1#2{\let\thepage\relax
\xdef\@gtempa{\@ifundefined{#1@idxfile}{}{\expandafter
\write\csname #1@idxfile\endcsname{\string
\indexentry{#2}{\thepage}}}}\endgroup\@gtempa
\if@nobreak \ifvmode\nobreak\fi\fi\@esphack}
% Modified \printindex command to allow multiple indexes.
% This now takes over much of the work of \theindex.
% Again, the first parameter is the index name.
% The second parameter is the index title (as printed).
\newif\if@restonecol
\def\printindex#1#2{\@restonecoltrue\if@twocolumn\@restonecolfalse\fi
\columnseprule \z@ \columnsep 35pt
\newpage \twocolumn[{\Large\bf #2 \vskip4ex}]
\markright{\uppercase{#2}}
\addcontentsline{toc}{section}{#2}
\@input{#1.ind}}
% The following index commands are taken from book.sty.
% \theindex is modified to not start a chapter.
\def\theindex{\parindent\z@
\parskip\z@ plus .3pt\relax\let\item\@idxitem}
\def\@idxitem{\par\hangindent 40pt}
\def\subitem{\par\hangindent 40pt \hspace*{20pt}}
\def\subsubitem{\par\hangindent 40pt \hspace*{30pt}}
\def\endtheindex{\if@restonecol\onecolumn\else\clearpage\fi}
\def\indexspace{\par \vskip 10pt plus 5pt minus 3pt\relax}
% the command \ix allows an abbreviation for the general index
%\def\ix#1{#1\index{general}{#1}}
% define the \see command from makeidx.sty
\def\see#1#2{{\em see\/} #1}

View file

@ -1,3 +0,0 @@
This directory contains simple documents that test features and fixes of
UseLATEX.cmake. You will find many features missing as I was very late in
starting this practice and have not gone back to retest earlier features.

View file

@ -1,10 +0,0 @@
cmake_minimum_required(VERSION 2.8.4)
project(Subdirectory NONE)
include(../../UseLATEX.cmake)
add_latex_document(subdir/Subdirectory.tex
IMAGE_DIRS subdir/images
INPUTS subdir/IncludedFile.tex
)

View file

@ -1,4 +0,0 @@
This tests appropriate behavior when the document is located in a
subdirectory. When running this test, make sure that the document is built
correctly, and that the auxclean and clean targets get rid of all the built
files.

View file

@ -1 +0,0 @@
This text comes from an included file.

View file

@ -1,13 +0,0 @@
\documentclass{article}
\usepackage{graphicx}
\begin{document}
Here is an image:
\fbox{\includegraphics[width=2in]{subdir/images/Cool2WarmBar}}
This included file should show up on the next page.
\include{subdir/IncludedFile}
\end{document}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB