如何编写长命名法条目?

如何编写长命名法条目?

我必须编写很长的命名法条目(最多 200 个字)。如果我在一个命名法条目中写了 200 个字,我就得不到命名法了。

我怎么解决这个问题?

MWE(PDF 页面倒数第二页上的术语):

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
% LyX 2.1.0 created this file.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 

\documentclass[twoside,ngerman,fontsize=10pt]{scrreprt}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage[a4paper]{geometry}
\geometry{verbose,tmargin=2.5cm,bmargin=2.5cm,lmargin=2.5cm,rmargin=2.5cm}
\pagestyle{empty}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\setlength{\parskip}{1em}
\setlength{\parindent}{0pt}
\synctex=-1
\usepackage{fancybox}
\usepackage{calc}
\PassOptionsToPackage{normalem}{ulem}
\usepackage{ulem}
\usepackage{nomencl}
\providecommand{\printnomenclature}{\printglossary}
\providecommand{\makenomenclature}{\makeglossary}
\makenomenclature
\makeatletter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
% User specified LaTeX commands.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 

%%%% Heading lines
\usepackage[headsepline, ilines,automark]{scrpage2}
\pagestyle{scrheadings}
\clearscrheadings 
\clearscrplain 
\ihead[\headmark]{\headmark}
\ohead{\pagemark}
\chead{}
\cfoot{}

%%%% Inhaltsverzeichnis!
\usepackage[colorlinks,pdfpagelabels,pdfstartview = FitH,bookmarksopen = true,bookmarksnumbered = true,linkcolor = black,plainpages = false,hypertexnames = false,citecolor = black] {hyperref}

\usepackage{fancybox}
\newcommand{\nobreakword}[1]{\mbox{#1}}
\usepackage{etoolbox}
\usepackage{makeidx}\makeindex
\makeatletter
\def\@idxitem{\par\addvspace{10\p@ \@plus 5\p@ \@minus 3\p@}\hangindent 40\p@}
\def\subitem{\par\hangindent 40\p@ \hspace*{20\p@}}
\def\subsubitem{\par\hangindent 40\p@ \hspace*{30\p@}}
\def\indexspace{}
\patchcmd\theindex{\indexname}{\indexname\vspace{12pt}}{}{}
\makeatother

%text before glossar!
\renewcommand{\nompreamble}{%
This text should be written for the entry Schokolade:

Lorem ipsum dolor sit amet,\\...consetetur sadipscing elitr,\\...sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren,\\...no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, \\...no sea takimata sanctus est Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata\\...sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero \\...eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
\par}

\usepackage{babel}
\makenomenclature

\begin{document}

\newpage
\setcounter{page}{1}
\thispagestyle{empty} 
\begin{center}
\vspace*{10cm}
titlepage
\end{center}

\pagestyle{scrheadings}
\clearpage\pdfbookmark{\contentsname}{toc}\tableofcontents

\chapter{Einleitung}
In diesem Dokument geht es um Haustiere.
\chapter{Tiere}
Heute ass meine \index{Katze}Katze \nomenclature{Katze}{Haustier} Schokolade und musste daher zum \index{Tierarzt}Tierarzt. \nomenclature{Tiger}{Raubtier}
\nomenclature{Schokolade}{Lorem ipsum dolor sit amet,\\...consetetur sadipscing elitr,\\...sed diam}
%
\newpage
neue Seite
\newpage
neue Seite
\addpart{Anhang}
\pagestyle{empty} %ohne Seitenzahlen und Kolumnentitel
\addcontentsline{toc}{chapter}{Glossar}
\renewcommand{\nomname}{Glossar}
\printnomenclature[2.5 cm]
%
\clearpage 
\phantomsection 
\addcontentsline{toc}{chapter}{Stichwortverzeichnis} 
\renewcommand{\indexname}{Stichwortverzeichnis}
\printindex
%
\end{document}

如果有解决方案的话我会非常高兴,如果没有确切的解决方案,那么带有内部和外部的标题不是强制性的,我很高兴能有一个妥协。

答案1

为长文本定义一个宏。这是一个简化的示例。

\documentclass{scrreprt}
\usepackage{nomencl}
\makenomenclature

\newcommand{\schokoladetext}{%
  Lorem ipsum dolor sit amet,\\...consetetur sadipscing elitr,\\...sed
  diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam
  erat, sed diam voluptua. At vero eos et accusam et justo duo dolores
  et ea rebum. Stet clita kasd gubergren,\\...no sea takimata sanctus
  est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur
  sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et
  dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam
  et justo duo dolores et ea rebum. Stet clita kasd gubergren, \\...no
  sea takimata sanctus est Lorem ipsum dolor sit amet.Lorem ipsum dolor
  sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
  invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
  At vero eos et accusam et justo duo dolores et ea rebum. Stet clita
  kasd gubergren, no sea takimata\\...sanctus est Lorem ipsum dolor
  sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
  sed diam nonumy eirmod tempor invidunt ut labore et dolore magna
  aliquyam erat, sed diam voluptua. At vero \\...eos et accusam et
  justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea
  takimata sanctus est Lorem ipsum dolor sit amet.}

\begin{document}

\chapter{Einleitung}
In diesem Dokument geht es um Haustiere.
\chapter{Tiere}
Heute ass meine Katze \nomenclature{Katze}{Haustier} 
Schokolade und musste daher zum Tierarzt. \nomenclature{Tiger}{Raubtier}
\nomenclature{Schokolade}{\schokoladetext}

\renewcommand{\nomname}{Glossar}
\printnomenclature[2.5 cm]

\end{document}

在此处输入图片描述

相关内容