Rob's LaTeX Page
 Rob's favorite links to all things LaTeX.
 Evangelism: Why Use LaTex
 
 Basic Documentation 
 Documentation and Resources on the Internet 
  
 Getting the Software 
There are many sources for LaTeX, almost all of them free.  Here are some
I, or people I respect, have used:
  -  Overleaf is a browser-based
      collaborative LaTeX that has taken over the market.  It has a free
      version, which is fine for personal use and a pay version for parger
      scale projects.  It is not the most powerful editor but it has so
      many nice features that when collaborating, there is nothing better
      on the market.
      
  
-  TexStudio is a cross
      platform software that seems to be one of the best choices at the
      moment.
      
  
-   TexLive
      package documentation  in 
      MacPorts, the first choice for all free OSX software .  Check
      this as there are too many different TexLive bundles and one has to
      choose carefully. Many other tools depend on such a complete
      installation so this is foundational.  I manage mine with  Macports, which is a great
      comprehensive tool for installing and updating software on the Mac OS
      X platform.
  
-  Mac/OSX: 
    
      TeXShop:  a TeX previewer for Mac OS X.
  
-  Windows: MikTex, this has
    traditionally been the domaintant freeware version of LaTeX for
    Windows.  Use WinEdt as the
    editor.
  
-  Windows: WinEdt is the editor
    of choice to go with  MikTex
  
-   CTAN
      the comprehensive TeX archive (UNC mirror)
  
-  teTeX home page
    TeTeX is also available via 
    MacPorts It is no longer the package of choice--try
      TexLive instead,
      available through   Macports
      
  
-   Tex Users Group (TUG)
 BibTex
 Graphics, Equations, and the WWW 
 Support tools for LaTeX
  -  My texit-macosx script , which is a
      simple shell script for executing all the pdflatex commands you will
      typically need to make LaTeX documents. Just save it somewhere and
      perhaps rename it to be shorter to call and then launch it from a
      terminal window, e.g., 
         texit-macosx.sh sample
      will run the script on the sample.tex file.
-   AucTex  the
      best tool I have found for emacs support for LaTeX.  See below for details of setting this up.
  
-  LaTeX Track
      Changes, an system for marking up changes in LaTeX using a
      standalone Java app or an Emacs mode.
  
-   Detexify,
      which is not the same as detex, but rather an interactive web service
      to identify symbols and their LaTeX equivalent code.
      
  
-  
      Nelson Beebe's latex.el file, editing support for LaTeX (and
      BibTeX) in emacs.  Also very good, better in some ways than Auctex
      but at least check, it lacked coloration.
  
-  Chikrii Softlab Word to LaTeX
      conversion (note academic pricing)
  
-  
      Conversion programs from LaTeX to other programs
  
-  
      Conversion programs from other text programs to LaTeX
  
-  LaTeX to RTF
      Converter, sadly only available for Windoze.
  
-   A general resource
      for PDF files , their format, conversion programs, etc.  (Thanks
      to Ashley Smith for this tip)
  
-  
       Solid PDF to Word for Mac, a Mac based converter
  
-  
    Another conversion from pdf to Word (Now for Mac)
  
-  Setting up colors in Emacs to determine which
      colors Emacs uses to mark different elements of LaTex files.
  
-   My personal view on LaTeX tools for
      whatever that's worth!  Very out of date and incomplete so don't take
      this too seriously.
 
 Specific Tips (table of contents)
 
I have not used classix LateX in years but
rather  pdfLaTeX.
The advantages include:
  -  Output is directly in pdf.
  
-  Included graphics can be in pdf, tiff, jpg, or png formats.
  
-  Never have to deal with postscript again!!!!
  
-  Everything that worked in regular LaTeX (except including postscript
  files) will work in PdfLaTeX.
