So I'm trying to have four different subsections on "2 different paragraphs". what I mean is the following:

                x ¦ x
              ----¦----
                x ¦ x

where x denotes the text I wish to have (without the dashed lines as there will be 4 sets of equations)

EDIT: This is what I've done thus far:

Let us define the following:

\smallskip
$\chi_0(x) = 1$
\bigskip

$\chi_1(x)$ = $\begin{cases}
    1,   & \text{if } x = 0, \\
    a,   & \text{if } x = 1, \\
    a^2, & \text{if } x = 2, \\
    a^3, & \text{if } x = 3, \\
    a^4, & \text{if } x = 4, 
\end{cases}$

$\chi_2(x)$ = $\begin{cases}
    1,   & \text{if } x = 0, \\
    a^2, & \text{if } x = 1, \\
    a^4, & \text{if } x = 2, \\
    a,   & \text{if } x = 3, \\
    a^3, & \text{if } x = 4, 
\end{cases}$

$\chi_3(x)$ = $\begin{cases}
    1,   & \text{if } x = 0, \\
    a^3, & \text{if } x = 1, \\
    a,   & \text{if } x = 2, \\
    a^4, & \text{if } x = 3, \\
    a^2, & \text{if } x = 4, 
\end{cases}$

$\chi_4(x)$ = $\begin{cases}
    1,   & \text{if } x = 0, \\
    a^4, & \text{if } x = 1, \\
    a^3, & \text{if } x = 2, \\
    a^2, & \text{if } x = 3, \\
    a,   & \text{if } x = 4, 
\end{cases}$

Firstly I want to move the \chi_0(x) down one line; and the other four "blocks" I want them to appear side by side like the following:

            chi_1(x) ¦ chi_3(x)
           ----------¦---------
            chi_2(x) ¦ chi_4(x)

I am unsure how to proceed.

  • Assuming that you know what are LateX minipages (otherwise, you must start with that), make a \noindent, followed with four minipages with a bit less of a width less than half the width of the text (e.g, 0.45\textwidth) and three \hfill between minipages. Then put the content of each subsection inside each minipage. If you a problem with that, edit the question and post a minimal working example (MWE) to show so far you are able to get. Note that "minimal" mean "do not show any irrelevant code!" but "working" mean "not a code fragment but compilable as is". – Fran Nov 13 at 12:12
  • sorry I don't understand – A.E Nov 13 at 12:21
  • Then I recommend you start here – Fran Nov 13 at 12:25
up vote 4 down vote accepted

The words "subsections" and "paragraphs" are here quite misleading because in TeX they refer to text elements, while you are writing equations. This might be a possible realization (I'm not sure where \chi_0 is supposed to be)

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{align*}
\chi_0(x) &= 1 \\[1ex]
\chi_1(x) &=
\begin{cases}
    1,   & \text{if } x = 0, \\
    a,   & \text{if } x = 1, \\
    a^2, & \text{if } x = 2, \\
    a^3, & \text{if } x = 3, \\
    a^4, & \text{if } x = 4, 
\end{cases}
&
\chi_3(x) &=
\begin{cases}
    1,   & \text{if } x = 0, \\
    a^3, & \text{if } x = 1, \\
    a,   & \text{if } x = 2, \\
    a^4, & \text{if } x = 3, \\
    a^2, & \text{if } x = 4, 
\end{cases}
\\[1ex]
\chi_2(x) &=
\begin{cases}
    1,   & \text{if } x = 0, \\
    a^2, & \text{if } x = 1, \\
    a^4, & \text{if } x = 2, \\
    a,   & \text{if } x = 3, \\
    a^3, & \text{if } x = 4, 
\end{cases}
&
\chi_4(x) &=
\begin{cases}
    1,   & \text{if } x = 0, \\
    a^4, & \text{if } x = 1, \\
    a^3, & \text{if } x = 2, \\
    a^2, & \text{if } x = 3, \\
    a,   & \text{if } x = 4.
\end{cases}
\end{align*}

\end{document}

enter image description here

  • This is perfect, exactly what I was looking for, thank you! – A.E Nov 13 at 12:52
  • however. is there a way to move everything to the left buy a little? – A.E Nov 13 at 12:54
  • @A.E You could e.g. make it in inline math instead of display math. Replace \begin{align*}...\end{align*} by $\displaystyle\begin{aligned}...\end{aligned}. – campa Nov 13 at 15:38
  • this does not work, the next line of code gets ruined – A.E Nov 13 at 15:47
  • @A.E Sorry, forgot to the closing $: It should be $\displaystyle\begin{aligned}...\end{aligned}$ – campa Nov 13 at 15:58

As campa stated, first showed question without code was misleading, and in this case can be nicely solved with align* (+1).

So this answer is not to search the acceptance, but just to show what you can with the commented minipages in other cases, not only with maths, since the minipages can contain anything, even a true subsection (e.g. \subsection{text} Text ...) with images, tables, etc. But of course, also is possible only with your equations:

\documentclass[12pt]{article}
\usepackage{amsmath}
\begin{document}

Let us define the following:


\[\chi_0(x) = 1\]

\noindent
\begin{minipage}[t]{.45\textwidth}
$\chi_1(x)$ = $\begin{cases}
    1,   & \text{if } x = 0, \\
    a,   & \text{if } x = 1, \\
    a^2, & \text{if } x = 2, \\
    a^3, & \text{if } x = 3, \\
    a^4, & \text{if } x = 4, 
\end{cases}$\bigskip
\end{minipage}\hfill%
\begin{minipage}[t]{.45\textwidth}
$\chi_3(x)$ = $\begin{cases}
    1,   & \text{if } x = 0, \\
    a^3, & \text{if } x = 1, \\
    a,   & \text{if } x = 2, \\
    a^4, & \text{if } x = 3, \\
    a^2, & \text{if } x = 4, 
\end{cases}$\bigskip
\end{minipage}\hfill%
\begin{minipage}[t]{.45\textwidth}
$\chi_2(x)$ = $\begin{cases}
    1,   & \text{if } x = 0, \\
    a^2, & \text{if } x = 1, \\
    a^4, & \text{if } x = 2, \\
    a,   & \text{if } x = 3, \\
    a^3, & \text{if } x = 4, 
\end{cases}$\bigskip
\end{minipage}\hfill%
\begin{minipage}[t]{.45\textwidth}
$\chi_4(x)$ = $\begin{cases}
    1,   & \text{if } x = 0, \\
    a^4, & \text{if } x = 1, \\
    a^3, & \text{if } x = 2, \\
    a^2, & \text{if } x = 3, \\
    a,   & \text{if } x = 4, 
\end{cases}$\bigskip
\end{minipage}\hfill%

\end{document}
  • Hi, so \chi_1(x) and \chi_2(x) is what I was looking for however, \chi_3(x) and \chi_4(x) are pushed too much to the right, I wanted them to be pushed to the left considerably more – A.E Nov 13 at 13:43
  • @A.E You can change the width of the minipages and also change the space between, i.e., change \hfill by any other horizontal spacer as \quad, \hspace{5mm}, ... o simply left one space between minipages of the same row. Note that in my MWE there are only a row of four minipages with an automatic break in the middle (because the big size of the minipages). With smaller minipages you could need two rows of two minipages each, with a blank line (= \par) between. – Fran Nov 13 at 14:05

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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