我不知道该怎么办,我是 LaTeX 新手,我想用它完成我的论文。当我不使用软件包进行编译时,我的代码一切正常。glossaries
当我编译我的 LaTeX 代码时,我收到以下错误消息:
! Use of \\lstinline doesn't match its definition. \kernel@ifnextchar ...rved@a {#2}\def \reserved@b {#3}\futurelet \@let@token... l.79 ...ndle{#2} \FP@gen@exp@handle{#3} div #4#5}} If you say, e.g., `\def\a1{...}', then you must always put `1' after `\a', since control sequence names are made up of letters only. The macro here has not been followed by the required stuff, so I'm ignoring it. ! Undefined control sequence. \lsthk@PreSet ... \fi \fi \let \lst@advancenumber \z@ l.79 ...ndle{#2} \FP@gen@exp@handle{#3} div #4#5}} The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g., `\hobx'), type `I' and the correct spelling (e.g., `I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined. ) ! Incomplete \iffalse; all text was ignored after line 79. <inserted text> \fi l.25 The file ended while I was skipping conditional text. This kind of error happens when you say `\if...' and forget the matching `\fi'. I've inserted a `\fi'; this might work. ) ! Incomplete \iffalse; all text was ignored after line 25. <inserted text> \fi l.45 \RequirePackage {datatool-base} The file ended while I was skipping conditional text. This kind of error happens when you say `\if...' and forget the matching `\fi'. I've inserted a `\fi'; this might work. ) ! Undefined control sequence. l.2569 \dtlifnumgt{\@dtl@numi}{\@dtl@numii }% The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g., `\hobx'), type `I' and the correct spelling (e.g., `I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined. ! Illegal parameter number in definition of \FP@gen@mul@splitted. <to be read again> 3 l.2571 #3 % You meant to type ## instead of #, right? Or maybe a } was forgotten somewhere earlier, and things are all screwed up? I'm going to assume that you meant ##. ! Illegal parameter number in definition of \FP@gen@mul@splitted. <to be read again> 4 l.2574 #4 % You meant to type ## instead of #, right? Or maybe a } was forgotten somewhere earlier, and things are all screwed up? I'm going to assume that you meant ##. ! Undefined control sequence. l.2577 \newcommand*{\DTLifstringgt }{\@ifstar\@sDTLifstringgt\@DTLifstringgt} (That makes 100 errors; please try again.) Here is how much of TeX's memory you used: 28430 strings out of 493323 521541 string characters out of 3139069 871146 words of memory out of 3000000 31664 multiletter control sequences out of 15000+200000 3938 words of font info for 15 fonts, out of 3000000 for 9000 1141 hyphenation exceptions out of 8191 61i,1n,53p,10452b,277s stack positions out of 5000i,500n,10000p,200000b,50000s ! ==> Fatal error occurred, no output PDF file produced!
这是我的代码,它不起作用:
\documentclass[12pt, parskip=half, headheight=35.1pt, footheight=21.75pt]{Klassen/meineKlasse}
\usepackage[backend=biber]{biblatex}
\usepackage{csquotes}
\addbibresource{Bibliothek/literatur.bib}
\usepackage{caption}
\usepackage{subcaption}
\usepackage[footsepline, automark]{scrlayer-scrpage}
\usepackage{scrhack}
\usepackage{hyperref}
\usepackage{etoolbox}
\usepackage{textgreek}
\usepackage{textcomp}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage[dvipsnames]{xcolor}
\usepackage{listingsutf8}
\captionsetup[figure]{labelfont={small,it}, textfont={small,it}}
\usepackage{Styles/neueKommandos}
\usepackage{Styles/meinStyleKFZeile}
\usepackage{Styles/meinListingsStyle}
\usepackage{glossaries}
\hypersetup{
pdftitle=A Title,
pdfauthor=Author,
pdfsubject=Thesis,
pdfkeywords={Some, Keywords},
}
%\makeglossaries
%\newglossaryentry{test}{name={Test},description={Dies ist nur ein Test}}
\begin{document}
%--------------------------------------------------------------------
%Verzeichnisse
%\include{Inhalt/Verzeichnisse}
%---------------------------------------------------------------------
\sffamily
%---------------------------------------------------------------------
%-----------------------------------------------------------------------
%\include{Inhalt/Einleitung}
%---------------------------------------------------------------------
%\include{Inhalt/Tests}
\printbibliography
%\printglossaries
\end{document}
neueKommandos.sty 中的代码
\newtoggle{InString}{} % Keep track of if we are within a string
\togglefalse{InString} % Assume not initally in string
\newcommand*{\ColorIfNotInString}[1]{\iftoggle{InString}{#1}{\color{red}#1}}
\newcommand*{\ProcessQuote}[1]{#1\iftoggle{InString}{\global\togglefalse{InString}}{\global\toggletrue{InString}}}
meinListingsStyle.sty 中的代码
\definecolor{javared}{rgb}{0.6,0,0} % for strings
\definecolor{javagreen}{rgb}{0.25,0.5,0.35} %comments
\definecolor{javapurple}{rgb}{0.5,0,0.35} %keywords
\definecolor{javadocblue}{rgb}{0.25,0.35,0.75} %javadoc
%Einstellungen für das Design des Quellcodes
\lstset{
language = {Java},
extendedchars = true,
inputencoding = utf8,
basicstyle = \ttfamily\DeclareFontShape{OT1}{lmtt}{m}{it}{<->sub*lmtt/m/sl}{},
}
\lstMakeShortInline[columns=fixed]|
%Fürs Zahlen highlighting und Umlaute
\lstset{literate=%
{"}{{{\ProcessQuote{"}}}}1 % Disable coloring within double quotes
{'}{{{\ProcessQuote{'}}}}1 % Disable coloring within single quotes
{0}{{{\ColorIfNotInString{0}}}}1
{1}{{{\ColorIfNotInString{1}}}}1
{.0}{{{\ColorIfNotInString{.0}}}}2
{.1}{{{\ColorIfNotInString{.1}}}}2
{\ }{{ }}1 %handle the space
{Ö}{{\"O}}1
{Ä}{{\"A}}1
{Ü}{{\"U}}1
{ß}{{\ss}}1
{ü}{{\"u}}1
{ä}{{\"a}}1
{ö}{{\"o}}1
}
%Einstellungen für die Variablen im Quellcode
\lstset{
morekeywords = {grammar, generate, enum, with},
emph = {name}
}
当我发表评论时\usepackage{Styles/meinListingsStyle}
,没有收到任何错误
\usepackages{glossaries-german}
导致找不到错误
有人可以帮帮我吗
答案1
glossaries-german
不提供任何软件包 ( sty
-file)。它为软件包提供了德语模块。glossaries
。 所以
\usepackage{glossaries-german}
总是会导致错误消息。语言模块不需要明确使用,您不应该使用这样的命令。如果glossaries-german.ldf
来自glossaries-german
已安装,glossaries
如果需要将自动使用它。
答案2
问题出\lstMakeShortInline[columns=fixed]|
在 之前\usepackage{glossaries}
。当我在 词汇表 之后写入它时,编译时没有错误