![编辑器中的目录中的条目不完整](https://linux22.com/image/329889/%E7%BC%96%E8%BE%91%E5%99%A8%E4%B8%AD%E7%9A%84%E7%9B%AE%E5%BD%95%E4%B8%AD%E7%9A%84%E6%9D%A1%E7%9B%AE%E4%B8%8D%E5%AE%8C%E6%95%B4.png)
我正在使用 winedt 来处理 MikTex。问题是我无法在 Windedt 左侧窗口的树形浏览器中看到章节标题。但是,它们之后确实会出现在 PDF 中。这是 MWE。
\documentclass[a4paper,11pt,Times]{article}
\usepackage[english]{babel}
\usepackage[a4paper]{geometry}
\usepackage{titlesec}
\title{{\sffamily Main Title }}
\begin{document}
\maketitle
\section {\sffamily \textbf{Introduction1}}
\subsection {\sffamily \textbf{Introduction}}
This is the text for the introduction1.
\section {\sffamily \textbf{Introduction2}}
This is the text for the introduction2
\section {\sffamily \textbf{Introduction3}}
This is the text for the introduction3.
\end{document}
答案1
您必须删除\section
命令和左花括号之间的空格{
。然后它才能按预期工作。
\documentclass[a4paper,11pt,Times]{article}
\usepackage[english]{babel}
\usepackage[a4paper]{geometry}
\usepackage{titlesec}
\title{{\sffamily Main Title }}
\begin{document}
\maketitle
\section{\sffamily \textbf{Introduction1}}
\subsection{\sffamily \textbf{Introduction}}
This is the text for the introduction1.
\section{\sffamily \textbf{Introduction2}}
This is the text for the introduction2
\section{\sffamily \textbf{Introduction3}}
This is the text for the introduction3.
\end{document}