> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/latex/pl/struktura-dokumentu/06-nomenclatures.md).

# Nomenklatury

## Wstęp

Lista skrótów i symboli jest powszechna w wielu dokumentach naukowych. Tego typu listy można tworzyć w LaTeX-u za pomocą pakietu `nomencl` pakietu. Ten artykuł wyjaśnia, jak tworzyć nomenklatury, dostosowując kolejność i podział na podgrupy symboli.

Wpisy nomenklatury działają prawie tak samo jak wpisy indeksu:

```latex
\documentclass{article}
\usepackage{nomencl}
\makenomenclature

\begin{document}
Oto przykład:
\nomenclature{\(c\)}{Prędkość światła w próżni}
\nomenclature{\(h\)}{stała Plancka}

\printnomenclature
\end{document}
```

[Otwórz ten `nomencl` przykład w Overleaf](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=nomencl+package+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bnomencl%7D%0A%5Cmakenomenclature%0A%0A%5Cbegin%7Bdocument%7D%0AHere+is+an+example%3A%0A%5Cnomenclature%7B%5C%28c%5C%29%7D%7BSpeed+of+light+in+a+vacuum%7D%0A%5Cnomenclature%7B%5C%28h%5C%29%7D%7BPlanck+constant%7D%0A%0A%5Cprintnomenclature%0A%5Cend%7Bdocument%7D)

![Nomenclatures01OLV2.png](/files/e0084831a39a6fd71ea563abe60fd716ef161c7c)

Jak zwykle pakiet jest importowany w preambule za pomocą `\usepackage{nomencl}`. Trzy podstawowe polecenia służące do tworzenia nomenklatur to:

* `\makenomenclature`. Zazwyczaj umieszcza się to zaraz po zaimportowaniu pakietu.
* `\nomenclature`. Służy do definiowania samych wpisów nomenklatury. Przyjmuje dwa argumenty: symbol i odpowiadający mu opis.
* `\printnomenclatures`. To polecenie wyświetli listę nomenklatur.

## Podstawowa składnia

Podczas importowania `nomencl` pakietu można użyć dodatkowych opcji. Następny przykład pokazuje, jak dodać nomenklaturę do spisu treści i jak zmienić domyślny język:

```latex
\documentclass{article}
\usepackage[spanish]{babel}
\usepackage[intoc, spanish]{nomencl}
\makenomenclature

\begin{document}
\tableofcontents

\section{Primera Sección}

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam lobortisfacilisis sem. Nullam nec mi et neque pharetra sollicitudin. Praesent imperdie...

\nomenclature{\(c\)}{Prędkość światła w próżni}
\nomenclature{\(h\)}{stała Plancka}

\printnomenclature
\end{document}
```

[Otwórz ten `nomencl` przykład w Overleaf](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=nomencl+package+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%5Bspanish%5D%7Bbabel%7D%0A%5Cusepackage%5Bintoc%2C+spanish%5D%7Bnomencl%7D%0A%5Cmakenomenclature%0A%0A%5Cbegin%7Bdocument%7D%0A%5Ctableofcontents%0A%0A%5Csection%7BPrimera+Secci%C3%B3n%7D%0A%0ALorem+ipsum+dolor+sit+amet%2C+consectetuer+adipiscing+elit.+Etiam+lobortisfacilisis+sem.+Nullam+nec+mi+et+neque+pharetra+sollicitudin.+Praesent+imperdie...%0A%0A%5Cnomenclature%7B%5C%28c%5C%29%7D%7BSpeed+of+light+in+a+vacuum%7D%0A%5Cnomenclature%7B%5C%28h%5C%29%7D%7BPlanck+constant%7D%0A%0A%5Cprintnomenclature%0A%5Cend%7Bdocument%7D)

![Nomenclatures02OLV2.png](/files/930b87e00f23bf0fbda3025e8d2c56bce123e2e5)

Dodatkowe opcje użyte tutaj podczas importowania pakietu to:

* `intoc` Dodaje **Nomenklaturę** do spisu treści.
* `spanish` Zmienia język, tłumacząc domyślny tytuł *Nomenklatury* odpowiednio. Obsługiwane języki to: `chorwacki`, `duński`, `angielski`, `francuski`, `niemiecki`, `włoski`, `polski`, `portugalski`, `russian`, `spanish` i `ukraiński`.

Inne przydatne funkcje `nomencl` pakietu to możliwość ręcznego ustawienia tytułu nomenklatury oraz dodania dodatkowej adnotacji.

