Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to make nomencl work? #503

Closed
drodenasherraiz opened this issue May 6, 2015 · 3 comments
Closed

How to make nomencl work? #503

drodenasherraiz opened this issue May 6, 2015 · 3 comments

Comments

@drodenasherraiz
Copy link

@drodenasherraiz drodenasherraiz commented May 6, 2015

Hi,

I am trying to compile a simple example that makes use of the nomencl package to print nomenclature. I am using SublimeText and LaTeXTools with mac, and it compiles without errors, but the nomenclature is not printed. I have been inspecting the build rules of LaTeXTools, but I cannot find the way to make it work. The example is:

\documentclass[a4paper,10pt]{article}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{nomencl}
\renewcommand{\nomname}{Nomenclature}
\makenomenclature

\title{I am trying to make nomencl work}
\author{}

\begin{document}
\maketitle
\blindtext \nomenclature{HI}{Hello} \nomenclature{BYE}{Good bye}
\printnomenclature
\end{document}

Thanks

@msiniscalchi

This comment has been minimized.

Copy link
Collaborator

@msiniscalchi msiniscalchi commented May 6, 2015

What do you see in the ST console (ctrl-backtick)? Any error messages? Did
you check the TeX log file? This may be a LaTeX issue...
On May 6, 2015 4:30 AM, "dr424" notifications@github.com wrote:

Hi,

I am trying to compile a simple example that makes use of the nomencl
package to print nomenclature. I am using SublimeText and LaTeXTools with
mac, and it compiles without errors, but the nomenclature is not printed. I
have been inspecting the build rules of LaTeXTools, but I cannot find the
way to make it work. The example is:

\documentclass[a4paper,10pt]{article}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{nomencl}
\renewcommand{\nomname}{Nomenclature}
\makenomenclature

\title{I am trying to make nomencl work}
\author{}

\begin{document}
\maketitle
\blindtext \nomenclature{HI}{Hello} \nomenclature{BYE}{Good bye}
\printnomenclature
\end{document}

Thanks


Reply to this email directly or view it on GitHub
#503.

@drodenasherraiz

This comment has been minimized.

Copy link
Author

@drodenasherraiz drodenasherraiz commented May 6, 2015

Hi,

The ST console prints out the following:


[Compiling /Users/admin/Desktop/Test/nomencl.tex]

TraditionalBuilder: Invoking latexmk... done.

No errors.

[Done!]


Then, checking the log file, it seems it loads the nomencl package but it is unable to create the .nsl file:


(/usr/local/texlive/2014/texmf-dist/tex/latex/nomencl/nomencl.sty
Package: nomencl 2005/09/22 v4.2 Nomenclature package (LN)
\nomlabelwidth=\dimen104
\nom@tempdim=\dimen105
\nomitemsep=\skip43
)
@nomenclaturefile=\write3
\openout3 = `nomencl.nlo'.

Writing nomenclature file nomencl.nlo
(./nomencl.aux)
\openout1 = `nomencl.aux'.

LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 12.
LaTeX Font Info: ... okay on input line 12.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 12.
LaTeX Font Info: ... okay on input line 12.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 12.
LaTeX Font Info: ... okay on input line 12.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 12.
LaTeX Font Info: ... okay on input line 12.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 12.
LaTeX Font Info: ... okay on input line 12.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 12.
LaTeX Font Info: ... okay on input line 12.
LaTeX Font Info: External font cmex10' loaded for size (Font) <12> on input line 14. LaTeX Font Info: External fontcmex10' loaded for size
(Font) <8> on input line 14.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <6> on input line 14.

No file nomencl.nls.
[1


Checking this with other programs, like TeXShop, it seems some sort of engine for nomenclature (http://tex.stackexchange.com/questions/37567/invoking-makeindex-for-nomencl) needs to be created first and then modify the compilation rules to make it consider the nomenclature. I have tried to do something similar on ST, checking the build rules, but as I mentioned earlier, I have been unable to do it.

Provided that you also use mac, are you able to replicate this problem?

Thanks in advance.

@ig0774

This comment has been minimized.

Copy link
Collaborator

@ig0774 ig0774 commented May 8, 2015

The problem here has little to do with LaTeXTools itself and more to do with the underlying build engine (texify on MiKTeX and LaTeXmk on basically anything else) and, more specifically, with the build tools having no knowledge of the various packages that might use the makeindex functionality (they DO both support generic indexes).

The documented solution for LaTeXmk is to create a .latexmkrc file which contains the following entry:

# Custom dependency and function for nomencl package
add_cus_dep( 'nlo', 'nls', 0, 'makenlo2nls' );
sub makenlo2nls {
    system( "makeindex -s nomencl.ist -o \"$_[0].nls\" \"$_[0].nlo\"" );
}

Which will correctly process the nomenclature for your test. Alternatively, or on a platform that doesn't use LaTeXmk, you can add this line to the top of your document:

\immediate\write18{makeindex -s nomencl.ist -o "\jobname.nls" "\jobname.nlo"}

(pulled from this question)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.