General ⇒ using multiple packages
-
- Posts: 2
- Joined: Thu Sep 23, 2010 7:20 pm
using multiple packages
Regardless, I am using multiple packages in a latex file that I am writing (they happen to be mathabx and amsfonts). The issue that I am having is that I need only a few commands from one package(in this case I only need the does not divide and divides symbols from mathabx), but since the two packages share a bunch of commands, every time I enter commands that they both share, the mathabx package receives precedence over amsfonts, and as a result, I am not getting the style of many symbols that I want.
I am curious, how do i tell latex that I want amsfonts to get precedence when both packages have the same commands in them?
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
using multiple packages
Maybe someone would have a better idea, but if you really only need those two symbols, you could leave out \usepackage{mathabx}, and instead put in:
Code: Select all
\DeclareFontFamily{U}{matha}{\hyphenchar\font45}
\DeclareFontShape{U}{matha}{m}{n}{
<5> <6> <7> <8> <9> <10> gen * matha
<10.95> matha10 <12> <14.4> <17.28> <20.74> <24.88> matha12
}{}
\DeclareSymbolFont{matha}{U}{matha}{m}{n}
\DeclareMathSymbol{\divides}{3}{matha}{"17}
\DeclareMathSymbol{\notdivides}{3}{matha}{"1F}
Alternatively, since those symbols seem fairly easy to replicate by other means, you could try doing so, e.g., as a first stab:
Code: Select all
\newcommand{\divides}{\mathrel{\vert}}
\newcommand{\notdivides}{\negthinspace\mathrel{\not\vert}}
-
- Posts: 2
- Joined: Thu Sep 23, 2010 7:20 pm
Re: using multiple packages
using multiple packages
This is very mysterious. Would it be possible to provide a minimal working example that generates an error when you use it?
What exactly is the error you get?
You could try to define it. This is a reasonable substitute:
Code: Select all
\newcommand{\pmod}[1]{\ (\mathrm{mod\ }#1)}
But I'm very confused as to why removing mathabx should produce an error here.