Skip to content

Manual Build Instructions

Joshua Lande edited this page Jun 23, 2013 · 1 revision

A description of how to build a pdf of the program manual from the tex source code.

Introduction

In this wiki page, I will describe the steps that are necessary to build my manual into a program. My manual is written in LaTeX and is build in a fairly straight foreword way. You need to get a full featured install of LaTeX with most of the common packages or you will end up spending a while downloading and installing custom packages just to get the paper working. I have been building my paper using MacTeX since I am a mac user. You can easily install MacTex by installing it from here. I used the program LaTexDraw to draw the PStricks diagrams that show up in my paper. You can get that program here but you only really need to if you want to edit the figures.

Details

All of my files for building the paper are in this projects SVN account in the folder named manual/. There is a subfolder in this folder named figures/ which stores all the figures used in this paper. In the manual/ folder is the shell script that I use to build the manual:

#! /bin/csh -f

# This is to fix a bug in LatexDraw
# where the code improperly ouputs numbers
# close to 0 in scientific notation and
# putputs the color 'White' instead of
# 'white'. This dose not always have to
# be used.
# foreach file (figures/*.tex)
#    echo $file
#    perl -pi~ -e "s/White/white/g" $file 
#    perl -pi~ -e "s/\d+.\d+E-\d+/0/g" $file 
# end

latex AreaDiffractionMachineManual
bibtex AreaDiffractionMachineManual
makeindex AreaDiffractionMachineManual
latex AreaDiffractionMachineManual
latex AreaDiffractionMachineManual
dvips -t letter -o AreaDiffractionMachineManual.ps AreaDiffractionMachineManual.dvi
ps2pdf AreaDiffractionMachineManual.ps AreaDiffractionMachineManual.pdf
rm AreaDiffractionMachineManual.log
rm AreaDiffractionMachineManual.aux
rm AreaDiffractionMachineManual.dvi
rm AreaDiffractionMachineManual.ps
rm AreaDiffractionMachineManual.toc
rm AreaDiffractionMachineManual.out
rm AreaDiffractionMachineManual.ilg
rm AreaDiffractionMachineManual.idx
rm AreaDiffractionMachineManual.blg
rm AreaDiffractionMachineManual.ind
rm AreaDiffractionMachineManual.bbl

It is a fairly standard shell script for the most part. But, I first have the option of running perl to clean up all of my figured (stored in the subfolder named figures/) to fix a bug in the output of LaTexDraw. Once the code is run once, the LatexDraw output code will be fixed so you don't need to run it again. You can just comment out these perl scripts if you are happy with the way the figures look.

I build the paper using the latex command. You can't use the program pdfLaTeX to build the paper because pdfLatex is not compatible with the pstricks figures that I am using. The bibtex program is run to build the bibliography to the paper. makeindex is used to build the index that is put at the end of the paper. Then latex is called a few more times to clean everything up. latex outputs a .dvi file which you can then use dvips to convert into a ps. ps2pdf then converts the ps file into a pdf that can easily be read. Aftewards, all I do in the shell script is remove lots of temporary files that I don't need anymore.

To call the shell script, just go into the manual/ folder and issue the command

$ ./make_manual

and it should do all the hard work for you :)

Clone this wiki locally