emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Steven Arntson <steven@stevenarntson.com>
To: emacs-orgmode@gnu.org
Subject: Re: LaTex export questions
Date: Wed, 28 May 2014 17:22:44 -0700	[thread overview]
Message-ID: <87egzdsaaz.fsf@stevenarntson.com> (raw)
In-Reply-To: 87ppix32n5.fsf@alphaville.bos.redhat.com

Nick Dokos <ndokos@gmail.com> writes:

> Steven Arntson <steven@stevenarntson.com> writes:
>
>> Nick Dokos <ndokos@gmail.com> writes:
>>
>>> Steven Arntson <steven@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):
>
> (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	other threads:[~2014-05-29  0:23 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-27 19:49 LaTex export questions Steven Arntson
2014-05-27 21:13 ` Igor Sosa Mayor
2014-05-27 21:42   ` Nick Dokos
2014-05-28  1:35     ` Alan L Tyree
2014-05-28  3:25     ` Steven Arntson
2014-05-28  4:31       ` Alan Tyree
2014-05-28  6:07         ` Steven Arntson
2014-05-28  6:30           ` Axel Kielhorn
2014-05-31  7:25         ` Martin Schöön
2014-06-02 21:07           ` Alan Tyree
2014-05-28 12:39       ` Rick Frankel
2014-05-28 20:48         ` Steven Arntson
2014-05-28 21:51           ` Nick Dokos
2014-05-28 22:46             ` Steven Arntson
2014-05-28 23:27               ` Nick Dokos
2014-05-29  0:22                 ` Steven Arntson [this message]
2014-05-29  1:52                   ` Nick Dokos
2014-05-27 21:31 ` Charles Millar
2014-05-28 19:48 ` Bastien
2014-05-28 19:51 ` Grant Rettke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87egzdsaaz.fsf@stevenarntson.com \
    --to=steven@stevenarntson.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).