TransWikia.com

Applying LARGErmfamilyscshapetextbf to entire title in beamer class

TeX - LaTeX Asked on April 4, 2021

I’m trying to apply LARGErmfamilyscshapetextbf to an entire title and rmfamilyscshapetextbf to an entire subtitle in the beamer class (see the minimal working example below). However, if I use {LARGErmfamilyscshapetextbf some title}, only the first letter is bold (see the picture below). If I apply LARGErmfamilyscshapetextbf{some subtitle}, only the last command gets applied, which is textbf or equivalently bfseries (see the picture below). This issue also appears in the comment and answer given below.

My question is: how can I apply all the commands, not only the bold one? In other words, how can I make the entire title LARGE, rmfamily, scshape, textbf, and the entire subtitle rmfamily, scshape, textbf?

Thanks for your help!

enter image description here

documentclass[10pt]{beamer}

usepackage{amsmath}
usepackage{amstext}
usepackage{amsfonts}
usepackage{amssymb}
usepackage{array}
usepackage{graphicx}
usepackage{color}

usetheme{CambridgeUS}

setbeamercolor{frametitle}{fg=blue,bg=blue!10}
setbeamercolor{title}{fg=blue,bg=blue!10}
setbeamertemplate{frametitle}[default][center]
setbeamertemplate{footline}[frame number]{}
beamertemplatenavigationsymbolsempty
setbeamertemplate{footline}{}
setbeamertemplate{headline}{}
setbeamertemplate{blocks}[rounded][shadow=true]

setbeamersize{text margin left=4em, text margin right=4em}
setbeamerfont{caption}{size=tiny}
setbeamerfont{title}{size=large}
title[]{LARGErmfamilyscshapetextbf some title}
subtitle{rmfamilyscshapetextbf{some subtitle}}
author[]{}
institute[]{}
date[]{}

begin{document}
begin{frame}
titlepage
begin{center}
end{center}
end{frame}

end{document}

2 Answers

Not all font support bold and small caps. Try this.

% !TeX TS-program = pdflatex

documentclass[10pt]{beamer}

usepackage{amsmath}
usepackage{amstext}
usepackage{amsfonts}
usepackage{amssymb}
usepackage{array}
usepackage{graphicx}
usepackage{color}

usepackage{libertine} % added font

usetheme{CambridgeUS}

setbeamercolor{frametitle}{fg=blue,bg=blue!10}
setbeamercolor{title}{fg=blue,bg=blue!10}
setbeamertemplate{frametitle}[default][center]
setbeamertemplate{footline}[frame number]{}
beamertemplatenavigationsymbolsempty
setbeamertemplate{footline}{}
setbeamertemplate{headline}{}
setbeamertemplate{blocks}[rounded][shadow=true]

setbeamersize{text margin left=4em, text margin right=4em}
setbeamerfont{caption}{size=tiny}
setbeamerfont{title}{size=large}
%title[]{LARGErmfamilyscshapetextbf some title}
title[]{Hugesffamilyscshapetextbf{Some Title}}
subtitle{rmfamilyscshapetextbf{some subtitle}}
author[]{}
institute[]{}
date[]{}

begin{document}    
    begin{frame}
    titlepage
    begin{center}
    end{center}
end{frame}

end{document}

outb

Now comment the line usepackage{libertine} and compile again.

Answered by Simon Dispa on April 4, 2021

The Computer Modern and Latin Modern fonts don't offer the bold/serif/scshape combination of font dimensions. The rmfamilybfseries and rmfamilyscshape combinations are available, but rmfamilyscshapebfseries is not.

If using the rmfamilyscshapebfseries combination is critical to you, you need to switch to a font family that provides this combination. Times (New) Roman is one such font family. Try running usepackage{newtxtext,newtxmath} before title{LARGErmfamilybfseriesscshape Some Title}.

Answered by Mico on April 4, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP