Wiki - README‎ > ‎Programming‎ > ‎

LaTeX

fully embed fonts [link]
% find where file is located that stores font refs
> kpsewhich pdftex.map
% run pdffonts on pdf to get a list of the fonts used.
> pdffonts main.pdf
% create file fullyembed.map
% search for each font in pdftex.map file and add these lines to fullyembed.map
% on each line, change last < to <<
% add to main .tex file...
\pdfmapfile{=fullembed.map}

nicer url formatting [link]
\makeatletter
% Inspired by http://anti.teamidiot.de/nei/2009/09/latex_url_slash_spacingkerning/
% but slightly less kern and shorter underscore
\let\UrlSpecialsOld\UrlSpecials
\def\UrlSpecials{\UrlSpecialsOld\do\/{\Url@slash}\do\_{\Url@underscore}}%
\def\Url@slash{\@ifnextchar/{\kern-.11em\mathchar47\kern-.2em}%
    {\kern-.0em\mathchar47\kern-.08em\penalty\UrlBigBreakPenalty}}
\def\Url@underscore{\nfss@text{\leavevmode \kern.06em\vbox{\hrule\@width.3em}}}
\makeatother

add \ignorespacesafterend when defining nested environments [link]

pdfmake.py [link]

embedding python in LaTeX [link]

basic formatting tools [link]

change font of url command [link]
\newcommand{\urlwofont}[1]{ \urlstyle{same}\url{#1} }

font catalog [link]

embedding videos and interactive 3d [link]

embed 2d/3d diagram into tex [link]

moving tables and figures [link]
"non-floating" floats [link]

ReStructuredText [link]

citing in figure captions [link]
\caption{A figure's caption \protect\cite{somereference}}

Custom List Styles (link) -- Nicely formated nested enumerations
\newcounter{lev1}
\newcounter{lev2}
\begin{list}{\arabic{lev1}:}{\usecounter{lev1}}
\item Loop:
\begin{list}{\arabic{lev1}.\arabic{lev2}:}{\usecounter{lev2}}
\item Command 1
\item Command 2
\item Command 3
\end{list}\setcounter{lev2}{1}
\item Command 4
\end{list}\setcounter{lev1}{1}

Poster (link) (link)

Convert TeX to HTML
htlatex texfile

Avoid eqnarray (link)

Various tips and tricks (link)

When compiling LaTeX with included PDFs, if warnings about page groups appear even though the PDF has only one page, do the following:
open the PDF in Okular.  File->Print.  Select Print to PDF.  Check the paper size!  Change output filename.  OK.  Use this new PDF, instead.

symbols (link)

TeX Resources on the Web (link)
Fonts (link)
mtpro2 (link)
TeX fonts (link), typewriter fonts (link)
Verbatim (link)

Beamer

prettifying [link]
arrows, tkiz [link]

Poster theme and template (link)
Keynote styled Beamer theme (link)

themes [link]

no theme [link]
\setbeamertemplate{frametitle}
  {\begin{centering}\smallskip
   \insertframetitle\par
   \smallskip\end{centering}}
\setbeamertemplate{itemize item}{$\bullet$}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{footline}[text line]{%
    \hfill\strut{%
        \scriptsize\sf\color{black!60}%
        \quad\insertframenumber
    }%
    \hfill
}

% Define some colors:
\definecolor{DarkFern}{HTML}{407428}
\definecolor{DarkCharcoal}{HTML}{4D4944}
\colorlet{Fern}{DarkFern!85!white}
\colorlet{Charcoal}{DarkCharcoal!85!white}
\colorlet{LightCharcoal}{Charcoal!50!white}
\colorlet{AlertColor}{orange!80!black}
\colorlet{DarkRed}{red!70!black}
\colorlet{DarkBlue}{blue!70!black}
\colorlet{DarkGreen}{green!70!black}

% Use the colors:
\setbeamercolor{title}{fg=Fern}
\setbeamercolor{frametitle}{fg=Fern}
\setbeamercolor{normal text}{fg=Charcoal}
\setbeamercolor{block title}{fg=black,bg=Fern!25!white}
\setbeamercolor{block body}{fg=black,bg=Fern!25!white}
\setbeamercolor{alerted text}{fg=AlertColor}
\setbeamercolor{itemize item}{fg=Charcoal}



customizing latex (link)

useful LaTeX commands
% general spacing commands
\setlength{\parindent}{6mm} %sets indentation space for each paragraph
\setlength{\parskip}{1cm} %sets spacing between paragraphs
\setlength{\parskip}{1cm plus4mm minus3mm} %sets flexible spacing

% math commands with text underneath
\newcommand{\argmin}[1]{\underset{#1}{\operatorname{argmin}}}

% command to produce a_i,...,a_j (\subvec[a]{i}{j}), x_0,...,x_10 (\subvec{0}{10})
\newcommand{\subvec}[3][x]{\ensuremath{#1_{#2},\ldots,#1_{#3}}}

% ensure always in math mode
\newcommand{\inmath}{\ensuremath{this will always be in math mode!}}

Tip-and-Tricks for Conference Papers
http://gurmeetsingh.wordpress.com/2008/09/20/latex-tips-n-tricks-for-conference-papers/

two column layouts, rubber lengths, hyphenating, etc. (link)

Getting to Grips with LaTeX - Formatting (link)
Common LaTeX errors (link)

Tables

from: link
to change the column alignment for a single cell, use \multicolumn{1}:
\begin{tabular}{lrr}
            & \multicolumn{1}{c}{Year1} & \multicolumn{1}{c}{Year2} \\
  Travel    & 100,000 & 110,000 \\
  Equipment & 50,000 & 60,000
\end{tabular}

BibTeX

unpublished papers can be given an invisible date
year = "unpublished paper\setbox0=\hbox{2010}"


Comments