如何将章节编号样式更改为 a) aa) 和 (1)

如何将章节编号样式更改为 a) aa) 和 (1)

我对 LaTeX 还很陌生,我想知道如何将我的子章节的章节编号样式更改为:a) b) aa) bb) (1) (2)

这是我已经拥有的:

\documentclass[12pt, oneside]{article}   
\usepackage[ngerman]{babel} 
\usepackage[margin = 1in, includefoot]{geometry}
\usepackage{parskip}




\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{1pt}
\fancyhf{}
\fancyhead[L]{\nouppercase{\leftmark}} 
\fancyhead[R]{\thepage} 



\renewcommand*{\thesection}{\Alph{section}.}
\renewcommand*{\thesubsection}{\Roman{subsection}.}
\renewcommand*{\thesubsubsection}{\arabic{subsubsection}.}



\begin{document}                

\begin{titlepage} 
      \textsc{text\\}\par
        
   
  
       \begin{center}
        \vspace*{5cm}
      \textsc{text} \\
        [0.75cm]
        \textsc{text} \\
         [0.75cm]
        \textsc{text} \\
        [10cm]
        \end{center}
               
\end{titlepage}


\fancyhead[]{}
\tableofcontents

\clearpage
\pagenumbering{arabic} 

\newpage
\fancyhead[]{}
\fancyhead[R]{\thepage} 
\section*{text}
\addcontentsline{toc}{section}{text}
\pagenumbering{Roman}

\newpage
\pagenumbering{arabic} 
\section*{text}
\addcontentsline{toc}{section}{text}
\section{text}



\end{document}

谢谢你的帮助

答案1

类似这样的情况?使用此设置,小节和小节级别标题中显示的)(“修饰”不会显示在\label和创建的交叉引用中\ref

在此处输入图片描述

\documentclass{article}   
\usepackage[ngerman]{babel} 
\usepackage[a4paper,margin=2.5cm,includefoot]{geometry}

\renewcommand\thesection{\alph{section}}
\renewcommand\thesubsection{\thesection\alph{subsection}}
\renewcommand\thesubsubsection{\arabic{subsubsection}}

\makeatletter
\def\@seccntformat#1{\@ifundefined{#1@cntformat}%
   {\csname the#1\endcsname\space}%    default
   {\csname #1@cntformat\endcsname}}%  enable individual control
\newcommand\section@cntformat{\thesection)\space} % section-level
\newcommand\subsection@cntformat{\thesubsection)\space} % subsection-level
\newcommand\subsubsection@cntformat{(\thesubsubsection)\space} % subsection-level

\renewcommand\p@subsubsection{\thesubsection}
\makeatother

\begin{document}

\section{Uno} \label{sec:uno}

\subsection{Un} \label{sec:uno:un}
\subsubsection{Eins} \label{sec:uno:un:eins}
\subsubsection{Zwei}

\subsection{Deux}
\subsubsection{Eins}
\subsubsection{Zwei}


\section{Due}

\subsection{Un}
\subsubsection{Eins}
\subsubsection{Zwei}

\subsection{Deux}
\subsubsection{Eins}
\subsubsection{Zwei}

Cross-references to section \ref{sec:uno}, subsection \ref{sec:uno:un}, and subsubsection \ref{sec:uno:un:eins}.

\end{document}

相关内容