Hello,
I am writing all types of equations in my reports. To be mathematically correct i am adding a leftrightarrow at the end of each equation-line. But when I compile the file, the leftrightarrows are placed too far to the right whereas the equations (which are placed vertically one beneath the other) are placed to the left of the paper, so that the distance between the equations and leftrightarrows is far to big. How do I decrease this distance ?
Thanks.
Math & Science ⇒ leftrightarrows in math equations
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Re: leftrightarrows in math equations
Hi,
that depends on the code you are using. You described the problem but you didn't mention which math environments you're using: equation, align, alignat, flalignat, ...
Just show us example code of such problematic formulas, then we could suggest a correction.
Stefan
that depends on the code you are using. You described the problem but you didn't mention which math environments you're using: equation, align, alignat, flalignat, ...
Just show us example code of such problematic formulas, then we could suggest a correction.
Stefan
LaTeX.org admin
-
- Posts: 26
- Joined: Wed Sep 30, 2009 7:04 pm
leftrightarrows in math equations
Hello,
Here is the code I am using:
One more question: Which package should I use if I want to insert a small black scare at the end of an example ( you know those small black squares which are flushed right to indicate that the example is finished).
Thanks in advande.
Here is the code I am using:
Code: Select all
\documentclass[12pt,a4paper,danish]{report}
\usepackage[latin1]{inputenc}
\usepackage[danish]{babel} % danske overskrifter
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{graphicx}
\usepackage{mathtools}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{ulem}
\usepackage{latexsym}
\begin{document}
\begin{align*}
\sum_{n=0}^{\infty} (e^{x})^{n} &= (e^{x})^{0} + \sum_{n=1}^{\infty} (e^{x})^{n} \\
\sum_{n=1}^{\infty} (e^{x})^{n} &= \sum_{n=0}^{\infty} (e^{x})^{n} - 1 \\
\sum_{n=1}^{\infty} (e^{x})^{n} &= \frac{1}{1-e^{x}} - 1
\end{align*}
\end{document}
Thanks in advande.
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
leftrightarrows in math equations
your code doesn't contain the arrows, so how you've got that behavior? Writing justabu aasiyah wrote:i am adding a leftrightarrow at the end of each equation-line. But when I compile the file, the leftrightarrows are placed too far to the right
Code: Select all
\begin{align*}
\sum_{n=0}^{\infty} (e^{x})^{n} &= (e^{x})^{0} + \sum_{n=1}^{\infty} (e^{x})^{n} \quad\Leftrightarrow\\
\sum_{n=1}^{\infty} (e^{x})^{n} &= \sum_{n=0}^{\infty} (e^{x})^{n} - 1 \quad\Leftrightarrow\\
\sum_{n=1}^{\infty} (e^{x})^{n} &= \frac{1}{1-e^{x}} - 1
\end{align*}
Or do you want to align the arrows as well? In that case try alignat*:
Code: Select all
\begin{alignat*}{2}
\sum_{n=0}^{\infty} (e^{x})^{n} &= (e^{x})^{0} + \sum_{n=1}^{\infty} (e^{x})^{n} &\quad&\Leftrightarrow\\
\sum_{n=1}^{\infty} (e^{x})^{n} &= \sum_{n=0}^{\infty} (e^{x})^{n} - 1 &&\Leftrightarrow\\
\sum_{n=1}^{\infty} (e^{x})^{n} &= \frac{1}{1-e^{x}} - 1
\end{alignat*}
LaTeX.org admin
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
leftrightarrows in math equations
The amssymb package provides a black square. If you want to format your examples with such a symbol flushed to the right you could try the ntheorem package. Otherwise it is possible to define a new command for signing a paragraph in such a way.abu aasiyah wrote:[...] One more question: Which package should I use if I want to insert a small black scare at the end of an example ( you know those small black squares which are flushed right to indicate that the example is finished).
Thanks in advande.
Best regards
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10