Re: Nomenclatura o lista dei simboli

#52551
Up
0
Down
::

Allora..
esempio ridotto del file Nomenclatura.tex:
`
% Roman symbols [r]
\nomenclature[r]{$d(t)$}{Temporal evolution of the spreading diameter}
\nomenclature[r]{$h_l(t)$}{Temporal evolution of height of thickness of the lamella}
\nomenclature[r]{$h_e$}{Limit of metastability}
\nomenclature[r]{$Re$}{Reynolds number}
% Greek symbols [g]
\nomenclature[g]{$\beta (t)$}{Temporal evolution of the spreading factor}
\nomenclature[g]{$\rho$}{Density of liquid}
\nomenclature[g]{$\mu$}{Dynamic viscosity of the liquid}
\nomenclature[g]{$\nu$}{Kinematic viscosity of the liquid}
`
Mentre il mio preambolo:
`
\documentclass[a4paper,12pt,oneside,indentfirst]{book}
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
%Nomenclature%
\usepackage{nomencl}
\makenomenclature
\RequirePackage{ifthen}
\ifthenelse{\equal{\languagename}{english}}
{
\renewcommand{\nomgroup}[1]{%
\ifthenelse{\equal{#1}{r}}{%
\item[\textbf{Roman symbols}]}{%
\ifthenelse{\equal{#1}{g}}{%
\item[\textbf{Greek symbols}]}{}}}%
}%
`
Poi per richiamare Nomenclatura.tex:
`
\begin{document}
\frontmatter
\begingroup
\makeatletter
\@fileswfalse
\tableofcontents
\clearpage
\addcontentsline{toc}{chapter}{\listfigurename}
\listoffigures
\clearpage
\addcontentsline{toc}{chapter}{\listtablename}
\listoftables
\clearpage
\addcontentsline{toc}{chapter}{\nomname}
\include{Nomenclatura}
\printnomenclature
\endgroup
`
Spero sia minimale come mi hai chiesto :)..

Il file seguente fa quello che deve:
`\documentclass[a4paper,12pt,oneside]{book}

\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
%Nomenclature%
\usepackage{nomencl}
\makenomenclature

\RequirePackage{ifthen}
\ifthenelse{\equal{\languagename}{english}}
{
\renewcommand{\nomgroup}[1]{%
\ifthenelse{\equal{#1}{r}}{%
\item[\textbf{Roman symbols}]}{%
\ifthenelse{\equal{#1}{g}}{%
\item[\textbf{Greek symbols}]}{}}}%
}%

\makeatletter
\newcommand{\ulist}[1]{\cleardoublepage
\addcontentsline{toc}{chapter}{\@nameuse{list#1name}}
\begingroup\@fileswfalse\@nameuse{listof#1s}\endgroup}
\makeatother

\begin{document}
\frontmatter
\tableofcontents
\ulist{figure}
\ulist{table}

\cleardoublepage
\addcontentsline{toc}{chapter}{\nomname}
%\include{Nomenclatura}
% Roman symbols [r]
\nomenclature[r]{$d(t)$}{Temporal evolution of the spreading diameter}
\nomenclature[r]{$h_l(t)$}{Temporal evolution of height of thickness of the lamella}
\nomenclature[r]{$h_e$}{Limit of metastability}
\nomenclature[r]{$Re$}{Reynolds number}
% Greek symbols [g]
\nomenclature[g]{$\beta (t)$}{Temporal evolution of the spreading factor}
\nomenclature[g]{$\rho$}{Density of liquid}
\nomenclature[g]{$\mu$}{Dynamic viscosity of the liquid}
\nomenclature[g]{$\nu$}{Kinematic viscosity of the liquid}

\printnomenclature

\mainmatter
\chapter{pippo}
abc

\end{document}`
Se lo chiamo tatino.tex ed eseguo:
`pdflatex tatino
makeindex tatino.nlo -s nomencl.ist -o tatino.nls
pdflatex tatino`
ottengo tutto quello che serve e al posto giusto.

Perché funzioni occorre che venga prodotta almeno una pagina dopo \printnomenclature (e questo è lo scopo del capitolo fasullo).

Se poi vuoi mettere tutti i tuoi comandi \nomenclature in un file separato, puoi benissimo farlo; ma chiamalo con \input e non con \include.

Ho cambiato i comandi per generare gli elenchi di figure e tabelle; così è più chiaro e, soprattutto, eviti di combinare pasticci. 🙂

Ciao
Enrico

Go to top