4

The slanted lines are correct regarding the size of characters, but horizontal isn't. How to correct that ?

enter image description here

\documentclass{beamer}

\usepackage{fourier}
\usepackage{fontspec}
\setmainfont{Erewhon}[
    Extension=.otf,
    UprightFont=*-Regular,
    ItalicFont=*-Italic,
    BoldFont=*-Bold,
    BoldItalicFont=*-BoldItalic,
    SlantedFont=*-RegularSlanted,
    BoldSlantedFont=*-BoldSlanted,
    SmallCapsFont=*-SmallCaps,
    SmallCapsFont=*-Regular,
    SmallCapsFeatures={Letters=SmallCaps}
    ]
\setsansfont{texgyreheros}[
    Scale=MatchLowercase,% or MatchUppercase
    Extension=.otf,
    UprightFont=*-regular,
    ItalicFont=*-italic,
    BoldFont=*-bold,
    BoldItalicFont=*-bolditalic,
    ]   

\usefonttheme{serif}            % Nécessaire pour Fourier
\usepackage{ulem}               % barrer des caractères


\begin{document}

\begin{frame}

{\Huge \xout{123} -- \sout{123}}

\end{frame}

\end{document}

1 Answer 1

7

Just do \renewcommand for \ULthickness (the default value is 0.4pt). If, additionally, you want that the strike out line is level with the hyphen, you have to modify the definition of \sout too.

\documentclass{article}

\usepackage{fourier}
\usepackage{fontspec}
\setmainfont{Erewhon}[
    Extension=.otf,
    UprightFont=*-Regular,
    ItalicFont=*-Italic,
    BoldFont=*-Bold,
    BoldItalicFont=*-BoldItalic,
    SlantedFont=*-RegularSlanted,
    BoldSlantedFont=*-BoldSlanted,
    SmallCapsFont=*-SmallCaps,
    SmallCapsFont=*-Regular,
    SmallCapsFeatures={Letters=SmallCaps}
    ]
\setsansfont{texgyreheros}[
    Scale=MatchLowercase,% or MatchUppercase
    Extension=.otf,
    UprightFont=*-regular,
    ItalicFont=*-italic,
    BoldFont=*-bold,
    BoldItalicFont=*-bolditalic,
    ]   

\usepackage{ulem}               % barrer des caractères
\renewcommand{\sout}{\bgroup \ULdepth=-.45ex \ULset} % was -0.55ex
\renewcommand{\ULthickness}{1.35pt}                  % was 0.4pt

\begin{document}
\Huge \xout{123} -- \sout{123}
\end{document}

I used article for making the example “more minimal”. The values have been found by trial and error.

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .