1

I am facing a problem in setting a font size of \section heading and \chaptersubhead heading. I have following code:

   \subsubsection{Geometrical Parameters}
        My name is John.

      \newcommand{\chapsubhead}[2]{{\normalsize #1}} 
      \chapsubhead{\flushleft \textbf {1. Time Delay}}
       John is a good boy.

Can anybody suggest me how to make these fonts of headings of \section and \chapsubhead same font style and fontsize in latex.

4
  • KOMA-Script, Memoir and fancyhdr all have different commands to change the formatting of headers, but they all let you insert a \fontsize command into the formatting.
    – Davislor
    Jan 28, 2019 at 15:16
  • I am using KOMA-Script but i am facing difficulty that how to change fonr size and style of headings in them. Can u please help with commands Jan 28, 2019 at 15:30
  • Okay, the \chapsubhead command doesn’t seem to be defined correctly.
    – Davislor
    Jan 28, 2019 at 15:43
  • By the way, a MWE and a description of what you want would make it easier to help.
    – Davislor
    Jan 28, 2019 at 15:45

1 Answer 1

1

Since yous say you are using KOMA_Script, the command you are looking for is \minisec (documented here).

\documentclass[headings=normal]{scrartcl}
\usepackage{fontspec}

\setkomafont{minisec}{\usekomafont{subsubsection}}

\begin{document}
   \subsubsection{Geometrical Parameters}
        My name is John.

   \minisec{1. Time Delay}
       John is a good boy.
\end{document}

minisec sample

To change only the size to match, you could

\addtokomafont{minisec}{\usesizeofkomafont{subsubsection}}

Any font you load should be properly scaled to the same height, if you use the fontspec command

\defaultfontfeatures{ Scale = MatchUppercase }

If you do this, and change your main font, load it with [Scale=1.0] to scale everything to it, not the unused default.

3
  • I have one question that due to use of \minisec the title displays in Table of Content or not. I dont want to show this in table of contents. Jan 28, 2019 at 16:57
  • @AhmadBilal They do not. You can also control whether sections, sub-sections and sub-sub-sections show up in the ToC.
    – Davislor
    Jan 28, 2019 at 16:58
  • @AhmadBilal You’re welcome. If nobody else posts a better answer, please consider accepting this one.
    – Davislor
    Jan 29, 2019 at 1:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.