
我已經titlesec
在 XeLaTeX 中使用了很長一段時間,從來沒有遇到過問題。但最近,我透過tlmgr
(因為我有 TeXLive 2015)將其更新到 2.10.1,現在我面臨著這種情況:
當我加載包時,節和小節編號消失。我試圖明確顯示編號(請參閱下面的 MWE),但沒有成功。當然,當我評論包括行(及其關聯命令)的包時,編號會再次出現。
這是一個 MWE:
\documentclass{article}
\usepackage{titlesec}
\titleformat{\section}[hang]{\normalfont\Large\bfseries}{\thesection.}{1em}{}[]
\titleformat{\subsection}[hang]{\normalfont\large\bfseries}{\thesubsection.}{0.5em}{}[]
\titleformat{\subsubsection}[runin]{\normalfont\normalsize\bfseries}{\thesubsubsection.}{0.25em}{}[.---]
\begin{document}
\section{A fancy section}
\subsection{A subsection}
\subsubsection{A sub-subsection}
\end{document}
這是我得到的輸出影像:
自從安裝 TeXLive 以來,我從未遇到過這個問題。我該如何解決?
編輯:我忘了說我在另一台電腦上有 TeXLive,沒有更新,MWE 工作正常。這是輸出的圖像:
答案1
正如@jon 所說,v2.10.1titlesec
有一個錯誤,作者(Javier Bezos)已經解決了。在撰寫本文時,並非每個伺服器都有可用的更新tlmgr
。對於遇到相同問題的人,請使用以下命令(TexLive):
tlmgr update --all -repository http://ctan.math.washington.edu/tex-archive/systems/texlive/tlnet/
該伺服器有更新。
閱讀此連結以了解更多資訊:https://groups.google.com/forum/#!topic/comp.text.tex/MBd3-o2Dzx8