Graphics, Figures & Tables ⇒ 2 table questions: align caption & notes environment
2 table questions: align caption & notes environment
Hi,
I cannot figure out how to align the caption of a table. My caption is at the top and I am using tabularx package. I would like to align it to the left.
Also, what is the best way to put notes in a table? Is there an environment or package that is recommended to use?
thank you
I cannot figure out how to align the caption of a table. My caption is at the top and I am using tabularx package. I would like to align it to the left.
Also, what is the best way to put notes in a table? Is there an environment or package that is recommended to use?
thank you
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
2 table questions: align caption & notes environment
That's definitely a job for the caption package.PGScooter wrote:[...] I cannot figure out how to align the caption of a table. My caption is at the top and I am using tabularx package. I would like to align it to the left. [...]
Try the threeparttable package. Since the package has no manual, you have to look at the *.sty file itself to get a short description of the provided commands and environments.PGScooter wrote:[...] Also, what is the best way to put notes in a table? Is there an environment or package that is recommended to use? [...]
Best regards
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
2 table questions: align caption & notes environment
Hi,
if with notes you are thinking on table footnotes, my proposal is the minipage environment, it works fine. Try with:
Add these two packages
The second package let you define the symbols you are using in the footnotes using renewcommand like it is shown...
if with notes you are thinking on table footnotes, my proposal is the minipage environment, it works fine. Try with:
Code: Select all
\begin{table}[!ht]
\begin{minipage}{\textwidth}
\captionof{table}[TOC title]{\label{tab:my_table}My table with footnotes.}
\begin{center}
\resizebox{0.9\textwidth}{!} {
\begin{tabular}{|c|c|}
\hline
A\footnote[1]{Uppercase a.} & B\\
\hline
C & D\footnote[2]{Another footnote.}\\
\hline
\end{tabular}
}
\end{center}
\end{minipage}
\end{table}
Code: Select all
\usepackage{caption}
\usepackage{mpfnmark}
\renewcommand*{\thempfootnote}{\fnsymbol{mpfootnote}}
The boxhandler package may also work...localghost wrote:That's definitely a job for the caption package.
Re: 2 table questions: align caption & notes environment
great! thank you for the replies. It's nice to have a few different approaches to a problem.
thanks!
thanks!
2 table questions: align caption & notes environment
Hi,
I just need to also like to left-align a caption to a figure, and saw this:

Any suggestions on what could be used to achieve this?
Thanks....
I just need to also like to left-align a caption to a figure, and saw this:
So, I took a look at http://tug.ctan.org/tex-archive/macros/ ... on-eng.pdf, and the word "align" is mentioned only three times in it, here:localghost wrote:That's definitely a job for the caption package.PGScooter wrote:[...] I cannot figure out how to align the caption of a table. My caption is at the top and I am using tabularx package. I would like to align it to the left. [...]
That is - no mention of left alignment ... Just to make myself clear, what I'd like to do, is move the caption to where the arrows indicate:The command
\sidecaptionvpos{hfloat typei}{hposi}
sets the vertical position of the side-caption. hposi can be either ‘t’ (for top alignment), ‘b’ (for
bottom alignment), or ‘c’ (for center alignment).
Any suggestions on what could be used to achieve this?
Thanks....
- Attachments
-
- leftaligncaption.jpg (67.78 KiB) Viewed 27107 times
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
2 table questions: align caption & notes environment
Just give the option singlelinecheck=false to the caption package as described in the manual (Section 2.2 - Justification, p. 8f).
Best regards
Thorsten¹
Best regards
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
2 table questions: align caption & notes environment
Localghost,
Finally this is what worked for me (intended to show a figure inside a minipage, which cannot be done with figure):
Thanks again !!!
Thanks for the great advice - indeed, that is it.. Unfortunately the 'align' terminology sticks too much for me, so I missed the singlelinechecklocalghost wrote:Just give the option singlelinecheck=false to the caption package as described in the manual (Section 2.2 - Justification, p. 8f).

Code: Select all
\begin{raggedright}
\includegraphics[width=4.3957in,height=0.3957in]{myimage.jpg}
\captionsetup{singlelinecheck=off,justification=raggedright}
\captionof{figure}{\textit{Picture zero}}
\label{fig:piczero}
\end{raggedright}
Thanks again !!!

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
2 table questions: align caption & notes environment
This seems a little bit too complicated to me. I worked out another short example.
The graphics file inside should have the same width as the minipage environment. This can easily be done by specifying its width as the current line width.
This way you get a centred figure with a left aligned caption.
Code: Select all
\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{babel}
\usepackage[font=small,labelfont=bf,singlelinecheck=false]{caption}
\usepackage{lmodern}
\usepackage{blindtext}
\parindent0em
\begin{document}
\blindtext
\begin{figure}[!ht]
\centering
\begin{minipage}{0.5\textwidth} % Desired width of the figure
\rule{\linewidth}{0.5\linewidth} % To be replaced with graphics file
\caption{Dummy Figure}\label{fig:dummy}
\end{minipage}
\end{figure}
\blindtext
\end{document}
Code: Select all
\includegraphics[width=\linewidth]{graphicsfile}
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
2 table questions: align caption & notes environment
I'd like to suggest another simpler approach using the floatrow package:
Code: Select all
\documentclass{article}
\usepackage[font=small,labelfont=bf,singlelinecheck=false]{caption}
\usepackage{floatrow}
\begin{document}
\begin{figure}
\ffigbox[\FBwidth]
{\caption{Dummy figure}\label{fig:test}}
{\rule{7cm}{4cm}}%just to simulate an actual figure
\end{figure}
\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...