0

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.

maco1717
  • 101
  • 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 03 '16 at 01:12
  • @Nasser H isn't really recommended and is not standard, in any case. Better to use \captionof from caption or capt-of if you don't want a float. @ OP An MWE is a minimal working example - code for a minimal document which shows how you are including an image into your document and what problem you are having when you do so. – cfr Jul 03 '16 at 01:15
  • The problem could be that you are using floats and don't know how to control them or when not to use them. Or it could be that you are not using floats when you should. Or it could be something else altogether. Or not a problem but just lack of familiarity. (LaTeX has a much steeper learning curve than Word.) – cfr Jul 03 '16 at 01:15
  • @cfr thanks for the upload "pointer" I've edited that... Im using overleaf one image is alright, the problem is see is having a bunch of images and working the text around that, and viceversa, later looking at it and saying ok more text, and then the whole formating changes, I constantly have to put and take of \clearpage{} to be able to see what im expecting... one image is fine working with a lot of images with diferent sizes and formats from scratch, meaning im actually writing on "LaTeX" rather that having a "mockup" and then "importing" which is think id be much better... – maco1717 Jul 03 '16 at 01:25
  • 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: http://tex.stackexchange.com/questions/39017/how-to-influence-the-position-of-float-environments-like-figure-and-table-in-lat?lq=1. Also what applies to tables applies also to figures – Au101 Jul 03 '16 at 01:29
  • @cfr I think you are completely right on you last comment... is a problem of lack of familiarity and that I'm at the bottom of the learning curve, and yeah Word is essentially WYSIWYG, hence intuitive, the other is a compiled markup language... – maco1717 Jul 03 '16 at 01:32
  • Thanks @Au101 the first I had seen, but haven't read in details, the later ill have a look at. Thanks – maco1717 Jul 03 '16 at 01:34
  • 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 03 '16 at 01: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 03 '16 at 01: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 03 '16 at 01:54

2 Answers2

4

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.]

cfr
  • 198,882
1

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 03 '16 at 01: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 03 '16 at 01: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 03 '16 at 01: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 03 '16 at 02:00
  • @maco1717 It also means the human is doing tedious, fine grained work that TeX is there precisely to do for you. It likes it. You are the author. Also learning as you go is fine, positively great even, but manually doing the "visual formatting" as we call it, using hardcoded instructions, is an entirely different (and bad) thing – Au101 Jul 03 '16 at 02:04
  • @cfr the problem I see there is that imagine we are going back to restructure a previos chapter becuase we realize that maybe something that went after should/could come before, would this then make it a nightmare on having to manually tweak, untweak, retweak as like in my case im using LaTeX on the "creative process" aswell? going back and forworth editing? – maco1717 Jul 03 '16 at 02:05
  • @maco1717 Yes. That is why you shouldn't tweak while writing. Only tweak when the content is finalised. (Or, say, you have to prepare it to submit it to a journal or something. So it might change, but you need it finalised-for-now. Then undo your tweaks if you do end up revising later.) – cfr Jul 03 '16 at 02:37
  • @cfr would this be simillar to what nasser was mentioning, just add inserting graphics to tweaking??? you got the article, add the images, and tweak... ? – maco1717 Jul 03 '16 at 02:50
  • @maco1717 I don't think so. I think Nasser is claiming the opposite of the rest of us i.e. saying tweak-as-you-go and everyone else is saying only-tweak-at-the-end. – cfr Jul 03 '16 at 02:57
  • @cfr I think Nasser is making a very fair point that if you're writing a book with hundreds of figures, you may not want to do all of the tweaking at the end, it'd be a nightmare, and certainly that is a con if you let it become one. If it were me, I'd either make sure I used something like \FloatBarrier from placeins, the H option, \captionof from caption or whatever or I'd tweak on a chapter-by-chapter basis, which would save the mother of all tedious jobs at the end, without the problem of having to go back and retweak, only to find that new tweaks mess up older tweaks – Au101 Jul 03 '16 at 03:03
  • @cfr you are right i meant Una Smith on this "answer"... – maco1717 Jul 03 '16 at 03:04
  • 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 03 '16 at 12:02