1

My MWE follows:

\documentclass{book}
\usepackage[T1]{fontenc}
\usepackage{palatino,mathpazo}
\begin{document}

This is for (test) $(a+b=c)$

\end{document}

I am using PDFLaTeX for generating the output, and the output generated nicely, but the brackets are in different font in Text and Math mode, please refer the screenshot for better clearence:

enter image description here

enter image description here

I required to fix the parenthesis should be in CMR font, raising parenthesis, i.e., \left and \right doesn't matter. Is this possible to fix?

10
  • 2
    Why do you require that? You are not using cmr10 for text at all as you have specified T1 encoding, the T1 encoded fonts use the same glyphs as OT1 but are extended to 256 charaters per font with accented letters etc. Jan 9, 2018 at 12:49
  • by the way, those are more usually called "parentheses". brackets are the square ones [...]. Jan 9, 2018 at 12:56
  • @DavidCarlisle Sorry, now I have updated my question, please suggest...
    – MadyYuvi
    Jan 9, 2018 at 13:09
  • @barbarabeeton Thanks for point out the typo, now corrected...
    – MadyYuvi
    Jan 9, 2018 at 13:10
  • 1
    you want to use cmr ( in text even if that text is set in palatino????? Jan 9, 2018 at 13:16

2 Answers 2

0

I do not think I properly captured the palatino parens for the extensibles, but it is certainly an improved match relative to the defaults from mathpazo:

\documentclass{book}
\usepackage[T1]{fontenc}
\usepackage{palatino}
\usepackage{mathpazo}

\DeclareMathSymbol{(}{\mathopen}{letters}{`(}
\DeclareMathSymbol{)}{\mathclose}{letters}{`)}
\DeclareMathDelimiter{(}{\mathopen} {operators}{"28}{largesymbols}{"00}
\DeclareMathDelimiter{)}{\mathclose}{operators}{"29}{largesymbols}{"01}
\begin{document}

This is for (test) $(a+b=c)$ 

$\bigl(\bigr)$ $\Bigl(\Bigr)$ $\biggl(\biggr)$ $\Biggl(\Biggr)$

\end{document}

enter image description here

For comparison, here it is without my four declarations:

enter image description here

3
  • This suits with my requirement, thanks a lot...
    – MadyYuvi
    Jan 10, 2018 at 9:03
  • Is there any possibility to fix all parenthesis (both text and math) in math font? as per your suggestion, now parenthesis are comes in text font both in Math and text and the raising parenthesis are in Math font...
    – MadyYuvi
    Jan 17, 2018 at 6:13
  • @MadyYuvi I am sorry, but I don't know how to readily make the text parens employ the math font, except maybe by way of active characters. But I would be hesitant to make parens active characters across a whole document. Jan 17, 2018 at 17:31
2

One way to get the same parentheses in Palatino text and math is to find a math font which would match Palatino. I'm not sure there's one for PdfLaTeX, but for XeLaTeX or LuaLaTeX with unicode-math you can use Asana Math with the following code:

\documentclass{book}
\usepackage{fontspec}
\setmainfont{URW Palladio L}
\usepackage{unicode-math}
\setmathfont{Asana Math}
\begin{document}

This is for (test) $(a+b=c)$

\end{document}

The result seems fine to me:

enter image description here

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.