Take the 2-minute tour ×
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.

Is there a command one can use in XeLaTeX and the rest of the TeX family to completely prevent any overlapping from occurring? Perhaps it could break the compilation with an error to alert you? I have found so many times that once you start playing around with embedded pdf's or even lettrines and placing text in the margins that there are almost always something ending up on top of another element. I don't provide a MWE because this problem is too general to confine it to one small example.

Edit: Example of an overlap

Edit 2: Working on documents of over 2500 pages it would really be helpful to detect overlaps automatically without having to manually scan through the final product each time.

Edit3: It seems that the problem is that when you get a length for possible text to place by means of \ifdimless then when the actual text is placed it is sometimes stretched or shrunk to fit into the space available. Thus rendering the text textwidth which might be different from the value you have calculated previously.

share|improve this question
2  
Could you at least mention some specific commands or some packages that cause this? In some cases it is intentional (\marginnote for instance). Some boxes are also meant to allow overlaps, so that would be the expected behaviour in those cases. You mention Lettrines – I am not used to working with them, but they almost always need to be manually adjusted if you want a decent result. –  ienissei Jan 13 '12 at 10:23
1  
The question, as it stands now, is too vague to receive an answer: some examples are necessary. –  egreg Jan 13 '12 at 10:37
    
Thanks for your comments, but I really don't think the question is too vague. I'm asking whether there is a "general" command to detect overlaps of any kind, which will then alert you when it gets compiled, or prevent the overlap from occurring. I will build an MWE or two of specific problems I came across and add them to separate questions later. Working on documents of over 2500 pages it would really be helpful to detect overlaps without having to manually scan through the final product each time. –  McGafter Jan 13 '12 at 11:01
2  
If you have control over the building of the document, then I suspect you should be able to reduce all your problem overlaps to a fairly small number of cases, and solve each of those by creating special-purpose LaTeX command or environments that ensure you're free of overlaps. I'm sorry if that's a bit smoke-and-mirrors hand-wavey, but a more concrete answer would need a more concrete example. (La)TeX, IMO, is not an environment that "fixes all my problems" -- I have to do certain things to avoid them -- but the results repay the effort tenfold. –  Brent.Longborough Jan 13 '12 at 11:32
add comment

2 Answers

If you have control over the building of the document, then I suspect you should be able to reduce all your problem overlaps to a fairly small number of cases, and solve each of those by creating special-purpose LaTeX command or environments that ensure you're free of overlaps.

I'm sorry if that's a bit smoke-and-mirrors hand-wavey, but a more concrete answer would need a more concrete example. (La)TeX, IMO, is not an environment that "fixes all my problems" -- I have to do certain things to avoid them -- but the results repay the effort tenfold.

share|improve this answer
add comment
up vote 0 down vote accepted

It appears then after leaving this question open for ages, that NO there is no general command to view a list/log of overlaps and locations.

Something like this would definitely be helpful. Similar to the PreFlight check feature in many publishing programs before exporting PDF's.

share|improve this answer
add comment

Your Answer

 
discard

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

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