9

In a two-column document, I would like some text to be positioned at the bottom right of the right column. The text is inside tabular and flushright. An MWE is:

\documentclass[twocolumn]{article}
\usepackage{lipsum}
\begin{document}

\lipsum[1-4]
\vfill
\begin{flushright}
  \begin{tabular}[b]{p{3cm} r}
    some text & 0
  \end{tabular}
\end{flushright}

\end{document}

However, there is some vertical space below (see image) which I would like to remove so the part "some text 0" fully aligns with the left column at the bottom.

I believe I would need to edit the spacing for both flushright and tabular in this instance but don't know how (other than just manually adding a negative space via \vspace{-1.5em}). Help appreciated!


EDIT: To explain why I use/need the tabular, here is working example less minimal but more similar to my needs. It already uses some of the answers below.

\documentclass[twocolumn]{article}
\usepackage{lipsum}
\usepackage[demo]{graphicx}
\usepackage{array}
\begin{document}

\lipsum[1-4]
\vspace*{\fill}

\noindent
\makebox[\linewidth][r]{
  \begin{tabular}[b]{ b{3cm} r@{}}
  some long, line-wrapped text &
\includegraphics[width=2cm]{img}
\end{tabular}
}

\end{document}

But there still seems to be some small space below the box.

MWE

0

2 Answers 2

6

enter image description here

\documentclass[twocolumn]{article}
\usepackage{lipsum}
\begin{document}

\lipsum[1-4]

\vspace*{\fill}


\noindent
\makebox[\linewidth][r]{some text \quad 0}



\end{document}

Note you want \vspace* not \vfill or the space would be discarded if the column break happened at that point.

4
  • My MWE might be a little too simplistic. Since I have longer (line-wrapped) text and an image in the tabular, I can't just replace it by {some text \quad 0}. Your solution does a great job, but if I place the tabular from above where you have {some text \quad 0} I still have a (small) space below. Could I remove this, too? Thanks!
    – Bernd
    Sep 6, 2013 at 13:47
  • you can replace the \noindent\makebox{} by \raggedleft text text ... ... or include a tabular at that point, the baselines may not quite line up with the first column as latex doesn't really try to do that. Sep 6, 2013 at 14:00
  • I'm sorry if I don't quite get it, but if I use tabular inside the makebox (since \raggedleft doesn't work with the combination of line-wrapped text and an image, see my update above) the bottom still does not match (though it's a lot better). Are you saying it just won't work?
    – Bernd
    Sep 6, 2013 at 14:19
  • ah well It's probably put by the depth of a g (you see the line rise up in my original one line example if you add a g. You could hide hide the depth of the box \raisebox{0pt}[0pt]{...} would do it but if the natural column break put a descender at the end of the first column you'd be wrong again, that could be fixed but would require opening up latex internals (perhaps at the weekend, not now:-) Sep 6, 2013 at 14:53
1

As soon as you box stuff, baselines tend to get messy (see How to keep a constant \baselineskip when using minipages (or \parboxes)?). You could do some manual jigging of the baseline if you have descenders (like in the example below, \smash{<stuff>} removed the vertical height/depth of <stuff>):

enter image description here

\documentclass[twocolumn]{article}
\usepackage{lipsum,graphicx}% http://ctan.org/pkg/{lipsum,graphicx}
\begin{document}

\lipsum[1-4]
\vspace*{\fill}

\noindent
\makebox[\linewidth][r]{%
  \parbox[b]{3cm}{some long, line-\smash{wrapped} text}\quad%
  \includegraphics[width=2cm]{example-image-a}%
}
\end{document}

Surely not ideal, but perhaps it'll work in your situation.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .