If every one reads manuals, then we will have very less questions here and less reputation too ;)
To make nomenclature you have to pdflatex
the .tex
file and then run this command:
makeindex -s nomencl.ist -t "<file name>.nlg" -o "<file name>.nls" "<file name>.nlo"
where <file name>
is the name without .tex
extension (myfile
if I have myfile.tex
).
Then again pdflatex
myfile.tex
.
Now the question is how to run makeindex
with all those arguments in texstudio.
You can create a user
command for this. Go to Options
→ Configure TeXstudio
. In the window that appears, choose Build
tab on the left side. Search for User Commands
. (You may have to click Add
button with a green +
). Type
Make Nomenclature
just after user0:
(0,or 1 0r 2, depending on how many use commands you already have) in the first box. In the second box type:
makeindex -s nomencl.ist -t %.nlg -o %.nls %.nlo
Now OK it. Illustration below.
Now you have a menu under Tools
→ User
with a short key also.
Now run pdflatex
→ Make Nomeclature
→ pdflatex
. Hope things are now clear.
As another option, you can install the cool automation tool arara
and create a User Command
for arara (as mentioned above) and make all three compilation clicks in one go. You have to add these lines:
% arara: pdflatex
% arara: nomencl
% arara: pdflatex
just before your \documentclass
command (or anywhere in the document), and compile using
arara myfile
using your User Command
.
This has nothing to do with the platform. The difference is due to using different versions of the glossaries
package. You are basically using an entry before it's been defined. Here's a MWE:
\documentclass{article}
\usepackage{glossaries}
\makeglossaries
\begin{document}
\gls{sample}
\newglossaryentry{sample}{name={sample},description={an example}}
\printglossary
\end{document}
The first time you compile this document, you get the error:
! Package glossaries Error: Glossary entry `sample' has not been defined.
With old (pre 3.08a) versions of glossaries
, you will always get this error whenever you try to use an entry before it's been defined. With newer versions of glossaries
, you'll get the error on the first LaTeX run, but not on subsequent runs (unless you delete the .glsdefs
file). Therefore, I suspect that your Ubuntu platform has a fairly new version of glossaries
, which is why it seems to work, whereas your other platform has an older pre-3.08a version, which is why it doesn't work.
The simplest, and recommended, solution is to define all your entries in the preamble.
Best Answer
You need to run
Run
LaTeX
to load my documentRun
makeglossaries
to load my GlossariesRun
LaTeX
to generate citations and references