I'm trying to draw a simple line, and at the end of that line include a table. I would like to do it without having to compute myself the position where the table needs to be drawn. How can I do that?
many thanks
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityYou could use the wonderfully versatile and popular tikz
package; there are lots of way to do it, but one such method follows.
% arara: pdflatex
% !arara: indent: {overwrite: yes}
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\coordinate (a) at (0,0);
\node[minimum width=3cm] (b) at (1,0){\begin{tabular}{cc}1&2\\3&4\end{tabular}};
\draw (a)--(b);
\end{tikzpicture}
\end{document}
Without tikz
;) (for a change)
\documentclass{article}
\begin{document}
\noindent
\rule[0.6ex]{1in}{1pt}
\begin{tabular}{cc}
1&2\\
3&4
\end{tabular}
\end{document}
\usepackage{tikz}
is a die hard habit (which my brain refuses to delete) :)
tikz
:% arara: pdflatex \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \coordinate (a) at (0,0); \node[minimum width=3cm] (b) at (1,0){\begin{tabular}{cc}1&2\\3&4\end{tabular}}; \draw (a)--(b); \end{tikzpicture} \end{document}
;)
)