Vivek
Vivek

Reputation: 175

Fix Table Width

I'm trying to create my project report which needs me to write in a two column style on each page. I have a table on the last page whose width is a lot more than half the page width so I want to allow it to extend to the full page width. However, Latex overwrites on the extended part.

I tried a few things like using \begin{table*} instead of \begin{table} - but that makes the table go to the next page. (I don't like this because it's the last page of my report)

I also tried \includegraphics[width=0.8\linewidth], but that causes a compilation error.

Any ideas on this. Stuck for a while now.

Upvotes: 1

Views: 704

Answers (1)

I am not sure if I completely understand your problem. IMO, you have a documentclass that defines that your text is going to be in two columns format, something like this:

\documentclass[a4paper, 11pt, twocolumn]{report}

You have a bunch of text that is your report, in this two-column format and you need to insert a table that will only use one-column format. For me, that is achieved by adding the \onecolumn command before the \begin{table} command. When you finish with the table, you can use the \twocolumn command to return to your previous format.

However, using this approach I am giving you, it will move the table to the top of the next page, since AFAIK you cannot have \onecolumn and \twocolumn on the same page in Latex.

You can also use the float package to allow you to place the table where you want it with the h option in the table; something like this: `\begin{table}[ht]. However, this will not override what I wrote above, it will still begin in the next page if you are changing the columns' style.

For big tables, I know there is a package for working with them. I have not used it myself, but give it a try. Take a look at this post: https://tex.stackexchange.com/questions/136212/how-to-use-longtable-package.

Upvotes: 1

Related Questions