2

I find the curly braces from kpfonts difficult to distinguish from other brace-like symbols and would like to replace all math instances of \{ and \} (so \lbrace and \rbrace) with curlier braces from another font. For now CM will do but I'm open to other suggestions. Following the answers in this question and this question I've succeeded in doing this for the large versions, i.e. when \{ is preceded by \left or \big and so on:

\documentclass{article}
\usepackage{kpfonts}

\DeclareSymbolFont{CMlargesymbols}{OMX}{cmex}{m}{n}
\DeclareMathDelimiter{\lbrace}{\mathopen}{symbols}{"66}{CMlargesymbols}{"08}
\DeclareMathDelimiter{\rbrace}{\mathopen}{symbols}{"67}{CMlargesymbols}{"09}

\begin{document}
$\{a\} \quad \big\{a\big\}$
\end{document}

enter image description here

The regular-sized braces are still from kpfonts. I thought perhaps \lbrace and \rbrace are declared twice, once for the regular case and another for largesymbols, but in source2e they are declared only for the largesymbols case.

A glance at, for example, newtxmath.sty makes it seem like changing the font for regular-sized \lbrace/\rbrace is done implicitly, not explicitly (its only declaration is for the large size; kpfonts.sty makes no declarations for them which confuses me further).

How do I change the font for the regular-size case as well?

P.S. I know the font designer made the braces as they are for a reason. This is just for personal use to increase readability.

1 Answer 1

1

You also need to change the braces at normal size.

\documentclass{article}
\usepackage{kpfonts}

\DeclareSymbolFont{CMsymbols}{OMS}{cmsy}{m}{n} % <---
\DeclareSymbolFont{CMlargesymbols}{OMX}{cmex}{m}{n}
\DeclareMathDelimiter{\lbrace}{\mathopen}{CMsymbols}{"66}{CMlargesymbols}{"08} % <---
\DeclareMathDelimiter{\rbrace}{\mathopen}{CMsymbols}{"67}{CMlargesymbols}{"09} % <---


\begin{document}

$\{a\} \quad \bigl\{a\bigr\}$

\end{document}

enter image description here

Don't use \big with delimiters; use \bigl and \bigr for opening and closing respectively.

You must log in to answer this question.

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