2

I am struggling to create two column, full page table. For now I made the following code:

\documentclass{article}
\usepackage{booktabs}
\usepackage[margin=13mm,paper=a4paper]{geometry}
\usepackage{graphics}
\begin{document}

\begin{table}
  \centering
  \small
  \resizebox{\columnwidth}{!}{%
    \begin{tabular}{l c}
        \toprule
            y & y' \\
            \midrule
            as & well \\
            using & the \\
            as & well \\
            using & the \\
            as & well \\
            using & the \\
            as & well \\
            using & the \\
            as & well \\
            using & the \\
            as & well \\
            using & the \\
            as & well \\
            using & the \\
        \bottomrule
    \end{tabular}
  }
\end{table}
\end{document}

But it has awful big font for some reason and I'll need ~20 rows of small math expressions. I am latex newbie so probably something simple is missing.

This is the output: enter image description here

6
  • 1
    It's a very narrow table, which gets then resized to \columnwidth. What's the purpose of the \resizebox? Commented Aug 7, 2016 at 9:04
  • @HeikoOberdiek If I don't use resizebox it won't be full page table. I am trying to create my calculus cheatsheet. :/ With functions in first column and derivatives in second. Commented Aug 7, 2016 at 9:10
  • Scaling to the desired height instead of width might be an option. Commented Aug 7, 2016 at 9:14
  • 1
    Use tabularx to get a full page width table. Commented Aug 7, 2016 at 9:15
  • 2
    never use \resizebox{\columnwidth}{!}{% on tables, you could of course make it full width by putting lots of space between the columns but that just makes it harder to read, why not let the table be natural width but centred on the page. Commented Aug 7, 2016 at 9:56

1 Answer 1

4

There are several possible solutions here (discussed in the comments).

The first is

\documentclass{article}
\usepackage{booktabs}
\usepackage[margin=13mm,paper=a4paper]{geometry}
\usepackage{graphics}

\begin{document}
\begin{table}
  \centering
  \small
    \begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}l c}
        \toprule
            y & y' \\
            \midrule
            as & well \\
            using & the \\
            as & well \\
            using & the \\
            as & well \\
            using & the \\
            as & well \\
            using & the \\
            as & well \\
            using & the \\
            as & well \\
            using & the \\
            as & well \\
            using & the \\
        \bottomrule
    \end{tabular*}
\end{table}
\end{document}

which results in

enter image description here

The second is

\documentclass{article}
\usepackage{booktabs}
\usepackage[margin=13mm,paper=a4paper]{geometry}
\usepackage{graphics}

\begin{document}
\begin{table}
  \centering
  \small
    \begin{tabular}{l c}
        \toprule
            y & y' \\
            \midrule
            as & well \\
            using & the \\
            as & well \\
            using & the \\
            as & well \\
            using & the \\
            as & well \\
            using & the \\
            as & well \\
            using & the \\
            as & well \\
            using & the \\
            as & well \\
            using & the \\
        \bottomrule
    \end{tabular}
\end{table}
\end{document}

which results in

enter image description here

The third is

\documentclass{article}
\usepackage{booktabs}
\usepackage[margin=13mm,paper=a4paper]{geometry}
\usepackage{graphics}

\begin{document}
\begin{table}
  \centering
  \small
  \resizebox{!}{391pt}{
    \begin{tabular}{l c}
        \toprule
            y & y' \\
            \midrule
            as & well \\
            using & the \\
            as & well \\
            using & the \\
            as & well \\
            using & the \\
            as & well \\
            using & the \\
            as & well \\
            using & the \\
            as & well \\
            using & the \\
            as & well \\
            using & the \\
        \bottomrule
    \end{tabular}}
\end{table}
\end{document}

which results in

enter image description here

(It's hard to tell from the picture, but it fills up the whole page and doesn't overflow.)

The fourth is

\documentclass{article}
\usepackage{booktabs}
\usepackage[margin=13mm,paper=a4paper]{geometry}
\usepackage{graphics}
\usepackage{tabularx}
% ...

\begin{document}
\begin{table}
  \centering
  \small
    \begin{tabularx}{\textwidth}{ XXXXXXX }
            \toprule
            y & y' \\
            \midrule
            as & well \\
            using & the \\
            as & well \\
            using & the \\
            as & well \\
            using & the \\
            as & well \\
            using & the \\
            as & well \\
            using & the \\
            as & well \\
            using & the \\
            as & well \\
            using & the \\
        \bottomrule
    \end{tabularx}
\end{table}

\end{document}

Which gives

enter image description here

I may be incorrectly spacing the tabularx option, but even still, I personally think the third option is the best option.

Thanks to all the commenters (Fran, David Carlisle, Johannes_B, and Heiko Oberdiek) for their suggestions.

Finally, in light of your comments, I'm working on a solution to what you really want to create. So far, I have

\documentclass{article}
\usepackage{booktabs}
\usepackage[margin=13mm,paper=a4paper]{geometry}
\usepackage{graphics}
% ...

\begin{document}


