4

I'm using a converter to generate LaTeX codes. The converter gives me the results below for integral and sum. limits are above and below. I want sum and other symbol limits as given in (1) but integral limits as given (2). I don't want to change the code for integrals manually every time. What command should I use?

\documentclass[11pt,a4paper]{exam}
\usepackage[utf8x]{inputenc}
\usepackage{ucs}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage[left=2.00cm, right=2.00cm, top=2.00cm, bottom=2.00cm]{geometry}
\begin{document}
\begin{equation}
\underset{1}{\overset{2}{\mathop \int }}\,{{x}^{2}}dx,\underset{i=1}{\overset{n}{\mathop \sum }}\,i,~\underset{i=1}{\overset{\infty }{\mathop \bigcup }}\,{{B}_{i}}
\end{equation}

\begin{equation}
\int_{1}^{2} x^2~dx
\end{equation}
\end{document}

Picture

6
  • Why are you using underset?
    – Sigur
    Commented Nov 20, 2013 at 16:51
  • 4
    The converter does a very bad work.
    – egreg
    Commented Nov 20, 2013 at 16:51
  • egreg. you are right. if it can't be changed by a command, can you suggest a different converter? Sigur. converter gives that.
    – mert
    Commented Nov 20, 2013 at 16:54
  • What is this converter?
    – Sigur
    Commented Nov 20, 2013 at 17:02
  • mathtype toggletex
    – mert
    Commented Nov 20, 2013 at 17:29

1 Answer 1

5

The converter shouldn't use \overset and \underset: it's just wrong!

Correct code for the examples is

\documentclass[11pt,a4paper]{exam}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage[left=2.00cm, right=2.00cm, top=2.00cm, bottom=2.00cm]{geometry}

\begin{document}

\begin{equation}
\int_{1}^{2}x^{2}\,dx,\quad
\sum_{i=1}^{n}i,\quad
\bigcup_{i=1}^{\infty}B_{i}
\end{equation}

\end{document}

The converter is doing bad work: it adds really useless constructions (which are wrong in some cases).

enter image description here

3
  • An alternate usage for integral is $\int\limits_{1}^{2}x^{2}\,dx$
    – user31034
    Commented Nov 20, 2013 at 17:27
  • @ferahfeza I don't think that \limits is what the OP wants.
    – egreg
    Commented Nov 20, 2013 at 17:41
  • you might want to mention that \overset and \underset don't even put the limits in the right position; compare with \int\limits. Commented Nov 20, 2013 at 19:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .