7

I would like to use the summation symbol provided by STIX package. I did try something but nothing worked. Here is what i attempted.

\documentclass{article}
\usepackage{amssymb,amsmath}
\DeclareSymbolFont{largesymbols}{LS2}{stixex}{m}{n}
\DeclareMathSymbol{\sumop}{\mathop}{largesymbols}{"B3}
\begin{document}
Hi, here is the $\sum$ and $$\sum$$ symbol of STIX
\end{document}

This was showing an error and didn't compile at all :(

6

You need to set-up the LS2 encoding and avoid overwriting the largesymbols:

Sample output

\documentclass{article}

\usepackage{amssymb,amsmath}

\makeatletter
\DeclareFontEncoding{LS2}{}{\noaccents@}
\makeatother

\DeclareFontSubstitution{LS2}{stix}{m}{n}
\DeclareSymbolFont{xlargesymbols}{LS2}{stixex}{m}{n}
\DeclareMathSymbol{\sumop}{\mathop}{xlargesymbols}{"B3}

\begin{document}

Hi, here is the $\sumop$ and
\[ \sumop \]
symbol of STIX and here are the standard $\sum$ and
\[ \sum \]
symbols.
\end{document}

In your sample file the first error in the .log file is

LaTeX Error: Encoding scheme `LS2' unknown.

telling that the encoding scheme has not been defined. Digging around the stix.sty file, leads to how that files sets-up the encoding.

5
  • Thanks a lot :) Yes i did see that. But where did you pick up this comand \Declarefontencoding{LS2} thing?? – crskhr Apr 25 '17 at 11:26
  • 1
    You should redefine \sum@, since you're using amsmath. – egreg Apr 25 '17 at 14:01
  • @egreg From the code in the question it looks like he wants an extra sum symbol \sumop. But that is not quite what is written in the text... – Andrew Swann Apr 25 '17 at 14:45
  • The OP was probably misled by another situation: tex.stackexchange.com/a/212089/4427 – egreg Apr 25 '17 at 14:48
  • @egreg Well how did you catch that :P. I exactly looked into this – crskhr Apr 25 '17 at 15:07
4

Andrew’s answer is only partial.

If you want to full substitute \sum with the STIX symbol, you have to redefine \sum@:

\documentclass{article}
\usepackage{amssymb,amsmath}

\makeatletter
\DeclareFontEncoding{LS2}{}{\noaccents@} 
\DeclareFontSubstitution{LS2}{stix}{m}{n}

\DeclareSymbolFont{largesymbolsSTIX}{LS2}{stixex}{m}{n}
\DeclareMathSymbol{\sum@}{\mathop}{largesymbolsSTIX}{"B3}
\makeatother

\begin{document}         

Hi, here is the $\sum$ and $\displaystyle\sum$ symbol of STIX

\end{document}

enter image description here

  1. The amsmath package saves \sum in \sum@ and then redefines \sum to be a complex macro; it does so in order to comply with the \dots features and to respect the sumlimits or nosumlimits options.

  2. Just defining \sumop will not make the symbol comply with the above features.

  3. The font encoding LS2 is not known to LaTeX, so it should be declared before referring to a font using it. The required \DeclareFontEncoding command can be found in stix.sty.

7
  • Thanks for this. How do i import a single alphabet of the STIX font. Suppose i want to import just the alphabet N of STIX how do i do that? Attempted this \DeclareFontEncoding{LS1}{}{} \DeclareFontSubstitution{LS1}{stix}{m}{n} \DeclareSymbolFont{letters}{LS1}{stix}{m}{it} \DeclareMathSymbol{N}{\mathalpha}{letters}{N}` but this is changing all the math alphabets. :( – crskhr Apr 25 '17 at 16:28
  • @S.C. You need to give a different name than letters, or this would override the default one. – egreg Apr 25 '17 at 16:38
  • Let me check and come back – crskhr Apr 25 '17 at 16:43
  • Yahooo! Working :D – crskhr Apr 25 '17 at 16:46
  • One More question. What about lbrace and rbrace. I tried to use \DeclareMathDelimiter{\lbrace}{\mathopen}{operators}{"5E}{xlargesymbols}{"0C} \DeclareMathDelimiter{\rbrace}{\mathclose}{operators}{"60}{xlargesymbols}{"0D} but this only working when things are at set at displaymath mode. If i type $\{e\}$, then braces aren't being produced. Any idea? – crskhr Apr 26 '17 at 1:42

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.