我正在使用 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}