From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johan Ekh Subject: Re: Use nomencl package with latex exporter? Date: Mon, 6 Aug 2012 21:26:22 +0200 Message-ID: References: <87mx286wva.fsf@ed.ac.uk> Mime-Version: 1.0 (1.0) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:57925) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SySwf-0004AG-9y for emacs-orgmode@gnu.org; Mon, 06 Aug 2012 15:26:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SySwe-0000uS-03 for emacs-orgmode@gnu.org; Mon, 06 Aug 2012 15:26:29 -0400 Received: from mail-lpp01m010-f41.google.com ([209.85.215.41]:36671) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SySwd-0000rK-P7 for emacs-orgmode@gnu.org; Mon, 06 Aug 2012 15:26:27 -0400 Received: by lahd3 with SMTP id d3so767039lah.0 for ; Mon, 06 Aug 2012 12:26:26 -0700 (PDT) In-Reply-To: <87mx286wva.fsf@ed.ac.uk> 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: Myles English Cc: "emacs-orgmode@gnu.org" Thank you Myles, I'm not that comfortable with cmake but I will give your solution a try and r= eport My milage. / Johan Sent from my iPad On 6 aug 2012, at 14:14, Myles English wrote: >=20 > Johan Ekh writes: >=20 >> Hi all, >> I use the default latex exporter in org-mode v7.8 to write documents usin= g >> a custom latex class which is built on "article". >> I would like to use the "nomencl" latex package if possible. >=20 >> =46rom the shell I usually run something like >>=20 >> makeindex filename.nlo -s nomencl.ist -o filename.nls >>=20 >> followed by latex or pdflatex, but how can I get the exporter to do >> this? >=20 > 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". >=20 > Basically you get emacs to export the .tex file from the .org file: >=20 > add_custom_command( > OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/mypaper.tex > COMMAND emacs --batch > --visit=3D${CMAKE_CURRENT_BINARY_DIR}/mypaper.org > --load=3D/home/me/myfuncs.el > --funcall org-export-as-latex-batch > DEPENDS orgfile > COMMENT "Exporting orgmode file to LaTeX using emacs" > ) >=20 > And then bibtex and nomenclature are asked to do their stuff, and a pdf > is produced, with something like this directive: >=20 > add_latex_document( mypaper.tex > INPUTS tex/bibliography.tex > texlib/mystyle.sty > BIBFILES texlib/mylibrary.bib > DEFAULT_PDF > USE_NOMENCL > ) >=20 > 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. >=20 > Myles