LaTeX users online

In total there are 10 users online :: 0 registered, 0 hidden and 10 guests (based on users active over the past 5 minutes)
Most users ever online was 1327 on Tue Nov 05, 2013 7:11 pm

Users browsing this forum: No registered users and 10 guests

nomencl | New Line in Item Label conflicts with Group Label Topic is solved

LaTeX Forum: Text Formatting

Add tags Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)

Postby will_flp on Mon Dec 17th, 2012

Hi,

Following the solution given in this thread, I am using
Code: Select all  •  Open in online LaTeX editor
\renewcommand{\nomlabel}[1]{\smash{\parbox[t]{1.5cm}{#1}}\hfil}

However, it conflicts with the \nomgroup (see below).
Code: Select all  •  Open in online LaTeX editor
\documentclass{article}
\usepackage{ifthen}
\usepackage{calc}
\usepackage[noprefix]{nomencl
}

% Configure title of groups
\newcommand{\bfdz}[1]{\bf\fontsize{12}{14}\selectfont #1}
\newcommand{\meru}[1]{\rule[2pt]{\textwidth-(\widthof{#1})}{.5pt}
}

% Enable two line label
\renewcommand{\nomlabel}[1]{\smash{\parbox[t]{1.5cm}{#1}}\hfil}

% Create Groups
\renewcommand{\nomgroup}[1]{%
\ifthenelse{\equal{#1}{A}}{\vspace{5mm} \item[\bfdz General Symbols] \meru{\bfdz General Symbols~~}}{%
\ifthenelse{\equal{#1}{G}}{\vspace{5mm} \item[\bfdz Greek Symbols] \meru{\bfdz Greek Symbols~~}}{}}}

\makenomenclature

\begin{document}

\printnomenclature[1.5cm]

\nomenclature[A]{$p(r_m,t)$, $p_m(t)$}{Received signal at the $m^{th}$ microphone\nomrefpage
}%{}{}

\nomenclature[G]{$\Delta t_{\vec{x}}$}{Emission time delay at focus point $\vec{x}$, $\Delta t_{\vec{x}}=r_{\vec{x}} / c$\nomrefpage}%{}{}

\end{document}

Does anyone know a way to fix it ?

Thanks,

Will
Attachments
nomencl-conflict-item-group.png
nomencl-conflict-item-group.png (36.88 KiB) Viewed 1206 times
will_flp
 
Posts: 4
Joined: Mon Dec 17th, 2012

Postby Stefan Kottwitz on Mon Dec 17th, 2012

Hi Will,

welcome to the board!

What is the conflict? It compiles without error.

Stefan
LaTeX Community Administrator
User avatar
Stefan Kottwitz
Site Admin
 
Posts: 7652
Joined: Mon Mar 10th, 2008
Location: Hamburg, Germany

Postby will_flp on Mon Dec 17th, 2012

Hi Stefan, thanks for the welcome.


Well, to be more clear please see the attached picture. I want the name of the groups to be wider ("blue space") and the labels smaller ("delimited green").

If you comment the line
Code: Select all  •  Open in online LaTeX editor
\renewcommand{\nomlabel}[1]{{\parbox[t]{1.5cm}{#1}}\hfil}

you will get something like the picture.
Attachments
nomencl-conflict-details.png
nomencl-conflict-details.png (35.09 KiB) Viewed 1206 times
will_flp
 
Posts: 4
Joined: Mon Dec 17th, 2012

Postby cgnieder on Wed Dec 19th, 2012

Here's a suggestion:

Code: Select all  •  Open in online LaTeX editor
% arara: pdflatex
% arara: nomencl
% arara: pdflatex
\documentclass{article}

\usepackage{ragged2e}
\usepackage[noprefix]{nomencl
}

\newcommand\grouphead[1]{%
  \rlap{%
    \parbox{\textwidth}{\textbf{\large#1 \hrulefill}}%
  }\hfill
}

% Enable two line label
\renewcommand{\nomlabel}[1]{%
  \smash{\parbox[t]{.15\linewidth}{\RaggedRight#1}}}

% Create Groups
\renewcommand{\nomgroup}[1]{%
  \ifx#1A\relax
    \item[\grouphead{General Symbols}]
  \fi
  \ifx#1G\relax
    \item[\grouphead{Greek Symbols}]
  \fi
  \bigskip}

\makenomenclature

\begin{document}

Text bla bla

\printnomenclature[1.5cm]

\nomenclature[A]{$p(r_m,t)$, $p_m(t)$}{Received signal at the $m^{th}$ microphone\nomrefpage
}%{}{}

\nomenclature[G]{$\Delta t_{\vec{x}}$}{Emission time delay at focus point $\vec{x}$, $\Delta t_{\vec{x}}=r_{\vec{x}} / c$\nomrefpage}%{}{}

\end{document}


nomencl.png
nomencl.png (17.87 KiB) Viewed 1394 times


Regards
Clemens
------------------------------
New German Q&A site about TeX: http://texwelt.de/wissen
User avatar
cgnieder
Site Moderator
 
Posts: 1938
Joined: Sat Apr 16th, 2011
Location: Germany

Postby will_flp on Wed Dec 19th, 2012

cgnieder, thanks a lot !

It is working perfectly!

=]
will_flp
 
Posts: 4
Joined: Mon Dec 17th, 2012

Postby cgnieder on Wed Dec 19th, 2012

For reference [1]: this question has been asked and answered on TeX.SX, too.

[1]: The board rules state that a direct link to crossposts has to be provided.

Regards
Clemens
------------------------------
New German Q&A site about TeX: http://texwelt.de/wissen
User avatar
cgnieder
Site Moderator
 
Posts: 1938
Joined: Sat Apr 16th, 2011
Location: Germany


Return to Text Formatting

LaTeX users online

Users browsing this forum: No registered users and 10 guests