From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: LaTex export questions Date: Wed, 28 May 2014 19:27:26 -0400 Message-ID: <87ppix32n5.fsf@alphaville.bos.redhat.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> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40072) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WpnG9-0001yg-Ne for emacs-orgmode@gnu.org; Wed, 28 May 2014 19:27:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WpnG2-0008Vz-Md for emacs-orgmode@gnu.org; Wed, 28 May 2014 19:27:49 -0400 Received: from plane.gmane.org ([80.91.229.3]:46372) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WpnG2-0008Uw-Fv for emacs-orgmode@gnu.org; Wed, 28 May 2014 19:27:42 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WpnG0-0000Sr-OX for emacs-orgmode@gnu.org; Thu, 29 May 2014 01:27:40 +0200 Received: from nat-pool-bos-t.redhat.com ([66.187.233.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 29 May 2014 01:27:40 +0200 Received: from ndokos by nat-pool-bos-t.redhat.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 29 May 2014 01:27:40 +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 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): --8<---------------cut here---------------start------------->8--- (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)) --8<---------------cut here---------------end--------------->8--- Then your org file should look like this: --8<---------------cut here---------------start------------->8--- #+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/. --8<---------------cut here---------------end--------------->8--- 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: --8<---------------cut here---------------start------------->8--- \runningtitle{Fahrenheit 451} \authorname{Ray Bradbury} --8<---------------cut here---------------end--------------->8--- plus any other settings from the sfmms documentation you think are necessary, and add a line to your .org file: --8<---------------cut here---------------start------------->8--- #+LATEX_HEADER: \usepackage{misc} --8<---------------cut here---------------end--------------->8--- to pick them up. That should get you some way towards your goal. Nick