I have a LaTeX export template I use with org-mode, and I've spent the last week trying and failing to figure out three things:
- How to add color to my section headers.
- How to put the section name in the header without the section numbering.
- How to put a page break after the Table of Contents given that I'm generating everything from within org-mode.
With the section name in the header, I followed instructions to remove section numbering:
Code: Select all
\\renewcommand{\\chaptermark}[1]{\\markboth{#1}{}}
\\renewcommand{\\sectionmark}[1]{\\markboth{#1}{}}
My template is below. If anyone wants to take pity on me and help me fix it, I would be forever grateful.
Code: Select all
(add-to-list 'org-export-latex-classes
'("salazar"
"\documentclass[12pt]{article}
\usepackage{float}
\usepackage[breaklinks=true,linktocpage,pdftitle={\@title},pdfauthor={\@author},xetex]{hyperref}
\usepackage{algorithm}
\usepackage{amsmath}
\usepackage{ifxetex}
\ifxetex
\usepackage{fontspec,xltxtra,xunicode}
\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
\setromanfont{Adobe Garamond Pro}
\setsansfont{Arial}
\setmonofont{Courier}
\else
\usepackage[mathletters]{ucs}
\usepackage[utf8x]{inputenc}
\fi
\usepackage{microtype}
\usepackage{url}
\usepackage{graphicx}
\hypersetup{ colorlinks, citecolor=SteelBlue4,filecolor=SteelBlue4,linkcolor=SteelBlue4,urlcolor=SteelBlue4}
\usepackage[includeheadfoot,margin=2.2in,hmargin=2.2in,vmargin=1.5in]{geometry}
\makeatletter
\def\maketitle{
\thispagestyle{empty}
\vfill
\begin{raggedright}
\leavevmode
\vskip 1cm
\{\fontsize{50}{60}\selectfont \textbf{\@title}\par}
\vskip 1cm
\normalfont
\{\Huge {\textit{\@author}\par}}
\vfill
\{\Large Peter Salazar}
\newline
\{\Large \href{mailto:cycleofsong@gmail.com}{cycleofsong@gmail.com}}
\newline
\{\Large \@date\par}
\end{raggedright}
\null
\cleardoublepage
}
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markboth{#1}{}}
\lhead{\href{mailto:cycleofsong@gmail.com}{Peter Salazar}}
\chead{}
\rhead{{\@title}: {\nouppercase{\rightmark}}}
\lfoot{}
\cfoot{\thepage}
\rfoot{}
\usepackage{listings}
\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{}
\setlength{\parindent}{0pt}
\setlength{\parskip}{12pt plus 2pt minus 1pt}
\usepackage{fancyvrb}
\usepackage{enumerate}
\usepackage{ctable}
\setlength{\paperwidth}{8.5in}
\setlength{\paperheight}{11in}
\tolerance=1000
\usepackage{tocloft}
\renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}}
\usepackage[normalem]{ulem}
\usepackage[hyperref,x11names]{xcolor}
\newcommand{\textsubscr}[1]{\ensuremath{_{\scriptsize\textrm{#1}}}}
\usepackage{paralist}
\let\itemize\compactitem
\let\description\compactdesc
\let\enumerate\compactenum
\let\description\compactdesc
\usepackage{enumitem}
\setitemize{noitemsep,topsep=0pt,parsep=0pt,partopsep=0pt}
[NO-DEFAULT-PACKAGES]
[NO-PACKAGES]"
("\section{%s}" . "\section*{%s}")
("\subsection{%s}" . "\subsection*{%s}")
("\subsubsection{%s}" . "\subsubsection*{%s}")
("\paragraph{%s}" . "\paragraph*{%s}")
("\subparagraph{%s}" . "\subparagraph*{%s}")))