我希望 \subparagraph 的标题就像其他普通部分标题一样,不缩进、不编号、大小合适。
\documentclass[letterpaper,12pt]{article}
\pagestyle{myheadings}
\markright{}
\usepackage{setspace}
\doublespacing
\usepackage{graphicx}
\graphicspath{ {pictures/} }
\usepackage[space]{grffile}
\usepackage{cite}
\usepackage{algpseudocode}
\usepackage{algorithm}
\usepackage{amsmath,amsfonts,amssymb}
\usepackage[hidelinks]{hyperref}
\usepackage{cleveref}
\usepackage[mathscr]{euscript}
\usepackage{eufrak}
\usepackage{fixmath}
\usepackage{bm}
\usepackage{caption}
\usepackage{multirow}
\usepackage{makecell}
\usepackage{subcaption}
%\usepackage{lscape}
\usepackage{changepage}
\usepackage{booktabs}
\setcounter{tocdepth}{5}
\setcounter{secnumdepth}{5}
\pagenumbering{roman}
\begin{document}
\maketitle
\thispagestyle{empty}
\clearpage
\tableofcontents
\clearpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{one}
eee
\subsection{two}
eee
\subsubsection{three}
www
\paragraph{four} \hspace{0pt} \\
\noindent
eee
sssss
\noindent
\subparagraph{five} \hspace{0pt} \\
\noindent
ddd
ddddd
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}
答案1
\subparagraph
这在的定义中是硬编码的。
删除所有软件包后我得到了这个工作:
\documentclass[letterpaper,12pt]{article}
\makeatletter
\renewcommand\subparagraph{%
\@startsection {subparagraph}{5}{\z@ }{3.25ex \@plus 1ex
\@minus .2ex}{-1em}{\normalfont \normalsize \bfseries }}%
\makeatother
\begin{document}
\section{one}
eee
\subsection{two}
eee
\subsubsection{three}
www
\paragraph{four}
%{\tracingmacros1 % for finding out what happened
\paragraph{five}
eee
sssss
\subparagraph{THE SUB-PARAGRAPH}
ddd
%}
ddddd
\end{document}
答案2
\documentclass{article}
\usepackage{lipsum}
\makeatletter
\renewcommand\subparagraph{%
\@startsection{subparagraph}{5}{0pt}%
{3.25ex \@plus 1ex \@minus .2ex}{-1em}%
{\normalfont\normalsize\bfseries}}
\makeatother
\begin{document}
\lipsum[1]
\subparagraph{Lores ipsum} \lipsum[2]
\end{document}