\begin{table}
  \centering
  \small
  \resizebox{520pt}{320pt}{%
    \begin{tabular}{l l}
      Derivatives and Integrals \\
      \\
      \toprule
      Basic Differentiation Rules \\
      \midrule
      \\
      1. $\frac {d}{dx} [cu] = cu'$ & 2. $\frac{d}{dx} [u \pm v] = u' \pm 
      v'$ \\
      3. $\frac{d}{dx} [uv] = uv' + vu'$ & 4. $\frac{d}{dx} [\frac{u}{v}] 
      = \frac{vu' - uv'}{v^2}$ \\
      5. $\frac{d}{dx} [c] = 0$ & 6. $\frac{d}{dx} [u^n] = nu^{n-1} \quad 
      u'$ \\
      7. $\frac{d}{dx} [x] = 1$ & 8. $\frac{d}{dx} [\mid u \mid] = 
      \frac{u}{\mid u \mid} (u'), \quad u \neq 0$ \\
      9. $\frac{d}{dx} [ln \quad u] = \frac{u'}{u}$ & 10. $\frac{d}{dx} 
      [e^u] = e^u \quad u'$ \\
      11. $\frac{d}{dx} [sin \quad u] = (cos \quad u) u'$ & 12. $\frac{d}
      {dx} [cos \quad u] = -(sin \quad u) u'$ \\
      13. $\frac{d}{dx} [tan \quad u] = (sec^2 \quad u)u'$ & 14. 
      $\frac{d}{dx} [cot \quad u] = -(csc^2 \quad u) u'$ \\
      15. $\frac{d}{dx} [sec \quad u] = (sec \quad u \quad tan \quad u) 
      u'$ & 16. $\frac{d}{dx} [csc \quad u] = -(csc \quad u \quad cot 
      \quad u) u'$ \\
      17. $\frac{d}{dx} [arcsin \quad u] = \frac{u'}{\sqrt{-1 - u^2}}$ & 
      18. $\frac{d}{dx} [arccos \quad u] = \frac{-u'}{\sqrt{1-u^2}}$ \\
      19. $\frac{d}{dx} [arctan \quad u] = \frac{u'}{1 + u^2}$ & 20. 
      $\frac{d}{dx} [arccot \quad u] = \frac{-u'}{1 + u^2}$ \\
      21. $\frac{d}{dx} [arcsec \quad u] = \frac{u'}{\mid u \mid 
      \sqrt{u^2 - 1}}$ & 22. $\frac{d}{dx} [arcsec \quad u] = \frac{-u'}
      {\mid u \mid \sqrt{u^2 - 1}}$ \\
      \\
      Basic Integration Formulas \\
      \\
      1. $\int k \quad f(u) \quad d u = k \int f(u) \quad du$ & 2. $\int 
      \quad [f(u) \pm g (u)] \quad du = \int f(u) \quad du \pm \int g(u) 
      \quad du$ \\
      3. $\int  d u = u + C$ & 4. $\int u^n d u = \frac{u^{n+1}}{n + 1} + 
      C, \quad n \neq -1$ \\
      5. $\int \frac{d}{u} = ln \mid u \mid + C$ & 6. $\int e^u d u = e^u 
      + C$ \\
      7. $\int sin \quad u \quad du = -cos u + C$ & 8. $\int cos \quad u 
      \quad d u = sin \quad u + C$ \\
      9. $\int tan \quad u \quad du = -ln \mid cos \quad u \mid + C$ & 
      10. $\int cot \quad u \quad du = ln \mid sin \quad u \mid + C$ \\
      11. $\int sec \quad u \quad du = ln \mid sec \quad u + tan \quad du 
      \mid + C$ & 12. $\int csc \quad u \quad du = -ln \mid csc \quad u + 
      cot \quad u \mid + C$ \\
      13. $\int sec^2 u \quad du  = tan \quad u + C$ & 14. $\int csc^2 
      \quad u \quad du = -cot \quad u + C$ \\
      15. $\int sec \quad u \quad tan \quad u \quad du = sec \quad u + C$ 
      & 16. $\int csc \quad u \quad cot \quad du = -csc \quad u + C$ \\
      17. $\int \frac{du}{\sqrt{a^2 - u^2}} = arcsin \frac{u}{a} + C$ & 
      18. $\int \frac{du}{a^2 + u^2} = \frac{1}{a} arctan \frac{u}{a} + 
      C$ \\
      19. $\int \frac{du}{u \sqrt{u^2 - a^2}} = \frac{1}{a} arcsec 
      \frac{\mid u \mid}{a} + C$ \\
      \bottomrule
  \end{tabular}}
\end{table}

\end{document}

Which gives

enter image description here

I am working toward this:

enter image description here

Some of the lines aren't centered, and the resizing isn't perfect, but you can fiddle with the resizing. I'll try to figure out how to center the lines properly.

Hope this helps!

2
  • Your effort is greatly appreciated! Although I can't see it as complete? Should I first enter maybe all the data I have and then try to style it? I am trying to get something like this image.slidesharecdn.com/… Commented Aug 7, 2016 at 16:38
  • @DusanJ. I think I've made a result that's pretty close to what you want, all that's left is to center the lines. Tell me what you think, or if there's anything big I'm missing. Commented Aug 8, 2016 at 16:03

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.