General ⇒ How to insert word 'Table' or 'Figure' before Table no. in L
How to insert word 'Table' or 'Figure' before Table no. in L
When Latex generates List of Figures (LOF) or List of Tables (LOT), it just shows the number..like 2.1, 4.5 etc...I was wondering if there is a way to insert word 'Table' or 'Figure' before it ? ..like Table 2.1, Figure 4.5 etc
Any ideas ?
Thanks
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Re: How to insert word 'Table' or 'Figure' before Table no. in L
Best regards and welcome on Board
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
How to insert word 'Table' or 'Figure' before Table no. in L
Code: Select all
\documentclass{article}
\usepackage{tocloft}
\renewcommand{\cfttabpresnum}{TABLE }
\newlength{\mylen}
\settowidth{\mylen}{\cfttabpresnum\cfttabaftersnum}
\addtolength{\cfttabnumwidth}{\mylen}
\begin{document}
\listoftables
\begin{table}[!ht]
\centering
\fbox{Test table}
\caption{The first table}
\end{table}
\begin{table}[!ht]
\centering
\fbox{Test table}
\caption{The second table}
\end{table}
\begin{table}[!ht]
\centering
\fbox{Test table}
\caption{The third table}
\end{table}
\end{document}
Re: How to insert word 'Table' or 'Figure' before Table no. in L
Thank you for reply. I do understand that it makes no sense but this is the comment that I have received on my thesis from thesis editor. It has been mentioned that they will accept the thesis without incorporating this comment if it is generated by latex file. But I was just wondering if it is at all possible.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Re: How to insert word 'Table' or 'Figure' before Table no. in L
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10