![创建自定义 \section](https://linux22.com/image/326634/%E5%88%9B%E5%BB%BA%E8%87%AA%E5%AE%9A%E4%B9%89%20%5Csection.png)
我正在使用以下代码来处理文档的各个部分。我希望下面的细线SECTION
停止在四分之三处,\textwidth
而不是覆盖整个宽度。我该怎么做?
\documentclass[a4paper, oneside, final]{scrartcl} % Paper options using the scrartcl class
\usepackage{titlesec} % Allows creating custom \section's\usepackage{url}
\titleformat{\section}{\large\scshape\raggedright}{}{0em}{}[\titlerule] % Section formatting
\begin{document}
\section{Section}
\end{document}
答案1
像这样 :
\documentclass[a4paper, oneside, final]{scrartcl} % Paper options using the scrartcl class
\usepackage{titlesec} % Allows creating custom \section's\usepackage{url}
\titleformat{\section}{\large\scshape\raggedright}{}{0em}{}[\rule{.75\linewidth}{1pt}] % Section formatting
\begin{document}
\section{Section}
\end{document}