Text FormattingUsing nath package and \Brack command gives error

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
juliette
Posts: 75
Joined: Thu Nov 20, 2008 10:15 pm

Using nath package and \Brack command gives error

Post by juliette »

Has anyone used the package \usepackage{nath}?

I tried using this package only for the \Brack command,
without even using that command,

If I add \usepackage{nath} to the preamble of a document with absolutely no errors, I end up getting thousands of compile-time errors ... and I have no clue why.

I'm using revtex4 and TeXnicCenter..

Any help, suggestions or discussions are greatly appreciated

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

juliette
Posts: 75
Joined: Thu Nov 20, 2008 10:15 pm

Using nath package and \Brack command gives error

Post by juliette »

In fact, just this:

Code: Select all

\documentclass{article}
\usepackage{nath}
\begin{document}
a
\end{document}
works,

but if I add

Code: Select all

\usepackage{graphicx}
I get a thousand error messages.

I'm not sure what the problem is here.

If I can't get the nath package working, does anyone know an alternative way to get the symbol \triple[ ??
phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

Re: nath package

Post by phi »

You must load the nath package after the graphicx package. However, keep in mind that the nath package completely changes everything related to mathematics, so you should never include it in a document that already contains some text.
For double brackets similar to those provided by the nath package (which depend on the heavy infrastructure of the nath package and are thus hard to isolate), see the stmaryrd package.
juliette
Posts: 75
Joined: Thu Nov 20, 2008 10:15 pm

Re: nath package

Post by juliette »

Thank you phi,

is it not possible for me to use the nath package for just some equations and not for others ??

The stmaryrd package looks like it only has double brackets, but doesn't have the triple brackets that I want from nath.
phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

Using nath package and \Brack command gives error

Post by phi »

juliette wrote: is it not possible for me to use the nath package for just some equations and not for others ??
No, that's impossible. As I said before, the nath package overwrites nearly all of LaTeX's math functionality. Once you've loaded it, you cannot revert to "normal" mathematics.
The stmaryrd package looks like it only has double brackets, but doesn't have the triple brackets that I want from nath.
You can try to fake the brackets (nath does something similar, but more sophisticated):

Code: Select all

\documentclass{article}

\newcommand*{\ltbrack}{\left[\mkern-6mu\left[\mkern-6mu\left[}
\newcommand*{\rtbrack}{\right]\mkern-6mu\right]\mkern-6mu\right]}

\begin{document}

\[ \ltbrack \frac12 \rtbrack \]

\end{document}
juliette
Posts: 75
Joined: Thu Nov 20, 2008 10:15 pm

Re: nath package

Post by juliette »

That alternative is pretty good!

Thanks phi!
Post Reply