```latex
\documentclass{article}
\usepackage{nomencl}
\makenomenclature

\renewcommand{\nomname}{List of Symbols}

\renewcommand{\nompreamble}{Następująca lista opisuje kilka symboli, które będą później używane w treści dokumentu}

\begin{document}
Oto przykład:

\nomenclature{\(c\)}{Prędkość światła w próżni}
\nomenclature{\(h\)}{stała Plancka}

\printnomenclature
\end{document}
```

[Otwórz ten `nomencl` przykład w Overleaf](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=nomencl+package+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bnomencl%7D%0A%5Cmakenomenclature%0A%0A%5Crenewcommand%7B%5Cnomname%7D%7BList+of+Symbols%7D%0A%0A%5Crenewcommand%7B%5Cnompreamble%7D%7BThe+next+list+describes+several+symbols+that+will+be+later+used+within+the+body+of+the+document%7D%0A%0A%5Cbegin%7Bdocument%7D%0AHere+is+an+example%3A%0A%0A%5Cnomenclature%7B%5C%28c%5C%29%7D%7BSpeed+of+light+in+a+vacuum%7D%0A%5Cnomenclature%7B%5C%28h%5C%29%7D%7BPlanck+constant%7D%0A%0A%5Cprintnomenclature%0A%5Cend%7Bdocument%7D)

![Nomenclatures03verbOLV2.png](/files/8b173268e0efbf972e7d94b344ec86e29e779829)

Linia

```
\renewcommand{\nomname}{List of Symbols}
```

zmienia domyślny tytuł.

Polecenie

```
\renewcommand{\nompreamble}{Następująca lista...}
```

wstawia tekst pomiędzy tytułem a listą symboli.

## Grupowanie

Aby pogrupować symbole według ich typu, potrzebna jest dodatkowa praca. Dodajemy prefiks do każdego symbolu i używamy pakietu `etoolbox` do porównywania prefiksów.

```latex
\documentclass{article}
\usepackage{amssymb}
\usepackage{nomencl}
\makenomenclature

%% Ten kod tworzy grupy
% -----------------------------------------
\usepackage{etoolbox}
\renewcommand\nomgroup[1]{%
  \item[\bfseries
  \ifstrequal{#1}{P}{Stałe fizyczne}{%
  \ifstrequal{#1}{N}{Zbiory liczbowe}{%
  \ifstrequal{#1}{O}{Inne symbole}{}}}%
]}
% -----------------------------------------

\begin{document}
Oto przykład:

\nomenclature[P]{\(c\)}{Prędkość światła w próżni}
\nomenclature[P]{\(h\)}{stała Plancka}
\nomenclature[P]{\(G\)}{stała grawitacyjna}
\nomenclature[N]{\(\mathbb{R}\)}{Liczby rzeczywiste}
\nomenclature[N]{\(\mathbb{C}\)}{Liczby zespolone}
\nomenclature[N]{\(\mathbb{H}\)}{Kwaterniony}
\nomenclature[O]{\(V\)}{Stała objętość}
\nomenclature[O]{\(\rho\)}{Wskaźnik tarcia}

\printnomenclature
\end{document}
```

[Otwórz ten `nomencl` przykład w Overleaf](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=nomencl+package+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bamssymb%7D%0A%5Cusepackage%7Bnomencl%7D%0A%5Cmakenomenclature%0A%0A%25%25+This+code+creates+the+groups%0A%25+-----------------------------------------%0A%5Cusepackage%7Betoolbox%7D%0A%5Crenewcommand%5Cnomgroup%5B1%5D%7B%25%0A++%5Citem%5B%5Cbfseries%0A++%5Cifstrequal%7B%231%7D%7BP%7D%7BPhysics+constants%7D%7B%25%0A++%5Cifstrequal%7B%231%7D%7BN%7D%7BNumber+sets%7D%7B%25%0A++%5Cifstrequal%7B%231%7D%7BO%7D%7BOther+symbols%7D%7B%7D%7D%7D%25%0A%5D%7D%0A%25+-----------------------------------------%0A%0A%5Cbegin%7Bdocument%7D%0AHere+is+an+example%3A%0A%0A%5Cnomenclature%5BP%5D%7B%5C%28c%5C%29%7D%7BSpeed+of+light+in+a+vacuum%7D%0A%5Cnomenclature%5BP%5D%7B%5C%28h%5C%29%7D%7BPlanck+constant%7D%0A%5Cnomenclature%5BP%5D%7B%5C%28G%5C%29%7D%7BGravitational+constant%7D%0A%5Cnomenclature%5BN%5D%7B%5C%28%5Cmathbb%7BR%7D%5C%29%7D%7BReal+numbers%7D%0A%5Cnomenclature%5BN%5D%7B%5C%28%5Cmathbb%7BC%7D%5C%29%7D%7BComplex+numbers%7D%0A%5Cnomenclature%5BN%5D%7B%5C%28%5Cmathbb%7BH%7D%5C%29%7D%7BQuaternions%7D%0A%5Cnomenclature%5BO%5D%7B%5C%28V%5C%29%7D%7BConstant+volume%7D%0A%5Cnomenclature%5BO%5D%7B%5C%28%5Crho%5C%29%7D%7BFriction+index%7D%0A%0A%5Cprintnomenclature%0A%5Cend%7Bdocument%7D)

