Steven Arntson <ste...@stevenarntson.com> writes: > Nick Dokos <ndo...@gmail.com> writes: > >> Steven Arntson <ste...@stevenarntson.com> 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