Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm trying to use knitr while learning LaTeX but all my figures are placed at a seemingly random place.

It's driving me insane. Any ideas?

Example Input

PDF Output

I tried reinstalling TeX Live and R but nothing changed

EDIT : Ok, I solved more or less the problem by wrapping all chunk in \begin{figure}[H] \end{figure}

LaTeX is complaining but it works

( R 2.15.2, Rstudio, Tex live )

share|improve this question
You need to give us some clues as to what the input looked like, and where the figure went (Preferably a complete small document that shows the problem). LaTeX figure placement is a deterministic algorithm, the placement of the figures depends on the input source. – David Carlisle Feb 10 at 17:04
I'll use one of the Knitr example to show it's not my fault :p Example Output – Darknight670 Feb 10 at 17:10
Welcome to TeX.SX. Usually, we don't put a greeting or a "thank you" in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Upvoting is the preferred way here to say "thank you" to users who helped you. – Claudio Fiandrino Feb 10 at 17:21
What version of knitr are you using? Also, it's good to give your OS in any question/bug report. – scottkosty Feb 10 at 22:49
Are you new to LaTeX? Do you know that figures will float by default? I'm not surprised by the output you saw. – Yihui Feb 11 at 3:00
show 2 more comments

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.