![Nomenclatures04OLV2.png](/files/8bac827d86764bbb52318314f2befa8642a789a0)

Dodawane są dodatkowe grupy. Kod tego nie jest taki prosty; używa polecenia `\ifstrequal{}{}{}{}`, dwa pierwsze argumenty to porównywane napisy; jeśli są równe, termin jest dodawany do grupy, w przeciwnym razie sprawdzany jest następny zagnieżdżony warunek.

Zauważ, że teraz każde `\nomenclature` polecenie ma dodatkowy argument, prefiks, w nawiasach; jest on używany w kodzie grupowania.

Jeśli `etoolbox` nie jest dostępne, można użyć `ifthen` pakietu, który zamiast tego udostępnia warunek `\ifthenelse{}{}{}`, ale składnia jest nieco bardziej złożona:

```latex
\usepackage{ifthen}
  \renewcommand{\nomgroup}[1]{%
  \item[\bfseries
  \ifthenelse{\equal{#1}{P}}{Stałe fizyczne}{%
  \ifthenelse{\equal{#1}{O}}{Inne symbole}{%
  \ifthenelse{\equal{#1}{N}}{Zbiory liczbowe}{}}}%
  ]}
```

To wygeneruje te same grupy nomenklatur.

## Dodawanie jednostek do stałych fizycznych

Kolejną interesującą funkcją jest użycie `siunitx` pakietu do dodawania jednostek, wyrównując je do prawej odpowiadających im wpisów. W tym celu należy zdefiniować `nomunit` makro tak, jak pokazano w poniższym przykładzie:

```latex
\documentclass{article}
\usepackage{amssymb}
\usepackage{nomencl}
\usepackage{siunitx}
\usepackage{hyperref}
\makenomenclature
\hypersetup{
    colorlinks=true,
    urlcolor=blue,
}
%% To doda podgrupy
%----------------------------------------------
\usepackage{etoolbox}
\renewcommand\nomgroup[1]{%
  \item[\bfseries
  \ifstrequal{#1}{A}{Stałe fizyczne}{%
  \ifstrequal{#1}{B}{Zbiory liczbowe}{%
  \ifstrequal{#1}{C}{Inne symbole}{}}}%
]}
%----------------------------------------------

%% To doda jednostki
%----------------------------------------------
\newcommand{\nomunit}[1]{%
\renewcommand{\nomentryend}{\hspace*{\fill}#1}}
%----------------------------------------------

Przykład nomenklatur
Zespół Overleaf
\date{\today}

\begin{document}
\maketitle

\noindent To jest przykład pokazujący, jak działa pakiet \texttt{nomencl}, z jednostkami sformatowanymi za pomocą pakietu \texttt{siunitx}. Odwołano się do \href{https://www.nist.gov/pml/fundamental-physical-constants}{NIST}, aby podać wartości stałych fizycznych oraz ich odpowiadające jednostki — odnośniki są dostarczane za pomocą pakietu \texttt{hyperref}:

\nomenclature[A, 02]{\(c\)}{\href{https://physics.nist.gov/cgi-bin/cuu/Value?c}
{Prędkość światła w próżni}
\nomunit{\SI{299792458}{\meter\per\second}}}
\nomenclature[A, 03]{\(h\)}{\href{https://physics.nist.gov/cgi-bin/cuu/Value?h}
{stała Plancka}
\nomunit{\SI[group-digits=false]{6.62607015e-34}{\joule\per\hertz}}}
\nomenclature[A, 01]{\(G\)}{\href{https://physics.nist.gov/cgi-bin/cuu/Value?bg}
{stała grawitacyjna}
\nomunit{\SI[group-digits=false]{6.67430e-11}{\meter\cubed\per\kilogram\per\second\squared}}}
\nomenclature[B, 03]{\(\mathbb{R}\)}{Liczby rzeczywiste}
\nomenclature[B, 02]{\(\mathbb{C}\)}{Liczby zespolone}
\nomenclature[B, 01]{\(\mathbb{H}\)}{Kwaterniony}
\nomenclature[C]{\(V\)}{Stała objętość}
\nomenclature[C]{\(\rho\)}{Wskaźnik tarcia}

\printnomenclature

\end{document}
```

