How can I control the size of a multi-line equation?

  • Thread starter Thread starter EngWiPy
  • Start date Start date
  • Tags Tags
    Control
Click For Summary

Discussion Overview

The discussion revolves around controlling the size of multi-line equations in LaTeX, specifically addressing issues related to font size and the vertical alignment of braces in equations that span multiple lines.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant asks how to control the size of a multi-line equation and expresses concern about the vertical length of braces when they are opened and closed across different lines.
  • Another participant questions what is meant by 'size' and suggests using the \vphantom command to help align braces vertically.
  • Some participants propose using manual sizing commands like \big, \bigg, \Big, etc., instead of \left and \right for better control over brace sizes.
  • There is a suggestion to break lines in long equations to improve readability and prevent overflow, with a note that this can be done using \\ or && for alignment.
  • One participant argues against changing font size, stating that it might reduce reading comfort, while another suggests experimenting with font size changes to see the effects.
  • A participant explains that font sizes in math mode are predefined in LaTeX and can be adjusted using specific commands like {\displaystyle}, {\textstyle}, etc.
  • There is a request for a specific command to set font size to 10 pt, and a suggestion to set the entire document to 10 pt in the document class declaration.
  • Another participant inquires about a simple command for splitting long equations in brackets, suggesting the use of \Bigg for this purpose.

Areas of Agreement / Disagreement

Participants express differing views on whether to change font size for multi-line equations, with some advocating for line breaks instead. The discussion remains unresolved regarding the best approach to manage the size and alignment of multi-line equations.

Contextual Notes

There are limitations regarding the assumptions about readability and comfort when changing font sizes, as well as the dependence on LaTeX's predefined math mode font sizes. The effectiveness of proposed solutions may vary based on specific use cases.

EngWiPy
Messages
1,361
Reaction score
61
Hello,

I have two questions:

1- How can I control the size of a multi-line equation?
2- In a multi-line equation, I always need to open a brace in one line and end it at another line. But the problem is by using the following code:
Code:
\begin{equation}
\begin{split}
X=&\left\{...\right.\\
& \left. ... \right\}
\end{split}
\end{equation}

the two braces are not always of the same vertical length. How to solve this problem?

Thanks in advance
 
Last edited by a moderator:
Physics news on Phys.org


In the first question, what do you mean by the 'size'?

For the second one: I haven't tested this, but you might try something like
Code:
\newcommand\twolines{3}{\ensuremath%
\begin{split}%
#1 = &\left\{\vphantom{#2}#1\right.\\%
       & \left. \vphantom{#1}#2 \right\}%
\end{split}%
}

and then use it like
Code:
\[ \twolines{X}{stuff on the first line}{stuff on the second line} \]

The trick lies of course in the use of \vphantom.

The quick-and-dirty way is to just make the brackets "by hand", so instead of \left and \right use \big, \bigg, \Big, etc.
 


CompuChip said:
The quick-and-dirty way is to just make the brackets "by hand", so instead of \left and \right use \big, \bigg, \Big, etc.

I've personally never ran into this problem, but if I did, that would be the approach I would take.

I will have to take a look at that phantom command though...
 


CompuChip said:
In the first question, what do you mean by the 'size'?

I mean the font size, because I have very long equations which takes much space in each page.
 


Why don't you make a line-break at some point so that the equation continues on the next line. This would preserve any unpleasant topography for the reader, and would assure that the equation doesn't overflow the page.

You can do this line break with a simple \\ wherever you want. Doing so, every part of your equation will be center aline. If you want to aline the equation specially, you can use && on each line.

Cheers
 


fatra2 said:
Why don't you make a line-break at some point so that the equation continues on the next line. This would preserve any unpleasant topography for the reader, and would assure that the equation doesn't overflow the page.

You can do this line break with a simple \\ wherever you want. Doing so, every part of your equation will be center aline. If you want to aline the equation specially, you can use && on each line.

Cheers

My equations are not single line, but multi-line equations, so I already did the line-break. But my request is: how to make these equations small enough to span a reasonable space on the page?
 


My remark is simple. If you have very long equations, and you change the font size, the reader might lose reading comfort, due to their overfullness.

I firmly believe that you should leave the font the way they are, and just make line-break to make them comprehensible. You will gain in reading comfort, which is probably why you use LaTeX.

Cheers
 


fatra2 said:
My remark is simple. If you have very long equations, and you change the font size, the reader might lose reading comfort, due to their overfullness.

How do we know, if we don't try? Let us try it, and then we decide.
 


Ok,

Here it goes. The font size in math mode are predefined in LaTeX. Therefore, a simple \fontsize or \Large only gives you a warning. This is due to a misunderstanding between the command given and the actions to be taken by the compiler.

Once in math mode, you can change the font size with the
Code:
{\...style}
command. For example,
Code:
{\displaystyle }
will appear full size. There are similar commands \textstyle, \scriptstyle, and \scriptscriptstyle.

Cheers
 
  • #10


I want to make them of font size 10 pt, for example, how can I do that using the commands you presented?
 
  • #11


Hi there,

The easiest way to do so, is to put the whole document to 10pt. You can do so within the doucmet class declaration : \documentclass{10pt}{report/book/article/letter}, and there you go, your math mode will also be at 10pt.

Otherwise, you will have to look at the size that suits from the different styles mentioned before.

I am sorry that I cannot be anymore help. It's just that you are writing in LaTeX, meaning that you might have a different point of view than the compiler for the layout. I stick with my suggestion from before, that the compiler might not be so bad.

Cheers
 
  • #12


Dear David
Did you found any simple command in LaTex for your 2nd question regarding splitting of the long equation in the brackets? I have the same problem now. Beforehand thank you.
 
  • #13


Artemida said:
Dear David
Did you found any simple command in LaTex for your 2nd question regarding splitting of the long equation in the brackets? I have the same problem now. Beforehand thank you.

Just use the commands \Bigg(Your Equation ........................\Bigg). This is the simplest way to solve this issue.

Regards
 
  • #14


thank you
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 5 ·
Replies
5
Views
8K
Replies
5
Views
3K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
10
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
Replies
1
Views
2K
  • · Replies 11 ·
Replies
11
Views
9K