1

I'm new to LaTeX and I'm getting a bit annoyed at the way stuff is just shoved where ever LaTeX feels like sticking it. I'm also enamoured with some of the other things the programme has done, so I'm not running off yet.

I'm curious though how others work with this - do people find that they spend a lot of time at the end arranging things that LaTeX has got wrong or do people just accept it?

I've read that it's a different way of working, and that LaTeX knows best. But some of the things that It's chosen to do are (in my opinion) objectively wrong.

  • Splitting an itemized list across a page - surely that's not done?

  • Having images a chapter after the section they're relevant to - must be wrong (though hard for an algorithm to catch)

I'm curious how others work with this, I'm currently working on something that has a lot of images, I have many screen-shots to display how to make a table in Access (woo!) and the whole thing is rather tricky.

Cheers all.

Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036
baxx
  • 709
  • 2
    (1) You can avoid splitting of a list across a page boundary and yes, this is done; (2) Having "images a chapter after the section they're relevant to" means you're doing something wrong. In answer to your general question: There are some things that is left for end-of-production, yes. In the meantime, you leave those things to the end. – Werner Dec 21 '14 at 03:50
  • what does “a chapter after the section...” mean? latex is designed to defer a figure to the end of the chapter if it can’t immediately find somewhere for it. (specifically, it defers until after the next \clearpage; \chapter includes one of those...) – wasteofspace Dec 21 '14 at 08:34
  • 1
    Using the placeins package you can force figures into the same section. – Juri Robl Dec 21 '14 at 08:45
  • 2
    Let me ask: Do you tend to inserts lots of [h] location specifiers when creating figure and table environments? For an in-depth explanation of how LaTeX places such environments, see the posting How to influence the position of float environments like figure and table in LaTeX? – Mico Dec 21 '14 at 08:50
  • @Werner - didn't realise this wasn't meta cheers... "means you're doing something wrong" -> I'm not sure what this would be ? thanks! – baxx Dec 21 '14 at 13:08
  • @wasteofspace sorry I was vague - I meant that things appear a chapter later, so chapter 2 I have info and images, but the images appear in chapter 3. That's what I meant – baxx Dec 21 '14 at 13:09
  • @JuriRobl thanks for the suggestion, I'll have a look – baxx Dec 21 '14 at 13:10
  • @Mico I don't think so no - I was going to but I read about how using [h] on things was considered pretty bad form. That post you linked seems to have a lot of good stuff, I need a tea first though :) I'm still curious as to whether others 'accept LaTeX knows best' with this kind of thing or if that's just something I've got a wrong impression of from things I've read. cheers – baxx Dec 21 '14 at 13:13
  • I don't think many people would go as far as claim that "LaTeX always knows best". (I certainly don't...) In the end, the optimal placement of floats will always also depend on matters such as the sheer number of floats, the floats' sizes relative to the size of the pageblock, the logical connections between the floats, various features of the document (eg, frequent or infrequent sectioning headers), and (last but not least) the importance of keeping the floats close to where they're mentioned in the text. You haven't told us much about how these criteria apply in your document, right? – Mico Dec 21 '14 at 13:25
  • "and (last but not least) the importance of keeping the floats close to where they're mentioned in the text" I think this is something that I was unsure about, it seems logical to have them close but I was unsure whether people just let them lie wherever then referenced them or something. Cheers though – baxx Dec 21 '14 at 13:30
  • 5
    In most document classes floats will not float past a chapter end so if they are doing so for you then probably you are doing something wrong but if you don't show any code it is hard to guess. – David Carlisle Dec 21 '14 at 14:33
  • @DavidCarlisle fair, codes atrocious so I guess I'll end up hacking it together with page breaks \newpage \clearpage and whatever else I can find :/ – baxx Dec 21 '14 at 15:01
  • 1
    frank mittelbach reformulated the material in the post cited by @Mico for tugboat. the article will be accessible electronically only to tug members until late next year, 2015, so i'm linking the contents for that issue, 35:3; the article begins on p.248. – barbara beeton Dec 21 '14 at 15:50
  • @barbarabeeton - hopefully that's helpful for others stumbling across this post – baxx Dec 21 '14 at 15:57
  • 1
    @user3130747 -- i apologize that it's not helpful for you, but tug does need to provide some incentive for people to join. while just about everything that tug does is accomplished by volunteers, there are some real expenses, as well as funding for development projects, that require income from membership dues or contributions, and one year of privileged access to tugboat is the principal incentive. – barbara beeton Dec 21 '14 at 16:08
  • @barbarabeeton I'm sure it's ace - I'd never heard of it so I'm sure others may not have either and hopefully they have the budget to sub to it. I didn't intend for that comment to come across as disingenuous sorry about that, probably my wallet talking :( – baxx Dec 21 '14 at 16:14
  • 1
    @user3130747 -- if you've never heard of tugboat, you might want to take a look at issues more than a year old -- everything older is freely accessible on the tugboat web site. if you see an answer on this site from someone with a "real name", you might look to see if their name is in the author list. similarly the individuals who have been interviewed for tex.sx. quite a few are. (and as for "pocketbook issues", most of us were "starving students" at some time or other. no problem.) – barbara beeton Dec 21 '14 at 16:25

1 Answers1

9

To address your questions in order:

  1. LaTeX has a formal algorithm for how it handles floats. It cannot, for example, fit a figure where there is no space. You can alter the parameters which affect these calculations (see https://texfaq.org/FAQ-floats)
  2. Most people ignore the placement while developing the document, allowing LaTeX to put the figures where it wants for the moment, and only look at changing things once development of the text is complete. Never hard-wire the placement of a float too early in the timescale, as the Fates will ensure that you edit the text later, and invalidate what you have done :-)
  3. It's very common to split an itemised list over a page boundary, especially if it is long (I use a rule-of-thumb of five items). If it's very long, you probably can't avoid it taking more than one page anyway. I would be interested to know where you read that it wasn't done. What should be avoided is having the first item alone at the bottom of a right-hand page, or the last item alone at the top of a left-hand page (for double-sided work; any page in respect of single-sided).
  4. LaTeX will not place figures in a chapter after the one in which they they occur in the code, so I'm not clear what your question refers to. LaTeX will gather all figures together at the end of a chapter if it encounters an insoluble placement problem earlier in the chapter: this is a signal to you to fix the problem. If figures are being placed after the section in which they occur, move them earlier in the code.
  5. The specific problem of documentation, which has huge numbers of screenshots and very little text, is sometimes not solvable with the standard floating mechanism, which relies on their being a good chunk of breakable text between figures. In this case, use the float package, which has a placement parameter H which creates a non-floating figure. Don't use regular floats in combination with this, though, as it will break the floating mechanism and your figures will appear out of order. Probably better not to use floats at all for tech doc, but a properly-designed environment that keeps the image and the text together on the page.
David Carlisle
  • 757,742
Peter Flynn
  • 2,870