[texhax] Punctuation around inline diagrams

tom sgouros tomfool at as220.org
Sat Jul 5 04:50:07 CEST 2008


Andy Farnell <padawan12 at obiwannabe.co.uk> wrote:

> 
> 
> Sorry Axel, I put that rather badly. What I mean is, I'm after
> a general solution. It's at that stage (40+ chapters, 600 pages)
> where I can't (reasonably) go through looking for every instance
> of an object being too close to a line end. And if I make any edits
> it may change.
> 
> I guess what I want to say in TeX is:
> 
> IF we just processed an object image AND the next char is a [comma,
> period, colon or semicolon] AND it's at the end of a line
> 
> THEN temporarily make the penalty for putting the [comma,
> period, colon or semicolon] on a new line very high.

I don't have anything to add for a solution to this, but I think you
won't be able to code what you say as a TeX macro.  On the other hand, I
think all you want to do is to forbid space between your objects and any
punctuation marks that follow, which I think sounds more like a TeX-able
task, though really the way you do that is only by making sure that
there aren't any spaces hiding in your definition.

I don't know why this is happening, and wonder if there isn't a spurious
space in the \includegraphics definition that most of us don't notice
because we don't use ps files inline.  You might try just sticking the
whole definition in a box to contain any spurious spaces it might have
lurking in it.

At any rate, a working example that shows the problem is probably
essential to anyone giving you real help.  I, at least, can't reproduce
it from your description.

 -tom


> 
> 
> Is that sort of thing possible to specify as a rule with document 
> wide scope?
> 
> Cheers,
> 
> Andy
> 
> 
> 
> 
> On Sat, 5 Jul 2008 02:06:07 +0100
> Andy Farnell <padawan12 at obiwannabe.co.uk> wrote:
> 
> > 
> > 
> > Hi Axel, 
> > 
> > I understand. Thanks for the suggestion, in this case the problem is 
> > the comma or period that follows an inline object, which is not part
> > of the object. So I think I need another solution.
> > 
> > Thanks,
> > 
> > Andy
> > 
> > On Fri, 04 Jul 2008 19:18:43 -0500
> > "Axel E. Retif" <axel.retif at mac.com> wrote:
> > 
> > > Andy,
> > > 
> > > > Hi Axel,
> > > >
> > > > How would an \mbox help? I chose \raisebox because the
> > > > objects were a bit too low and I wanted to vertically
> > > > align them with the text.
> > > >
> > > > Cheers,
> > > >
> > > > Andy
> > > 
> > > No, not as a substitute of \raisebox in your macro, but in your text:  
> > > whatever you put inside a \mbox will not break across lines.
> > > 
> > > Best,
> > > 
> > > Axel
> > 
> > 
> > 
> > -- 
> > Use the source
> > _______________________________________________
> > TeX FAQ: http://www.tex.ac.uk/faq
> > Mailing list archives: http://tug.org/pipermail/texhax/
> > More links: http://tug.org/begin.html
> > 
> > Automated subscription management: http://tug.org/mailman/listinfo/texhax
> > Human mailing list managers: postmaster at tug.org
> 
> 
> -- 
> Use the source
> _______________________________________________
> TeX FAQ: http://www.tex.ac.uk/faq
> Mailing list archives: http://tug.org/pipermail/texhax/
> More links: http://tug.org/begin.html
> 
> Automated subscription management: http://tug.org/mailman/listinfo/texhax
> Human mailing list managers: postmaster at tug.org
> 


-- 
 ------------------------
 tomfool at as220 dot org
 http://sgouros.com  
 http://whatcheer.net


More information about the texhax mailing list