Text wrapping/figures in latex

  • LaTeX
  • Thread starter lavster
  • Start date
  • Tags
    Latex Text
In summary, the package "wrapfig" does not like how the text is wrapped around the figure in the latex document. Any other suggestions?
  • #1
lavster
217
0
Can anyone tell me how i can wrap text around my figure in latex? I am trying to use the \usepackage{wrapfig} but it objects when i put this in. any idea why? any other suggestions?
thanks
 
Physics news on Phys.org
  • #2
lavster said:
Can anyone tell me how i can wrap text around my figure in latex? I am trying to use the \usepackage{wrapfig} but it objects when i put this in. any idea why? any other suggestions?
thanks
How does "it" "object"? It's a good idea whenever you are talking about problems with a computer program or computer language to be specific about those problems.

If the objection is ! LaTeX Error: File `wrapfig.sty' not found., that means you are working with an archaic, outdated version of LaTeX. Are you perchance on some Linux machine? The default version of LaTeX supplied with many Linux distros is outdated and nonstandard. You can download wrapfig.sty from www.ctan.org, but see this page first. Or you might want to toss that archaic beast in the trash and download a version of LaTeX that was built in this millennium.

If the objection is something different than the above you need to give us more info on the nature of the problem.
 
  • #3
im using windows and everything else seems to work except subfig.
I can't interpret the errors. It doesn't give any as such. It just doesn't run and says 0 pages 0 errors etc whereas its fine before i put it in and after i take it out
thanks
 
  • #4
How are we supposed to interpret your errors if you don't give us a clue as to what the errors are?
 
  • #5
Are you just looking at the messages in the console window? The .log file might have more information.

As D.H. said, if we can't see either your input (for a small example that doesn't work) or your output, this is just a guessing game.
 
  • #6
There are no errors apart from:

"GUI framwork cannot be initalised"

it just stops running. I didnt think that would help.
It stops at the \usepackage on the line above and then says that error. Then it says something about bibtex that it always says and then it says no pages and no errors
 
  • #7
is this what you mean:

\multlinetaggap=\skip45
\mathdisplay@stack=\toks19
LaTeX Info: Redefining \[ on input line 2666.
LaTeX Info: Redefining \] on input line 2667.
)
("C:\Program Files (x86)\miktex\tex\latex\amsfonts\amssymb.sty"
Package: amssymb 2009/06/22 v3.00

("C:\Program Files (x86)\miktex\tex\latex\amsfonts\amsfonts.sty"
Package: amsfonts 2009/06/22 v3.00 Basic AMSFonts support
\symAMSa=\mathgroup4
\symAMSb=\mathgroup5
LaTeX Font Info: Overwriting math alphabet `\mathfrak' in version `bold'
(Font) U/euf/m/n --> U/euf/b/n on input line 96.
))
("C:\Program Files (x86)\miktex\tex\latex\tools\array.sty"
Package: array 2008/09/09 v2.4c Tabular extension package (FMi)
\col@sep=\dimen114
\extrarowheight=\dimen115
\NC@list=\toks20
\extratabsurround=\skip46
\backup@length=\skip47
)
("C:\Program Files (x86)\miktex\tex\latex\multirow\bigdelim.sty")
("C:\Program Files (x86)\miktex\tex\latex\graphics\epsfig.sty"
Package: epsfig 1999/02/16 v1.7a (e)psfig emulation (SPQR)
\epsfxsize=\dimen116
\epsfysize=\dimen117
)
("C:\Program Files (x86)\miktex\tex\latex\ams\classes\amsthm.sty"
Package: amsthm 2004/08/06 v2.20
\thm@style=\toks21
\thm@bodyfont=\toks22
\thm@headfont=\toks23
\thm@notefont=\toks24
\thm@headpunct=\toks25
\thm@preskip=\skip48
\thm@postskip=\skip49
\thm@headsep=\skip50
\dth@everypar=\toks26
)
("C:\Program Files (x86)\miktex\tex\latex\graphics\color.sty"
Package: color 2005/11/14 v1.0j Standard LaTeX Color (DPC)

("C:\Program Files (x86)\miktex\tex\latex\00miktex\color.cfg"
File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
)
Package color Info: Driver file: pdftex.def on input line 130.
)
("C:\Program Files (x86)\miktex\tex\latex\multirow\multirow.sty"
\bigstrutjot=\dimen118
)
 
  • #8
That's the log file. Now find the error message. It's probably at or near the end of the file. We can't help you if you can't tell us what went wrong.
 
  • #9
