ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* text flowing around images
@ 2019-02-04 10:10 Henning Hraban Ramm
  2019-02-05 20:38 ` Henning Hraban Ramm
  0 siblings, 1 reply; 9+ messages in thread
From: Henning Hraban Ramm @ 2019-02-04 10:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Ahoi,

in my current project I must include a bunch of illustrations in my layout, and the text should flow around their irregular shapes (side placement in single text column only).
I got the pictures as TIFFs with alpha channel, but of course I can change that.

I’m quite sure I remember that it was possible to let text flow around shapes somehow, but I can’t find documentation or a sample.
I’d be thankful for hints.

Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: text flowing around images
  2019-02-04 10:10 text flowing around images Henning Hraban Ramm
@ 2019-02-05 20:38 ` Henning Hraban Ramm
  2019-02-05 20:48   ` Alan Braslau
  2019-02-05 20:51   ` Henri Menke
  0 siblings, 2 replies; 9+ messages in thread
From: Henning Hraban Ramm @ 2019-02-05 20:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users

No hints?

If it’s not possible, I must redo the whole layout in InDesign. I’d like to avoid that (footnotes!).

Best, Hraban

Am 2019-02-04 um 11:10 schrieb Henning Hraban Ramm <texml@fiee.net>:

> Ahoi,
> 
> in my current project I must include a bunch of illustrations in my layout, and the text should flow around their irregular shapes (side placement in single text column only).
> I got the pictures as TIFFs with alpha channel, but of course I can change that.
> 
> I’m quite sure I remember that it was possible to let text flow around shapes somehow, but I can’t find documentation or a sample.
> I’d be thankful for hints.
> 
> Greetlings, Hraban
> ---
> https://www.fiee.net
> http://wiki.contextgarden.net
> https://www.dreiviertelhaus.de
> GPG Key ID 1C9B22FD
> 
> ___________________________________________________________________________________
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: text flowing around images
  2019-02-05 20:38 ` Henning Hraban Ramm
@ 2019-02-05 20:48   ` Alan Braslau
  2019-02-05 20:52     ` Wolfgang Schuster
  2019-02-05 20:56     ` Alan Braslau
  2019-02-05 20:51   ` Henri Menke
  1 sibling, 2 replies; 9+ messages in thread
From: Alan Braslau @ 2019-02-05 20:48 UTC (permalink / raw)
  To: Henning Hraban Ramm; +Cc: mailing list for ConTeXt users

\parshape

On Tue, 5 Feb 2019 21:38:29 +0100
Henning Hraban Ramm <texml@fiee.net> wrote:

> No hints?
> 
> If it’s not possible, I must redo the whole layout in InDesign. I’d like to avoid that (footnotes!).
> 
> Best, Hraban
> 
> Am 2019-02-04 um 11:10 schrieb Henning Hraban Ramm <texml@fiee.net>:
> 
> > Ahoi,
> > 
> > in my current project I must include a bunch of illustrations in my layout, and the text should flow around their irregular shapes (side placement in single text column only).
> > I got the pictures as TIFFs with alpha channel, but of course I can change that.
> > 
> > I’m quite sure I remember that it was possible to let text flow around shapes somehow, but I can’t find documentation or a sample.
> > I’d be thankful for hints.
> > 
> > Greetlings, Hraban
> > ---
> > https://www.fiee.net
> > http://wiki.contextgarden.net
> > https://www.dreiviertelhaus.de
> > GPG Key ID 1C9B22FD
> > 
> > ___________________________________________________________________________________
> > 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://context.aanhet.net
> > archive  : https://bitbucket.org/phg/context-mirror/commits/
> > wiki     : http://contextgarden.net
> > ___________________________________________________________________________________  
> 
> ___________________________________________________________________________________
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: text flowing around images
  2019-02-05 20:38 ` Henning Hraban Ramm
  2019-02-05 20:48   ` Alan Braslau
@ 2019-02-05 20:51   ` Henri Menke
  1 sibling, 0 replies; 9+ messages in thread
From: Henri Menke @ 2019-02-05 20:51 UTC (permalink / raw)
  To: ntg-context

For LaTeX there is a tool called fig2sty which can take an XFig figure
and transform it into a LaTeX sty file.  Maybe you could adapt it to
ConTeXt.

https://www.ctan.org/pkg/fig2sty