[Otwórz w Overleaf (przykład użycia `nomencl` i `siunitx` pakietów).](/latex/pl/struktura-dokumentu/06-nomenclatures.md)

![Nomcomplex.png](/files/e2212260691b938d54008e82c81dc12af95d1d7a)

## Sortowanie wpisów

To jest domyślna kolejność sortowania:

```latex
\documentclass{article}
\usepackage{nomencl}

\makenomenclature

\begin{document}
Oto przykład:

\nomenclature{\(+a\)}{Operator}
\nomenclature{\(2a\)}{Liczba}
\nomenclature{\(:a\)}{Symbol interpunkcyjny}
\nomenclature{\(Aa\)}{Wielka litera}
\nomenclature{\(aa\)}{Mała litera}
\nomenclature{\(\alpha\)}{Znak grecki}

\printnomenclature

\end{document}
```

[Otwórz ten `nomencl` przykład w Overleaf](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=nomencl+default+sort+order\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bnomencl%7D%0A%0A%5Cmakenomenclature%0A%0A%5Cbegin%7Bdocument%7D%0AHere+is+an+example%3A%0A%0A%5Cnomenclature%7B%5C%28%2Ba%5C%29%7D%7BOperator%7D%0A%5Cnomenclature%7B%5C%282a%5C%29%7D%7BNumber%7D%0A%5Cnomenclature%7B%5C%28%3Aa%5C%29%7D%7BPunctuation+symbol%7D%0A%5Cnomenclature%7B%5C%28Aa%5C%29%7D%7BUppercase+letter%7D%0A%5Cnomenclature%7B%5C%28aa%5C%29%7D%7BLowercase+letter%7D%0A%5Cnomenclature%7B%5C%28%5Calpha%5C%29%7D%7BGreek+character%7D%0A%0A%5Cprintnomenclature%0A%0A%5Cend%7Bdocument%7D)

![Nomenclatures05OLV2.png](/files/880c0f05f1a5b20a4fafb7616be1c09e6e70a2c8)

Zauważ, że znak grecki pojawił się przed znakami alfabetycznymi z powodu ukośnika odwrotnego `\` % `\alpha`.

Podobnie jak w przypadku grupowania, można użyć prefiksu do ręcznego sortowania wpisów nomenklatury:

```latex
\documentclass{article}
\usepackage{nomencl}

\makenomenclature

\begin{document}
Oto przykład:

\nomenclature[06]{\(+a\)}{Operator}
\nomenclature[03]{\(2a\)}{Liczba}
\nomenclature[05]{\(:a\)}{Symbol interpunkcyjny}
\nomenclature[04]{\(Aa\)}{Wielka litera}
\nomenclature[01]{\(aa\)}{Mała litera}
\nomenclature[02]{\(\alpha\)}{Znak grecki}

\printnomenclature

\end{document}
```

[Otwórz ten `nomencl` przykład w Overleaf](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Sorting+nomencl+entries\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bnomencl%7D%0A%0A%5Cmakenomenclature%0A%0A%5Cbegin%7Bdocument%7D%0AHere+is+an+example%3A%0A%0A%5Cnomenclature%5B06%5D%7B%5C%28%2Ba%5C%29%7D%7BOperator%7D%0A%5Cnomenclature%5B03%5D%7B%5C%282a%5C%29%7D%7BNumber%7D%0A%5Cnomenclature%5B05%5D%7B%5C%28%3Aa%5C%29%7D%7BPunctuation+symbol%7D%0A%5Cnomenclature%5B04%5D%7B%5C%28Aa%5C%29%7D%7BUppercase+letter%7D%0A%5Cnomenclature%5B01%5D%7B%5C%28aa%5C%29%7D%7BLowercase+letter%7D%0A%5Cnomenclature%5B02%5D%7B%5C%28%5Calpha%5C%29%7D%7BGreek+character%7D%0A%0A%5Cprintnomenclature%0A%0A%5Cend%7Bdocument%7D)

![Nomenclatures06OLV2.png](/files/962abacd915575f754ac0cd10f5a12f08aed6542)

Liczba w nawiasach określa kolejność wyświetlania odpowiedniego symbolu. Można też łączyć grupowanie i ręczne sortowanie:

```latex
\documentclass{article}
\usepackage{amssymb}
\usepackage{nomencl}
\makenomenclature

