## 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?

\intertext{The vector of parameters to be estimated by maximum likelihood is as follows:}\begin{align*}\boldsymbol{\theta}_{2} =   \begin{bmatrix}a_{y,1} & a_{y,2} & a_{r} & a_{0} & a_{g} & b_{\pi} & b_{y} & g & \sigma_{\Tilde{y}} & \sigma_{\pi} & \sigma_{y^{*}}                            \end{bmatrix}\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: 4101
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:

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

Best, Sean

Johannes_B
Site Moderator
Posts: 4101
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:

\documentclass{article}\usepackage{amsmath}\setcounter{MaxMatrixCols}{11}\begin{document}\begin{align*}\intertext{The vector of parameters to be estimated by maximumlikelihood is as follows:}\end{align*}$\boldsymbol{\theta}_{2} = \begin{bmatrix} a_{y,1} & a_{y,2} & a_{r} & a_{0} & a_{g} & b_{\pi} & b_{y} & g & \sigma_{\Tilde{y}} & \sigma_{\pi} & \sigma_{y^{*}} \end{bmatrix}$\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
I suggest just read the geometry manual to become aware of the options and how they work. It's good anyway in case you need changes later. One good point with geometry is, that it automatically calculates missing values, for example if you specify top and bottom margin, it calculates the text area height based on the paper size. And more values, such as footnote separation and head height for header etc. If one sets values manually, it can easily be that for example text height plus margins just don't fit the paper height.