ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Bug in \placefigure[right]?
@ 2014-01-13 11:22 Mari Voipio
  2014-01-13 11:27 ` Wolfgang Schuster
  0 siblings, 1 reply; 4+ messages in thread
From: Mari Voipio @ 2014-01-13 11:22 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 1702 bytes --]

Hello!

For a while I've been baffled by a weird bug where sometimes I get
overset text when using \placefigure[right]. The problem appeared
sometime this autumn in places where everything has worked before.

This far I've (reluctantly) worked my way around the bug by using hard
line breaks where needed, but the current project has so many of those
spots that a more flexible solution would be nice.

On the other hand, just because I have so many of them and some
appeared today, I realized that the problem can be related to {\tfx }
in the beginning of the line. Here's a minimal example:


============

\starttext

\placefigure
    [right][cow]
    {A cow}
    {\externalfigure[cow]}


{\tfx SET TIME/DATE} allows you to (re)set the instrument date and
time. Time is set by inputting a certain amount of digits. Possible
inputs are 4, 6, 8 and 12 digits. To set hours and minutes, input 4
digits. To set day of month and time input 6 digits. To set month, day
and time input 8 digits. To set year, month, day and time input 12
digits. In all cases seconds can be set by separating them with a dot.
The format can be seen below.

\input tufte



\stoptext

===============



I know it is not beautiful, but I'm doing something very specific
where this is needed. In a real pinch I can probably rewrite every
problem sentence to put the \tfx in the middle instead of the
beginning, but this still doesn't make the original problem go away.
(Although I may be the only one bothered by it...)


Mari

PS. Hmm... Same thing if I use {\sc blabla} so while I reallly should
switch to small caps, that is not the solution.

PS2. I just tried with \placefigure[left] and I get overset text with it, too.

[-- Attachment #2: right_bugi.pdf --]
[-- Type: application/pdf, Size: 19761 bytes --]

[-- Attachment #3: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bug in \placefigure[right]?
  2014-01-13 11:22 Bug in \placefigure[right]? Mari Voipio
@ 2014-01-13 11:27 ` Wolfgang Schuster
  2014-01-13 14:23   ` Mari Voipio
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Schuster @ 2014-01-13 11:27 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 13.01.2014 um 12:22 schrieb Mari Voipio <mari.voipio@iki.fi>:

> Hello!
> 
> For a while I've been baffled by a weird bug where sometimes I get
> overset text when using \placefigure[right]. The problem appeared
> sometime this autumn in places where everything has worked before.
> 
> This far I've (reluctantly) worked my way around the bug by using hard
> line breaks where needed, but the current project has so many of those
> spots that a more flexible solution would be nice.
> 
> On the other hand, just because I have so many of them and some
> appeared today, I realized that the problem can be related to {\tfx }
> in the beginning of the line. Here's a minimal example:
> 
> 
> ============
> 
> \starttext
> 
> \placefigure
>    [right][cow]
>    {A cow}
>    {\externalfigure[cow]}
> 
> 
> {\tfx SET TIME/DATE} allows you to (re)set the instrument date and
> time. Time is set by inputting a certain amount of digits. Possible
> inputs are 4, 6, 8 and 12 digits. To set hours and minutes, input 4
> digits. To set day of month and time input 6 digits. To set month, day
> and time input 8 digits. To set year, month, day and time input 12
> digits. In all cases seconds can be set by separating them with a dot.
> The format can be seen below.
> 
> \input tufte
> 
> 
> 
> \stoptext
> 
> ===============
> 
> 
> 
> I know it is not beautiful, but I'm doing something very specific
> where this is needed. In a real pinch I can probably rewrite every
> problem sentence to put the \tfx in the middle instead of the
> beginning, but this still doesn't make the original problem go away.
> (Although I may be the only one bothered by it…)

It’s a known problem when you have a font switch at the begin of a paragraph
and you can avoid it only when you force horizontal mode before you change
the font with

  \dontleavehmode{\tfx …} …

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bug in \placefigure[right]?
  2014-01-13 11:27 ` Wolfgang Schuster
@ 2014-01-13 14:23   ` Mari Voipio
  2014-01-13 14:47     ` Alan Braslau
  0 siblings, 1 reply; 4+ messages in thread
From: Mari Voipio @ 2014-01-13 14:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, Jan 13, 2014 at 1:27 PM, Wolfgang Schuster
<schuster.wolfgang@gmail.com> wrote:
>
> It’s a known problem when you have a font switch at the begin of a paragraph
> and you can avoid it only when you force horizontal mode before you change
> the font with
>
>   \dontleavehmode{\tfx …} …

Ah, I just haven't known what to look for, then. The magic formula
works and it is *much* better than hardcoding the line breaks. :-)


Thank you for your quick reply, Wolfgang!


Mari
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bug in \placefigure[right]?
  2014-01-13 14:23   ` Mari Voipio
@ 2014-01-13 14:47     ` Alan Braslau
  0 siblings, 0 replies; 4+ messages in thread
From: Alan Braslau @ 2014-01-13 14:47 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, 13 Jan 2014 16:23:24 +0200
Mari Voipio <mari.voipio@iki.fi> wrote:

> On Mon, Jan 13, 2014 at 1:27 PM, Wolfgang Schuster
> <schuster.wolfgang@gmail.com> wrote:
> >
> > It’s a known problem when you have a font switch at the begin of a
> > paragraph and you can avoid it only when you force horizontal mode
> > before you change the font with
> >
> >   \dontleavehmode{\tfx …} …
> 
> Ah, I just haven't known what to look for, then. The magic formula
> works and it is *much* better than hardcoding the line breaks. :-)

Wikified:

http://wiki.contextgarden.net/Font_Switching

Alan
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-01-13 14:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-13 11:22 Bug in \placefigure[right]? Mari Voipio
2014-01-13 11:27 ` Wolfgang Schuster
2014-01-13 14:23   ` Mari Voipio
2014-01-13 14:47     ` Alan Braslau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).