MikTex版本是2.9,Texstudio版本是2.12.22。
我无法让 MWE 尽可能短,因为我的文档包含很多前言材料,需要很多包。鉴于我不知道是前言中的某些内容还是调用tikzpicture
本身导致了问题,我必须包含几乎所有内容:
\documentclass[a4paper,12pt]{book}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\graphicspath{ {images/} }
\usepackage[toc, nonumberlist]{glossaries}
\makeglossaries
\usepackage{enumitem}
\usepackage{booktabs}
\usepackage[table,xcdraw]{xcolor}
\usepackage{rotating}
\usepackage{longtable}
\usepackage{tabu}
\usepackage{float}
\usepackage{tipa}
\usepackage{leipzig}
\usepackage{caption}
\usepackage[backend=biber, style=authoryear, maxnames = 6]{biblatex}
\addbibresource{sorsat.bib}
\usepackage{mathptmx}
\usepackage{gb4e}
\usepackage{tikz}
\usepackage{tikz-qtree}
\noautomath
\usepackage{soul}
\usepackage[shortcuts]{extdash}
\setacronymstyle{long-short}
\newglossaryentry{dagger}{name = \ensuremath{\dagger}, description=Abridged corpus example}
\newacronym{hp}{H\&P}{Huddleston and Pullum (2002)}
\newacronym{NOW}{NOW}{Corpus of News on the Web}
\newacronym{bnc}{BNC}{The British National Corpus}
\begin{document}
\author{My Anonymized Name}
\title{My Anonymized Title}
\date{October 2020}
\frontmatter
\maketitle
\newpage
\tableofcontents
\printglossary[title = Symbols and Acronyms]
\clearpage
\mainmatter
\chapter{C1}
Blah blah.
\section{C2S1}
Blah. And now for the tree:
\begin{tikzpicture}
\tikzset{frontier/.style={distance from root=150pt}}
\Tree [.Clause_1 [.Subject_1:\\NP [.Adj Furious ] [.N listeners ] ] [.Predicate_1:\\VP [.Predicator\\V demanded ] [.Complement:\\Clause_2 [.Marker:\\Subordinator (NULL) ] [.Clause_2 [.Subject_2:\\NP [.N he ] ] [.Predicate_2:\\VP\\Predicator_2:\\V resign ] ] ] ] ]
\end{tikzpicture}
Here we admire the tree's beauty.
\backmatter
% bibliography, glossary and index would go here.
\printbibheading
\printbibliography[keyword = written, heading = subbibliography, title = {Written Sources}]
\printbibliography[keyword = corpus, heading = subbibliography, title = {Corpora Consulted}]
\printbibliography[keyword = software, heading = subbibliography, title = {Software Used}]
\end{document}
该文档无法编译,并且存在一系列看起来像语法错误的内容:
line 241: Missing \endcsname inserted. ...lmnopqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ}
line 241: Missing \begin{document}. ...lmnopqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ}
line 241: Extra \endcsname. ...lmnopqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ}
line 241: Argument of \automath@two has an extra }. ...lmnopqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ}
line 241: Paragraph ended before \automath@two was complete. ...lmnopqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ}
line 241: Missing \endcsname inserted. ...lmnopqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ}
line 241: Too many }'s. ...lmnopqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ}
line 241: Extra \endcsname. ...lmnopqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ}
line 241: Missing \begin{document}. ...lmnopqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ}
line 1089: TeX capacity exceeded, sorry [parameter stack size=10000]. }
line 503: Font shape `OT1/cmr/bx/sc' undefined(Font) using `OT1/cmr/bx/n' instead
...等等。编辑:发布第一个版本后,我注意到该tikz
包在序言中被意外调用了两次。这个问题现已修复,错误消息也已更新。
这非常令人沮丧,因为tikz-qtree
似乎具有我想要的功能,即不像qtree
,它允许解析的句子的单词全部显示在同一级别。