On 6/02/19 9:38 AM, Henning Hraban Ramm wrote:
> No hints?
> 
> If it’s not possible, I must redo the whole layout in InDesign. I’d like to avoid that (footnotes!).
> 
> Best, Hraban
> 
> Am 2019-02-04 um 11:10 schrieb Henning Hraban Ramm <texml@fiee.net>:
> 
>> Ahoi,
>>
>> in my current project I must include a bunch of illustrations in my layout, and the text should flow around their irregular shapes (side placement in single text column only).
>> I got the pictures as TIFFs with alpha channel, but of course I can change that.
>>
>> I’m quite sure I remember that it was possible to let text flow around shapes somehow, but I can’t find documentation or a sample.
>> I’d be thankful for hints.
>>
>> Greetlings, Hraban
>> ---
>> https://www.fiee.net
>> http://wiki.contextgarden.net
>> https://www.dreiviertelhaus.de
>> GPG Key ID 1C9B22FD
>>
>> ___________________________________________________________________________________
>> 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://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> wiki     : http://contextgarden.net
>> ___________________________________________________________________________________
> 
> ___________________________________________________________________________________
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
> 

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: text flowing around images
  2019-02-05 20:48   ` Alan Braslau
@ 2019-02-05 20:52     ` Wolfgang Schuster
  2019-02-05 23:19       ` Aditya Mahajan
  2019-02-05 20:56     ` Alan Braslau
  1 sibling, 1 reply; 9+ messages in thread
From: Wolfgang Schuster @ 2019-02-05 20:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Alan Braslau

The metafun manual should have a few examples.

Wolfgang


Alan Braslau schrieb am 05.02.19 um 21:48:
> \parshape
>
> On Tue, 5 Feb 2019 21:38:29 +0100
> Henning Hraban Ramm <texml@fiee.net> wrote:
>
>> No hints?
>>
>> If it’s not possible, I must redo the whole layout in InDesign. I’d like to avoid that (footnotes!).
>>
>> Best, Hraban
>>
>> Am 2019-02-04 um 11:10 schrieb Henning Hraban Ramm <texml@fiee.net>:
>>
>>> Ahoi,
>>>
>>> in my current project I must include a bunch of illustrations in my layout, and the text should flow around their irregular shapes (side placement in single text column only).
>>> I got the pictures as TIFFs with alpha channel, but of course I can change that.
>>>
>>> I’m quite sure I remember that it was possible to let text flow around shapes somehow, but I can’t find documentation or a sample.
>>> I’d be thankful for hints.
>>>
>>> Greetlings, Hraban
>>> ---
>>> https://www.fiee.net
>>> http://wiki.contextgarden.net
>>> https://www.dreiviertelhaus.de
>>> GPG Key ID 1C9B22FD
>>>
>>> ___________________________________________________________________________________
>>> 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://context.aanhet.net
>>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>>> wiki     : http://contextgarden.net
>>> ___________________________________________________________________________________
>> ___________________________________________________________________________________
>> 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://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> wiki     : http://contextgarden.net
>> ___________________________________________________________________________________
> ___________________________________________________________________________________
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: text flowing around images
  2019-02-05 20:48   ` Alan Braslau
  2019-02-05 20:52     ` Wolfgang Schuster
@ 2019-02-05 20:56     ` Alan Braslau
  2019-02-05 21:02       ` Wolfgang Schuster
  1 sibling, 1 reply; 9+ messages in thread
From: Alan Braslau @ 2019-02-05 20:56 UTC (permalink / raw)
  To: Henning Hraban Ramm; +Cc: mailing list for ConTeXt users

p.101 of the TeXbook ...

On Tue, 5 Feb 2019 13:48:14 -0700
Alan Braslau <braslau.list@comcast.net> wrote:

> \parshape
> 
> On Tue, 5 Feb 2019 21:38:29 +0100
> Henning Hraban Ramm <texml@fiee.net> wrote:
> 
> > No hints?
> > 
> > If it’s not possible, I must redo the whole layout in InDesign. I’d like to avoid that (footnotes!).
> > 
> > Best, Hraban
> > 
> > Am 2019-02-04 um 11:10 schrieb Henning Hraban Ramm <texml@fiee.net>:
> > 
> > > Ahoi,
> > > 
> > > in my current project I must include a bunch of illustrations in my layout, and the text should flow around their irregular shapes (side placement in single text column only).
> > > I got the pictures as TIFFs with alpha channel, but of course I can change that.
> > > 
> > > I’m quite sure I remember that it was possible to let text flow around shapes somehow, but I can’t find documentation or a sample.
> > > I’d be thankful for hints.
> > > 
> > > Greetlings, Hraban
> > > ---
> > > https://www.fiee.net
> > > http://wiki.contextgarden.net
> > > https://www.dreiviertelhaus.de
> > > GPG Key ID 1C9B22FD
> > > 
> > > ___________________________________________________________________________________
> > > 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://context.aanhet.net
> > > archive  : https://bitbucket.org/phg/context-mirror/commits/
> > > wiki     : http://contextgarden.net
> > > ___________________________________________________________________________________  
> > 
> > ___________________________________________________________________________________
> > 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://context.aanhet.net
> > archive  : https://bitbucket.org/phg/context-mirror/commits/
> > wiki     : http://contextgarden.net
> > ___________________________________________________________________________________
> 
> ___________________________________________________________________________________
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: text flowing around images
  2019-02-05 20:56     ` Alan Braslau
@ 2019-02-05 21:02       ` Wolfgang Schuster
  0 siblings, 0 replies; 9+ messages in thread
