From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: LaTex Adjustments for Org-Export Date: Wed, 31 Jul 2013 10:01:08 -0400 Message-ID: <87siyu96cb.fsf@gmail.com> References: <51F902C4.4080902@taupro.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4g11-0008BB-41 for emacs-orgmode@gnu.org; Wed, 31 Jul 2013 19:41:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V4g0u-0007rx-4r for emacs-orgmode@gnu.org; Wed, 31 Jul 2013 19:41:11 -0400 Received: from plane.gmane.org ([80.91.229.3]:46835) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4Wxv-0000jM-3s for emacs-orgmode@gnu.org; Wed, 31 Jul 2013 10:01:23 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1V4Wxt-0001nG-1K for emacs-orgmode@gnu.org; Wed, 31 Jul 2013 16:01:21 +0200 Received: from pool-108-7-96-134.bstnma.fios.verizon.net ([108.7.96.134]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 31 Jul 2013 16:01:21 +0200 Received: from ndokos by pool-108-7-96-134.bstnma.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 31 Jul 2013 16:01:21 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Jeff Rush writes: > I'm trying to export a .org file to .pdf and although I've gotten past > many formatting hurdles, I am stuck on two problems. > > 1) How can I redefine, in my org-export-latex-classes variable, the > \section definition, such that it includes \pagebreak? > My reason is that I would like each of my top-level headings to > start on a new page, like a new chapter. > > 2) How can I change the basic formatting of paragraphs everywhere to > > a) omit the leading indent, and > b) have a blank line between paragraphs > > Instead of this strange-looking style: > > This is a test paragraph > of the following kind of thing. > And so is this one. > > I want it to look like this: > > This is a test paragraph > of the following kind of thing. > And so is this one. > > Thanks for any helpful souls out there. I'm working on learning LaTeX > but can't see how the various parts of the "article" base class fit > together and how to selectively override them. > I think the best solution is along these lines: o use a latex style file to redefine \parindent and \parskip. Also define a new command, \psection, to do the page break thingie. o Add a new class to org-latex-classes which is just like "article" except that it uses \psection in place of \section (so I call it "particle" :-) ) o Tell org to use particle as your LaTeX class, and also tell it to use the latex style from step 1. In more detail, create a file, foo.sty, in the same directory as your org file and give it these contents: --8<---------------cut here---------------start------------->8--- \setlength{\parindent}{0pt} \setlength{\parskip}{4pt} \newcommand{\psection}{\newpage\section} --8<---------------cut here---------------end--------------->8--- Then evaluate the following (or add this to your .emacs if you want to make it permanent - needs to be added *after* org-latex-classes is defined, so it might need to be in a hook): --8<---------------cut here---------------start------------->8--- (add-to-list 'org-latex-classes '("particle" "\\documentclass[11pt]{article}" ("\\psection{%s}" . "\\psection*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))) --8<---------------cut here---------------end--------------->8--- and finally your org file should look like this: --8<---------------cut here---------------start------------->8--- #+LATEX_CLASS: particle #+LATEX_HEADER: \usepackage{foo} * foo This is a long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph. This is another paragraph. * bar Who knows? Who cares? --8<---------------cut here---------------end--------------->8--- HTH. -- Nick