3

Sorry. i couldn't see another question about this. I'm using garamondx package. The problem is large curly bracket. It seems like the picture given. i want stg like { , but that's like ( . what can i do?

enter image description here

Code:

\documentclass[11pt,a4paper]{article}
\usepackage[utf8x]{inputenc}
\usepackage{ucs}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage[T1]{fontenc}
\usepackage{garamondx}
\usepackage[garamondx,cmbraces]{newtxmath}
\DeclareSymbolFont{operators}{OT1}{txr}{m}{n}
\DeclareMathAlphabet{\mathbf}{OT1}{txr}{bx}{n}
\usepackage[left=2.00cm, right=2.00cm, top=2.00cm, bottom=2.00cm]{geometry}
\DeclareSymbolFont{largesymbols}{OMX}{yhex}{m}{n}

\begin{document}

$\{f(x)= \left\{ \begin{cases}
  & 1 \\ 
 & 2 \\ 
 & 3 \\ 
\end{cases} \right.$ \\

$W(A,B)=\left\{ \begin{array}{l}
    0 \quad \text{se $n$=0 ed $m$=0}\\
    \infty \quad \text{se $n$=0 o $m$=0}\\

  \end{array} \right.$

\end{document}
4
  • It would probably help if you provided a MWE so we can see exactly what you're doing to produce these results.
    – A.Ellett
    Oct 21, 2013 at 13:28
  • Please add the code as text, select it and click the {} button, that way we can copy-paste it.
    – marczellm
    Oct 21, 2013 at 13:46
  • Remove the \DeclareSymbolfont and \DeclareMathAlphabet commands. They are plainly wrong, as you want to use Garamond and not Times, don't you?
    – egreg
    Oct 21, 2013 at 14:00
  • when i write those, i see numbers from Times and letters from Garamond. Actually i tried and removing them changed nothing except numbers. so i preferred it.
    – mert
    Oct 21, 2013 at 14:04

1 Answer 1

6

The wrong symbol is a consequence of

\DeclareSymbolFont{largesymbols}{OMX}{yhex}{m}{n}

because newtxmath uses a different encoding for its largesymbols font, namely LMX as one can see from the declaration

\DeclareSymbolFont{largesymbols}{LMX}{ntxexx}{m}{n}

found in newtxmath.sty. In the same file we see

\DeclareMathDelimiter{\lbrace}{\mathopen}{lettersA}{163}{largesymbols}{138}

whereas, for an OMX encoded font, one has

\DeclareMathDelimiter{\lbrace}{\mathopen}{symbols}{"66}{largesymbols}{"08}

So the slot used in an OMX font is different from the one used in LMX. The yhex font has a closing parentheses in slot 138, whence what you're experiencing.

One should note that the yhex font is an extension of cmex, which is not visually compatible with any form of Garamond, while the garamondx option for newtxmath is not visually clashing (or, at least, it's less visually clashing).

Remove also

\DeclareSymbolFont{operators}{OT1}{txr}{m}{n}
\DeclareMathAlphabet{\mathbf}{OT1}{txr}{bx}{n}

because you don't really want to have Times characters in a Garamond based document. Also amsfonts and amssymb are not needed, because newtxmath replaces them anyway.

Here's a working version of your document.

\documentclass[11pt,a4paper]{article}
\usepackage[left=2.00cm, right=2.00cm, top=2.00cm, bottom=2.00cm]{geometry}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{garamondx}
\usepackage[garamondx,cmbraces]{newtxmath}

\begin{document}

\begin{gather*}
f(x)= \begin{cases}
 1 \\
 2 \\
 3 \\
\end{cases}
\\
W(A,B)=\begin{cases}
  0 & \text{se $n$=0 ed $m$=0}\\
  \infty & \text{se $n$=0 o $m$=0}
\end{cases}
\end{gather*}

\end{document}

enter image description here

You must log in to answer this question.

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