# [texhax] checking if a piece of text stays on one line or more than one line

Vafa Khalighi vafaklg at gmail.com
Tue Oct 11 06:56:57 CEST 2011

```Can you please send a minimal example showing how this works because all my
attempts with your package so far failed.

On Mon, Oct 10, 2011 at 9:40 PM, Heiko Oberdiek <
heiko.oberdiek at googlemail.com> wrote:

> On Mon, Oct 10, 2011 at 08:34:22PM +1100, Vafa Khalighi wrote:
>
> > Suppose you create a macro similar to \mytextbf, is there a way that you
> can
> > check if the text inside \mytextbf will stay on one line or more than one
> > (if the text inside \textbf statys on just one line do something , but if
> > stays on more than one line do something else). I guess this is a bit
> tricky
> > because:
> >
> > 1) you could have shorter or longer lines
> >
> > 2) you might start using \textbf at the middle or realy end of a specific
> > line
> >
> > So is this checking doable?
>
> Project zref, package zref-savepos.
> It uses \pdfsavepos from pdfTeX/LuaTeX/XeTeX (works independent from mode).
>
> Yours sincerely
>  Heiko Oberdiek
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texhax/attachments/20111011/951ae46a/attachment-0001.html>
```

More information about the texhax mailing list