Graphics, Figures & TablesProblem with fig wrapping

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
BoudewijnD
Posts: 60
Joined: Wed Nov 18, 2009 4:18 pm

Problem with fig wrapping

Post by BoudewijnD »

Hi,

For my chemistry thesis I need to write a experimental wich contains all my compounds. The text how to make them should be wrapped around the figure.

The package warpfig works for one figure. At the second figure it fails. Can some one help me out. I already played with the space in front of the wrapped figure but i really need 2 empty lines.
See the pic of how i want it and in the zip file is my minimal working tex.

Cheers,
\BoudewijnD
Attachments
latex.zip
working file
(13.34 KiB) Downloaded 207 times
how i want it
how i want it
IMAG0060.jpg (124.5 KiB) Viewed 3554 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Problem with achemso in your example

Post by kaiserkarl13 »

I couldn't get your example to work without errors---you may have to specify version numbers for the achemso style (which, by the way, now exists as a class file, which I suggest you use).

I suspect there's something wrong with your file, which is why the second figure isn't working. If you get errors messages, don't ignore them---I've seen at least one person report a problem here that was solved by fixing the error messages they got instead of ignoring them.
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Problem with fig wrapping

Post by cgnieder »

Remove the newline commands (\\) and start the next paragraph as a real paragraph and it should work:

Code: Select all

[...] 133.7 (CH$_{arom}$), 137.7, 138.0 (Cq$_{arom}$), 167.7, 168.0 (C=O Phth). HRMS: \ce{C34H31NO5S + Na+} requires 588.18151, found 588.18115.


\begin{wrapfigure}[4]{l}{0.2\textwidth}
\includegraphics{cmp4.eps}
% cmp5.eps: 0x0 pixel, 2400dpi, 0.00x0.00 cm, bb=
\vspace{-10pt}
\end{wrapfigure}
\textbf{Benzyl 3,6-di-\textit{O}-benzyl-2-deoxy-2-phthalimido-$\beta$-\textsc{d}-glucopyranoside (4-OH-GluNPhth-OBn).} [...]
You also might consider using the siunitx package to type the amounts and other values with units like temperatures:

Code: Select all

\SI{0}{\celsius} instead of 0\degree C
(which was one point that gave me an error when I tried to compile your file)

Clemens
site moderator & package author
BoudewijnD
Posts: 60
Joined: Wed Nov 18, 2009 4:18 pm

Problem with fig wrapping

Post by BoudewijnD »

cgnieder wrote:Remove the newline commands (\\) and start the next paragraph as a real paragraph and it should work:

You also might consider using the siunitx package to type the amounts and other values with units like temperatures:

Code: Select all

\SI{0}{\celsius} instead of 0\degree C
(which was one point that gave me an error when I tried to compile your file)

Hey Clemens,

The first option worked indeed I have to make really new paragraphs. The only thing is that the first word doesn't start completely left, but with a tab.
Is there an option to fix this??

Thanx for the tip on siunitx i will look in to it. I really like your website, a complete review about chemistry and Latex.

\BoudewijnD
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Problem with fig wrapping

Post by cgnieder »

BoudewijnD wrote:The first option worked indeed I have to make really new paragraphs. The only thing is that the first word doesn't start completely left, but with a tab.
Is there an option to fix this??
That is because a new paragraph starts with an indent. You could start the paragraph with "\noindent" to suppress the indent. Or, if you're using KOMA classes like "scrartcl" you can use the document option "parskip" to change the behaviour for the whole document.
Compare this:

Code: Select all

\documentclass{scrartcl}
\usepackage{lipsum}
\begin{document}
\lipsum
\end{document}
with this:

Code: Select all

\documentclass[parskip=full]{scrartcl}
\usepackage{lipsum}
\begin{document}
\lipsum
\end{document}
BoudewijnD wrote:Thanx for the tip on siunitx i will look in to it. I really like your website, a complete review about chemistry and Latex.
Thanks. I hope to be able to fill it with more useful information in the future...

Clemens
site moderator & package author
Post Reply