Graphics, Figures & Tables ⇒ Insert Figure Between Text
Insert Figure Between Text
\documentclass{article}
\usepackage{epsfig}
\renewcommand{\topfraction}{0.9}
\renewcommand{\bottomfraction}{0.8}
\setcounter{topnumber}{2}
\setcounter{bottomnumber}{2}
\setcounter{totalnumber}{2}
\renewcommand{\textfraction}{0.07}
\renewcommand{\floatpagefraction}{0.7}
Then, I have
Text, text, and more text
\centering
\begin{tabular}{ | l | l | l | p{5cm} |}
\hline
Day & Min Temp & Max Temp & Summary \\ \hline
Monday & 11C & 22C & A clear day with lots of sunshine.
However, the strong breeze will bring down the temperatures. \\ \hline
Tuesday & 9C & 19C & Cloudy with rain, across many northern regions. Clear spells
across most of Scotland and Northern Ireland,
but rain reaching the far northwest. \\ \hline
Wednesday & 10C & 21C & Rain will still linger for the morning.
Conditions will improve by early afternoon and continue
throughout the evening. \\
\hline
\end{tabular}
\caption{Weather Table}
\end{figure
Text, text, and still more text
I just took the table from some website so I could test all this out.
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
Insert Figure Between Text
Code: Select all
\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{babel}
\usepackage[font=small,labelfont=bf,tableposition=top]{caption}
\usepackage{booktabs}
\usepackage{textcomp}
\usepackage{lmodern}
\usepackage{blindtext}
%%% Do you know what this lines do? %%%
\renewcommand{\topfraction}{0.9}
\renewcommand{\bottomfraction}{0.8}
\setcounter{topnumber}{2}
\setcounter{bottomnumber}{2}
\setcounter{totalnumber}{2}
\renewcommand{\textfraction}{0.07}
\renewcommand{\floatpagefraction}{0.7}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\blindtext
\begin{table}[!ht]
\centering
\caption{Weather Table}\label{tab:weather}
\begin{tabular}{lllp{5cm}}\toprule
Day & Min Temp & Max Temp & Summary \\ \midrule[0.8pt]
Monday & 11\textcelsius & 22\textcelsius & A clear day with lots of sunshine. \\
\multicolumn{4}{l}{However, the strong breeze will bring down the temperatures.} \\ \midrule
Tuesday & 9\textcelsius & 19\textcelsius & Cloudy with rain, across many northern regions. Clear spells across most of Scotland and Northern Ireland, but rain reaching the far northwest. \\ \midrule
Wednesday & 10\textcelsius & 21\textcelsius & Rain will still linger for the morning. Conditions will improve by early afternoon and continue throughout the evening. \\ \bottomrule
\end{tabular}
\end{table}
\blindtext
\end{document}
Best regards and welcome to the board
Thorsten¹
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Insert Figure Between Text
What I'm trying to do is to make my text flow with my figures. I want to have text, followed by a figure, then more text. The problem is that the text is not breaking for the figure in the correct spot; my figure is not going where I tell it to go.
My first problem was trying to keep LaTeX from putting my tables at the end of the paper. Now I can't get the figure to go in the right spot in between the text. I want say something like "as shown in Figure 2 below," then have the figure, and then continue with the rest of my text.
I'm new to LaTeX and I'm not sure entirely what those commands do. I got them from this website here.
http://mintaka.sdsu.edu/GF/bibliog/latex/floats.html
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Insert Figure Between Text
[1] View topic: LaTeX Resources for Beginners
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Insert Figure Between Text
\usepackage{float}
\begin{figure}{H}
...
\end{figure}
More detailes on:
http://en.wikibooks.org/wiki/LaTeX/Floa ... d_Captions
Regards,
Olf
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Insert Figure Between Text
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Insert Figure Between Text
the default floating commands of LaTeX. You can find it http://www.ipipan.waw.pl/MGV/here.sty.
Best,
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Insert Figure Between Text
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10