I started writing an article with graphics, but had to stop because getting everything in place was too time consuming, and later editing would make me have to re-edit all the code to be able to make it look nice.

I write and insert the graphics as I go along sometimes insert a bunch of graphics and write accordingly or add text later...

In any case my question is, am I doing something wrong? I've had to to this in Word because it was so time consuming that it was taking energy and time from the creative process.

I this a case of Word is better than LaTeX for this kind of stuff? While LaTeX is more a typographical editor?

Any suggestions of what I might be doing wrong on this process would be appreciated.

  • Welcome! Your question right now is not clear and too broad. LaTeX is not an editor at all. It is a format. You use an editor to write, usually, and there are many different editors to choose from. But that is independent of LaTeX itself. Beyond that, it is impossible to say if you are 'doing something wrong' because we don't know what you are doing. I don't understand what you mean about uploading things. Are you using an online compilation service? The truth is, there is probably no better or worse. It would take me much longer to include an image in a Word document than in a LaTeX one! – cfr Jul 3 '16 at 1:12
  • 1
    "I constantly have to put and take of \clearpage{}" Ah, then yes, you are doing something wrong, that is doubleplusungood. I have a feeling you need this: tex.stackexchange.com/questions/39017/…. Also what applies to tables applies also to figures – Au101 Jul 3 '16 at 1:29
  • 1
    Well in any case, you shouldn't be issuing \clearpage very often, generally you would not do it to control the placing of images and generally you would only issue it as a last resort when the document is entirely finished as a final, manual tweaking of the visual formatting to get things to look exactly how you want. The reason for this is because otherwise you end up doing what you're doing, having to change and move all the \clearpages every time you make a change. And then what if, 3 days later, you want to add something earlier in the document because you get a new idea? – Au101 Jul 3 '16 at 1:40
  • 1
    Even if you don't learn all about floats etc. always write the document first, then worry about tweaking things like widows and orphans, dodgy line and page breaks, that kind of thing – Au101 Jul 3 '16 at 1:41
  • 1
    Also, look for patterns in the problems you are having. When are you tempted to use \clearpage and why? Certainly you shouldn't use it in the document itself until the content is finalised. But you are likely using it behind the scenes anyway (or, at least, \newpage which is different). If you always want floats output before X where X is a certain type of document element, then you should configure your preamble to do that bit automatically. Of course, this might be irrelevant to you, but it is worth considering. E.g. sometimes people want floats cleared before \section etc. – cfr Jul 3 '16 at 1:54

Here's a way to think about the work-flow.

Let's invent a concept I'll call 'placement intelligence' (PI). PI is how intelligent a process, programme or person is when it comes to arranging things on pages in a document.

A word processor has very low PI. It will refuse to put something in too small a space, for example. Or it might be able to wrap text around something. But it will not try to figure out whether your image should go before the previous paragraph or after the next one or five pages later rather than here. It just slaps stuff where you say and, if it all spills over the place, it all spills over the place.

This may seem initially OK because you have very high PI. You are really good at figuring out where you want things to end up (even if you can't always persuade the software to put them there - we're talking design, not implementation).

The trouble is that if the stuff earlier changes, you have to revisit the placement to make sure it hasn't got screwed up because the word processor has too low a PI to make any serious effort to prevent this.

What about LaTeX? LaTeX has moderate PI. It is much more intelligent than the word processor. It can often tell it would be better if an image or table went a bit earlier or a bit later or, even, a lot later. At the same time, it is built on TeX which has a high but domain-specific PI. It is really good at working out when to break lines and, generally, pages of text.

However, LaTeX has much lower PI than you. Even TeX in its specialist domain has lower PI. Add images or tables and it gets trickier. This means that there are cases in which you have to intervene.

Manual intervention involves adding a one-off additional constraint which limits the degrees of freedom La(TeX has to exercise its PI. It says, e.g., 'whatever your other algorithms for placement say, this must (not) go here (there)!!' (There are interventions which are less forceful, but it is the most forceful which are generally used.)

Now the system must obey this additional constraint. So it has fewer and worse options (as far as the algorithms go). This is OK because it got it wrong in this case, so you have to impose this limitation.

But that's only true if the content of the document up to 'here (there)' is finalised. Otherwise, you don't know where 'this' would have ended up if LaTeX did its thing. So, in that case, you are forcing the system to consider fewer and worse options possibly for no benefit at all.

You can only tell if you need to intervene when the document content is finalised. At that point, you make changes one at a time going forwards. After any change, you recompile because what happens later may be changed by the intervention.

The goal is to intervene no more than necessary. This is a good idea because LaTeX has moderately high PI. If it had lower PI, it wouldn't be useful because it wouldn't make good choices anyway. If it had much higher PI, it wouldn't be needed, because it would make good choices all the time.

But it doesn't. It is in between. And that's why you get worse results if you intervene earlier than if you intervene only in the final stage.

For the record, this is the method I use to produce documents of 200-400 pages with lots of diagrams, pictures, tables etc. so don't say 'that's OK for a few pages but not a book'. It is of the greatest importance in a longer document. The longer the document, the greater the complexity, the more images, tables etc., the more crucial it is to wait until the content is finalised.

[I almost never intervene manually if I'm writing an article.]


Simply ignore figure placements until the text is complete. Use inline references to the figures, perhaps temporary ones, to help keep straight what figures relate to what text. Right now you are composing; polish and format later.

  • This doesn't really seem to be a proper answer - more a comment. In any case, it is a bad idea to use 'temporary' inline references. Why would you do that? – cfr Jul 3 '16 at 1:55
  • I'm no way close to 1,000s of images, but in any case as @nasser mentioned I prefear to learn as I go along, I think is the best way of learning, becuase unless you do so, how to know what you need to learn. I supose that is one of the things I wanted to say, I'm learning, I just want to make sure I'm using a good consistent method and get some pointers from the expert. a bit of brain picking. – maco1717 Jul 3 '16 at 1:56
  • @Nasser No. You make more work this way. However, once the content of a particular chapter or part is finalised, obviously you might tweak that before continuing if you prefer. – cfr Jul 3 '16 at 1:56
  • 1
    @maco1717 Because every manual tweak has a cost. It makes it that bit harder for TeX to get everything else right. It means it has to introduce more 'badness' somewhere to accommodate this constraint. When you later change the content, your constraint is still there even if you wouldn't have needed it or wanted it given the new results. So either you take all your existing manual interventions out or you add yet more, reducing TeX's degrees of freedom further. Generally, TeX does a good job. Early manual intervention prevents it doing as much of the work as it could later on. – cfr Jul 3 '16 at 2:00
  • 1
    @Au101 I agree. I was basically suggesting the same. But then you shouldn't be doing minor retweaking to the stuff you've settled at the end, as Nasser suggested. But perhaps that is not what was meant and I've misunderstood. Certainly, it is possible to do it part-by-part or chapter-by-chapter, for example. But the point is that you only tweak this once where this is any unit, for whatever units you divide it up into. If each \chapter does \clearpage, then you can safely tweak per chapter. Etc. – cfr Jul 3 '16 at 12:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.