Couldnt find input index file (path directory) nor (pathdirectory).idx
Usage: C:\program Files (x86)\miktex\miktex\bin\makeindex.exe [-ilqrcgLT] [-s sty] [-o ind] [-t log] [-p num] [idx0 idx1 ...]

is this it?
 
  • #10
infact. that comes up even when it does work. I have read through it all. there is no error message. it just doesn't run... and the entire log file is copy and pasted above
 
  • #11
lavster said:
There are no errors apart from:

"GUI framwork cannot be initalised"
I just checked my MikTeX installation on Windows, and the only place the that contains the string "GUI fram" is the MikTeX program itself.

I don't think this has anything to do with the wrapfig package. More likely you are trying to use a previewer or something and it doesn't like what is in your document.

This works OK for me. If it doesn't work for you, the problem must be with your TeX installation not with the package.

Code:
\documentclass{article}
\usepackage{wrapfig}
\begin{document}
blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah

\begin{wrapfigure}{l}{0pt}
\begin{minipage}{100pt}
this is the text that is wrapped around
this is the text that is wrapped around
\end{minipage}
\end{wrapfigure}
paragraph paragraph paragraph paragraph paragraph
paragraph paragraph paragraph paragraph paragraph
paragraph paragraph paragraph paragraph paragraph
paragraph paragraph paragraph paragraph paragraph
paragraph paragraph paragraph paragraph paragraph
paragraph paragraph paragraph paragraph paragraph
paragraph paragraph paragraph paragraph paragraph
paragraph paragraph paragraph paragraph paragraph

\end{document}
 
  • #12
I have problems with wrapping text about figure. As you can see from the attached image, the line above is formatted quite strangely. Is there any way to solve this braking of line?

my code of wrapping figure:
\begin{wrapfigure}{r}{0.5\textwidth}
\begin{center}
\includegraphics[width=0.4\textwidth]{blabla}
\end{center}
\caption{blabla }
\label{fig:pirmas}
\end{wrapfigure}

Used packages:
\usepackage[utf8]{inputenc}

\usepackage{geometry}
\geometry{a4paper}\usepackage{graphicx}

\usepackage[parfill]{parskip}

\usepackage{booktabs}
\usepackage{array}
\usepackage{paralist}
\usepackage{verbatim}
\usepackage{subfig} \usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
\lhead{}\chead{}\rhead{}
\lfoot{}\cfoot{\thepage}\rfoot{}

\usepackage{sectsty}
\allsectionsfont{\sffamily\mdseries\upshape}
\usepackage[nottoc,notlof,notlot]{tocbibind}
\usepackage[titles,subfigure]{tocloft}
\usepackage{textgreek}
\renewcommand{\cftsecfont}{\rmfamily\mdseries\upshape}
\renewcommand{\cftsecpagefont}{\rmfamily\mdseries\upshape}
\usepackage{mathtools}
\usepackage{wrapfig}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{dcolumn}
\usepackage{sidecap}
\usepackage[colorlinks]{hyperref}
\usepackage{color}
 

Attachments

  • Untitled.png
    Untitled.png
    5.3 KB · Views: 772
Last edited:

1. What is text wrapping in LaTeX?

Text wrapping in LaTeX refers to the process of automatically adjusting the placement of text around figures or tables in a document. This ensures that the document has a clean and organized appearance.

2. How do I wrap text around figures in LaTeX?

To wrap text around figures in LaTeX, you can use the wrapfigure package. This package provides the wrapfigure environment, which allows you to specify the placement of the figure and the text wrapping style.

3. Can I customize the text wrapping style in LaTeX?

Yes, you can customize the text wrapping style in LaTeX by using the wrapfig package. This package provides additional options for text wrapping, such as the ability to specify the number of lines to wrap, the distance between the figure and the text, and the alignment of the text with the figure.

4. How do I insert a figure in LaTeX?

To insert a figure in LaTeX, you can use the \includegraphics command. This command allows you to specify the path to the image file and other optional parameters, such as the width and height of the figure.

5. How do I control the placement of figures in LaTeX?

You can control the placement of figures in LaTeX by using the placement options. These options include h (here), t (top), b (bottom), p (page), and ! (override default placement). You can also use the float package to customize the placement of figures and tables in your document.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
234
  • MATLAB, Maple, Mathematica, LaTeX
Replies
12
Views
731
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
299
  • MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
787
  • MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
936
  • MATLAB, Maple, Mathematica, LaTeX
Replies
23
Views
2K
Back
Top