LaTeX forum ⇒ Math & ScienceEquations on two columns Topic is solved

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
User avatar
Cham
Posts: 936
Joined: Sat Apr 02, 2011 4:06 pm

Re: Equations on two columns

Postby Cham » Thu Jan 15, 2015 7:51 pm

Johannes_B wrote:But, one question i want you to ask yourself is: Why the hell am i the first one needing this? I think there is a much simpler thing going on, i.e. this is an xy-Problem. Wanting x but describing y.


Here's an example of what I currently have, for a typical page of the document I'm creating :
dbequs.jpg
dbequs.jpg (60.53 KiB) Viewed 3698 times


I'm using the align environment for these equations.

The equations distribution on that page is not elegant. If find the global result ugly!

Take note : the second line of equations (1.7.96) isn't pushed to the left by their equ. number, since I'm using a macro to force the equations to stay on their place, even if there's a large number to the right.

So if we forget the solutions that you gave above, what would you do in this case ?

Tags:

User avatar
Johannes_B
Site Moderator
Posts: 4166
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Thu Jan 15, 2015 8:48 pm

Mathtools provides the option showonlyrefs. I guess that would make your document a bit cleaner since i cannot imagine you are referring to all those equations in your document.
On the other hand, my mathematical background is a bit dusty and and my french quite as rusty. I really cannot judge or give any advice here for this short part.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

User avatar
Cham
Posts: 936
Joined: Sat Apr 02, 2011 4:06 pm

Postby Cham » Thu Jan 15, 2015 8:53 pm

Johannes_B wrote:Mathtools provides the option showonlyrefs. I guess that would make your document a bit cleaner since i cannot imagine you are referring to all those equations in your document.
On the other hand, my mathematical background is a bit dusty and and my french quite as rusty. I really cannot judge or give any advice here for this short part.


The French part isn't relevant. What is the showonlyrefs option ?

EDIT : Ah ! Ok, that option could be usefull ! Thanks !

http://tex.stackexchange.com/questions/ ... n-the-text


But then the original problem is still the same : double equations on same line are not well balanced across the page. What would be the best way to achieve a beautifull page, if there are several double equations lines ?

User avatar
Cham
Posts: 936
Joined: Sat Apr 02, 2011 4:06 pm

Postby Cham » Sat Jan 17, 2015 6:07 pm

I just found that the first solution doesn't allow removing the equation number. Using dblequation* gives many errors, and adding \nonumber gives an error too.

The second solution doesn't fix that. Adding * still gives compilation errors, and adding \nonumber doesn't change anything (the equ. number is still there). So what are the advantages of the second solution ? (labels are working with the first solution).

So my question to the problem shown above is still the same : What would you do if you have several double-equations showing on the same page, like on the picture above ? (see first picture on this page. French text is irrelevant here). Using the usual align environment frequently gives some ugly distributions of double equations.

User avatar
Johannes_B
Site Moderator
Posts: 4166
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Sat Jan 17, 2015 6:38 pm

To be quite honest, nothing.
I have no great experience in mathematical typesetting, with maths at all to be quite honest. I want to have one label/reference for each unique equation. Having to equations on one line is confusing for me.

You have seen that aligning the stuff (also vertically) is pretty complicated. You have to do it manually by trial and error.

What happens if a line is longer than .5\textwidth?

  1. \documentclass[12pt,letterpaper]{book}
  2. \usepackage[T1]{fontenc}
  3. \usepackage{mathtools}
  4. \usepackage{showframe}
  5. \usepackage{tabularx}
  6. \usepackage[total={6in,10in},left=1.5in,top=0.5in,includehead,includefoot]{geometry}
  7.  
  8. \begin{document}
  9. \begin{equation}
  10. \begin{array}{c@{\hspace{8em}}c}
  11. x = y^2 - c + d + z^3,
  12. & z = x^3 + x - y^2.
  13. \end{array}
  14. \end{equation}
  15. Just another small line of text :
  16. \begin{equation}
  17. \begin{array}{c@{\hspace{8em}}c}
  18. x -5 y + 3 = y^2,
  19. & y^2 = -\: x^2 + 4 - y^2 - x.
  20. \end{array}
  21. \end{equation}
  22. Yet another line :
  23. \begin{equation}
  24. \begin{array}{c@{\hspace{8em}}c}
  25. A + B + E = b,
  26. & B - C = 0.
  27. \end{array}
  28. \end{equation}
  29. The global distribution of these equations is ugly !
  30. \end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

