emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] LaTex export questions


From: Steven Arntson
Subject: Re: [O] LaTex export questions
Date: Wed, 28 May 2014 17:22:44 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Nick Dokos <address@hidden> writes:

> Steven Arntson <address@hidden> writes:
>
>> Nick Dokos <address@hidden> writes:
>>
>>> Steven Arntson <address@hidden> 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....




reply via email to

[Prev in Thread] Current Thread [Next in Thread]