Compare commits
138 commits
Version1.8
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
6c55769501 | ||
|
0c21bd7f75 | ||
|
ddcaa05f5c | ||
|
6999f191fa | ||
|
3c3ce51454 | ||
|
adf9530897 | ||
|
4bfb138e33 | ||
|
e0e6028757 | ||
|
7e1e03b4c0 | ||
|
193d64b3c4 | ||
|
b99d970ef1 | ||
|
b6e3317aaf | ||
|
acc9ac7762 | ||
|
d0d4d59ff5 | ||
|
88facfc81c | ||
|
aa36c16f99 | ||
|
56d5753c84 | ||
|
ac4d21d0b3 | ||
|
ca926d851c | ||
|
cdec9a8944 | ||
|
64034cf48b | ||
|
8dd1878f7a | ||
|
5c0fd3da23 | ||
|
dc2e6b8931 | ||
|
3945141c70 | ||
|
a564114f2b | ||
|
091a7a3409 | ||
|
6577150a41 | ||
|
1c817c70f2 | ||
|
c8eb18ad32 | ||
|
b36810fe9a | ||
|
0c9f0c7822 | ||
|
d03bb459ea | ||
|
3a66f0e5e5 | ||
|
6895ba6d37 | ||
|
c5394a7263 | ||
|
2fd11379ab | ||
|
abad1ed145 | ||
|
0eb452382a | ||
|
9d39cbdadc | ||
|
f1d6102b39 | ||
|
52de6837a4 | ||
|
63a8a4f49e | ||
|
e80946efba | ||
|
22eacee5cd | ||
|
66ca3a5cac | ||
|
f4546b6d8e | ||
|
c190c19cae | ||
|
7c6ea36464 | ||
|
46e7d83b2a | ||
|
844394a066 | ||
|
9b5271a10f | ||
|
e6358ec349 | ||
|
18390f6a94 | ||
|
73515335f5 | ||
|
1a9d75a3b5 | ||
|
54d2bdfe71 | ||
|
2c570eea4d | ||
|
4177f43744 | ||
|
763d730275 | ||
|
2d71bffed5 | ||
|
3d6a7a93d3 | ||
|
d83fd902b5 | ||
|
82357b7dde | ||
|
47ba871b8e | ||
|
b662bf887f | ||
|
18abbfebc1 | ||
|
26426e23ec | ||
|
7c30cef708 | ||
|
8ecd472518 | ||
|
fb07aa109f | ||
|
dc6efbb2b8 | ||
|
640891fd25 | ||
|
74ae43a968 | ||
|
2ce9fb7097 | ||
|
5bb6a7a638 | ||
|
e603d1f003 | ||
|
59cc0e32ce | ||
|
5f7c265521 | ||
|
78a7233a33 | ||
|
9e1f62b5dc | ||
|
a01764abf1 | ||
|
9778983e16 | ||
|
11e29805bc | ||
|
91cc27cbc3 | ||
|
5468246176 | ||
|
f77b563329 | ||
|
2eb8826243 | ||
|
2cf610a36b | ||
|
77fe49f7c1 | ||
|
3264be4f0f | ||
|
fa0fc39926 | ||
|
4627adc1e4 | ||
|
582d86ccbd | ||
|
4dbbc765d6 | ||
|
7155d6374d | ||
|
9236074d70 | ||
|
387cf24870 | ||
|
a337f2668a | ||
|
c0d0d30a9b | ||
|
50661481a7 | ||
|
b2065e7ed2 | ||
|
264791bd71 | ||
|
0005385708 | ||
|
dd7f482295 | ||
|
a424ee4298 | ||
|
afdf1a7285 | ||
|
b1d4071114 | ||
|
2e6847b561 | ||
|
f07faa839d | ||
|
6e08608b2c | ||
|
ab6d94ae36 | ||
|
28524f18ba | ||
|
b3073dd638 | ||
|
5fd9c1270f | ||
|
de1c9e9607 | ||
|
b92794f5b1 | ||
|
a30554f4ec | ||
|
465c52763c | ||
|
b7cc2bb5a2 | ||
|
17b4001802 | ||
|
80854be3f1 | ||
|
337167bd5d | ||
|
33c552c5ba | ||
|
9fd05b6487 | ||
|
8385c6be43 | ||
|
b2ff69f9c8 | ||
|
74884dab2b | ||
|
acc72788dd | ||
|
822f46d0ba | ||
|
e263ea7e1e | ||
|
0f95622330 | ||
|
bc8f67127a | ||
|
0a184ba20c | ||
|
5acf5264eb | ||
|
2625f1475c | ||
|
b85f612fd0 | ||
|
cf7af26067 |
75 changed files with 4012 additions and 871 deletions
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
*.swp
|
||||
*~
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
PROJECT(UseLATEX_DOC NONE)
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
|
||||
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
|
||||
add_latex_document(UseLATEX.tex
|
||||
INPUTS CMakeLists.txt
|
||||
)
|
||||
|
|
34
README
34
README
|
@ -1,34 +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". Here
|
||||
are some of the things 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.
|
||||
|
||||
This repository contains the CMake macros in the 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, that contains all of the
|
||||
documentation for UseLATEX.cmake. You will also find a CMake build file,
|
||||
CMakeLists.txt, that uses UseLATEX.cmake to build UseLATEX.tex. It also
|
||||
serves as a good example for using UseLATEX.cmake.
|
||||
|
||||
You can find the latest information on UseLATEX.cmake on the CMake Wiki at
|
||||
the following URL.
|
||||
|
||||
http://www.cmake.org/Wiki/CMakeUserUseLATEX
|
||||
|
||||
|
42
README.md
Normal file
42
README.md
Normal file
|
@ -0,0 +1,42 @@
|
|||
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).)
|
2282
UseLATEX.cmake
2282
UseLATEX.cmake
File diff suppressed because it is too large
Load diff
BIN
UseLATEX.pdf
Normal file
BIN
UseLATEX.pdf
Normal file
Binary file not shown.
819
UseLATEX.tex
819
UseLATEX.tex
File diff suppressed because it is too large
Load diff
183
scripts/release-version.sh
Executable file
183
scripts/release-version.sh
Executable file
|
@ -0,0 +1,183 @@
|
|||
#!/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
|
14
tests/Bibliography/CMakeLists.txt
Normal file
14
tests/Bibliography/CMakeLists.txt
Normal file
|
@ -0,0 +1,14 @@
|
|||
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
|
||||
)
|
10
tests/Bibliography/DocWithBib.tex
Normal file
10
tests/Bibliography/DocWithBib.tex
Normal file
|
@ -0,0 +1,10 @@
|
|||
\documentclass{article}
|
||||
|
||||
\begin{document}
|
||||
|
||||
This document tests citations such as these \cite{Moreland2008}.
|
||||
|
||||
\bibliographystyle{plain}
|
||||
\bibliography{References}
|
||||
|
||||
\end{document}
|
14
tests/Bibliography/DocWithBibLatex.tex
Normal file
14
tests/Bibliography/DocWithBibLatex.tex
Normal file
|
@ -0,0 +1,14 @@
|
|||
\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}
|
4
tests/Bibliography/README
Normal file
4
tests/Bibliography/README
Normal file
|
@ -0,0 +1,4 @@
|
|||
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.
|
7
tests/Bibliography/References.bib
Normal file
7
tests/Bibliography/References.bib
Normal file
|
@ -0,0 +1,7 @@
|
|||
@techreport{Moreland2008,
|
||||
Author = {Kenneth Moreland},
|
||||
Title = {{UseLATEX.cmake}: {\LaTeX} Document Building Made Easy},
|
||||
Institution = {Sandia National Laboratories},
|
||||
Number = {SAND 2008-2743P},
|
||||
Year = {2008}
|
||||
}
|
10
tests/DefaultTargets/CMakeLists.txt
Normal file
10
tests/DefaultTargets/CMakeLists.txt
Normal file
|
@ -0,0 +1,10 @@
|
|||
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)
|
15
tests/DefaultTargets/DefaultDvi.tex
Normal file
15
tests/DefaultTargets/DefaultDvi.tex
Normal file
|
@ -0,0 +1,15 @@
|
|||
\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}
|
15
tests/DefaultTargets/DefaultHtml.tex
Normal file
15
tests/DefaultTargets/DefaultHtml.tex
Normal file
|
@ -0,0 +1,15 @@
|
|||
\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}
|
15
tests/DefaultTargets/DefaultPdf.tex
Normal file
15
tests/DefaultTargets/DefaultPdf.tex
Normal file
|
@ -0,0 +1,15 @@
|
|||
\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}
|
15
tests/DefaultTargets/NoDefault.tex
Normal file
15
tests/DefaultTargets/NoDefault.tex
Normal file
|
@ -0,0 +1,15 @@
|
|||
\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}
|
18
tests/DefaultTargets/README
Normal file
18
tests/DefaultTargets/README
Normal file
|
@ -0,0 +1,18 @@
|
|||
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
|
BIN
tests/DefaultTargets/images/Circles_eps.eps
Normal file
BIN
tests/DefaultTargets/images/Circles_eps.eps
Normal file
Binary file not shown.
214
tests/DefaultTargets/images/Circles_pdf.pdf
Normal file
214
tests/DefaultTargets/images/Circles_pdf.pdf
Normal file
File diff suppressed because one or more lines are too long
BIN
tests/DefaultTargets/images/Cool2WarmBar.png
Normal file
BIN
tests/DefaultTargets/images/Cool2WarmBar.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
8
tests/File Name Spaces/CMakeLists.txt
Normal file
8
tests/File Name Spaces/CMakeLists.txt
Normal file
|
@ -0,0 +1,8 @@
|
|||
cmake_minimum_required(VERSION 2.8.4)
|
||||
|
||||
project(FileNameSpaces NONE)
|
||||
|
||||
include(../../UseLATEX.cmake)
|
||||
|
||||
add_latex_document("My Document.tex"
|
||||
)
|
9
tests/File Name Spaces/My Document.tex
Normal file
9
tests/File Name Spaces/My Document.tex
Normal file
|
@ -0,0 +1,9 @@
|
|||
\documentclass{article}
|
||||
|
||||
\usepackage{graphicx}
|
||||
|
||||
\begin{document}
|
||||
|
||||
This is some text.
|
||||
|
||||
\end{document}
|
4
tests/File Name Spaces/README
Normal file
4
tests/File Name Spaces/README
Normal file
|
@ -0,0 +1,4 @@
|
|||
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.
|
15
tests/FindWarnings/CMakeLists.txt
Normal file
15
tests/FindWarnings/CMakeLists.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
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)
|
9
tests/FindWarnings/DuplicateLabel.tex
Normal file
9
tests/FindWarnings/DuplicateLabel.tex
Normal file
|
@ -0,0 +1,9 @@
|
|||
\documentclass{article}
|
||||
|
||||
\begin{document}
|
||||
|
||||
Define the label once. \label{DefinedTwice}
|
||||
|
||||
Define the label again. \label{DefinedTwice}
|
||||
|
||||
\end{document}
|
9
tests/FindWarnings/Natbib.tex
Normal file
9
tests/FindWarnings/Natbib.tex
Normal file
|
@ -0,0 +1,9 @@
|
|||
\documentclass{article}
|
||||
|
||||
\usepackage{natbib}
|
||||
|
||||
\begin{document}
|
||||
|
||||
This is an undefined citation: \cite{NoSuchCite}.
|
||||
|
||||
\end{document}
|
7
tests/FindWarnings/Overfull.tex
Normal file
7
tests/FindWarnings/Overfull.tex
Normal file
|
@ -0,0 +1,7 @@
|
|||
\documentclass{article}
|
||||
|
||||
\begin{document}
|
||||
|
||||
This is an overfull box: \framebox[14in]{Box too big.}
|
||||
|
||||
\end{document}
|
4
tests/FindWarnings/README
Normal file
4
tests/FindWarnings/README
Normal file
|
@ -0,0 +1,4 @@
|
|||
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.
|
7
tests/FindWarnings/UndefinedReference.tex
Normal file
7
tests/FindWarnings/UndefinedReference.tex
Normal file
|
@ -0,0 +1,7 @@
|
|||
\documentclass{article}
|
||||
|
||||
\begin{document}
|
||||
|
||||
This is an undefined reference: \ref{sec:DoesNotExist}.
|
||||
|
||||
\end{document}
|
7
tests/FindWarnings/UndefinedReferenceLong.tex
Normal file
7
tests/FindWarnings/UndefinedReferenceLong.tex
Normal file
|
@ -0,0 +1,7 @@
|
|||
\documentclass{article}
|
||||
|
||||
\begin{document}
|
||||
|
||||
This is an undefined reference: \ref{sec:AVeryLongReferenceNameThatCausesTheWarningLineToBreakAcrossLines}.
|
||||
|
||||
\end{document}
|
9
tests/ImageTypes/CMakeLists.txt
Normal file
9
tests/ImageTypes/CMakeLists.txt
Normal file
|
@ -0,0 +1,9 @@
|
|||
cmake_minimum_required(VERSION 2.8.4)
|
||||
|
||||
project(ImageTypes NONE)
|
||||
|
||||
include(../../UseLATEX.cmake)
|
||||
|
||||
add_latex_document(ImageTypes.tex
|
||||
IMAGE_DIRS images
|
||||
)
|
29
tests/ImageTypes/ImageTypes.tex
Normal file
29
tests/ImageTypes/ImageTypes.tex
Normal file
|
@ -0,0 +1,29 @@
|
|||
\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}
|
5
tests/ImageTypes/README
Normal file
5
tests/ImageTypes/README
Normal file
|
@ -0,0 +1,5 @@
|
|||
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.
|
BIN
tests/ImageTypes/images/Blue2TanBar.bmp
Normal file
BIN
tests/ImageTypes/images/Blue2TanBar.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
BIN
tests/ImageTypes/images/Circles_eps.eps
Normal file
BIN
tests/ImageTypes/images/Circles_eps.eps
Normal file
Binary file not shown.
214
tests/ImageTypes/images/Circles_pdf.pdf
Normal file
214
tests/ImageTypes/images/Circles_pdf.pdf
Normal file
File diff suppressed because one or more lines are too long
7
tests/ImageTypes/images/Circles_svg.svg
Normal file
7
tests/ImageTypes/images/Circles_svg.svg
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?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>
|
After Width: | Height: | Size: 289 B |
BIN
tests/ImageTypes/images/Cool2WarmBar.gif
Normal file
BIN
tests/ImageTypes/images/Cool2WarmBar.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
4
tests/ImageTypes/images/Green2RedDivBar.ppm
Normal file
4
tests/ImageTypes/images/Green2RedDivBar.ppm
Normal file
File diff suppressed because one or more lines are too long
BIN
tests/ImageTypes/images/RainbowBar.tif
Normal file
BIN
tests/ImageTypes/images/RainbowBar.tif
Normal file
Binary file not shown.
16
tests/IncludeDirectories/CMakeLists.txt
Normal file
16
tests/IncludeDirectories/CMakeLists.txt
Normal file
|
@ -0,0 +1,16 @@
|
|||
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
|
||||
)
|
4
tests/IncludeDirectories/CopiedInput.tex
Normal file
4
tests/IncludeDirectories/CopiedInput.tex
Normal file
|
@ -0,0 +1,4 @@
|
|||
% -*- latex -*-
|
||||
|
||||
% This should only compile if working with the "copied" version of the latex file.
|
||||
This is a copied input for @UseLATEX_TEST_NAME@.
|
22
tests/IncludeDirectories/IncludeStuff.tex
Normal file
22
tests/IncludeDirectories/IncludeStuff.tex
Normal file
|
@ -0,0 +1,22 @@
|
|||
% -*- 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}
|
3
tests/IncludeDirectories/README
Normal file
3
tests/IncludeDirectories/README
Normal file
|
@ -0,0 +1,3 @@
|
|||
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.
|
3
tests/IncludeDirectories/UncopiedInput.tex
Normal file
3
tests/IncludeDirectories/UncopiedInput.tex
Normal file
|
@ -0,0 +1,3 @@
|
|||
% -*- latex -*-
|
||||
|
||||
This comes from a file in the source directory.
|
|
@ -0,0 +1,4 @@
|
|||
% -*- latex -*-
|
||||
|
||||
% This should only compile if working with the "copied" version of the latex file.
|
||||
This is a copied input for @UseLATEX_TEST_NAME@.
|
|
@ -0,0 +1,3 @@
|
|||
% -*- latex -*-
|
||||
|
||||
This comes from a file in a source subdirectory.
|
7
tests/MultiDocuments/CMakeLists.txt
Normal file
7
tests/MultiDocuments/CMakeLists.txt
Normal file
|
@ -0,0 +1,7 @@
|
|||
cmake_minimum_required(VERSION 2.8.4)
|
||||
|
||||
project(MultiDocuments NONE)
|
||||
|
||||
add_subdirectory(subdir1)
|
||||
add_subdirectory(subdir2)
|
||||
add_subdirectory(subdir2_2)
|
10
tests/MultiDocuments/README
Normal file
10
tests/MultiDocuments/README
Normal file
|
@ -0,0 +1,10 @@
|
|||
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.
|
6
tests/MultiDocuments/subdir1/CMakeLists.txt
Normal file
6
tests/MultiDocuments/subdir1/CMakeLists.txt
Normal file
|
@ -0,0 +1,6 @@
|
|||
include(../../../UseLATEX.cmake)
|
||||
|
||||
add_latex_document(Subdirectory1.tex
|
||||
IMAGE_DIRS images
|
||||
INPUTS IncludedFile.tex
|
||||
)
|
1
tests/MultiDocuments/subdir1/IncludedFile.tex
Normal file
1
tests/MultiDocuments/subdir1/IncludedFile.tex
Normal file
|
@ -0,0 +1 @@
|
|||
This text comes from an included file.
|
15
tests/MultiDocuments/subdir1/Subdirectory1.tex
Normal file
15
tests/MultiDocuments/subdir1/Subdirectory1.tex
Normal file
|
@ -0,0 +1,15 @@
|
|||
\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}
|
BIN
tests/MultiDocuments/subdir1/images/Cool2WarmBar.png
Normal file
BIN
tests/MultiDocuments/subdir1/images/Cool2WarmBar.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
3
tests/MultiDocuments/subdir2/CMakeLists.txt
Normal file
3
tests/MultiDocuments/subdir2/CMakeLists.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
include(../../../UseLATEX.cmake)
|
||||
|
||||
add_latex_document(Subdirectory2.tex)
|
7
tests/MultiDocuments/subdir2/Subdirectory2.tex
Normal file
7
tests/MultiDocuments/subdir2/Subdirectory2.tex
Normal file
|
@ -0,0 +1,7 @@
|
|||
\documentclass{article}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\textbf{Document from subdirectory 2}
|
||||
|
||||
\end{document}
|
5
tests/MultiDocuments/subdir2_2/CMakeLists.txt
Normal file
5
tests/MultiDocuments/subdir2_2/CMakeLists.txt
Normal file
|
@ -0,0 +1,5 @@
|
|||
include(../../../UseLATEX.cmake)
|
||||
|
||||
add_latex_document(Subdirectory2.tex
|
||||
TARGET_NAME RenamedTargetForSubdirectory2_2
|
||||
)
|
7
tests/MultiDocuments/subdir2_2/Subdirectory2.tex
Normal file
7
tests/MultiDocuments/subdir2_2/Subdirectory2.tex
Normal file
|
@ -0,0 +1,7 @@
|
|||
\documentclass{article}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\textbf{Document from subdirectory 2\_2}
|
||||
|
||||
\end{document}
|
10
tests/MultiDotFilename/CMakeLists.txt
Normal file
10
tests/MultiDotFilename/CMakeLists.txt
Normal file
|
@ -0,0 +1,10 @@
|
|||
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
|
||||
)
|
11
tests/MultiDotFilename/README
Normal file
11
tests/MultiDotFilename/README
Normal file
|
@ -0,0 +1,11 @@
|
|||
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.
|
4
tests/MultiDotFilename/multi.dot.filename.bib
Normal file
4
tests/MultiDotFilename/multi.dot.filename.bib
Normal file
|
@ -0,0 +1,4 @@
|
|||
@book(foo,
|
||||
author = "Hero Protagonist",
|
||||
title = "The Life of Foo"
|
||||
)
|
16
tests/MultiDotFilename/multi.dot.filename.tex
Normal file
16
tests/MultiDotFilename/multi.dot.filename.tex
Normal file
|
@ -0,0 +1,16 @@
|
|||
\documentclass{article}
|
||||
|
||||
\usepackage{graphicx}
|
||||
|
||||
\begin{document}
|
||||
|
||||
Here is an image.
|
||||
|
||||
\includegraphics{my.image.eps}
|
||||
|
||||
\cite{foo}
|
||||
|
||||
\bibliographystyle{plain}
|
||||
\bibliography{multi.dot.filename}
|
||||
|
||||
\end{document}
|
500
tests/MultiDotFilename/my.image.eps
Normal file
500
tests/MultiDotFilename/my.image.eps
Normal file
|
@ -0,0 +1,500 @@
|
|||
%!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
|
14
tests/MultiIndex/CMakeLists.txt
Normal file
14
tests/MultiIndex/CMakeLists.txt
Normal file
|
@ -0,0 +1,14 @@
|
|||
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
|
||||
)
|
25
tests/MultiIndex/MultiIndex.tex
Normal file
25
tests/MultiIndex/MultiIndex.tex
Normal file
|
@ -0,0 +1,25 @@
|
|||
\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}
|
4
tests/MultiIndex/README
Normal file
4
tests/MultiIndex/README
Normal file
|
@ -0,0 +1,4 @@
|
|||
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.
|
18
tests/MultiIndex/SingleIndex.tex
Normal file
18
tests/MultiIndex/SingleIndex.tex
Normal file
|
@ -0,0 +1,18 @@
|
|||
\documentclass{article}
|
||||
|
||||
\usepackage{blindtext}
|
||||
|
||||
\usepackage{makeidx}
|
||||
\makeindex
|
||||
|
||||
\begin{document}
|
||||
|
||||
\index{foo}
|
||||
\index{bar}
|
||||
\index{baz}
|
||||
|
||||
\blindtext
|
||||
|
||||
\printindex
|
||||
|
||||
\end{document}
|
65
tests/MultiIndex/multind.sty
Normal file
65
tests/MultiIndex/multind.sty
Normal file
|
@ -0,0 +1,65 @@
|
|||
% 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}
|
3
tests/README
Normal file
3
tests/README
Normal file
|
@ -0,0 +1,3 @@
|
|||
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.
|
10
tests/Subdirectory/CMakeLists.txt
Normal file
10
tests/Subdirectory/CMakeLists.txt
Normal file
|
@ -0,0 +1,10 @@
|
|||
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
|
||||
)
|
4
tests/Subdirectory/README
Normal file
4
tests/Subdirectory/README
Normal file
|
@ -0,0 +1,4 @@
|
|||
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.
|
1
tests/Subdirectory/subdir/IncludedFile.tex
Normal file
1
tests/Subdirectory/subdir/IncludedFile.tex
Normal file
|
@ -0,0 +1 @@
|
|||
This text comes from an included file.
|
13
tests/Subdirectory/subdir/Subdirectory.tex
Normal file
13
tests/Subdirectory/subdir/Subdirectory.tex
Normal file
|
@ -0,0 +1,13 @@
|
|||
\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}
|
BIN
tests/Subdirectory/subdir/images/Cool2WarmBar.png
Normal file
BIN
tests/Subdirectory/subdir/images/Cool2WarmBar.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
Loading…
Add table
Add a link
Reference in a new issue