From: Wolfgang Schuster @ 2019-02-05 21:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Alan Braslau

Alan Braslau schrieb am 05.02.19 um 21:56:
> p.101 of the TeXbook ...
or page 40 of Einführung in TeX: https://www.ruhr-uni-bochum.de/schwarz/TeX/

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: text flowing around images
  2019-02-05 20:52     ` Wolfgang Schuster
@ 2019-02-05 23:19       ` Aditya Mahajan
  2019-02-06  9:03         ` Henning Hraban Ramm
  0 siblings, 1 reply; 9+ messages in thread
From: Aditya Mahajan @ 2019-02-05 23:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

On Tue, 5 Feb 2019, Wolfgang Schuster wrote:

>>> Am 2019-02-04 um 11:10 schrieb Henning Hraban Ramm <texml@fiee.net>:
>>>
>>>> Ahoi,
>>>>
>>>> in my current project I must include a bunch of illustrations in my 
> layout, and the text should flow around their irregular shapes (side 
> placement in single text column only).
>>>> I got the pictures as TIFFs with alpha channel, but of course I can 
> change that.
>>>>
>>>> I’m quite sure I remember that it was possible to let text flow around 
> shapes somehow, but I can’t find documentation or a sample.
>>>> I’d be thankful for hints.
>>>>
> The metafun manual should have a few examples.
>
See https://tex.stackexchange.com/a/32308/323 which is based on an example 
in the metafun manual.

Aditya

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: text flowing around images
  2019-02-05 23:19       ` Aditya Mahajan
@ 2019-02-06  9:03         ` Henning Hraban Ramm
  0 siblings, 0 replies; 9+ messages in thread
From: Henning Hraban Ramm @ 2019-02-06  9:03 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 2019-02-06 um 00:19 schrieb Aditya Mahajan <adityam@umich.edu>:

> On Tue, 5 Feb 2019, Wolfgang Schuster wrote:
> 
>>>> Am 2019-02-04 um 11:10 schrieb Henning Hraban Ramm <texml@fiee.net>:
>>>> 
>>>>> Ahoi,
>>>>> 
>>>>> in my current project I must include a bunch of illustrations in my 
>> layout, and the text should flow around their irregular shapes (side placement in single text column only).
>>>>> I got the pictures as TIFFs with alpha channel, but of course I can 
>> change that.
>>>>> 
>>>>> I’m quite sure I remember that it was possible to let text flow around 
>> shapes somehow, but I can’t find documentation or a sample.
>>>>> I’d be thankful for hints.
>>>>> 
>> The metafun manual should have a few examples.
>> 
> See https://tex.stackexchange.com/a/32308/323 which is based on an example in the metafun manual.

Thank you all!

I guess I can reduce the flow cases to <10 and use \parshape directly; thinking in lines looks a bit easier than the MetaPost way.

Calculating the MP path from the TIFF alpha channel would be interesting, but is way above my head.

I guess it would work like:
* preprocessing:
  - find the outer contour of the image (after some threshold value of color value or alpha channel)
  - simplify and vectorize that (I remember there were different OS tools/libraries used with FontForge or Inkscape)
  - convert this outline (SVG or EPS I guess) into MP
* within the ConTeXt run:
  - place the (scaled) picture
  - preliminary page/paragraph breaking to find where there might be overlaps
  - calculate the fitting paragraph shape (rectangle minus overlapping part of the scaled outline)
  - probably some new line/paragraph breaking?


Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2019-02-06  9:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-04 10:10 text flowing around images Henning Hraban Ramm
2019-02-05 20:38 ` Henning Hraban Ramm
2019-02-05 20:48   ` Alan Braslau
2019-02-05 20:52     ` Wolfgang Schuster
2019-02-05 23:19       ` Aditya Mahajan
2019-02-06  9:03         ` Henning Hraban Ramm
2019-02-05 20:56     ` Alan Braslau
2019-02-05 21:02       ` Wolfgang Schuster
2019-02-05 20:51   ` Henri Menke

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).