Thread: [Vim-latex-devel] calling makeindex during compilation
Brought to you by:
srinathava,
tmaas
From: Felipe G. N. <fgn...@te...> - 2008-04-10 20:28:36
|
Hi. I'm using the "nomenclature" latex package [1]. It requires the following command makeindex mydoc.nlo -s nomencl.ist -o mydoc.nls in between latex runs. Could you give me a hint on how I could use the Vim-Latex suite to automatize that intermediary call to makeindex, please? I'd like to keep doing simply \ll, then. I've tried searching at the mailing list archive, to no avail. Thanks, Felipe. [1] <http://mirror.ctan.org/macros/latex/contrib/nomencl/nomencl.pdf> A snippet: The creation of the nomenclature list is very similar to the creation of an index [6, App. A]. You need to: o Put \usepackage[hoptionsi]{nomencl} in the preamble of your document. o Put \makenomenclature in the preamble of your document. o Issue the \nomenclature command (see Section 2.2) for each symbol you want to have included in the nomenclature list. o Put \printnomenclature at the place you want to have your nomenclature list. Now put your file through LATEX. The command \makenomenclature will instruct LATEX to open the nomenclature file <filename>.nlo corresponding to your LATEX file <filename>.tex and to write the information from your \nomenclature commands to this file. The next step is to invoke MakeIndex. You should instruct MakeIndex to use <filename>.nlo as your input file, use nomencl.ist as your style file, and write output to the file <filename>.nls. How to do this depends on your implementation of MakeIndex. For most UNIX implementations you should write something like makeindex <filename>.nlo -s nomencl.ist -o <filename>.nls Now you have the file <filename>.nls that contains your nomenclature list properly ordered. The last step is to invoke LATEX on your master file <filename>.tex once more. It will input your .nls file and process it accordingly to the current options. That’s all! |
From: Martin S. <fo...@un...> - 2008-04-10 22:26:20
|
If you are familiar with make(1) and Makefiles, I would recommend giving them a try. It should't be to big of a hassle to write one, and latex-suite automatically uses the Makefile if it exists in your working directory. I think your Makefile would look like this (I did not test it, never used nomenclature before): all: mydoc.dvi mydoc.dvi: mydoc.nls latex -interaction=nonstopmode mydoc.tex mydoc.nls: mydoc.nlo nomencl.ist makeindex mydoc.nlo -s nomencl.ist -o mydoc.nls mydoc.nlo: mydoc.tex latex -interaction=nonstopmode mydoc.tex clean: -rm -rf mydoc.dvi .PHONY: clean (don't just copy and paste, there has to be a TAB in front of every rule, not a number of SPACES (if you don't know what I am talking about, read an introduction to Makefiles). Of course you could write the Makefile much more generally, but that wouldn't help readability. There are tons of documentation on Makefiles on the internet.. I guess you could do something similar with latex-suites compiler dependency stuff (see :help compiler-dependency), setting the chain to nlo,nls,dvi and setting compilation rules for .nls and .nlo. That would be your homework. Happy hacking (and vimming) Martin On Thu, Apr 10, 2008 at 05:28:26PM -0300, Felipe G. Nievinski wrote: > Hi. > > I'm using the "nomenclature" latex package [1]. > > It requires the following command > > makeindex mydoc.nlo -s nomencl.ist -o mydoc.nls > > in between latex runs. > > Could you give me a hint on how I could use the Vim-Latex suite to > automatize that intermediary call to makeindex, please? I'd like to keep > doing simply \ll, then. > > I've tried searching at the mailing list archive, to no avail. > > Thanks, > Felipe. > > [1] <http://mirror.ctan.org/macros/latex/contrib/nomencl/nomencl.pdf> > A snippet: > The creation of the nomenclature list is very similar to the creation of > an index [6, App. A]. You need to: > o Put \usepackage[hoptionsi]{nomencl} in the preamble of your > document. > o Put \makenomenclature in the preamble of your document. > o Issue the \nomenclature command (see Section 2.2) for each > symbol you want to have included in the nomenclature list. > o Put \printnomenclature at the place you want to have your > nomenclature list. > > Now put your file through LATEX. The command \makenomenclature will > instruct LATEX to open the nomenclature file <filename>.nlo > corresponding to your LATEX file <filename>.tex and to write the > information from your \nomenclature commands to this file. > > The next step is to invoke MakeIndex. You should instruct MakeIndex to > use <filename>.nlo as your input file, use nomencl.ist as your style > file, and write output to the file <filename>.nls. How to do this > depends on your implementation of MakeIndex. For most UNIX > implementations you should write something like > makeindex <filename>.nlo -s nomencl.ist -o <filename>.nls > > Now you have the file <filename>.nls that contains your nomenclature > list properly ordered. The last step is to invoke LATEX on your master > file <filename>.tex once more. It will input your .nls file and process > it accordingly to the current options. That’s all! > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > Vim-latex-devel mailing list > Vim...@li... > https://lists.sourceforge.net/lists/listinfo/vim-latex-devel |
From: Ted P. <te...@te...> - 2008-04-11 13:06:31
|
> I guess you could do something similar with latex-suites compiler > dependency stuff (see :help compiler-dependency), setting the chain > to nlo,nls,dvi and setting compilation rules for .nls and .nlo. That > would be your homework. A few things... *) As with makeindex, bibtex, etc., you'll often have to run latex twice after the makeindex call: latex makeindex latex latex In fact, there are some (ALMOST pathological) times when latex will need to be run yet again (and possibly makeindex again). Writing a Makefile to do all of this isn't trivial (though it's been done -- it's easy to find lots of very complete latex Makefile solutions on-line). *) If you build all of this logic into your Makefile, you should probably turn it off within Vim-LaTeX, or it may try to run LaTeX more than it needs to. *) I've actually modified my ~/.vim/ftplugin/latex-suite/compiler.vim file so that it runs makeindex not only if it sees idx files, but also if it sees other files for makeindex (like glo for glossaries or acr for acronyms). I'm not comfortable with distributing my own compiler.vim (for fear that I'll forget to tell you to also change something in texrc), but it may be a good idea to try hacking your own compiler.vim so that it responds to new .nlo files. Open up compiler.vim and search for "makeindex". You'll find the section. The flow isn't hard to follow. Best -- Ted > Happy hacking (and vimming) > > Martin > > > On Thu, Apr 10, 2008 at 05:28:26PM -0300, Felipe G. Nievinski wrote: >> Hi. >> >> I'm using the "nomenclature" latex package [1]. >> >> It requires the following command >> >> makeindex mydoc.nlo -s nomencl.ist -o mydoc.nls >> >> in between latex runs. >> >> Could you give me a hint on how I could use the Vim-Latex suite to >> automatize that intermediary call to makeindex, please? I'd like to >> keep doing simply \ll, then. >> >> I've tried searching at the mailing list archive, to no avail. >> >> Thanks, Felipe. >> >> [1] >> <http://mirror.ctan.org/macros/latex/contrib/nomencl/nomencl.pdf> A >> snippet: The creation of the nomenclature list is very similar to >> the creation of an index [6, App. A]. You need to: o Put >> \usepackage[hoptionsi]{nomencl} in the preamble of your document. o >> Put \makenomenclature in the preamble of your document. o Issue >> the \nomenclature command (see Section 2.2) for each symbol you >> want to have included in the nomenclature list. o Put >> \printnomenclature at the place you want to have your nomenclature >> list. >> >> Now put your file through LATEX. The command \makenomenclature will >> instruct LATEX to open the nomenclature file <filename>.nlo >> corresponding to your LATEX file <filename>.tex and to write the >> information from your \nomenclature commands to this file. >> >> The next step is to invoke MakeIndex. You should instruct MakeIndex >> to use <filename>.nlo as your input file, use nomencl.ist as your >> style file, and write output to the file <filename>.nls. How to do >> this depends on your implementation of MakeIndex. For most UNIX >> implementations you should write something like makeindex >> <filename>.nlo -s nomencl.ist -o <filename>.nls >> >> Now you have the file <filename>.nls that contains your >> nomenclature list properly ordered. The last step is to invoke >> LATEX on your master file <filename>.tex once more. It will input >> your .nls file and process it accordingly to the current options. >> That’s all! >> >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference >> Don't miss this year's exciting event. There's still time to save >> $100. Use priority code J8TL2D2. >> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone >> _______________________________________________ Vim-latex-devel >> mailing list Vim...@li... >> https://lists.sourceforge.net/lists/listinfo/vim-latex-devel > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save > $100. Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ Vim-latex-devel > mailing list Vim...@li... > https://lists.sourceforge.net/lists/listinfo/vim-latex-devel -- Ted Pavlic <te...@te...> |