2

I managed to successfully hack mathspec to use parentheses () and brackets [] from the specified font via e.g.

\DeclareMathSymbol{]}{\mathord}{\eu@DigitsArabic@symfont}{`]}

Obviously, I'd like to do the same thing with braces {}, but \DeclareMathSymbol{\{}... causes XeLaTeX to throw the following error:

! Latex Error: Command '\{' already defined.

I was half-expecting this to happen all along to be honest. Does anyone know how to make this work?

lockstep
  • 250,273
  • 1
    Could you please add a minimal working example (MWE) that illustrates your problem? (I.e. what font are you trying to use? Does it provide large math delimiters?) I have tried to answer some of your question in lieu of this information. – mforbes May 08 '12 at 02:33
  • @mforbes Sorry, I guess I could've been clearer with my question. No, the font doesn't provide large delimiters which is why I thought I shouldn't use \DeclareMathDelimiter. I'm just looking to replace the basic-sized ones. Relevant code: \usepackage{eulervm} \usepackage{mathspec} \setmathfont(Digits)[Numbers={Lining,Proportional}]{Optima nova LT Pro} I've hacked mathspec.sty itself to include brackets as "Digits". – Saran Tunyasuvunakool May 08 '12 at 10:42
  • If you really want to use \DeclareMathSymbol, you can always just \let\lbrace\relax, but I still think you should use \DeclareMathDelimiter: LaTeX needs to know what to do in the case of delimiters: maybe fallback to Euler? I must admit I am having difficulty doing that though. \DeclareMathDelimiter will automatically set the symbol too. – mforbes May 08 '12 at 19:19

1 Answers1

4

If you want to modify the delimiters, you should use \DeclareMathDelimiter instead of \DeclaraMathSymbol so that you can specify both the small and large symbols.

Here is a simple example that changes the left brace to a left parenthesis:

\DeclareMathDelimiter{\lbrace}{\mathopen}{operators}{"28}
                                         {largesymbols}{"00}

You will need to figure out the slots that contain the appropriate small and large version of the symbol in your desired font if it does not follow a standard encoding.

References

mforbes
  • 5,571