User avatar
Cham
Posts: 936
Joined: Sat Apr 02, 2011 4:06 pm

Postby Cham » Sat Jan 17, 2015 7:38 pm

Johannes_B wrote:
What happens if a line is longer than .5\textwidth?


Sorry, I don't understand this.

And from your last code above, the equations are still not centered at all.
I must admit I still don't understand well the array environment.

Of course, if the equations are too long, I wouldn't present them as a double equations line.
I'll stack them one on top of the other, using the gather or the align environment.

However, if the equations are small enough (like the equations shown on the picture above), it's frequently very convenient to present them on the same line. Especially to save some space.

So what you suggest is to "hack" the spacings, using all sorts of tricks like the usual commands \;, \quad, \hspace{} etc, until the equations appear to be well balanced after compilation ?

User avatar
Stefan Kottwitz
Site Admin
Posts: 9586
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Sat Jan 17, 2015 7:59 pm

The solution is nice. I firstly though of using multicolumn or a tabular environment and putting the equations in columns, with a dedicated environment for it.

Just a personal opinion, I don't try to save space. Compressed texts are hard to read. I use space so text can easier be read or quickly be scanned with the eyes, such as when you search some equation.

If an institution would require a limited number of pages, I would rather reduce the content to focus on the most important things than explaining in too detailed steps. I guess a page limit is intended as a content limit and doesn't aim at authors compressing their texts.

Today we often produce PDF files. White space doesn't cost something then. :-) Easier reading on small displays is good, and more pages are not bad, just larger file size might be, but whitespace doesn't have such impact.

Stefan
LaTeX.org admin

User avatar
Cham
Posts: 936
Joined: Sat Apr 02, 2011 4:06 pm

Postby Cham » Sat Jan 17, 2015 8:05 pm

Stefan_K wrote:The solution is nice. I firstly though of using multicolumn or a tabular environment and putting the equations in columns, with a dedicated environment for it.

Just a personal opinion, I don't try to save space. Compressed texts are hard to read. I use space so text can easier be read or quickly be scanned with the eyes, such as when you search some equation.


Thanks for the reply, Stefan.

So two questions :

1. If you have (for any reason) to present several lines of double equations, what would you do (code wise) ? Just accept the ugly distribution ? Or try to fix it in some way ? If so how ? (ok, that is more than 2 questions !).

2. What exactly was your first though of using multicolumn or a tabular environment ?

User avatar
Johannes_B
Site Moderator
Posts: 4166
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Sat Jan 17, 2015 8:23 pm

There was an alternative solution in chat yesterday posted between the two of egreg. It was using a tabular approach as well.

Above i meant to ask what happens if an equation is longer than half of the line. I am a bit in a hurry today, sorry.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

User avatar
Cham
Posts: 936
Joined: Sat Apr 02, 2011 4:06 pm

Postby Cham » Sat Jan 17, 2015 8:51 pm

Johannes_B wrote:There was an alternative solution in chat yesterday posted between the two of egreg. It was using a tabular approach as well.


I can't see it, in that very long discussion. Can you paste the code here ?

By the way, I'm very suprised that there is no special LaTeX package that could do what I need.
Or maybe is there one ?


Return to “Math & Science”

Who is online

Users browsing this forum: No registered users and 3 guests