Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am quite new to LaTeX but I love its typographic clearness and I'm using it to create pdf for some geometric drawings, nothing involved with scientific writing.

Now I'm working with some Lissajous figures and I want some pages with a lot of Lissajous figures exploring different parameters. For drawing I'm using the TikZ package. I generate all .tex code with a Python script.

If you have better solutions than longtable please advice about them, I'm only a new user.

First of all I want automatic spacing: if I try to put 20 figures on one row the table exceeds the page and I have to manually change the [scale=0.2] parameter in \begin{tikzpicture}. This is quite annoying.

Then I want the table not to be centered but to fill all the page and I don't know how to do it. This screenshot explain better, i hope:

enter image description here

This is my TeX code (only what I think is the important part):

\documentclass{article}
\usepackage{tikz}
\usepackage{longtable}

\begin{document}
\begin{center}
    \bf{\Huge{ Lissajous figures \\ }}
\end{center}

\begin{longtable}{llllllllllllllllllll}
\begin{tikzpicture}[scale=0.2]
\draw (0.0,0.0) -- (0.32,0.32);
\draw (0.32,0.32) -- (0.61,0.61);
...
\draw (-0.61,-0.61) -- (-0.32,-0.32);
\draw (-0.32,-0.32) -- (0.0,0.0);
\end{tikzpicture}

&
\begin{tikzpicture}[scale=0.2]
\draw (0.0,0.16) -- (0.32,0.47);
\draw (0.32,0.47) -- (0.61,0.73);
...
\draw (-0.61,-0.47) -- (-0.32,-0.16);
\draw (-0.32,-0.16) -- (0.0,0.16);
\end{tikzpicture}



\\
\hfill
\end{longtable}

\end{document}
share|improve this question
2  
You are aware that longtable is for multi-page tables, not for very wide tables? You can scale something to a specific width using \resizebox{<width>}{!}{<content>}, but placing a longtable or any other multi-page element doesn't work here. Please clarify if you really need multi-page tables. –  Martin Scharrer Jul 15 '11 at 15:16
    
thank you! no i didn't know that. tabular could be a good alternative? –  nkint Jul 15 '11 at 15:25
1  
TikZ itself provides a \matrix command, so you could do everything inside TikZ. Otherwise use tabular. –  Martin Scharrer Jul 15 '11 at 15:28
    
Also, I'd suggest defining a macro like so:\def\tkzscl{0.2} and then replace each scale=0.2 by scale=tkzscl. That way, changing one thing will cause all the scales to change... –  Seamus Jul 15 '11 at 17:16
1  
@Seamus Would you try and suggest a real answer with sidewaystable? –  egreg Oct 2 '11 at 11:06
show 2 more comments

1 Answer

I don't know how you generated your diagrams, so I've replaced them with little blocks. I've used the rotating package to provide the sidewaystable environment which makes – surprise surprise – a sideways table!

The little blocks have their top left corner chopped off, so you can see that they are displaying sideways. sidewaystable will normally float to its own page.

\documentclass{article}
\usepackage{rotating}
\newcommand\block{\rule{2em}{1em}\llap{\rule{1em}{2em}}}
\begin{document}
\begin{sidewaystable}
  \caption{A sideways table of blocks}
  \begin{tabular}{*{20}{l}}
    \block & \block & \block & \block & \block & \block & \block & \block & \block & Ten    & \block & \block & \block & \block & \block & \block & \block & \block & \block & Twenty \\
    \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block \\
    \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block \\
    \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block \\
    \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block \\
    \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block \\
    \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block \\
    \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block \\
    \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block & \block
  \end{tabular}
\end{sidewaystable}
\end{document}

big picture

And here's a detail from the same file:

detail

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.