Resubmitting documents like papers and grant applications often requires
the authors to mark those sections that have changed since a previous
version.  LaTeX has support for this through the changebar package,
typically part of a standard installation of LaTeX but also available via a
Google search.
Once you have installed the package, perform the following steps to
create a vertical bar in the right margin of the page next to sections that
you have changed.
  -  In the header, add the line
  \usepackage{changebar}
-  Then around every piece of the text that has changed, place these two
  commands: 
  \cbstart
  \cbend
 
-  For example,
  \cbstart
  Each year, there are changes in the Handbook and we mark such changes from
  the previous edition with a vertical bar in the right margin, as with this
  paragraph.   Such markings may not be visible in the HTML version of the
  handbook---please see the pdf edition for clarification.
  \cbend
 
 Things have changed recently so that it is now easier to control how
  citations appear in the document.  To get some control over citations,
  use the cite.sty package (i.e.,
    \usepackage{cite}
  To have
  citation numbers appear as superscripts, change this to be
    \usepackage[super]{cite}
and that may be all you ever need to
know.  For more info, read the cite.sty file.
With the requirement of many granting agencies to submit applications using
a san serrif font like Helvetica or Arial, there are several tricks in
LaTeX.
Mine looks like this and gives an 11-point like font that NIH has
  accepted without problem on several occasions.
    \usepackage{times}
    % This command somehow makes Helvetica fonts
    \renewcommand\rmdefault{phv}
To get complex units to look good needs some math mode but without the math
fonts, which requires the use of
    \mathrm
for example
   $\mathrm{\mu A / cm ^ 2}$
creates "micro-Amps per cm squared" with the correct fonts.
 
LaTeX is not always efficient in the way it uses space on a page, sometimes
leaving large white spaces and big gaps between elements of the document.
There are several packages that support text wrapping and other tricks to
getting better use of page space in LaTeX.  Here are some pointers to a
few.
 
  -  
    Tricks on saving space and text from a Cambride University site
  
-   Desciption of
  the floatflt package that allows text to wrap around figures.
  
-   
    Wrapfig my current favorite system for text wrapping.  There is a
      nice  stackexchange article  that describes a common problem and how to deal
      with it.  
  
-  Picinpar is
      a standard package, part of most releases.  The 
    key usage information (that is not well documented) is to bracket a
    region containing the figure with \begin{figwindow} and \end{figwindow}.
    The regular figure description has to be embedded into the
    \begin{figwindow} command with the arguments that indicate the number
    of line of paragraph above the figure and then a letter to place the
    figure on the page, e.g.,
    
      \usepackage{graphicx}
      \usepackage{picinpar}
      \begin{figwindow}[3,l,%
           {\includegraphics[height=2in]{leadfield.eps}},%
           {\label{fig:leadfield} Electrocardiographic lead field for use 
            in the student lab for Bioengineering 6000 class.}]
      In this lab, you will record the standard limb leads in sequence,
      according to the diagram below:
      The goal for the Frank electrode system is to capture the
      three-dimensional extent of the heart dipole.  For this, it is
      necessary to measure potential differences not just in the frontal
      plane, as in the limb leads, but along the antero-posterior
      (front-to-back) axis of the body.  The diagram below illustrates the
      original Frank lead system \cite{RSM:Fra56} and we will use a
      simplified version of this.
      \end{figwindow}
    Note that despite what the documentation says, this does not work for
    centering a figure and having text wrap around both sides.
-  You can use either floatflt package
  or wrapfig package. 
    
      For example:
       
	\begin{floatingfigure}[r]{0.4\textwidth}
	\centering
	\includegraphics[width=0.4\textwidth]{lake1}
	\caption{Text wrap around figure}
	\noindent \hrulefill
	\label{test}
	\end{floatingfigure}
      and
	\begin{wrapfigure}{r}{0.4\textwidth}
	\centering
	\includegraphics[width=0.4\textwidth]{lake1}
	\caption{Text wrap around figure}
	\noindent \hrulefill
	\label{test}
	\end{wrapfigure}
      
      The difference between floatingfigure and wrapfigure is
      that the text typed after \end{floatingfigure} will be forced
      to be a new paragraph.
     
 
LaTeX folks (at least Leslie Lamport) seem to frown on the use of
underlining but if you do like to use it, the package ulem.sty is your
friend.   With  \usepackage{ulem}, you have the following new
commands:
 -  \uline{important}   underlined text
 
-  \uuline{urgent}     double-underlined text
 
-  \uwave{boat}        wavy underline
 
-  \sout{wrong}        line drawn through word
 
-  \xout{removed}      marked over with //////.
 
-  {\em phasized\/} and \emph{asized}  In LaTeX, by default, these are
 underlined; use \normalem or [normalem] to restore italics
 
-  \useunder{\uwave}{\bfseries}{\textbf}
                      use wavy underline in place of bold face
Note that this package changes \em and \emph to be underline.  To change
this behavior back to normal, use the \normalem command, for example
    \usepackage{ulem}
    \normalem
 The thesis is often one of the first major projects for a student in
LaTeX (it sure was for me) and there are some nice tools specific to that
task.
      
 Getting and setting up Auctex is easy, either for a sysadmin type or a
mere mortal.  If you do not have local support, here are the steps:
  -  Go to 
      here  and get the latest stable version (who needs to live
      dangerously when writing is already hard enough)
  
-  Note that Auctex also includes
      
      Preview LaTeX, which I have not yet tried but provides a nice
      preview for segments of complex LaTeX code.
  
-  The modern way to install packages in emacs is to use the 
      M-x list-packages  
 command, which lists a set of possible emacs packages.  Place the
      cursor next to Auctex, select "i" and then "x" to install the
      package.
-  Alternatively, you can go to the web site for
      downloading Auctex  and follow instructions there.
      
	-  Put the folder in   your local emacs lisp  folder, typically
	    something like ~/emacs/lisp
	
-  Read the INSTALLATION file, where you will find the commands
 
	    make
 make lispdir=$HOME/emacs/lisp install
 
-  The nasty part of installing this yourself is the need to put the
	    info files somewhere and set up your own info directory.  You can
	    ignore this and just read the PDF
	    version of the manual I have prepared.
      
 
-  To set up parameters for Auctex, add the following lines to your
  .emacs file:
 
      (load "auxtex.el" nil t t ))
 (setq TeX-auto-save t)
 (setq TeX-parse-self t)
 (setq-default TeX-master nil)
 (setq LaTeX-indent-level 4)
 (setq LaTeX-item-indent -2)
 
