Re: [NTG-context] Best strategy for ConTeXt to ePub update

2019-02-05 Thread Henning Hraban Ramm
Am 2019-02-04 um 20:26 schrieb Martin Bruchanov :

> While ago I wrote a book (http://sstv-handbook.com/) in ConTeXt and I have 
> started to thinking about possibility to export also ePub and xHTML besides 
> the PDF version.
> 
> Few questions:
> 
> 1. What is current support of ePub, will it export pictures automatically?

it will, but you need postprocessing to make them usable for HTML/ePub

> 2. Do I need to rewrite source code to use those verbose \startsXXX of every 
> element (paragraph, item,...) or is there any simplier way how to handle 
> sources as they are now?

Yes. No.
For a proper XML/XHTML export you need this markup. Also use 
\definehighlighting instead of switches like \em or \bf.

In my experience, you can work with the exported raw XML if your markup is 
good, but you must convert it to usable HTML yourself.

Unfortunately I never completed my workflow notes at:
https://wiki.contextgarden.net/Export
https://wiki.contextgarden.net/ePub

Export got better since then, but I’m not up to date about the current state. 
My latest attempts to get an ePub from a book worked quite well with my 
conversion workflow (where I use ConTeXt’s export and ePub script, but re-make 
most of the ePub files via Python and XSLT).
Footnotes and such are a PITA, because there’s no working mechanism in ePub for 
them.

ePub reader compatibility is still a big mess.



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
___


[NTG-context] Adjusting interlinespace in a table

2019-02-05 Thread Mari Voipio
Hello all!

This may be a really stupid question, but wiki wasn't helpful: Is
there a way of adjusting interlinespace in a table? A \setupTABLE
command would work as I want to change the line height throughout the
table to make it smaller (have the rows closer to each other than in
my running text). I don't need to set the cell height or anything like
that, I just want to adjust the text inside the cells. I'm fairly
certain there's some simple way of doing it...

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


Re: [NTG-context] Automatic thousands separation in \unit

2019-02-05 Thread Marco Patzer
On Thu, 31 Jan 2019 13:43:13 +0100
Otared Kavian  wrote:

Sorry for the late response.

> Can this give what you wish?
> 
> \define[2]\myunit{\spaceddigits{#1}\unit{#2}}
> \starttext 
> \myunit{123456789}{volt}
> \stoptext

That's a way to solve it, yes. But I'd prefer it to be integrated
into the \unit command. It looks cleaner and I don't have to modify
the sources to use a different command.

Is there a way to hook the \spaceddigits into \unit somehow?

Marco
___
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
___


Re: [NTG-context] setupdirections RTL bug

2019-02-05 Thread Hans Hagen

On 2/5/2019 12:36 AM, Mohammad Hossein Bateni wrote:

Hello,

This is perhaps /related/ to what Alan Bowen reported.  Not the same, 
since I don't get compilation errors.

use method "three"

(I'll add "unicode" method which will take the latest version.)

Hans



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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
___


Re: [NTG-context] inner option for \showgrid

2019-02-05 Thread Marcus Vinicius Mesquita
Ok, thank you.

Regards

Marcus Vinicius

On Mon, Feb 4, 2019, 07:13 Hans Hagen  wrote:

> On 2/3/2019 9:06 PM, Marcus Vinicius Mesquita wrote:
> > Dear list,
> >
> > In the i-context.pdf file, among the \showgrid[…,…] options there are:
> > right, left, and outer.
> > Is it possible to add another option: inner?
> sure, but no beta today
>
> Hans
>
>
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The N
> 
> etherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
>
___
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
___


[NTG-context] \index[infinity]{$+\infty$} gives an error

2019-02-05 Thread Mikael P. Sundqvist
Hi,

With latest beta, the file below throws me the error given below the
example file. I thought this was possible (see
http://www.pragma-ade.com/general/manuals/cont-enp.pdf, (pdf)page
202). The error is not present if I remove the third problematic index
entry.

/Mikael

% Example file

\starttext
This does not look right:
\index{entry}
\index[key]{entry}
\index[infinifty]{$+\infty$}
\placeindex
\stoptext

% Error message

tex error   > tex error on line 68 in file
/home/mps/tmp/indexproblem.tex: ! Extra }, or forgotten $

 }

 ...mand {[internal expandable lua function call]}}
  }
\firstofoneargument #1->#1

