GeneralIndentation and different formulas in the same row

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
iperten
Posts: 40
Joined: Thu Jul 12, 2007 1:53 pm

Indentation and different formulas in the same row

Post by iperten »

Dear all,

good morning.

I have two questions, in order to save space in the article I am writing:

1- if I use the blank line (instead of \\) to start a paragraph after a period, this will have a small indentation: how can I avoid it?

2- I have to write 3 short formulas (each of them needs the number to refer to later on in the text), but I don't want to use three following rows, one for each formula. Instead, since they are short and there's room, I'd like to have them on a single line: can I do so?

Thank you very much!
Cheers,
M.

Recommended reading 2024:

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

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

iperten
Posts: 40
Joined: Thu Jul 12, 2007 1:53 pm

Re: Indentation and different formulas in the same row

Post by iperten »

PS: concerning 1-, I sometimes have to use the blank line, specially after figures or equations. Of course, if there is a better way to do so, it's welcome!
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Indentation and different formulas in the same row

Post by Stefan Kottwitz »

Hi iperten,
  1. write \noindent at the beginning of the next line or set the length \parindent to 0:

    Code: Select all

    \setlength{\parindent}{0pt}
    Don't use a blank line before or after equations (displayed math), it will produce additional space.
  2. you could use a table and equations inside, for example:

    Code: Select all

    \documentclass[a4paper,10pt]{article}
    \usepackage{tabularx}
    \usepackage{amsmath}
    \begin{document}
    \noindent\begin{tabularx}{\textwidth}{XXX}
    \begin{equation}
     a = 1
    \end{equation} &
    \begin{equation}
     b = 2
    \end{equation} &
    \begin{equation}
     c = 3
    \end{equation}
    \end{tabularx}
    \end{document}
Stefan
LaTeX.org admin
iperten
Posts: 40
Joined: Thu Jul 12, 2007 1:53 pm

Indentation and different formulas in the same row

Post by iperten »

Dear Stefan,

thank you!

Well, I have to short comments:

1- if I use
\setlength{\parindent}{0pt}
than every paragraph won't have indentation, so probably it's better to use
\noindent
right before where I need no indentation;

2- the table with equations inside works perfectly, but I can flush left with text the first equation?

Thanks again!
Cheers,
M.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Indentation and different formulas in the same row

Post by Stefan Kottwitz »

You could do it by using $...$ instead of equation and manual tagging/numbering. I think of using flalign, but perhaps it doesn't work inside tabular. You could try something like this:

Code: Select all

\newcolumntype{E}{p{3cm}}
...
\noindent\begin{tabularx}{\textwidth}{@{}E@{\hspace{1cm}}E@{\hspace{1cm}}E@{}}
It's not completely on the left margin, but a bit to the center may be good because those are displayed equations, not inline. You can change the width of the E column or the space between them until it fits well.
It could have been done very easy by the align or alignat environment if you wouldn't need numbering of each formula in the columns.

Stefan
LaTeX.org admin
iperten
Posts: 40
Joined: Thu Jul 12, 2007 1:53 pm

Re: Indentation and different formulas in the same row

Post by iperten »

Thank you! I'll try this as well!

Cheers,
Mattia.
Post Reply