![todo 行與該行不符](https://rvso.com/image/420044/todo%20%E8%A1%8C%E8%88%87%E8%A9%B2%E8%A1%8C%E4%B8%8D%E7%AC%A6.png)
我想使用 \todonodes 包,但目前,佈局讓我發瘋。 “todo”行的末尾與文字不對齊。我不知道如何更好地描述它,請看截圖
這是我的程式碼
\documentclass[
12pt,
a4paper,
headinclude,
footinclude,
listof=totoc,
toc=sectionentrywithdots,
bibliography=totoc
]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[onehalfspacing]{setspace} % 1,5facher Zeilenabstand
\usepackage[a4paper, top=3cm,bottom=3cm,left=4.5cm,right=2cm]{geometry}
\usepackage{graphicx}
\usepackage{parskip} %Abstand zwischen Abständen
\setlength\parindent{0pt} %Einzug neuer Absatz unterbinden
\usepackage[]{acronym} % Abkürzungen
\usepackage{float}
\usepackage[colorinlistoftodos, ngerman]{todonotes}\setlength{\marginparwidth}{3cm}\reversemarginpar
\usepackage{microtype}
%\usepackage{showframe}
%Literaturverzeichnis Pakete + Anpassungen am Erscheinungsbild
\usepackage[
style=authoryear,
autocite=footnote,
maxcitenames=3,
mincitenames=3,
maxbibnames=8,
minbibnames=8,
]{biblatex}
\usepackage[babel, german=guillemets]{csquotes}
\addbibresource{literatur.bib} % Datei mit Literaturverzeichnis
\renewcommand*{\newunitpunct}{\addcomma\space}
\renewcommand*{\finentrypunct}{}
\DeclareFieldFormat[book]{title}{\mkbibquote{#1\isdot}}
\DeclareNameAlias{default}{family-given}
\DeclareNameAlias{sortname}{default}
\DeclareListWrapperFormat{location}{\mkbibparens{#1}}
\DefineBibliographyStrings{german}{
andothers = {et al\adddot},
nodate = {o.J\adddot},
}
\DeclareDelimFormat{nameyeardelim}{\addcomma\space}
\DeclareDelimFormat[bib]{nameyeardelim}{\addcomma\space}
\renewbibmacro*{cite:label}{%
\printtext[bibhyperref]{\printfield{label}}}
\newbibmacro*{cite:labeltitle}{%
\printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}}
\renewbibmacro*{cite}{%
\iffieldundef{shorthand}
{\ifthenelse{\ifnameundef{labelname}}
{\usebibmacro{cite:label}%
\setunit{\printdelim{nonameyeardelim}}}
{\printnames{labelname}%
\setunit{\printdelim{nameyeardelim}}}%
\ifboolexpr{ test {\iffieldundef{labelyear}}
or test {\iffieldequalstr{labelyear}{nodate}}}
{\usebibmacro{cite:labeltitle}}
{\usebibmacro{cite:labeldate+extradate}}}
{\usebibmacro{cite:shorthand}}}
\setlength\bibitemsep{1.5\itemsep}
\begin{document}
\tableofcontents
\setcounter{page}{1}
%Abbilungsverzeichnis und Tabellenverzeichnis einfügen
\newpage
\listoffigures
\newpage
\listoftables
\newpage
\section{Abkürzungsverzeichnis}
\begin{acronym}[Bash]
\acro{JK-FlipFlop}{Jack Kilby FlipFlop}
\end{acronym}
\newpage
%Beginn der Einleitung
\section{Einleitung}
\todo{test}
Das Ziel dieses Assigments ist es, \todo[]{Einleitung überarbeiten} einen synchronen
\end{document}
答案1
嗯,我發現了我的問題。
我已將序言排除在單獨的文件中。由於某些原因,導入會導致問題。
如果我使用\usepackage[colorinlistoftodos, ngerman]{todonotes}\setlength{\marginparwidth}{3cm}\reversemarginpar直接在我的主文件中,一切都按方面進行。