From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Arntson Subject: Re: LaTex export questions Date: Wed, 28 May 2014 17:22:44 -0700 Message-ID: <87egzdsaaz.fsf@stevenarntson.com> References: <87mwe3uhmt.fsf@stevenarntson.com> <871tve7wmj.fsf@gmail.com> <87mwe2c30n.fsf@alphaville.bos.redhat.com> <87d2eyvb3a.fsf@stevenarntson.com> <1b73dba0e0b4de21e1b2d1875574c5e8@mail.rickster.com> <87mwe1tysz.fsf@stevenarntson.com> <87zji1373p.fsf@alphaville.bos.redhat.com> <87oayhsern.fsf@stevenarntson.com> <87ppix32n5.fsf@alphaville.bos.redhat.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49131) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wpo7q-0005f8-BC for emacs-orgmode@gnu.org; Wed, 28 May 2014 20:23:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wpo7c-0001kL-LM for emacs-orgmode@gnu.org; Wed, 28 May 2014 20:23:18 -0400 Received: from plane.gmane.org ([80.91.229.3]:37331) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wpo7c-0001kF-EH for emacs-orgmode@gnu.org; Wed, 28 May 2014 20:23:04 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Wpo7W-0004ws-Uj for emacs-orgmode@gnu.org; Thu, 29 May 2014 02:22:58 +0200 Received: from 97-113-56-186.tukw.qwest.net ([97.113.56.186]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 29 May 2014 02:22:58 +0200 Received: from steven by 97-113-56-186.tukw.qwest.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 29 May 2014 02:22:58 +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 Nick Dokos writes: > Steven Arntson writes: > >> Nick Dokos writes: >> >>> Steven Arntson writes: >>> >>>> Rick, >>>> >>>> Your google search to find the "sffms" style package seems like it >>>> could >>>> be the perfect answer to my quandary. I'm trying now to get my head >>>> around acquiring it. I don't have a great track record with installing >>>> things, and try to use package management systems when I can. >>>> >>>> Sffms is located on CTAN (which I'm learning about as I write >>>> this!). I'm running Ubuntu, and believe I have TexLive installed, but >>>> have never tried its package management system. >>>> >>>> What's a good way to proceed here? >>>> >>> >>> You can search for packages containing a file: >>> >>> $ dpkg -S sffms.cls >>> texlive-latex-extra: /usr/share/texmf-texlive/tex/latex/sffms/sffms.cls >>> >>> So you need to install texlive-latex-extra: >>> >>> # apt-get install texlive-latex-extra >>> >>> You'll probably need to be root for that (or use the graphical thingie >>> that will ask for your password). >>> >>> Nick >> >> That dpkg search is a great thing to know about! So I just went through >> the install process, and it turns out I already have the files in >> question. I just haven't gotten them working yet. The website for sffms >> says I need to put the following into my doc: >> >> \documentclass{sffms} >> \author{Lois McMaster Bujold} >> \title{Komarr} >> \begin{document} >> Your story goes here. >> \end{document} >> >> Which seems encouragingly simple, but I'm a little confused about using >> this LaTex markup in the context of an org document. Org has its own >> markup to pass to latex for these I think, like #+AUTHOR. Is there >> a similar one for \documentclass ? >> > > You will need to add a class to org-latex-classes. You should read the > documentation for the variable with C-h v org-latex-classes RET. > > You can try customizing this variable but I find the customize interface > to it somewhat confusing, so I prefer to do it by hand - you need to add > something like this to the end of your initialization file (you probably > just need chapters): > > (setq sa/sffms-latex-class '("novel" "\\documentclass{sffms}" > ("\\chapter{%s}" . "\\chapter*{%s}") > ("\\section{%s}" . "\\section*{%s}") > ("\\subsection{%s}" . "\\subsection*{%s}") > ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))) > > (eval-after-load "ox-latex" > '(add-to-list 'org-latex-classes sa/sffms-latex-class)) > > Then your org file should look like this: > > #+LATEX_CLASS: novel > #+TITLE: Fahrenheit 451 > #+AUTHOR: Ray Bradbury > #+OPTIONS: toc:nil > > * The Hearth and the Salamander > > It was a pleasure to burn. > > It was a special pleasure to see things eaten, blackened > and /changed/. > > Note that the latex class is known as "novel" to org because of > the way I defined sa/sffms-latex-class. You could call it whatever > you want, by changing the two instances of "novel". > > That's a beginning but you will probably have to modify some other > things. Just put them in a style file, say misc.sty: > > \runningtitle{Fahrenheit 451} > \authorname{Ray Bradbury} > > plus any other settings from the sfmms documentation you think are > necessary, and add a line to your .org file: > > #+LATEX_HEADER: \usepackage{misc} > > to pick them up. That should get you some way towards your goal. > > Nick Hi Nick, Sorry to call you Rick earlier; I just noticed I did that. So, this has been incredibly helpful. I've just processed an org file into a pdf that's about 93% totally correct for formatting. Furthermore, it looks great; way better than the output I typically get from Word or LibreOffice. And way, /way/ easier to achieve. Thanks so much for your help here, and everyone else on this thread, too! I'm sure I'll have questions further on but I'm going to call this a success for today and go mix a martini. Best! Steven PS Strangely, I just read Fahrenheit 451 last week. Odd coincidence....