Graphics, Figures & TablesTabular too big for page: Alternatives?

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Tronn
Posts: 3
Joined: Wed Jul 15, 2015 9:08 am

Tabular too big for page: Alternatives?

Post by Tronn »

Hello everyone,

I'm currently writing my Master thesis and I'm in the final stage before submitting it. There are still some formating issues of which a few are severe :-/ I'm almost completely new to LaTeX and only had to start using it to write my thesis because it contains a lot of calculations. For these, I used the tabular expression to align them. It looks like this:

Code: Select all

\newenvironment{derivation}
	{\vspace{8pt}\begin{tabular}[b]{p{0.3cm} p{0.2cm} p{15cm}}}
	{\end{tabular}\vspace{8pt}}

\newcommand{\derstart}[1]{\\ \\ (#1) &	$=$	&}
I call the environment like this:

Code: Select all

\begin{derivation}

  & & This is the first line\\
  \derstart{1} This is the second line
  \derstart{2} And this is the third one
  \derstart{3} Sometimes, lines will be quite long and they need to break, which, of course, should not be a complete break (for the row), but only for the 'cell'. This is why I added p's to the definition of the derivation-environment, so I could use \\. 
  \derstart{$\alpha$} The final line sometimes needs a different symbol so I can better refer to it

\end{derivation}
The output should be something like this (without borders):

Code: Select all

___ | _ | This is the first line
(1) |  =  | This is the second line
(2) |  =  | And this is the third one
(3) |  =  | Sometimes, lines will be quite long and they
_________ need to break, which, of course ...
(a) |  =  | The final line sometimes ...
It worked out quite well until the point where one calculation took more than one page. It went on over the footer and looked bad, of course.

Someone gave me the hint to use the enumeration environment instead, like this:

Code: Select all

\newenvironment{deri1} 
   {\begin{enumerate}[label={\arabic*~=}]} 
   {\end{enumerate}}
It looks neat, but I cannot change the label for specific lines.

Do you have a recommendation what I could do?

Thanks a lot in advance for your time!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Tabular too big for page: Alternatives?

Post by Johannes_B »

The someone is Ulrike Fischer and this is a crosspost to goLaTeX.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Tronn
Posts: 3
Joined: Wed Jul 15, 2015 9:08 am

Re: Tabular too big for page: Alternatives?

Post by Tronn »

This is true; sorry! Time is running out and I'm kind of stressed because I'm desperately trying to get the formating done until Friday :-/
Tronn
Posts: 3
Joined: Wed Jul 15, 2015 9:08 am

Tabular too big for page: Alternatives?

Post by Tronn »

Hi everyone,

My problem has been solved in the other forum. I can use it like this:

Definitions:

Code: Select all

\newenvironment{deri1} 
   {\begin{enumerate}} 
   {\end{enumerate}} 
\newcommand{\deristart}[1]{\ifthenelse{\equal{#1}{}}{\item[~]\relax}{\item[(#1)~=]\relax}}
Application:

Code: Select all

\begin{deri1}
	\deristart{} first line w/o anything, but indented correctly
	\deristart{1} second line
\end{deri1}
In case I want a manual line break followed by a square bracket, I have to use it like this:
\deristart{} this is a line \\ \relax [with a break and a square bracket], but it works!

Sorry again for the cross-post!
Post Reply