10

In the following code, I would like to show two different formatting styles: one using the package nath output, and another showing the default output.

How can I do that?

% Source : http://tex.stackexchange.com/questions/1023/vertically-asymmetric-size-variation-for-parentheses

\documentclass[10pt,a4paper]{article}
    \usepackage[utf8x]{inputenc}
    \usepackage{ucs}
    \usepackage{amsmath}
    \usepackage{amsfonts}
    \usepackage{amssymb}

    \usepackage{nath} % The usefull package.

    \newcommand{\formulaOne}{\sum_{0 \le i \le m \\ 0 < j < n} P(i,j)}
    \newcommand{\formulaTwo}{1 + \frac{1 + x^2}{1 - \frac{x}{2}}}


\begin{document}

\section{With nath}

\begin{equation}
    ( \formulaOne ) = [ \formulaTwo ]
\end{equation}


\section{Without nath}

\begin{equation}
    \left( \formulaOne \right) = \left[ \formulaTwo \right]
\end{equation}


\end{document}
10

this works:

\documentclass[10pt,a4paper]{article}
\usepackage{amsmath}
\begin{document}

\section{Without nath}   
\begin{equation}
    \left( \sum_{0 \le i \le m \\ 0 < j < n} P(i,j) \right) 
    = \left[ 1 + \frac{1 + x^2}{1 - \frac{x}{2}} \right]
\end{equation}

\section{With nath}

\makeatletter
\input{nath.sty}
\makeatother
\begin{equation}
    ( \sum_{0 \le i \le m \\ 0 < j < n} P(i,j) ) 
      = [ 1 + \frac{1 + x^2}{1 - \frac{x}{2}} ]
\end{equation}

\end{document}
14

The nath package changes too much of the default setting that such a project, even if it was feasible (I don't think so, though), would require a gigantic effort.

The best strategy is to prepare the samples with the standalone class and to import them as PDF graphics.

1
  • While Herbert's answer apparently works in this instance, I think this answer is the more generally applicable...
    – Seamus
    Oct 20 '11 at 14:08

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.