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 currently have at able whose row's height is set, so I can control it. This is what it looks like:

\begin{tabular}{ @{} p{1.60in} l @{} }
\hspace{-0.8in}\textbf{Fundacion Tecnologica Centroamericana} & \textbf{13/09/2012}\vspace{-0.06in} \\[0.3in]
\multicolumn{2}{ l }{\hspace{-0.8in}\textbf{Ciudad}\vspace{-0.07in}} \\
\multicolumn{2}{ l }{\hspace{-1.15in}\textbf{NIT}} \\
\end{tabular}

I used [] to set height. It works fine, but the row is of course taller than the text, this is what I want because as more text fills in I want it to go "up" in the cell, not push everything below it down.

So how do I tell it to vertically align bottom of the row for that row?

EDIT (Update):

Ok, this is what I have so far, I went with the tabularht from below. It works by allowing me to position absolutely everything, great! Problem is the part that I want is still filling downward, I need it to fill UP so that it stays where I put it at.

\begin{tikzpicture}[remember picture,overlay]
\node [anchor=south] at ( $ (current page.center) + (-1.5cm,3.15cm) $ )
{
    \begin{tabularht}{3cm}{ @{} b{2.35in} @{} }
        \textbf{Fundacion Tecnologica centroamericana} \\[0.05in]\hline
    \end{tabularht}
};
\end{tikzpicture}

\begin{tikzpicture}[remember picture,overlay]
\node [anchor=south] at ( $ (current page.center) + (3cm,3cm) $ )
{
    \begin{tabularht}{3cm}{ @{} l @{} }
        \textbf{13/09/2012}
    \end{tabularht}
};
\end{tikzpicture}

Here are the images to show you what I am doing:

enter image description here

enter image description here

See how it pushes down and overtop of the text below it. I need it to push up and keep at the nombre part. If for instance the nombre part is only two words and only needs the first line it should stay in line, but if it's 3 or 4 word's and pushes to a second line the other word's should push UP instead of down overtop of everything. Thanks for all the help.

share|improve this question
    
Although I'm not entirely clear on what you're after, it seems like using a "strut" would be better here. That is, instead of \\[0.3in], you might be interested in adding a zero-width rule of specific height to (say) the first cell in a particular row: \rule{0pt}{0.5in}. –  Werner Sep 13 '12 at 23:16
    
I've updated my answer with a new possible solution; it is something like that what you want? –  Gonzalo Medina Sep 15 '12 at 0:40

2 Answers 2

up vote 3 down vote accepted

I am not sure if I understand the question correctly. Perhaps what you want is that independently of the table contents, its bottom will always be in the same vertical position of the page. If this is the case, one possible solution would be to place the tabular material inside a TikZ \node placed at an absolute position on the page and using the proper anchor.

In the following example the tabular bottom will always be in the same vertical position (3cm above the y-coordinate of current page.center); the tabular was built using the tabularht package. If more rows are added, the bottom of the tabular will preserve its vertical position:

\documentclass{article}
\usepackage{tabularht}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}

\begin{tikzpicture}[remember picture,overlay]
\node [anchor=south] at ( $ (current page.center) + (0,3cm) $ )
{
\begin{tabularht}{3cm}{ @{} p{1.60in} l @{} }
\hspace{-0.8in}\textbf{Fundacion Tecnologica Centroamericana} & \textbf{13/09/2012}\vspace{-0.06in} \\[0.3in]
\multicolumn{2}{ l }{\hspace{-0.8in}\textbf{Ciudad}\vspace{-0.07in}} \\
\multicolumn{2}{ l }{\hspace{-1.15in}\textbf{NIT}} \\
\end{tabularht}
};
\end{tikzpicture}

\end{document}

After the edit to the original question, it seems that, after all. you can do without using tabular material; what you seem to need is some way to place elements at absolute positions of a page and in this case, you can use, for example, a simple TikZ approach (other packages would also perform the same task, but sice you are using TikZ already, I opted to use this approach); the key text width allows you to control the width of the node:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc}

\begin{document}

\begin{tikzpicture}[remember picture,overlay]
\node [anchor=south west,text width=2.35in,align=left] at ( $ (current page.center) + (-3cm,3.15cm) $ )
{
        \textbf{Fundaci\'on Tecnol\'ogica Centroamericana}
};
\node [anchor=south] at ( $ (current page.center) + (4cm,3.15cm) $ )
{
        \textbf{13/09/2012}
};
\node [anchor=south west] at ( $ (current page.center) + (-3cm,2.65cm) $ )
{
        \textbf{Ciudad}
};
\node [anchor=south west] at ( $ (current page.center) + (-3.5cm,2.15cm) $ )
{
        \textbf{1953012-9}
};
\draw ( $ (current page.center) + (-3.5cm,2.05cm) $ ) -- +(8cm,0);
\end{tikzpicture}

\end{document}

enter image description here

share|improve this answer

Probably you are referring to the cell with the p column. It is aligned with the first line to the next cell of the l column. You can change that by using b instead of p if package array is loaded.

\documentclass{article}
\usepackage{array}
\begin{document}
\bfseries
\begin{tabular}{p{1.6in}l}
  Fundacion Tecnologica Centroamericana &
  13/09/2012 \\
\end{tabular}
\par
\bigskip
\begin{tabular}{b{1.6in}l}
  Fundacion Tecnologica Centroamericana &
  13/09/2012 \\
\end{tabular}
\end{document}

Comparison p vs. b column

BTW, the \hspaces and \vspaces look quite odd. What's their purpose?

Update: Line added below:

\documentclass{article}
\usepackage{array}
\begin{document}
\bfseries
\begin{tabular}{b{1.6in}l}
  Fundacion Tecnologica Centroamericana &
  13/09/2012 \\
\hline
  Ciudad
\end{tabular}
\end{document}

Result with bottom line

share|improve this answer
    
The hspace and vspace are there to allow me to align the text right where it needs to be, as I am printing on top of another document and things need to line up perfectly. Now with this code it is aligning at the bottom, but as you can tell it's not at the bottom of the cell since the line is so far away from it: link –  jfreak53 Sep 14 '12 at 12:53
    
You have added the space yourself by \vspace and \\[...]. –  Heiko Oberdiek Sep 14 '12 at 13:48
    
Ok the vspace I don't really need since it's only .03in, I can make that up elsewhere. BUT, I have to have a max height on that cell. See the problem is if I remove the [..] then when the text there is multiline is shifts everything down below it, I can't have that. I need the cell to be big enough to hold two lines at all times, and when there's only one line of text it stays the same as when there's two lines. Basically when there are two lines it shifts up instead of shifting everything down below it. –  jfreak53 Sep 14 '12 at 13:54
1  
I have the suspicion that tabular is not the right tool for this positioning stuff. Consider environment picture (perhaps with package picture and overpic depending on the context). Also tikz could be used. –  Heiko Oberdiek Sep 14 '12 at 13:57

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.