Thank you.
Code: Select all
\makeatletter
\newenvironment{tablehere}
{\def\@captype{table}}
{}
\newenvironment{figurehere}
{\def\@captype{figure}}
{}
\makeatother
Code: Select all
\makeatletter
\newenvironment{tablehere}
{\def\@captype{table}}
{}
\newenvironment{figurehere}
{\def\@captype{figure}}
{}
\makeatother
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
Code: Select all
\documentclass{article}
\usepackage{multicol}
\usepackage{lipsum}
\makeatletter
\newenvironment{tablehere}
{\def\@captype{table}}
{}
\newenvironment{figurehere}
{\def\@captype{figure}}
{}
\makeatother
\begin{document}
\begin{multicols}{2}
\section{foobar}
\lipsum[1]
\begin{figurehere}
foo
\caption{foo}\label{tab:foo}
\end{figurehere}
\lipsum[1]
\begin{figurehere}
bar
\caption{bar}
\label{tab:bar}
\end{figurehere}
See figures~\ref{tab:foo} and~\ref{tab:bar}.
\lipsum[2]
\end{multicols}
\end{document}
Code: Select all
\documentclass[10pt]{article}
\usepackage[pdftex]{graphicx}
\usepackage{multicol}
\makeatletter
\newenvironment{tablehere}
{\def\@captype{table}}
{}
\newenvironment{figurehere}
{\def\@captype{figure}}
{}
\makeatother
\begin{document}
\section{A section}
\begin{figurehere}
\begin{center}
\includegraphics[width=0.45\textwidth]{./myfigure} \\ %[1cm]
\end{center}
\label{RL4}
\caption{An incorrectly labeled image, i.e. Figure 6.}
\end{figurehere}
A reference, \ref{RL4}, corresponding to the section number i.e. 4.1.
\begin{figurehere}
\begin{center}
\includegraphics[width=0.45\textwidth]{./my2ndfigure} \\ %[1cm]
\end{center}
\label{RL4}
\caption{Another incorrectly labeled image, i.e. Figure 7.}
\end{figurehere}
A reference, \ref{RL4}, corresponding to the section number i.e. 4.1.
\end{document}
\label
after \caption
. The \caption
command is the one that actually steps the underlying counter.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