\usepackage{etoolbox}
\renewcommand\nomgroup[1]{%
  \item[\bfseries
  \ifstrequal{#1}{A}{Stałe fizyczne}{%
  \ifstrequal{#1}{B}{Zbiory liczbowe}{%
  \ifstrequal{#1}{C}{Inne symbole}{}}}%
]}

\begin{document}
Oto przykład:

\nomenclature[A, 02]{\(c\)}{Prędkość światła w próżni}
\nomenclature[A, 03]{\(h\)}{stała Plancka}
\nomenclature[A, 01]{\(G\)}{stała grawitacyjna}
\nomenclature[B, 03]{\(\mathbb{R}\)}{Liczby rzeczywiste}
\nomenclature[B, 02]{\(\mathbb{C}\)}{Liczby zespolone}
\nomenclature[B, 01]{\(\mathbb{H}\)}{Oktoniony}
\nomenclature[C]{\(V\)}{Stała objętość}
\nomenclature[C]{\(\rho\)}{Wskaźnik tarcia}

\printnomenclature

\end{document}
```

[Otwórz ten `nomencl` przykład w Overleaf](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Grouping+and+sorting+with+nomencl\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bamssymb%7D%0A%5Cusepackage%7Bnomencl%7D%0A%5Cmakenomenclature%0A%0A%5Cusepackage%7Betoolbox%7D%0A%5Crenewcommand%5Cnomgroup%5B1%5D%7B%25%0A++%5Citem%5B%5Cbfseries%0A++%5Cifstrequal%7B%231%7D%7BA%7D%7BPhysics+Constants%7D%7B%25%0A++%5Cifstrequal%7B%231%7D%7BB%7D%7BNumber+Sets%7D%7B%25%0A++%5Cifstrequal%7B%231%7D%7BC%7D%7BOther+Symbols%7D%7B%7D%7D%7D%25%0A%5D%7D%0A%0A%5Cbegin%7Bdocument%7D%0AHere+is+an+example%3A%0A%0A%5Cnomenclature%5BA%2C+02%5D%7B%5C%28c%5C%29%7D%7BSpeed+of+light+in+a+vacuum%7D%0A%5Cnomenclature%5BA%2C+03%5D%7B%5C%28h%5C%29%7D%7BPlanck+constant%7D%0A%5Cnomenclature%5BA%2C+01%5D%7B%5C%28G%5C%29%7D%7BGravitational+constant%7D%0A%5Cnomenclature%5BB%2C+03%5D%7B%5C%28%5Cmathbb%7BR%7D%5C%29%7D%7BReal+numbers%7D%0A%5Cnomenclature%5BB%2C+02%5D%7B%5C%28%5Cmathbb%7BC%7D%5C%29%7D%7BComplex+numbers%7D%0A%5Cnomenclature%5BB%2C+01%5D%7B%5C%28%5Cmathbb%7BH%7D%5C%29%7D%7BOctonions%7D%0A%5Cnomenclature%5BC%5D%7B%5C%28V%5C%29%7D%7BConstant+volume%7D%0A%5Cnomenclature%5BC%5D%7B%5C%28%5Crho%5C%29%7D%7BFriction+index%7D%0A%0A%5Cprintnomenclature%0A%0A%5Cend%7Bdocument%7D)

![Nomenclatures07OLV2.png](/files/201c3789247017c537968073cd583606986d5d53)

Zauważ, że wielkie litery używane do grupowania różnią się od tych użytych w przykładzie w poprzedniej sekcji, ponieważ ta litera służy do sortowania grup.

## Dalsza lektura

Więcej informacji znajdziesz w:

* [Glosariusze](/latex/pl/struktura-dokumentu/05-glossaries.md)
* [Wieloplikowe projekty LaTeX](/latex/pl/struktura-dokumentu/08-multi-file-latex-projects.md)
* [Wyrównanie tekstu](/latex/pl/formatowanie/06-text-alignment.md)
* [Pogrubienie, kursywa i podkreślenie](/latex/pl/podstawy-latex-a/03-bold-italics-and-underlining.md)
* [Wyrażenia matematyczne](/latex/pl/matematyka/01-mathematical-expressions.md)
* [Tworzenie i redefiniowanie makr](/latex/pl/polecenia/01-commands.md)
* [`nomencl` dokumentacja pakietu](http://mirror.jmu.edu/pub/CTAN/macros/latex/contrib/nomencl/nomencl.pdf)
* [`ifthen` dokumentacja pakietu](http://texdoc.net/texmf-dist/doc/latex/base/ifthen.pdf)
* [`etoolbox` dokumentacja pakietu](http://mirror.math.ku.edu/tex-archive/macros/latex/contrib/etoolbox/etoolbox.pdf)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://overleaf-pro.ayaka.space/latex/pl/struktura-dokumentu/06-nomenclatures.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
