You can put the \nomenclature
command inside the equation environment.
Recall also that consecutive display environments are not recommended and that amsmath
provides many environments for displays. Here's with align
:
\documentclass{report}
\usepackage{amsmath}
\usepackage{nomencl}
\makenomenclature
\begin{document}
\printnomenclature
\cleardoublepage
Some text
\begin{equation}
a=A
\nomenclature{$a$}{Anything}
\end{equation}
Some other text
\begin{align}
a&=
\begin{pmatrix}
1 & 0 \\
0 & 1 \\
\end{pmatrix}
\\
b&=
\begin{pmatrix}
1 & 1 \\
1 & 1 \\
\end{pmatrix}
\nomenclature{$b$}{Anything}
\\
c&=
\begin{pmatrix}
0 & 0 \\
0 & 0 \\
\end{pmatrix}
\end{align}
\end{document}
As mentioned in the comments, microtype
is your friend here, and produces nicer output for the rest of the document as well.
Because all of these options depend on your reference list/reference style/margin settings/font choices (which we do not have), I've listed a few options and compared them using a sample text (\lipsum
) and sample reference list biblatex-examples.bib
which should be included on any system with biblatex
installed.
In addition to microtype
, I'd recommend a setting for biblatex
's block=
option. cgnieder suggested block=ragged
, but I think this will be not acceptable for you given the update to your question. I've included it for future visitors, though. :-)
I think block=space
would look closer to your ideal output. It allows extra space to be inserted between "blocks" in the bibliography, which can alleviate would-be line-breaking problems.
Another option could be \RaggedRight
from ragged2e
, which enables hyphenation without full justification, but this didn't look the greatest either considering your dissatisfaction with the block=ragged
option. But again, this is highly dependent on the text/font/margins, so I've included it as an option for future visitors to try.
MWE
Here's the base test MWE I used to compare the settings:
\documentclass[draft]{memoir} % `draft' to show overfull \hboxes
\usepackage{lipsum}
%\usepackage{ragged2e}
\usepackage[final]{microtype} % `final' to prevent disabling
\usepackage[
backend=biber, % default, but avoids warnings
block=space, % allow additional horizontal space between blocks
% block=ragged, % set the bibliography ragged right and introduce a line break penalty
]{biblatex}
\addbibresource{biblatex-examples.bib} % bunch of sample entries
\begin{document}
\lipsum % print the sample text
\nocite{*} % print all references in the bibliography
%\raggedright
%\Raggedright
\printbibliography
\end{document}
Spoiler alert: the "best" (IMHO and for my test input/references) combination is shown in the sample above.
Comparison
I've left out anything that's "too ragged" (except for the default result) based on your update above. From "worst" to "best":
- Default configuration; no
\raggedright
, no \RaggedRight
, no microtype
, default block=none
: 14 bad boxes, worst 26.46pt
too wide
![enter image description here](https://i.stack.imgur.com/XLC7g.png)
- Add
microtype
with default settings: 4 bad boxes, worst 8.09pt
too wide
- Add
block=space
in addition to microtype
: 1 bad box, 1.12pt
too wide
![enter image description here](https://i.stack.imgur.com/T6EY1.png)
I've shown the worst offender in the screenshots, but line breaks around long DOI/URL-like strings were also vastly improved. Two examples:
Before:
After:
![enter image description here](https://i.stack.imgur.com/oOD6C.png)
Notes
If for some reason you really want microtype
enabled only in the bibliography (though I'd recommend to just use it throughout the document), you can use \microtypesetup{disable}
and \microtypesetup{enable}
at the appropriate places in your document, as detailed in this answer. These keys are still undocumented, but you can find the code in lines 4118–4128 of the current (v2.5a) package code (p. 125 of the v2.5a documentation).
Best Answer
The word “quad” is a traditional term in typography. It comes from Italian “quadratone” (big square). In old fashioned metal typography it meant a square piece of metal lower than type height that could be inserted between types for spacing them. In Italian typography it's still called “spazio quadratone”.
It's commonly as wide and high as an uppercase “M”, since this is usually the widest letter in a font and occupies a square area.
The command
\quad
takes its name from this traditional name;\qquad
just means ”two quads”. However in TeX the\quad
has no height, but only width.