Tag: latexMakefile for ACM Publications in LaTeXOctober 18, 2011 Below is the Makefile I use for compiling ACM publications. The Makefile LATEX = latex
BIBTEX = bibtex
PDF = ps2pdf
PDF_FLAGS = -dMaxSubsetPct=100 -dCompatibilityLevel=1.2 -dSubsetFonts=true \
-dEmbedAllFonts=true -dEPSCrop=true
PS = dvips
PS_FLAGS = -P cmz -t letter
WORKINGBASE = main
CAMERABASE = final
default: working
working: version $(WORKINGBASE).pdf
camera: $(CAMERABASE).pdf
gs -q -dNOPAUSE -dBATCH -dPDFSETTINGS=/prepress -sDEVICE=pdfwrite \
-sOutputFile=$<.tmp $<
mv $<.tmp $<
version:
svnversion > version.tex
%.pdf: %.ps
$(PDF) $(PDF_FLAGS) $<
.PRECIOUS:%.ps
%.ps: %.dvi
$(PS) $(PS_FLAGS) $< -o $@
$(WORKINGBASE).dvi: $(wildcard *.tex) $(wildcard *.bib) $(wildcard images/*.eps)
$(LATEX) ${@:.dvi=}
$(BIBTEX) ${@:.dvi=}
$(LATEX) ${@:.dvi=}
$(LATEX) ${@:.dvi=}
$(CAMERABASE).dvi: $(wildcard *.tex) $(wildcard *.bib) $(wildcard images/*.eps)
$(LATEX) ${@:.dvi=}
$(LATEX) ${@:.dvi=}
$(LATEX) ${@:.dvi=}
clean:
rm -rRf *.dvi *.aux *.blg *.log *.ps *~ *.bbl *.pdf *.out
I also set the svn propedit svn:ignore .and add the following: *.aux *.bbl *.blg *.log *.dvi *.ps version.tex main.pdf (Change Categories: Uncategorized Compiling LaTeX Publications for Conference Proceedings July 25, 2011 As a computer science graduate student, compiling LaTeX publications for conferences is a frequent task. For the draft and submission versions, compilation settings are not as particular, but a final camera ready version has certain requirements, such as a PDF with embedded fonts. I have built a Makefile that allows me to compile everything from my early drafts to the final camera-ready version that meets the requirements of typical ACM publications. The Makefile assumes your main LaTeX file is called main.tex (change the value assigned to the
LATEX = latex
BIBTEX = bibtex
PDF = ps2pdf
PDF_FLAGS = -dPDFSETTINGS=/prepress
PS = dvips
PS_FLAGS = -t letter
BASE = main
CAMERABASE = camera
.PRECIOUS:$(CAMERABASE).ps
all: version $(BASE).pdf
camera: $(CAMERABASE).pdf
version:
svnversion > version.tex
%.pdf: %.ps
$(PDF) $(PDF_FLAGS) $<
%.ps: %.dvi
$(PS) $(PS_FLAGS) $< -o $@
$(BASE).dvi: $(wildcard *.tex) $(wildcard *.bib) $(wildcard images/*.eps)
$(LATEX) ${@:.dvi=}
$(BIBTEX) ${@:.dvi=}
$(LATEX) ${@:.dvi=}
$(LATEX) ${@:.dvi=}
$(CAMERABASE).dvi: $(wildcard *.tex) $(wildcard *.bib) $(wildcard images/*.eps)
$(LATEX) ${@:.dvi=}
$(LATEX) ${@:.dvi=}
$(LATEX) ${@:.dvi=}
clean:
rm -rf *.dvi *.aux *.blg *.log $ *~ *.bbl *.out
rm -rf (BASE).ps $(BASE).pdf $(CAMERABASE).pdf
Categories: Uncategorized Tags: latex, subversion Cropping eps Figures January 27, 2011 When writing documents in LaTeX, I need figures to be in eps format. Depending on the original format of the figure, converting the figure to eps may result in an eps figure with extra white space. Even gnuplot graphs, which can be exported directly to eps, include unnecessary which space. To crop an existing eps (or ps) file, simply run ps2eps input.eps A cropped eps file will be produced, named Categories: Linux LaTeX and BibTeX Search Path October 22, 2009 I often write papers in LaTeX that use the ACM SIG Proceedings Template. Previously, I would put a copy of the LaTeX style file (.sty) in every directory where I had a LaTeX document that used it. Then I discovered I could set an environment variable to automatically have LaTeX search a path for a style file. The There is also a The following few lines in my
# Include shared LaTeX classes and BibTeX files in path, if LaTeX folder exists
if [ -d "~/latex" ]; then
export TEXINPUTS=".:~/latex/:"
export BIBINPUTS=".:~/latex/:"
fi
Categories: Linux Including Code Blocks in LaTeX September 23, 2009 I recently had a need to include a block of C code in a report I was writing in LaTeX. I discovered the \usepackage{listings}
somewhere before your
\begin{lstlisting}[language=C,frame=single]
CODE GOES HERE
\end{lstlisting}
You can specify other options besides language and frame. For more details on the package see the LaTex Wikibook. Categories: Development Tags: latex Conditions in LaTeX July 01, 2009 You can use the
#define var
#ifdef var
\section{Included Section}
#else
\section{Excluded Section}
#endif
The actual LaTeX is:
\newboolean{var}
\setboolean{var}{true}
\ifthenelse{\boolean{var}}
{ \section{Included Section} }
{ \section{Excluded Section} }
Categories: Linux Tags: latex |
SearchCategories
TagsR acm apt awk bash benchwork bibtex c compiz dd-wrt dia dvd eeebuntu eeepc eps excel fedora firefox flash freebsd gnome hostname iptables java kde latex mac os x mail merge mediawiki mercurial mrtg nvidia pdf phidgets printer putty pxe python route scenery sed snmp ssh structures subnet subversion sudo ubuntu vegetarian vim visio windows word wrt54gl x11 yum Years |