2

Section titles should be bold+small-caps (but this code fail to do it)

       \usepackage{titlesec}
       \titleformat{\section}{\Large\sc\bfseries}{}{}{}[]  

Full code:

\documentclass[a4paper,12pt]{article} 
\usepackage{titlesec}
\titleformat{\section}{\Large\sc\bfseries}{}{}{}[]
\usepackage[utf8]{inputenc} 
\usepackage[english]{babel}
\setcounter{secnumdepth}{0}

\begin{document}

\section{1 Introduction}

\end{document}

Please only make it work for section titles (not for subsection\subsubsection etc..)

Kobi
  • 164
  • 2
    For that, you need a font that has bold small caps. – Bernard Sep 13 '21 at 13:30
  • @Bernard, which font support it? – Kobi Sep 13 '21 at 14:04
  • 1
    I do not have a complete list, but, if I remember well, Latin Modern doesn't. Erewhon (which can work with fourier for maths) does have bold small caps. I'm not sure whether Computer Modern Unicode has, but you might test it. – Bernard Sep 13 '21 at 15:17
  • 3
    also if you want font commands to combine don't use the old latex2.09 commands like \sc which do not combine, your usage \sc\bfseries works but looks odd (and wouldn't work if \bfseries was first) \scshape is the standard command. – David Carlisle Sep 13 '21 at 17:59

1 Answers1

1

Search https://tug.org/FontCatalogue/

With pdflatex look for a font using fontenc and having \scshape like

https://tug.org/FontCatalogue/newpx/

bb

% !TeX TS-program = pdflatex

\documentclass[a4paper,12pt]{article} \usepackage[utf8]{inputenc} \usepackage[english]{babel}

\usepackage[T1]{fontenc} % added <<<< \usepackage{newpxtext}% added <<<<

\usepackage{titlesec} \titleformat{\section}{\scshape\bfseries\Large}{}{}{}[]

\setcounter{secnumdepth}{0}

\begin{document}

\section{1 Introduction}

\end{document}

Simon Dispa
  • 39,141
  • Thanks! What about \usepackage{bold-extra} as suggested in https://tex.stackexchange.com/questions/27411/small-caps-and-bold-face — then we do not need fontenc? – Kobi Sep 14 '21 at 14:38
  • @Ben It looks that in this simple example \usepackage{bold-extra} alone will do it. Try it in your real document. – Simon Dispa Sep 14 '21 at 14:56