TeX - LaTeX Asked by maltebsa on February 24, 2021
I’m looking to make a custom section title similar to this but I can’t figure out how to change the section number placement as well as aligning the horizontal line with the bottom of the section number. I’m using titlesec but can’t seem to wrap my head around it.
Probably something like this
documentclass{article}
usepackage[compact]{titlesec}% http://ctan.org/pkg/titlesec
titleformat{section}
{normalfontLargebfseries}{thesection}{0pt}{hfill}[{titlerule[0.8pt]}]
titlespacing*{section}
{0em} %left
{0em} %before
{1em} %after/below
begin{document}
section{Introduction}
This is some regular text.
end{document}
edit to conform better to OP requirement
adapted from --
How to get custom section style using titlesec?
documentclass{article}
usepackage[explicit]{titlesec}
usepackage{lmodern}
usepackage{lipsum}
usepackage{multirow}
usepackage[table]{xcolor}
usepackage{tabularx}
usepackage{ctable}
newcolumntype{C}{>{raggedleftarraybackslash}X}
titleformat{section}[block]{Largebfseriessffamily}%
{}%
{0pt}%
{%
begin{tabularx}{textwidth}{lC}
multirow{-2.5}{*}{fontsize{70}{30}selectfontnormalfontthesection} & #1\arrayrulecolor{red!50!black}cmidrule[4pt]{2-2}
end{tabularx}
%
}
begin{document}
section {Introduction}
lipsum[4]
end{document}
Correct answer by js bibra on February 24, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP