## LaTeX forum ⇒ Math & Science ⇒ Avoiding a 'split up' equation

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Seanshine
Posts: 52
Joined: Sat Apr 28, 2018 9:59 pm

### Avoiding a 'split up' equation

I am trying to fit in a rather long vector of variables, but LaTeX splits up the vector, while this is not necessary as there appears to be plenty of space on one line. How can one avoid this?

1. \intertext{The vector of parameters to be estimated by maximum likelihood is as follows:}
2. \begin{align*}
3. \boldsymbol{\theta}_{2} = \begin{bmatrix}
4. a_{y,1} & a_{y,2} & a_{r} & a_{0} & a_{g} & b_{\pi} & b_{y} & g & \sigma_{\Tilde{y}} & \sigma_{\pi} & \sigma_{y^{*}}
5. \end{bmatrix}
6. \end{align*}

Furthmore, maybe off-topic, but why does \intertext (while amsmath package is in the preamble) not work?

Tags:

Johannes_B
Site Moderator
Posts: 4100
Joined: Thu Nov 01, 2012 4:08 pm
Doesn't work that way. I can fit everything perfectly on a page that is three meters wide.

Page margins? Page size? Document class? minimal working example?
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Seanshine
Posts: 52
Joined: Sat Apr 28, 2018 9:59 pm
Hi Johannes,

As requested:

1. \documentclass[
2. 11pt,english, onehalfspacing, nolistspacing, liststotoc, headsepline,oneside,
3. chapterinoneline, leqno, a4paper
4. %consistentlayout, change the layout of the declaration, abstract and acknowledgements pages to match the default layout
5. ]{MastersDoctoralThesis}
6.
7. \voffset = -2.54cm
8. \hoffset = -2.54cm
9. \textheight 23cm
10. \textwidth 16 cm
11. \topmargin 2.5cm
12. \oddsidemargin 2.50cm \evensidemargin 2.5cm \unitlength 1cm

Best, Sean

Johannes_B
Site Moderator
Posts: 4100
Joined: Thu Nov 01, 2012 4:08 pm
Wombat=-.314Capybara

//Written while at a BBQ.

What do you expext? Mind readers? You are using the low-level interface, instead of the high leve interface.
And still no working example.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Seanshine
Posts: 52
Joined: Sat Apr 28, 2018 9:59 pm
Nice, enjoy the BBQ.

What interface?

This one?

Stefan Kottwitz
Posts: 9521
Joined: Mon Mar 10, 2008 9:44 pm
Hi Sean!

I guess the low-level interface means using the commands \voffset, ..., \evensidemargin etc. That's stone age TeX and can lead to issues easily. It's better to use the geometry package and the \geometry command with options.

Have a look at this link, about why and how to provide code: minimal working example

\intertext works within an align environment. You used it outside, that's why it doesn't work.

align* is not useful here since there's no alignment.

Furthermore, the matrix has more than 10 columns, that's the default maximum. You can raise it, such as by setting \setcounter{MaxMatrixCols}{11}.

Working code:

1. \documentclass{article}
2. \usepackage{amsmath}
3. \setcounter{MaxMatrixCols}{11}
4. \begin{document}
5. \begin{align*}
6. \intertext{The vector of parameters to be estimated by maximum
7. likelihood is as follows:}
8. \end{align*}
9. $10. \boldsymbol{\theta}_{2} = \begin{bmatrix} 11. a_{y,1} & a_{y,2} & a_{r} & a_{0} & a_{g} & b_{\pi} & b_{y} & g 12. & \sigma_{\Tilde{y}} & \sigma_{\pi} & \sigma_{y^{*}} 13. \end{bmatrix} 14.$
15. \end{document}

I used the align* environment only to show how \intertext works. It is for text between several lines within a multi-line formula or equation.

Stefan

Seanshine
Posts: 52
Joined: Sat Apr 28, 2018 9:59 pm
Thanks Stefan! The column problem has been solved.

I did not know once could put text within the alignment environment and use $and$ around the mathematical expressions. Another thing learned!

How would one set-up the geometry to achieve the same margins?

\geometry{
paper=a4paper, % Change to letterpaper for US letter
inner=1.5cm, % Inner margin
outer=2.5cm, % Outer margin
bindingoffset=0.5cm, % Binding offset
top=0.5cm, % Top margin
bottom=1.0cm, % Bottom margin
}

Stefan Kottwitz