emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Russell Adams <RLAdams@AdamsInfoServ.Com>
To: emacs-orgmode@gnu.org
Subject: Re: Professional PDF LaTeX templates?
Date: Thu, 17 Mar 2011 07:06:28 -0500	[thread overview]
Message-ID: <20110317120628.GB2617@x201> (raw)
In-Reply-To: <14953.1300287258@alphaville.dokosmarshall.org>

On Wed, Mar 16, 2011 at 10:54:18AM -0400, Nick Dokos wrote:
> 'Mash <mashdot@toshine.net> wrote:
> >
> > I suppose by "professional" I really meant "polished", and so it is
> > LaTeX styling I have having trouble with, it may also be laziness on
> > my part. I have tried searching for LaTeX styling which I can
> > translate into a few org-mode header declarations but still can't work
> > out what is or is not compatible with org-mode (LaTeX classes) or how
> > to implement styling correctly.
> >

I understand completely! So here's a few tricks I use.

First, my org-class for latex is "none". This lets me manage my
documentclass and other features in the org export header.

(setq org-export-latex-classes (cons '("none"
									   ("\\section{%s}" . "\\section*{%s}")
									   ("\\subsection{%s}" . "\\subsection*{%s}")
									   ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
									   ("\\paragraph{%s}" . "\\paragraph*{%s}")
									   ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))

Then, my documents start like this:

#+OPTIONS:   H:3 num:nil toc:t \n:t @:t ::t |:t ^:nil -:t f:t *:t TeX:t LaTeX:nil skip:nil d:nil tags:not-in-toc
#+BIND: org-export-latex-title-command ""
#+LaTeX_CLASS: none
#+LATEX_HEADER: \documentclass[10pt,letterpaper]{article}
#+LATEX_HEADER: \usepackage[letterpaper,includeheadfoot,top=0.5in,bottom=0.5in,left=0.75in,right=0.75in]{geometry}
#+LATEX_HEADER: \usepackage[utf8]{inputenc}
#+LATEX_HEADER: \usepackage[T1]{fontenc}
#+LATEX_HEADER: \usepackage{lastpage}
#+LATEX_HEADER: \usepackage{fancyhdr}
#+LATEX_HEADER: \pagestyle{fancy}
#+LATEX_HEADER: \usepackage{hyperref}
#+LATEX_HEADER: \hypersetup{colorlinks,linkcolor=blue}
#+LATEX_HEADER: \renewcommand{\headrulewidth}{1pt}
#+LATEX_HEADER: \renewcommand{\footrulewidth}{0.5pt}
#+LATEX_HEADER: \usepackage{graphicx}
#+LATEX_HEADER: \usepackage{multicol}
#+LATEX_HEADER: \geometry{headheight=47pt}
#+LATEX_HEADER: \def\ORGTITLE      {Latex Example}
#+LATEX_HEADER: \def\ORGAUTHOR     {Russell Adams}
#+LATEX_HEADER: % Header
#+LATEX_HEADER: \fancyhead[R]{\bf    \ORGAUTHOR }
#+LATEX_HEADER: % Footer
#+LATEX_HEADER: \fancyfoot[L]{\small \ORGTITLE\\ \today}
#+LATEX_HEADER: \fancyfoot[C]{\small Revision: \Revision \\ Page \thepage\ of \pageref{LastPage}}
#+LATEX_HEADER: \fancyfoot[R]{\small \ORGAUTHOR }


That way I can control all of the output in the Org file. I intend to
make a custom class eventually for letterhead, but haven't yet.

Other ones to experiment with are:

\setlength{\parindent}{0pt}   - Don't indent each paragraph (pet peeve)
\setlength{\parskip}{10pt}    - Add a small indent between paragraps

Better fonts:


I also don't export from inside emacs. I use a makefile and call a
separate emacs instance in batch mode.

> > There are a huge amount of LaTeX examples on the web, but they are
> > full documents with inline elements, I wanted to know if anyone has
> > already setup classes that work, with notes on LaTeX dependencies (and
> > how and where to download them from) which they use day to day to
> > produce reports, articles, contracts or client proposals from simple
> > .org files?

I know there are many pre-made classes available for Latex,
unfortunately I haven't found any good "galleries" of sample
output. That makes it difficult to know where to start.

Let me know if you find one!

> Both Eric Fraga and John Hendy have given valid answers to how one goes
> about it: you settle down to *one* kind of document that you want to
> produce (take the simplest one and leave the rest for later), then
> either learn enough LaTeX to be able to produce it or cajole/beg/hire
> somebody to do it for you, and *then* figure out how to use org to produce
> the LaTeX needed to produce that kind of document.
> The trouble is that neither org nor LaTeX are black boxes whose insides
> you can afford to ignore. With the approach outlined above, at the end
> of the process, you *will* have a (blackbox-like) almost automatic way of
> going from org to "professional" output, but it is fragile in the sense
> that if you want to change something, you will need to implement the
> change in LaTeX first, and once you are satisfied with the output, you
> will need to go back and tweak the org mechanisms to produce that.
> Then you can shut your eyes again and pretend that it's a black box.
> So learn some LaTeX: once you get past the initial hump (the mechanics
> of producing output), then it's not only fairly easy, it also starts
> making sense. Having a desired output (keep it simple!) is going to make
> that an enjoyable journey too. And once you touch down on LaTeX island,
> and become comfortable, you'll either never leave or you'll want to
> visit again and again!

I agree, learn some Latex too. Org's another layer, but much more

Good luck!

Russell Adams                            RLAdams@AdamsInfoServ.com

PGP Key ID:     0x1160DCB3           http://www.adamsinfoserv.com/

Fingerprint:    1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3

  reply	other threads:[~2011-03-17 12:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-16 11:04 'Mash
2011-03-16 13:54 ` John Hendy
2011-03-16 14:10 ` Eric S Fraga
2011-03-16 14:43   ` 'Mash
2011-03-16 14:57     ` Eric S Fraga
2011-03-16 14:54 ` Nick Dokos
2011-03-17 12:06   ` Russell Adams [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-03-14 16:27 Thomas Herbert
2011-03-16  2:24 ` Camille persson
2011-03-16  2:52   ` John Hendy
2011-03-16  9:37     ` Eric S Fraga
2011-03-16 10:41       ` Scot Becker
2011-03-17 20:34 ` Rasmus
2011-03-17 20:52   ` Thomas S. Dye

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110317120628.GB2617@x201 \
    --to=rladams@adamsinfoserv.com \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: Professional PDF LaTeX templates?' \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).