# Align content with the bottom of a table

My sense is that I am missing something basic, but here goes:

I have a \tabular object, and on the same line as it ends, I wish to put a \Box

If I create a dummy column to store the \Box then the table is not wide enough (I want the box at the end of the line)

If I use \hfill $\Box$ after the end of the table (if there is a manual newline after the table, else it vertically centers it on the right which is also not what I want) it left justifies as it is the only thing on the line. If I use test \hfill $\Box$ I get what I want (well, its really one line down too far, but thats OK) but with a pesky test at the beginning of the line (as an aside, this seems to be a common issue with me, so if there is a way to have a "dummy" (not visible, has no other impact on the document) character that would do as well).

How can I get what I am looking for?

-
The "dummy" object that you are looking for can be \mbox{} or \null. –  Gonzalo Medina Sep 6 '12 at 3:51
@GonzaloMedina this works and I will accept it, but I would prefer a cleaner way (and on the same line as the end of the table) –  soandos Sep 6 '12 at 3:58
I was not proposing using \mbox{} or \null as part of the solution; I was only mentioning that this is the standard "dummy" object you were asking for. –  Gonzalo Medina Sep 6 '12 at 4:05

Use the [b] optional argument for tabular:

\documentclass{article}
\usepackage{amssymb}

\begin{document}

\begin{tabular}[b]{|cc|}
text & text \\
text & text \\
text & text \\
\end{tabular}\hfill$\Box$

\end{document}


Using [t], the top line of the table is aligned with the baseline of the current external line of text; using [b], the bottom line of the table is aligned with the external baseline; with [c] (or with no positioning argument given), the table is centered on the external baseline.

-
For some reason it come it comes out vertically centered on my table (snag.gy/8VBNP.jpg for an example of what it looks like on my table) –  soandos Sep 6 '12 at 3:53
@soandos Did you use the [b] alignment specifier I used in my example for tabular? –  Gonzalo Medina Sep 6 '12 at 3:54
Worked perfectly, thanks. What does it do? –  soandos Sep 6 '12 at 3:59
@soandos [b] vertically aligns the table at the bottom, [t] aligns it at the top and [c] (default) at the center. –  Gonzalo Medina Sep 6 '12 at 4:03
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.815510094165802, "perplexity": 1310.3212806630117}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2014-10/segments/1393999674642/warc/CC-MAIN-20140305060754-00032-ip-10-183-142-35.ec2.internal.warc.gz"}