Fonts & Character SetsAdd horizontal line beneath subsection heading and subsubsection heading

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
Christoph
Posts: 29
Joined: Tue Mar 22, 2022 5:22 pm

Add horizontal line beneath subsection heading and subsubsection heading

Post by Christoph »

Here the final CODE:

Code: Select all

\makeatletter\renewcommand{\sectionlinesformat}[4]{%
	\Ifstr{#1}{section}{%
		\parbox[t]{\linewidth}{%
			\raggedsection\@hangfrom{\hskip #2#3}{#4}\par%
			\vspace*{-1\ht\strutbox}\rule{\linewidth}{0.8pt}%
		}%
	}{%
		\Ifstr{#1}{subsection}{%
			\parbox[t]{\linewidth}{%
				\raggedsection\@hangfrom{\hskip #2#3}{#4}\par%
				\vspace*{-1\ht\strutbox}\rule{\linewidth}{.8pt}%
			}%
		}{%
			\Ifstr{#1}{subsubsection}{%
				\parbox[t]{\linewidth}{%
					\raggedsection\@hangfrom{\hskip #2#3}{#4}\par%
					\vspace*{-1\ht\strutbox}\rule{\linewidth}{.8pt}%
				}%
			}{%
				\@hangfrom{\hskip #2#3}{#4}}% 
}}}%
\makeatother

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
Post Reply