19

After reading an article by Grätzer in the current AMS-Notices on the STIX fonts, I wanted to use one of the math symbols in the article I am currently writing.

In perfect naivety I did what was suggested: I put the line \RequirePackage{stix} as the first line in the doc.

OK, you already know what happened: The article had no resemblance to its former shape anymore and had become completely unreadable.

Here my scenario: I want to use only some selected math symbols of the STIX fonts and otherwise maintain everything else as before. What it the best way to proceed?

What I want are only the delimiters \lbrbrak and \rbrbrak from STIX.

What I get and what I want

\RequirePackage{stix}
\documentclass{amsart}
%\DeclareFontEncoding{LS1}{}{}
%\DeclareFontSubstitution{LS1}{stix}{m}{n}
%\DeclareSymbolFont{largesymbols} {LS1}{stixsf}{m} {n}
%\DeclareMathDelimiter{\lbrbrak} {\mathrel}{largesymbols}{"EE}{largesymbols}{"EE}
%\DeclareMathDelimiter{\rbrbrak} {\mathrel}{largesymbols}{"EF}{largesymbols}{"EF}
\newcommand{\newbrak}[2]{\genfrac{\lbrbrak}{\rbrbrak}{0pt}{}{#1}{#2}}
\begin{document} 
    \begin{equation}
        \newbrak{k}{m}  = 
        (m n)! \, \frac{\Omega_{k}(z)}{\Omega_{m}(z)}
    \end{equation}
\end{document}

This script works. The lines beginning with 'Declare...' try to mimic the answer of David below. However out-commenting the first line and un-commenting the 'Declare..' lines leads to the error 'Insufficient extension fonts.' What did I do wrong?

2 Answers2

14

You can just look in stix.sty and extract the definition for any character:

enter image description here

\documentclass{article}

\DeclareFontEncoding{LS1}{}{}
\DeclareFontSubstitution{LS1}{stix}{m}{n}
\DeclareSymbolFont{arrows1}       {LS1}{stixsf}   {m} {n}
\DeclareMathDelimiter{\DDownarrow} {\mathrel}{arrows1}{"FF}{arrows1}{"FF}

\begin{document}\showoutput

\[\alpha + \sum x_i \DDownarrow \phi \]

\end{document}
David Carlisle
  • 757,742
14

Here's how to add the requested symbols. You don't have correctly identified the required fonts and symbols.

Look for \lbrbrak in stix.sty, to find

\stix@MathDelimiter{\lbrbrak}   {\mathopen} {largesymbols}{"EE}{largesymbols}{"14}
\stix@MathDelimiter{\rbrbrak}   {\mathclose}{largesymbols}{"EF}{largesymbols}{"15}

Thus we need to see what font largesymbols refers to:

\DeclareSymbolFont{largesymbols}  {LS2}{stixex}   {m} {n}

OK, now we need LS2:

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

Next we have to choose a different symbolic name for the math font and put the pieces together (in reverse order).

\documentclass{amsart}

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

\DeclareSymbolFont{largesymbolsstix}{LS2}{stixex}{m}{n}

\DeclareMathDelimiter{\lbrbrak}{\mathopen}{largesymbolsstix}{"EE}{largesymbolsstix}{"14}
\DeclareMathDelimiter{\rbrbrak}{\mathclose}{largesymbolsstix}{"EF}{largesymbolsstix}{"15}
\newcommand{\newbrak}[2]{\genfrac{\lbrbrak}{\rbrbrak}{0pt}{}{#1}{#2}}

\begin{document}
\begin{equation}
\lbrbrak x\rbrbrak,\quad
\bigl\lbrbrak x\bigr\rbrbrak,\quad
\newbrak{k}{m}  = (m n)! \, \frac{\Omega_{k}(z)}{\Omega_{m}(z)}
\end{equation}

\end{document}

enter image description here

egreg
  • 1,121,712