-  Run emacs on your latest LaTeX document and have a real blast!
 One of the mysteries of Emacs version 21 is how to set up colors for
the different elements of a document.  This used to happen with highlight
packages but now it is built in and hence more powerful and sometimes more
difficult to use.  Here are some points to note in fumbling around with
this feature.
  -  You must enable font lock to have any highlighting.  To do this on a
      global basis, put this command in your .emacs file.
 
       (global-font-lock-mode t)
      
-  To customize the faces (colors, fonts, etc.) used by Font Lock for
       fontifying different parts of buffer text, use the command
 M-x customize-face
 You will then have a funky UI that will allow you to make changes in
      color for any type of element in the LaTeX file.  Read the
      instructions at the top of the page and play around until you get the
      hang of it.
-  Changes you make permanent in the UI above appear at the end of the
      .emacs file looking something like this:
 
      (custom-set-faces
 '(font-lock-comment-face ((t (:foreground "pink")))))
-  If you want to really get fancy, you can look at the set of keywords
      that highlighting uses to set color and font.  For this, go to the
      mode you like (or dislike) most and enter
 
      C-h v
 font-lock-keywords
 
Then read the documentation at the top or jump to the encoded list of
      keywords at the bottom.
 Last modified: Sun Aug 11 07:59:12 MDT 2024