Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question
add comment

2 Answers 2

up vote 10 down vote accepted

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}
share|improve this answer
add comment

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.

share|improve this answer
    
Thanks for your comment. –  projetmbc Oct 20 '11 at 13:33
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.