\doapplyregisterentrycommand ...extcommand {#2
  \dostoptagged
\registerentry ...plyregisterentrycommand {#2}{#5}
  \fi \popcurrentregister
l.68 }
___
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
___


[NTG-context] constructing block content partly with lua

2019-02-05 Thread Sanjoy Mahajan
Dear List,

I've been trying to construct part of a block's content programmatically
with Lua.  Despite many experiments and much rereading of the cld manual
(especially chapter 3 on functions), the following attempt fails for
reasons that perplex me.  Below is the MNWE (Minimal NonWorking
Example).  It fails with these lines in the log file:

  structure   > sectioning > subject @ level 3 : 0.0.0 -> Answers

  tex error   > tex error on line 1 in file virtual://block.answer.1: ! 
Undefined control sequence

  l.1 \oneargTestparameter


That is, when the "answer" block is included via \useblocks, somehow the
beginning of the answer, which should be "\onearg{Test parameter}", has
its curly braces and spaces elided.

What characteristic(s) of the Lua interface am I missing?  Thank you if
you happen to where I've gone wrong.  I've also tried steppers without
much luck (and, admittedly, without really understanding their use).

=== testluabeginblock.tex ===
\defineblock[answer]
\hideblocks[answer]

\def\onearg#1{{\bf #1}}
\def\noarg{{\it fixed argument}}

\starttext

\startluacode
  context.beginanswer()
  context("\\onearg{Test parameter}")
\stopluacode
This is part of the answer.

\endanswer

\subject{Answers}

\useblocks[answer]

\stoptext
=== end testluabeginblock.tex ===

-Sanjoy



___
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
___


Re: [NTG-context] setupdirections RTL bug

2019-02-05 Thread Mohammad Hossein Bateni
Thanks, Hans!

With \setupdirections[bidi=global,method=three], the footers are placed
correctly.  But the *left* footer still does not get RTL treatment.  Adding
\setupdirections[bidi=global,method=three] inside startsetups does not help.

Method three has this "bug": a word with ZWNJ gets the long direction.  For
example, if I have A+ZWNJ+B (logical), visually I should get "B+ZWNJ+A" but
I don't.  It works correctly with SPC in place of ZWNJ.

On Tue, Feb 5, 2019 at 7:30 AM Hans Hagen  wrote:

> On 2/5/2019 12:36 AM, Mohammad Hossein Bateni wrote:
> > Hello,
> >
> > This is perhaps /related/ to what Alan Bowen reported.  Not the same,
> > since I don't get compilation errors.
> use method "three"
>
> (I'll add "unicode" method which will take the latest version.)
>
> Hans
>
>
>
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
>
___
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
___


Re: [NTG-context] constructing block content partly with lua

2019-02-05 Thread Hans Hagen

On 2/5/2019 4:01 PM, Sanjoy Mahajan wrote:

Dear List,

I've been trying to construct part of a block's content programmatically
with Lua.  Despite many experiments and much rereading of the cld manual
(especially chapter 3 on functions), the following attempt fails for
reasons that perplex me.  Below is the MNWE (Minimal NonWorking
Example).  It fails with these lines in the log file:

   structure   > sectioning > subject @ level 3 : 0.0.0 -> Answers

   tex error   > tex error on line 1 in file virtual://block.answer.1: ! 
Undefined control sequence

   l.1 \oneargTestparameter


That is, when the "answer" block is included via \useblocks, somehow the
beginning of the answer, which should be "\onearg{Test parameter}", has
its curly braces and spaces elided.

What characteristic(s) of the Lua interface am I missing?  Thank you if
you happen to where I've gone wrong.  I've also tried steppers without
much luck (and, admittedly, without really understanding their use).

=== testluabeginblock.tex ===
\defineblock[answer]
\hideblocks[answer]

\def\onearg#1{{\bf #1}}
\def\noarg{{\it fixed argument}}

\starttext

\startluacode
   context.beginanswer()
   context("\\onearg{Test parameter}")


does

context.onearg("Test parameter")

work?



\stopluacode
This is part of the answer.

\endanswer

\subject{Answers}

\useblocks[answer]

\stoptext
=== end testluabeginblock.tex ===

-Sanjoy



___
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
___




--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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
___


Re: [NTG-context] constructing block content partly with lua

2019-02-05 Thread Sanjoy Mahajan
On 2019-02-05 16:24, Hans Hagen  wrote:

>> \startluacode
>>context.beginanswer()
>>context("\\onearg{Test parameter}")
>
> does
>
> context.onearg("Test parameter")
>
> work?

Sorry, I forgot to say that I had tried that version too but also with
no luck.  Also, either version of onerg works as expected if I delete
the context.beginanswer() and the \endanswer lines.

-Sanjoy
___
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
___


Re: [NTG-context] \index[infinity]{$+\infty$} gives an error

2019-02-05 Thread Wolfgang Schuster

Mikael P. Sundqvist schrieb am 05.02.19 um 15:37:

Hi,

With latest beta, the file below throws me the error given below the
example file. I thought this was possible (see
http://www.pragma-ade.com/general/manuals/cont-enp.pdf, (pdf)page
202). The error is not present if I remove the third problematic index
entry.

/Mikael

% Example file

\starttext
This does not look right:
\index{entry}
\index[key]{entry}
\index[infinifty]{$+\infty$}

\index[infinifty]{$\mathplus\infty$}

ConTeXt uses + as separator in index entries.

In you example the argument is split into the two parts “$” and 
“\infty$” which creates two incomplete formulas.


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
___


Re: [NTG-context] constructing block content partly with lua

2019-02-05 Thread Hans Hagen

On 2/5/2019 4:28 PM, Sanjoy Mahajan wrote:

On 2019-02-05 16:24, Hans Hagen  wrote:


\startluacode
context.beginanswer()
context("\\onearg{Test parameter}")


does

context.onearg("Test parameter")

work?


Sorry, I forgot to say that I had tried that version too but also with
no luck.  Also, either version of onerg works as expected if I delete
the context.beginanswer() and the \endanswer lines.
the problem is that you effectively use buffers so you have a different 
catcode regime ... i'm not sure what you want but thsi might give a clue


\starttext

\defineblock[foo]

\beginfoo
test 1
\endfoo

\startluacode
buffers.assign("temp","test 2")
structures.blocks.save("foo",nil,nil,"temp")
\stopluacode

\useblocks[foo]

\stoptext

there are mechanisms for templates for constructing more meaningful 
content than "test 2" (see test suite)


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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
___


Re: [NTG-context] \index[infinity]{$+\infty$} gives an error

2019-02-05 Thread Wolfgang Schuster

Mikael P. Sundqvist schrieb am 05.02.19 um 20:17:

On Tue, Feb 5, 2019 at 5:11 PM Wolfgang Schuster
 wrote:

Mikael P. Sundqvist schrieb am 05.02.19 um 15:37:

Hi,

With latest beta, the file below throws me the error given below the
example file. I thought this was possible (see
http://www.pragma-ade.com/general/manuals/cont-enp.pdf, (pdf)page
202). The error is not present if I remove the third problematic index
entry.

/Mikael

% Example file

\starttext
This does not look right:
\index{entry}
\index[key]{entry}
\index[infinifty]{$+\infty$}

\index[infinifty]{$\mathplus\infty$}

ConTeXt uses + as separator in index entries.

In you example the argument is split into the two parts “$” and
“\infty$” which creates two incomplete formulas.

Wolfgang

Many thanks, works like charm for +\infty. For -\infty, it seems that
an endash(?) is picked up instead. I notice the following definitions
in math-ini.mkiv

\unexpanded\def\mathplus {+}
\unexpanded\def\mathminus{\ifmmode –\else\iffontchar\font`−−\else –\fi\fi}

Seems wrong to me because math mode should use the normal hyphen.

So, a follow-up question: Should I use something else than
\index[minusinfty]{$\mathminus\infty$} if I want -\infty in the index?
Only + is a special character in the index entry but - can be used 
without problems

and you don’t have to use \mathminus.

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
___


[NTG-context] How to query fonts.handlers

2019-02-05 Thread Henri Menke
Dear list,

I am trying to access extra kerning that I have defined using
fonts.handlers.otf.addfeature.  Even though I query the kerning from
within a paragraph where the kerning is evidently applied I can't seem
to get the value stored earlier, see the comment in the MWE.  What am I
doing wrong?

Cheers, Henri

---

\startluacode
fonts.handlers.otf.addfeature {
name = "ktest",
type = "kern",
data = {
["t"] = { ["e"] = 500 },
}
}
\stopluacode

\definefontfeature[ktest][ktest=yes]

\definefont[1][Serif*ktest]

\starttext

\1 test \ctxlua{
 local fnt = font.current()
 local tfmdata = fonts.hashes.identifiers[fnt]
 local t = string.byte("t")
 local e = string.byte("e")
 local kern = fonts.handlers.otf.getkern(tfmdata,t,e)
 context(kern) % 0 instead of 500. Why?
}

\stoptext

---

P.S.: I have posted the same question on the LuaTeX list, but with a
different MWE.

 Forwarded Message 
Subject: How to query fonts.handlers
Date: Mon, 4 Feb 2019 15:00:12 +1300
From: Henri Menke 
To: LuaTeX discussion. 

Dear list,

I am trying to access extra kerning that I have defined using
fonts.handlers.otf.addfeature.  Even though I query the kerning from
within a paragraph where the kerning is evidently applied I can't seem
to get the value stored earlier, see the comment in the MWE.  What am I
doing wrong?

Cheers, Henri

---

\input luaotfload.sty

\directlua{
 fonts.handlers.otf.addfeature {
 name = "ktest",
 type = "kern",
 data = {
 ["t"] = { ["e"] = 500 },
 }
 }
}

\font\1="lmroman10-regular.otf:+ktest" at 10pt
\1

test%
\directlua{
 local fnt = font.current()
 local tfmdata = fonts.hashes.identifiers[fnt]
 local t = string.byte("t")
 local e = string.byte("e")
 local kern = fonts.handlers.otf.getkern(tfmdata,t,e)
 tex.sprint(kern) % 0 instead of 500. Why?
}

\bye


___
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
___


[NTG-context] problem with non-printing hex 0x0C

2019-02-05 Thread martin
I had a problem that kept me busy for a few hours. A \page command had 
no effect, the text just continued in the pdf.


The culprid turned out to be a hex 0x0C, a formfeed character. Once I 
removed them all was good. It got introduced by extracting the text from 
a PDF.


I realize my files should be "clean" of control characters and ConTexT 
should (maybe) not be stripping those characters. Then again, they serve 
no purpose in the document. So...


My question: Isn't some more resilience sensible so commands don't 
break? Or error messages?


cheers and thanks for any thoughts.
Martin

For the record:

ConTeXt  ver: 2019.01.28 16:58 MKIV beta  fmt: 2019.2.4  int: 
english/english




I'm not sure if the FF makes it through the mail. A hex editor 
will/would show it in front of the \page (sheer coincidence)




\starttext

\startitemize[columns]
\item auf \hl[6]~  Baum
\stopitemize

\page


1. Der Bauer sitzt auf  \hl[6]~  Traktor.
\stoptext
___
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
___


Re: [NTG-context] text flowing around images

2019-02-05 Thread Henning Hraban Ramm
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 :

> 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
___


Re: [NTG-context] text flowing around images

2019-02-05 Thread Alan Braslau
\parshape

On Tue, 5 Feb 2019 21:38:29 +0100
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 :
> 
> > 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
___


Re: [NTG-context] text flowing around images

2019-02-05 Thread Henri Menke
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 :
> 
>> 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
___


Re: [NTG-context] text flowing around images

2019-02-05 Thread Wolfgang Schuster

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  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 :


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
___


Re: [NTG-context] text flowing around images

2019-02-05 Thread Alan Braslau
p.101 of the TeXbook ...

On Tue, 5 Feb 2019 13:48:14 -0700
Alan Braslau  wrote:

> \parshape
> 
> On Tue, 5 Feb 2019 21:38:29 +0100
> 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 :
> > 
> > > 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
___


Re: [NTG-context] text flowing around images

2019-02-05 Thread Wolfgang Schuster

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
___


[NTG-context] Failure using --jit with latest beta

2019-02-05 Thread Joseph Canedo
Dear list,

I get a fatal error when using –jit using latest beta.

$ ./build.sh Livre.pdf
[1/1] context --noconsole --jit --errors Livre.tex
FAILED: Livre.pdf
context --noconsole --jit --errors Livre.tex
mtx-context | run 1: luajittex 
--fmt="c:/ConTeXt/test/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en"
 --jobname="Livre" 
--lua="c:/ConTeXt/test/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui"
 --c:currentrun=1 --c:directives="logs.errors,logs.target=file" 
--c:engine="luajittex" --c:errors --c:fulljobname="./Livre.tex" 
--c:input="./Livre.tex" --c:jit --c:kindofrun=1 --c:maxnofruns=9 --c:noconsole 
--c:texmfbinpath="c:/ConTeXt/test/tex/texmf-win64/bin" "cont-yes.mkiv"

This is LuajitTeX, Version 1.09.2 (TeX Live 2018/W32TeX)
 system commands enabled.

---! 
c:/ConTeXt/test/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.fmt
 was written by luatex
(Fatal format file error; I'm stymied)mtx-context | fatal error: return 
code: 1

It works all fine without --lit option. Was the support LuaJitTeX removed now ?
Thanks a lot

Joseph 
___
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
___


Re: [NTG-context] text flowing around images

2019-02-05 Thread Aditya Mahajan

On Tue, 5 Feb 2019, Wolfgang Schuster wrote:


Am 2019-02-04 um 11:10 schrieb Henning Hraban Ramm :


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___
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
___


Re: [NTG-context] How to query fonts.handlers

2019-02-05 Thread Henri Menke
I found a solution.

\startluacode
fonts.handlers.otf.addfeature {
name = "ktest",
type = "kern",
data = {
["t"] = { ["e"] = 500 },
}
}
\stopluacode

\definefontfeature[ktest][ktest=yes]

\definefont[1][Serif*ktest]

\starttext

\1 test \ctxlua{
 local fnt = font.current()
 local tfmdata = fonts.hashes.identifiers[fnt]
 local t = string.byte("t")
 local e = string.byte("e")
 local kern = 0
 for kind in pairs(tfmdata.shared.rawdata.lookupcache) do
 kern = kern + fonts.handlers.otf.getkern(tfmdata,t,e,kind)
 end
 context(kern / tfmdata.parameters.factor) % 500
}

\stoptext

On 6/02/19 9:27 AM, Henri Menke wrote:
> Dear list,
> 
> I am trying to access extra kerning that I have defined using
> fonts.handlers.otf.addfeature.  Even though I query the kerning from
> within a paragraph where the kerning is evidently applied I can't seem
> to get the value stored earlier, see the comment in the MWE.  What am I
> doing wrong?
> 
> Cheers, Henri
> 
> ---
> 
> \startluacode
> fonts.handlers.otf.addfeature {
> name = "ktest",
> type = "kern",
> data = {
> ["t"] = { ["e"] = 500 },
> }
> }
> \stopluacode
> 
> \definefontfeature[ktest][ktest=yes]
> 
> \definefont[1][Serif*ktest]
> 
> \starttext
> 
> \1 test \ctxlua{
>  local fnt = font.current()
>  local tfmdata = fonts.hashes.identifiers[fnt]
>  local t = string.byte("t")
>  local e = string.byte("e")
>  local kern = fonts.handlers.otf.getkern(tfmdata,t,e)
>  context(kern) % 0 instead of 500. Why?
> }
> 
> \stoptext
> 
> ---
> 
> P.S.: I have posted the same question on the LuaTeX list, but with a
> different MWE.
> 
>  Forwarded Message 
> Subject: How to query fonts.handlers
> Date: Mon, 4 Feb 2019 15:00:12 +1300
> From: Henri Menke 
> To: LuaTeX discussion. 
> 
> Dear list,
> 
> I am trying to access extra kerning that I have defined using
> fonts.handlers.otf.addfeature.  Even though I query the kerning from
> within a paragraph where the kerning is evidently applied I can't seem
> to get the value stored earlier, see the comment in the MWE.  What am I
> doing wrong?
> 
> Cheers, Henri
> 
> ---
> 
> \input luaotfload.sty
> 
> \directlua{
>  fonts.handlers.otf.addfeature {
>  name = "ktest",
>  type = "kern",
>  data = {
>  ["t"] = { ["e"] = 500 },
>  }
>  }
> }
> 
> \font\1="lmroman10-regular.otf:+ktest" at 10pt
> \1
> 
> test%
> \directlua{
>  local fnt = font.current()
>  local tfmdata = fonts.hashes.identifiers[fnt]
>  local t = string.byte("t")
>  local e = string.byte("e")
>  local kern = fonts.handlers.otf.getkern(tfmdata,t,e)
>  tex.sprint(kern) % 0 instead of 500. Why?
> }
> 
> \bye
> 
> 

___
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
___