From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johan Ekh Subject: Re: Use nomencl package with latex exporter? Date: Wed, 8 Aug 2012 08:40:05 +0200 Message-ID: References: <87mx286wva.fsf@ed.ac.uk> <2714.1344281746@alphaville> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d042fdd029d6e6604c6bb612c Return-path: Received: from eggs.gnu.org ([208.118.235.92]:58792) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Syzw9-0005kT-Bd for emacs-orgmode@gnu.org; Wed, 08 Aug 2012 02:40:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Syzw7-0005mE-75 for emacs-orgmode@gnu.org; Wed, 08 Aug 2012 02:40:09 -0400 Received: from mail-vb0-f41.google.com ([209.85.212.41]:43943) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Syzw6-0005kW-RY for emacs-orgmode@gnu.org; Wed, 08 Aug 2012 02:40:06 -0400 Received: by vbkv13 with SMTP id v13so462339vbk.0 for ; Tue, 07 Aug 2012 23:40:05 -0700 (PDT) In-Reply-To: <2714.1344281746@alphaville> 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: nicholas.dokos@hp.com Cc: Myles English , "emacs-orgmode@gnu.org" --f46d042fdd029d6e6604c6bb612c Content-Type: text/plain; charset=ISO-8859-1 Thanks, can you give some hints on how to customize it, or point me to some information? /Johan On Mon, Aug 6, 2012 at 9:35 PM, Nick Dokos wrote: > Johan Ekh wrote: > > > Thank you Myles, > > I'm not that comfortable with cmake but I will give your solution a try > and report My milage. > > > > / Johan > > > > Sent from my iPad > > > > On 6 aug 2012, at 14:14, Myles English wrote: > > > > > > > > Johan Ekh writes: > > > > > >> Hi all, > > >> I use the default latex exporter in org-mode v7.8 to write documents > using > > >> a custom latex class which is built on "article". > > >> I would like to use the "nomencl" latex package if possible. > > > > > >> From the shell I usually run something like > > >> > > >> makeindex filename.nlo -s nomencl.ist -o filename.nls > > >> > > >> followed by latex or pdflatex, but how can I get the exporter to do > > >> this? > > Customize the variable org-latex-to-pdf-process appropriately. > > Nick > > > > I don't know the answer to your question, but when I came across the > > > same problem, I used a makefile-like solution because I felt that the > > > building process was becoming sufficiently complicated to warrant using > > > a specialised tool. If you are comfortable with CMake already it may > be > > > worth a look. Have a look for "UseLatex.cmake". > > > > > > Basically you get emacs to export the .tex file from the .org file: > > > > > > add_custom_command( > > > OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/mypaper.tex > > > COMMAND emacs --batch > > > --visit=${CMAKE_CURRENT_BINARY_DIR}/mypaper.org > > > --load=/home/me/myfuncs.el > > > --funcall org-export-as-latex-batch > > > DEPENDS orgfile > > > COMMENT "Exporting orgmode file to LaTeX using emacs" > > > ) > > > > > > And then bibtex and nomenclature are asked to do their stuff, and a pdf > > > is produced, with something like this directive: > > > > > > add_latex_document( mypaper.tex > > > INPUTS tex/bibliography.tex > > > texlib/mystyle.sty > > > BIBFILES texlib/mylibrary.bib > > > DEFAULT_PDF > > > USE_NOMENCL > > > ) > > > > > > I also get it to generate all my R plots. Other advantages are that > you > > > get an out-of-source build that is isolated (to some extent) in its own > > > directory. And I think it is easier to diagnose the problems when > > > things go wrong, better than staring at an elisp backtrace. Now if org > > > would write my CMakeList.txt for me, that would be a fine thing. > > > > > > Myles > > > > > > --f46d042fdd029d6e6604c6bb612c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks,
can you give some hints on how to customize it, or point me to s= ome information?

/Johan

On Mon, Au= g 6, 2012 at 9:35 PM, Nick Dokos <nicholas.dokos@hp.com>= wrote:
Johan Ekh <ekh.johan@gmail.com> wrote:

> Thank you Myles,
> I'm not that comfortable with cmake but I will give your solution = a try and report My milage.
>
> / Johan
>
> Sent from my iPad
>
> On 6 aug 2012, at 14:14, Myles English <mylesenglish@gmail.com> wrote:
>
> >
> > Johan Ekh writes:
> >
> >> Hi all,
> >> I use the default latex exporter in org-mode v7.8 to write do= cuments using
> >> a custom latex class which is built on "article". > >> I would like to use the "nomencl" latex package if = possible.
> >
> >> From the shell I usually run something like
> >>
> >> makeindex filename.nlo -s nomencl.ist -o filename.nls
> >>
> >> followed by latex or pdflatex, but how can I get the exporter= to do
> >> this?

Customize the variable org-latex-to-pdf-process appropriately.

Nick

> > I don't know the answer to your question, but when I came acr= oss the
> > same problem, I used a makefile-like solution because I felt that= the
> > building process was becoming sufficiently complicated to warrant= using
> > a specialised tool. =A0If you are comfortable with CMake already = it may be
> > worth a look. =A0Have a look for "UseLatex.cmake".
> >
> > Basically you get emacs to export the .tex file from the .org fil= e:
> >
> > add_custom_command(
> > =A0OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/mypaper.tex
> > =A0COMMAND emacs --batch
> > =A0 =A0--visit=3D${CMAKE_CURRENT_BINARY_DIR}/mypaper.org
> > =A0 =A0--load=3D/home/me/myfuncs.el
> > =A0 =A0--funcall org-export-as-latex-batch
> > =A0DEPENDS orgfile
> > =A0COMMENT "Exporting orgmode file to LaTeX using emacs"= ;
> > =A0)
> >
> > And then bibtex and nomenclature are asked to do their stuff, and= a pdf
> > is produced, with something like this directive:
> >
> > add_latex_document( mypaper.tex
> > =A0INPUTS tex/bibliography.tex
> > =A0 =A0 =A0 =A0 texlib/mystyle.sty
> > =A0BIBFILES texlib/mylibrary.bib
> > =A0DEFAULT_PDF
> > =A0USE_NOMENCL
> > )
> >
> > I also get it to generate all my R plots. =A0Other advantages are= that you
> > get an out-of-source build that is isolated (to some extent) in i= ts own
> > directory. =A0And I think it is easier to diagnose the problems w= hen
> > things go wrong, better than staring at an elisp backtrace. =A0No= w if org
> > would write my CMakeList.txt for me, that would be a fine thing.<= br> > >
> > Myles
>




--f46d042fdd029d6e6604c6bb612c--