von larswi » Fr 21. Dez 2018, 10:16
Hallo zusammen,
für meine Bachelor-Arbeit soll ich mein Abkürzungs- & Symbolverzeichnis wie eine Tabelle gestalten.
Ich habe mich dazu auch ein wenig schlau gemacht und bisher ist folgendes dabei rausgekommen (als minimalbeispiel):
%
\documentclass[]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[left=35mm, right=30mm, top=35mm, bottom=25mm]{geometry}
\usepackage{amsmath}
\usepackage[
nomain,
nonumberlist,
toc,
acronym,
nopostdot,
nogroupskip
]{glossaries}
\newglossary[slg]{symbols}{syi}{syg}{List of Symbols}
\renewcommand*{\glspostdescription}{}
\makeglossaries
% MyStyle for list of Symbols
\newglossarystyle{MyStyle}{
\glossarystyle{long3colheader}
\renewenvironment{theglossary}
{\begin{longtable}{lp{2cm}p{\glsdescwidth}}}
{\end{longtable}}
\renewcommand*{\glossaryheader}{\textbf{Symbol} & \textbf{Unit} &
\textbf{Name}\\[3ex]\endhead}
\renewcommand*{\glossaryentryfield}[5]{%
\glsentryitem{##1}\glstarget{##1}{##2} & ##4 & ##3 \\[1ex]}%
}
% Abkürzungen
\newacronym{acr:ansys}{ANSYS}{Analysis System}
\newacronym{acr:fem}{FEM}{Finite Element Method}
% Symbole
% ELONGATION
\newglossaryentry{sym:elongation}{
name={\ensuremath{\varepsilon}},
symbol={[-]},
description={Elongation},
sort=symbolelongatilon,
type=symbols
}
% Stress
\newglossaryentry{sym:stress}{
name={\ensuremath{\sigma}},
symbol={[$N/mm^2$]},
description={Stress},
sort=symbolstress,
type=symbols
}
\glsaddall
\begin{document}
\printglossary[
type=acronym,
title=List of Abbreviations,
style=listdotted]
\newpage
\printglossary[
type=symbols,
style=MyStyle]
\newpage
\section{Beispiel}
The acronyms \gls{acr:ansys} and \gls{acr:fem} and the Symbols \gls{sym:elongation} and
\gls{sym:stress}.
\end{document}
Soweit so gut, nur möchte ich bei den Abkürzungsverzeichnis noch einen Tabellenkopf mit "\textbf{Abbreviation} | \textbf{Name}" haben und bei beiden Verzeichnissen jeweils noch eine horizontale Linie unterhalb dieser dick gedruckten Bezeichnung.
Am Ende der Seite soll dann auch nochmal eine horizontale Linie erscheinen.
Vielen Dank
PS: Ich hab noch ein Bild zugefügt, wie ich es mir in etwa vorstelle.
- Dateianhänge
-
- Example.png (17.86 KiB) 3196 mal betrachtet
Hallo zusammen,
für meine Bachelor-Arbeit soll ich mein Abkürzungs- & Symbolverzeichnis wie eine Tabelle gestalten.
Ich habe mich dazu auch ein wenig schlau gemacht und bisher ist folgendes dabei rausgekommen (als minimalbeispiel):
[code]%
\documentclass[]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[left=35mm, right=30mm, top=35mm, bottom=25mm]{geometry}
\usepackage{amsmath}
\usepackage[
nomain,
nonumberlist,
toc,
acronym,
nopostdot,
nogroupskip
]{glossaries}
\newglossary[slg]{symbols}{syi}{syg}{List of Symbols}
\renewcommand*{\glspostdescription}{}
\makeglossaries
% MyStyle for list of Symbols
\newglossarystyle{MyStyle}{
\glossarystyle{long3colheader}
\renewenvironment{theglossary}
{\begin{longtable}{lp{2cm}p{\glsdescwidth}}}
{\end{longtable}}
\renewcommand*{\glossaryheader}{\textbf{Symbol} & \textbf{Unit} &
\textbf{Name}\\[3ex]\endhead}
\renewcommand*{\glossaryentryfield}[5]{%
\glsentryitem{##1}\glstarget{##1}{##2} & ##4 & ##3 \\[1ex]}%
}
% Abkürzungen
\newacronym{acr:ansys}{ANSYS}{Analysis System}
\newacronym{acr:fem}{FEM}{Finite Element Method}
% Symbole
% ELONGATION
\newglossaryentry{sym:elongation}{
name={\ensuremath{\varepsilon}},
symbol={[-]},
description={Elongation},
sort=symbolelongatilon,
type=symbols
}
% Stress
\newglossaryentry{sym:stress}{
name={\ensuremath{\sigma}},
symbol={[$N/mm^2$]},
description={Stress},
sort=symbolstress,
type=symbols
}
\glsaddall
\begin{document}
\printglossary[
type=acronym,
title=List of Abbreviations,
style=listdotted]
\newpage
\printglossary[
type=symbols,
style=MyStyle]
\newpage
\section{Beispiel}
The acronyms \gls{acr:ansys} and \gls{acr:fem} and the Symbols \gls{sym:elongation} and
\gls{sym:stress}.
\end{document}
[/code]
Soweit so gut, nur möchte ich bei den Abkürzungsverzeichnis noch einen Tabellenkopf mit "\textbf{Abbreviation} | \textbf{Name}" haben und bei beiden Verzeichnissen jeweils noch eine horizontale Linie unterhalb dieser dick gedruckten Bezeichnung.
Am Ende der Seite soll dann auch nochmal eine horizontale Linie erscheinen.
Vielen Dank :)
PS: Ich hab noch ein Bild zugefügt, wie ich es mir in etwa vorstelle.