1

Similar to my question here: I want to import \bigplus and \bigtimes from the mathabx package but not use the whole package as it alters the look of \int, \partial etc.

There are a lot of solutions out there for similar problems but I don't know where to start adapting them to my own needs as they seem like magic LaTeX incantations! Can anyone give me a particular solution, or help me understand how to adopt a general solution?

If possible I would like to avoid relying on the amsmath package because the journal class file I'm using does not play well with amsmath (very frustrating but I cannot do anything about this!).

Thanks!

1

Here's how to do it:

\documentclass{article}%

\DeclareFontFamily{U}{mathx}{\hyphenchar\font45}
\DeclareFontShape{U}{mathx}{m}{n}{
<-6> mathx5 <6-7> mathx6 <7-8> matha7
<8-9> mathx8 <9-10> mathx9
<10-12> mathx10 <12-> mathx12
}{}
\DeclareSymbolFont{mathx}{U}{mathx}{m}{n}
\DeclareMathSymbol{\bigplus}{\mathop}{mathx}{"90}
\DeclareMathSymbol{\bigtimes}{\mathop}{mathx}{"91}

\begin{document}

\[ A \bigplus B \qquad C\bigtimes D\]%

\end{document} 

enter image description here

4
  • Thanks Bernard and Steven B Segletes. I went with Bernard's answer in the end because the symbols were a bit too big in Steven's answer. But can you help me understand what the difference between your answers is? As far as I can see, the only differences are the slots in \DelareMathSymbol, i.e. "90, "91" (Bernard) vs "A0, "A1 (Steven), and the numbers in \DeclareFontShape. So what do these numbers in \DeclareFontShape mean and do? – jms547 Mar 9 at 18:44
  • As far as I remember (I've adapted an old answer for another symbol), `mathx cjhooses automatically the glyph in the correct slot, according to the required font size. The numbers denote the position of the glyph in the font table, in base 16 with the double quote. Base 8 can also be used if the single quote is used. – Bernard Mar 9 at 18:54
  • ok, thanks. What about the other strange incantation in the line \DeclareFontShape{U}{mathx}{m}{n}{ <-6> mathx5 <6-7> mathx6 <7-8> matha7 <8-9> mathx8 <9-10> mathx9 <10-12> mathx10 <12-> mathx12 }{} ? – jms547 Mar 11 at 21:34
  • 1
    This is, as far as I remember, because the font exists in several base sizes, and it tells the compiler which base size to use depending on the required size in the document (it is the font which contains the variable size delimiters). – Bernard Mar 11 at 21:40
1

I include the mathabx font tables at the end, so that you can see that the \bigplus and \bigtimes are part of the the mathx subset of mathabx, occupying slots "A0 and "A1.

\documentclass{article}
% Setup the mathx font (from mathxbx.sty)
\DeclareFontFamily{U}{mathx}{\hyphenchar\font45}
\DeclareFontShape{U}{mathx}{m}{n}{
      <5> <6> <7> <8> <9> <10> gen * mathx
      <10.95> mathx10 <12> <14.4> <17.28> <20.74> <24.88> mathx12
      }{}
\DeclareSymbolFont{mathx}{U}{mathx}{m}{n}

% Define a subset character from that font (from mathabx.dcl)

\DeclareMathSymbol{\bigplus}{1}{mathx}{"A0}
\DeclareMathSymbol{\bigtimes}{1}{mathx}{"A1}

\usepackage{fonttable}
\begin{document}

\texttt{mathabx} subset

\[
A \bigtimes B
\]
\[
B \bigplus A
\]

\tiny\clearpage
\fonttable{mathx10}\clearpage
\fonttable{matha10}\clearpage
\fonttable{mathb10}
\end{document}

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.