Re: [NTG-context] Ebooks with ConTeXt?

2019-12-10 Thread Jan U. Hasecke
Am 10.12.19 um 20:38 schrieb Nicola:
> As for ConTeXt, I have tried the latest beta with:
> 
> context mybook.tex
> mtxrun --script epub --make mybook
> 
> This, among the rest, creates an .epub file, which unfortunately the
> above mentioned tools do not like (maybe, that output is still
> experimental?). 

From time to time I publish an ebook either created with Pandoc or with
the pythonic Sphinx documentation tool. In most cases Pandoc epubs
validate fine. Sphinx only lately produces epub that validates without
errors. But I had issues with Apple when I tried to publish a valid epub
on their platform.

You can validate epubs with epubcheck:
https://github.com/w3c/epubcheck

I don't know if ConTeXt produces epub2 or epub3.
http://idpf.org/epub/30/

HTH
juh

-- 
Das ZEN von Pandoc
Bücher und E-Books einfach und professionell produzieren
http://www.amazon.de/Das-ZEN-von-Pandoc-professionell/dp/1505218799/
Paperback (232 Seiten) und E-Book
___
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] Ebooks with ConTeXt?

2019-12-10 Thread Jan U. Hasecke
Am 10.12.19 um 08:50 schrieb Nicola:
> On 2019-12-10, Jan U. Hasecke  wrote:

> Thanks, I didn't think of Pandoc, I'll give it a try. In the past,
> I have tried to create some simple content (slides) with Markdown, but
> my conclusion was that if you know TeX, it doesn't make sense to use
> Markdown :)
> 
> Perhaps this is a silly question (excuse my ignorance about the topic):
> what if you want to add some stylistic touches to your ebooks, such as
> initials? Or Non-breaking spaces? How about adding, say, a text box with
> a different background and a smaller font?

Ebooks are xhtml so styles are limited to the capabilities of css. I
fear that initials has to be left flowing images.

>***
> 
> Or fine control page numbering, headers, footnotes, ligatures, or the
> spacing between paragraphs, or center a separator as above? Do you need
> to modify the generated CSS for that, or would ConTeXt (or Pandoc)
> allow you to take care of (some of) those things?

No page numbers in E-Books and I would avoid headers. Footnotes are
endnotes. Ligatures might be possible if directly inserted, sorry never
tried this in an ebook.

You can modify the css to achieve what is possible in xhtml, though.

I have to confess that I never managed to create an ebook with context
right aways. AFAIK, please correct me Hans, you end up with an epub
folder not the compressed epub itself. I would guess that it is a good
thing if you want to postprocess the book manually by editing content
files or css.

What I can say about epub generally is: It's better to avoid fancy
styling at all and use the default fonts and styles of the ebook devices.

HTH
juh
___
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] Blank page inserted when text reaches column's end

2019-12-10 Thread Wolfgang Schuster

Thangalin schrieb am 11.12.2019 um 02:51:

Commenting out the \page_grd_command_flush_page macro seems to have
reversed the effect. Any pages having columnar text that does not
extend to the last line are now suppressed. How would I go about
adding a conditional that checks to see whether the column is filled
before deciding if a page break is necessary?

\unprotect
\def\page_grd_stop{%
   \endgraf % needed, else wrong vsize in one par case
   \vfill % otherwise weird \placenotes[endnotes]
   \page_grd_command_set_vsize % needed
   \penalty\c_page_otr_eject_penalty
   %\page_grd_command_flush_page
   \page_otr_fill_and_eject_page
   \page_grd_command_set_vsize % why here
   \egroup
   \page_otr_command_set_vsize
   \page_otr_command_set_hsize}
\protect


Fails for the next example (the first page appears twice in the PDF and 
the second page is missing):


\setuplayout[grid=yes]

\starttext
  \startcolumnset[n=2]
    \dorecurse{100}{Line #1\par}
  \stopcolumnset
\stoptext

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] LMTXL Tagging and overlay

2019-12-10 Thread Rik Kabel

Dear list,

With the example below (perhaps not minimal, but I have stripped out as 
much as I could), the second page is set completely in the color of the 
overlay. This also happens when a layer is used instead of an overlay. 
When tagging is turned off, the colors are what they should be. When a 
few lines are removed from the first page, the colors are correct as 
well, but ...


Attached is the resulting pdf.

LMTX 20191206 only. MKIV 20191206 is fine.

Error on my part, or bug?

   % \definelayer   [WatermarkOverlay]
   %    [repeat=yes,
   % width=\paperwidth,
   % height=\paperheight]
   % \setlayerframed    [WatermarkOverlay]
   %    [preset=center]
   %    [foregroundcolor=red,frame=off]
   % {\scale[factor=max]{\rotate[rotation=60.0]{~Oops!~}}}

   \defineoverlay   [WatermarkOverlay]
 [{\framed[frame=off,
   foregroundcolor=red]
  {\scale[factor=max]
   {\rotate[rotation=60.0]
    {~Oops!~]

   \setupbackgrounds    [page]
 [background=WatermarkOverlay]

   %setuptagging    [state=stop]
   \setuptagging    [state=start]

   \setuplanguage   [en]
 [spacing=packed]
   \setupinterlinespace [2.2ex]
   \definenarrower  [MidOneEm]
 [middle=1em]
   \setuplayout [topspace=0.25in,
  footerdistance=0in,
  height=fit,
  width=27em,
  footer=0.5in,
  bottom=0.25in,
  backspace=1.1in]
   \definepapersize [octavo]
 [width=6in,
  height=9in]
   \setuppagenumbering  [location=]
   \setuppapersize  [octavo]
   \setupbodyfont   [Termes,10pt]

   \starttext

   \starttitle  [title={N aa aaa }]

   \startsubject    [title={B}]
  Faaa aaa {\em Naa Yaaa T}  aa C 22, 9990 (
  999):
   \startnarrow [MidOneEm]
  {\bi Maaa Fa, 86; R Laaa aaa Pa Ta Ba a La}

  Da.~Fa, a  aa aaa Ja I aa Raaa, aa aa
  a  Ta Ia aa Wa Haa  1925 aa 1928. Ha
  aaa  a aa a aa Caaa Ta Ra Sa aaa
  aa M 1930 a aaa   a aaa aa aa 83a Sa
  aaa Caa Paaa Waaa. A a a, aa   aaa aa
  a, aaa  aa aa aa a aaa aa aa aa
  “aaa a a a.”

  “P a aa,” R Fa  aa aaa aa aa
  aaa, “aaa a  aa aa aa, aa a,
  aa a, aa aa aaa  aaa  aa aa
   aa aaa aa,  a aa aa  aaa
  aaa . Taa a aaa aa aaa , aaa aaa
  aaa a a.”

  Eaa, aa aaa a Paa aa a “ a” aaa
  aaa a aaa S P aaa aaa Paaa aaa aa
  Na Ta.

  Aaa aa aaa  aa aaa  a.

  A aa  Caaa Ua Laa Sa aa 1933, aa aaa
  aaa aa aaa aaa Aaaa-Naaa La aaa aaa aaa Ga-Aaaa
  Baaa. Ha aaa  aaa aa aaa Naa Yaaa B aa Ra aaa
  aaa aa aaa aaa. Ha aa a  aa aaa
   aa aaa
  aa Naa Yaaa S.
   \stopnarrow

  Fa  aa aa aaa  aaa aaa a aa aaa
  R Ra Caa.

  A aa aaa Faaa 30, 1967 {\em Naa Yaaa T} 
  ( 38), aaa , Da.~Ea Oaa Fa, aaa a  aa
  aa {\em Taa Jaa aa Daa}. Saa aaa a  aaa aaa
  a aaa   aa  aa aaa aaa
  Ia aa Raaa aaa Ha aa aa  a .

  Taa Fa’a aa aaa, Faaa M.~Fa (1894–1949) aaa a
  a aa a aa MIT. T aaa aaa, Wa A.~Fa
  (aaa  I  aaa aa’a aa aa a aaa
  ) aaa aa aaa  a aa aaa U.S.~H Maaa Ma
  aaa aa aa Daaa aa Raaa aaa  aaa Ca aa Ja
  Maaa Ca Aaa Gaa aaa aaa W Ja Raa
  Oaaa.%
   \startfootnote
  T aaa aa  a  I  aa Da.~Fa aa a
  a aa aaa aa’a .
   \stopfootnote
   \ T , Ja Fa H, aaa a aa aa aaa 
   a aa aa aaa aa aa.
   \stopsubject

   \startsubject   

Re: [NTG-context] Blank page inserted when text reaches column's end

2019-12-10 Thread Thangalin
Commenting out the \page_grd_command_flush_page macro seems to have
reversed the effect. Any pages having columnar text that does not
extend to the last line are now suppressed. How would I go about
adding a conditional that checks to see whether the column is filled
before deciding if a page break is necessary?

\unprotect
\def\page_grd_stop{%
  \endgraf % needed, else wrong vsize in one par case
  \vfill % otherwise weird \placenotes[endnotes]
  \page_grd_command_set_vsize % needed
  \penalty\c_page_otr_eject_penalty
  %\page_grd_command_flush_page
  \page_otr_fill_and_eject_page
  \page_grd_command_set_vsize % why here
  \egroup
  \page_otr_command_set_vsize
  \page_otr_command_set_hsize}
\protect

Thank you!
___
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] Bug: Segmentation fault

2019-12-10 Thread Henri Menke

On 12/11/19 12:23 PM, luigi scarso wrote:

On Wed, Dec 11, 2019 at 12:10 AM Hans Hagen  wrote:


On 12/11/2019 12:03 AM, luigi scarso wrote:



On Tue, Dec 10, 2019 at 9:27 PM Henri Menke mailto:henrime...@gmail.com>> wrote:

 Dear devs,

 The example below crashes LuaTeX with a segmentation fault.  It is
 reproducible
 with LuaTeX 1.10.1 7143 and LuaTeX 1.11.2 7226.  To this end I built
 7226 from
 source with --debugopt to get a backtrace, which can be found below
 as well.

 Cheers, Henri

 ---

 \directlua{token.set_macro(-1, "foo","\string\\,")}
 \show\foo
 \foo
 \bye


I guess that we have to check if catcodetable -1 is already defined...

i already sent you a patch, probbaly also ok for trunk




yes, seen




but one needs to be careful as fo rinstance \string\foo is seen as
oo so often one also needs to escape properly



  I always start with  [==[ ... ]==]  ie
\directlua{token.set_macro(-1, [==[foo]==],[==[\string\\,]==])}
  gdb reports this [==[\string\\,]==] string as
  ","
which is an array of char of length 3 ie {'\\','\\',','}

With \directlua{token.set_macro(-1, [==[foo]==],"\string\\,")}
gdb reports "\\,"
ie {'\\','\,'}

I always check which one is the correct one...


In this case I wanted to generate the thin space (\,).  My expectation
(which worked elsewhere) was that full expansion will turn "\string\\,"
into "\\," where the two backslashes have catcode 12 and will not be
expanded further.  Then the Lua string will turn the escape sequence \\
into a single backslash, therefore ending up with \, in the Lua string.
Demo below.

Cheers, Henri


$ luatex <(echo '\relax\directlua{print("\string\\,")}\bye')
This is LuaTeX, Version 1.11.2 (TeX Live 2020/dev)
 restricted system commands enabled.
(/dev/fd/63\,
)
warning  (pdf backend): no pages of output.
Transcript written on 63.log.




___
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] Bug: Segmentation fault

2019-12-10 Thread luigi scarso
On Wed, Dec 11, 2019 at 12:10 AM Hans Hagen  wrote:

> On 12/11/2019 12:03 AM, luigi scarso wrote:
> >
> >
> > On Tue, Dec 10, 2019 at 9:27 PM Henri Menke  > > wrote:
> >
> > Dear devs,
> >
> > The example below crashes LuaTeX with a segmentation fault.  It is
> > reproducible
> > with LuaTeX 1.10.1 7143 and LuaTeX 1.11.2 7226.  To this end I built
> > 7226 from
> > source with --debugopt to get a backtrace, which can be found below
> > as well.
> >
> > Cheers, Henri
> >
> > ---
> >
> > \directlua{token.set_macro(-1, "foo","\string\\,")}
> > \show\foo
> > \foo
> > \bye
> >
> >
> > I guess that we have to check if catcodetable -1 is already defined...
> i already sent you a patch, probbaly also ok for trunk
>


yes, seen



> but one needs to be careful as fo rinstance \string\foo is seen as
> oo so often one also needs to escape properly
>

 I always start with  [==[ ... ]==]  ie
\directlua{token.set_macro(-1, [==[foo]==],[==[\string\\,]==])}
 gdb reports this [==[\string\\,]==] string as
 ","
which is an array of char of length 3 ie {'\\','\\',','}

With \directlua{token.set_macro(-1, [==[foo]==],"\string\\,")}
gdb reports "\\,"
ie {'\\','\,'}

I always check which one is the correct one...

-- 
luigi
___
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] Bug: Segmentation fault

2019-12-10 Thread Hans Hagen

On 12/11/2019 12:03 AM, luigi scarso wrote:



On Tue, Dec 10, 2019 at 9:27 PM Henri Menke > wrote:


Dear devs,

The example below crashes LuaTeX with a segmentation fault.  It is
reproducible
with LuaTeX 1.10.1 7143 and LuaTeX 1.11.2 7226.  To this end I built
7226 from
source with --debugopt to get a backtrace, which can be found below
as well.

Cheers, Henri

---

\directlua{token.set_macro(-1, "foo","\string\\,")}
\show\foo
\foo
\bye


I guess that we have to check if catcodetable -1 is already defined...

i already sent you a patch, probbaly also ok for trunk

but one needs to be careful as fo rinstance \string\foo is seen as 
oo so often one also needs to escape properly


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] Bug: Segmentation fault

2019-12-10 Thread luigi scarso
On Tue, Dec 10, 2019 at 9:27 PM Henri Menke  wrote:

> Dear devs,
>
> The example below crashes LuaTeX with a segmentation fault.  It is
> reproducible
> with LuaTeX 1.10.1 7143 and LuaTeX 1.11.2 7226.  To this end I built 7226
> from
> source with --debugopt to get a backtrace, which can be found below as
> well.
>
> Cheers, Henri
>
> ---
>
> \directlua{token.set_macro(-1, "foo","\string\\,")}
> \show\foo
> \foo
> \bye
>

I guess that we have to check if catcodetable -1 is already defined...

--
luigi
___
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] Bug: Segmentation fault

2019-12-10 Thread Hans Hagen

On 12/10/2019 9:26 PM, Henri Menke wrote:

Dear devs,

The example below crashes LuaTeX with a segmentation fault.  It is 
reproducible
with LuaTeX 1.10.1 7143 and LuaTeX 1.11.2 7226.  To this end I built 
7226 from
source with --debugopt to get a backtrace, which can be found below as 
well.

i see what's going on ... more later


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


[NTG-context] overbar in math mode is asymmetric over "F"

2019-12-10 Thread Bernd Donner
Hello,



the following small sample illustrates the problem:



\starttext

\enabletrackers[math.stackers.texts]

\math{\overbar {ABC}} %<-- somewhat okay

\math{\overbar {F}}   %<-- too short on the right side



%manual fixing

\math{\overbar {ABC\mkern\onemuskip}}

\math{\overbar {F\mkern3\onemuskip}}

\stoptext



I wish to have an overbar that extends over the exact boundingbox of the
letter or sequence of letters. How can this be done in context without
manual fixing?



Thnk you,

Bernd Donner

___
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] Bug: Segmentation fault

2019-12-10 Thread luigi scarso
On Tue, Dec 10, 2019 at 9:27 PM Henri Menke  wrote:

> Dear devs,
>
> The example below crashes LuaTeX with a segmentation fault.  It is
> reproducible
> with LuaTeX 1.10.1 7143 and LuaTeX 1.11.2 7226.  To this end I built 7226
> from
> source with --debugopt to get a backtrace, which can be found below as
> well.
>
>
confirmed, we will see asap
(btw,  I use --debug ie CFLAGS="-g -O0" because it's hard to follow the
flow of optimized code)


-- 
luigi
___
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] Bug: Segmentation fault

2019-12-10 Thread Henri Menke

Dear devs,

The example below crashes LuaTeX with a segmentation fault.  It is reproducible
with LuaTeX 1.10.1 7143 and LuaTeX 1.11.2 7226.  To this end I built 7226 from
source with --debugopt to get a backtrace, which can be found below as well.

Cheers, Henri

---

\directlua{token.set_macro(-1, "foo","\string\\,")}
\show\foo
\foo
\bye

---

(gdb) run
Starting program: /usr/local/bin/luatex test.tex
This is LuaTeX, Version 1.11.2 (TeX Live 2020/dev)
 restricted system commands enabled.
(./test.tex
Program received signal SIGSEGV, Segmentation fault.
get_sa_item (head=0x41002, n=n@entry=92) at 
../../../source/texk/web2c/luatexdir/utils/managed-sa.c:65
65  if (head->tree != NULL) {
(gdb) bt full
#0  get_sa_item (head=0x41002, n=n@entry=92) at 
../../../source/texk/web2c/luatexdir/utils/managed-sa.c:65
No locals.
#1  0x005607d0 in get_cat_code (h=h@entry=-1, n=n@entry=92) at 
../../../source/texk/web2c/luatexdir/tex/textcodes.c:68
sa_value = 
s = 
#2  0x004d8a8c in set_macro (L=) at 
../../../source/texk/web2c/luatexdir/lua/lnewtokenlib.c:1204
p = 
q = 
t = 
se = 0x295bf9a ""
name = 
str = 
s = 
lname = 3
lstr = 2
cs = 743
cc = 
ct = -1
n = 
a = 0
nncs = 
#3  0x006dc924 in luaD_precall (L=L@entry=0x1202678, 
func=func@entry=0x2214490, nresults=nresults@entry=0)
at ../../../source/libs/lua53/lua53-src/src/ldo.c:434
n = 
f = 0x4d8890 
ci = 0x123c830
#4  0x006f62c2 in luaV_execute (L=L@entry=0x1202678) at 
../../../source/libs/lua53/lua53-src/src/lvm.c:1134
b = 
nresults = 0
i = 
ra = 0x2214490
ci = 0x12221c0
cl = 0x2952f00
k = 0x294ea40
base = 
#5  0x006dcef7 in luaD_call (nResults=, func=, L=0x1202678) at ../../../source/libs/lua53/lua53-src/src/ldo.c:499
No locals.
#6  luaD_callnoyield (L=0x1202678, func=, nResults=) at ../../../source/libs/lua53/lua53-src/src/ldo.c:509
No locals.
#7  0x006db78c in luaD_rawrunprotected (L=0x1202678, f=0x6d0800 
, ud=0x7fffdf80) at 
../../../source/libs/lua53/lua53-src/src/ldo.c:142
oldnCcalls = 0
lj = {previous = 0x0, b = {{__jmpbuf = {832, -3576387603206626035, 
18884312, 1, 18884216, 0, 3576387604335174925, -3576387282536356595},
  __mask_was_saved = 0, __saved_mask = {__val = {0, 18884312, 
18884216, 7198250, 35733824, 72057594037927937, 140737488346976, 0, 0, 0, 0, 0, 
0,
  0, 0, 0, status = 0}
#8  0x006dd3af in luaD_pcall (L=L@entry=0x1202678, func=func@entry=0x6d0800 
, u=u@entry=0x7fffdf80, old_top=832, ef=)
at ../../../source/libs/lua53/lua53-src/src/ldo.c:729
status = 
old_ci = 0x12026d8
old_allowhooks = 1 '\001'
old_nny = 1
old_errfunc = 0
oldtop = 
#9  0x006d3907 in lua_pcallk (L=0x1202678, nargs=nargs@entry=0, 
nresults=nresults@entry=0, errfunc=errfunc@entry=51, ctx=ctx@entry=0, 
k=k@entry=0x0)
at ../../../source/libs/lua53/lua53-src/src/lapi.c:969
c = {func = 0x2214480, nresults = 0}
status = 
func = 
#10 0x00463b5f in luatokencall (p=p@entry=9030, 
nameptr=nameptr@entry=0) at 
../../../source/texk/web2c/luatexdir/lua/luastuff.c:653
base = 51
ls = {s = 0x295e890 "\240܂\367\377\177", size = 0}
i = 0
l = 32
s = 0x0
lua_id = 
stacktop = 50
#11 0x00567a83 in conv_toks () at 
../../../source/texk/web2c/luatexdir/tex/textoken.c:2859
old_setting = 
p = 
q = 
save_scanner_status = 0
save_def_ref = 0
save_warning_index = 0
bool = 
s = 9030
sn = 0
u = 0
c = 
str = 
i = 0
#12 0x00503a25 in expand () at 
../../../source/texk/web2c/luatexdir/tex/expand.c:259
t = 
p = 
---Type  to continue, or q  to quit---
cur_ptr = 
cv_backup = 0
cvl_backup = 0
radix_backup = 0
co_backup = 0
backup_backup = 7961
save_scanner_status = 
#13 0x00503f85 in get_x_token () at 
../../../source/texk/web2c/luatexdir/tex/expand.c:501
No locals.
#14 0x00513ae5 in main_control () at 
../../../source/texk/web2c/luatexdir/tex/maincontrol.c:1014
No locals.
#15 0x0050f4ac in main_body () at 
../../../source/texk/web2c/luatexdir/tex/mainbody.c:567
pdftex_map = "pdftex.map"
bad = 
#16 0x00446d2e in main (ac=, av=) at 
../../../source/texk/web2c/luatexdir/luatex.c:609
No locals.
___
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 / 

Re: [NTG-context] Ebooks with ConTeXt?

2019-12-10 Thread Nicola
On 2019-12-10, Hans Hagen  wrote:
> On 12/9/2019 10:13 PM, Nicola wrote:
>> What is the current status of epub support in ConTeXt?
>> 
>> I have never followed ConTeXt's development on the XML front too
>> closely, but recently I have been asked to help format a text-only
>> manuscript for publishing on platforms such as Kindle or Apple Books
>> Store. Can ConTeXt be used (or perhaps even recommended) for that? Or
>> would I have better luck with the proprietary tools (Kindle Create,
>> iBooks Author)?
> context has an xml export (a few variants) and one can start from that 
> ... in the end it all boils down to some css (depends on the book i 
> guess) and tagged content (one can use the divs and spans output or 
> transform the xml to whatever wanted) ... for more complex setups i 
> think there are no generic solutions (unless all books should look 
> alike)

Ok, I imagined that things were like that, but I wasn't sure. Thanks for
confirming my impression.

Nicola

___
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] Ebooks with ConTeXt?

2019-12-10 Thread Nicola
On 2019-12-10, Henning Hraban Ramm  wrote:
>
>> Am 2019-12-10 um 16:53 schrieb Denis Maier :
>>> 
>>> Perhaps this is a silly question (excuse my ignorance about the
>>> topic): what if you want to add some stylistic touches to your
>>> ebooks, such as initials? Or Non-breaking spaces? How about adding,
>>> say, a text box with a different background and a smaller font?
>>> 
>>> Or fine control page numbering, headers, footnotes, ligatures, or
>>> the spacing between paragraphs, or center a separator as above? Do
>>> you need to modify the generated CSS for that, or would ConTeXt (or
>>> Pandoc) allow you to take care of (some of) those things?
>>> 
>>> Nicola
>> 
>> For Pandoc: Some things can be tweaked with pandoc, but for anything
>> that is a bit more advanced you'll probably need a custom CSS. For
>> special content you can use spans and divs. In your custom CSS you
>> can define how those elements should be rendered. Sounds pretty
>> similar to what Hans wrote in his response. Probably the main
>> questions are if you prefer to work with pandoc markdown or with
>> ConTeXt sources, and if you need additional output formats.

The current need is only for epub. In any case, I'd like to have
a single source of truth for the content. I have experimented a bit with
Pandoc and, in fact, it can generate an .epub file that can be imported
by iBooks Author and converted with kindlegen. As for the style, it
seems that modifying the CSS gives the most control and can't be avoided
for advanced tweaks, even if I'd use ConTeXt.

As for ConTeXt, I have tried the latest beta with:

context mybook.tex
mtxrun --script epub --make mybook

This, among the rest, creates an .epub file, which unfortunately the
above mentioned tools do not like (maybe, that output is still
experimental?). I'll try to follow the more complex steps at
https://wiki.contextgarden.net/Epub_Sample.

> The problem is that custom CSS must be tuned for every single ePub
> reader (app or device), it’s like the browser wars. Most readers
> interprete only a strange subset of CSS2, it’s completely unreliable
> in my (limited) experience.

That's... sad.

> Have a look at https://wiki.contextgarden.net/ePub WRT ePub ot of
> ConTeXt, also at the old docs; unfortunately I never finished writing
> these pages, but I must review my ePub workflow soon-ish.

Thanks, I'll give it a shot!

Nicola


___
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] changing alignment inside a paragraph

2019-12-10 Thread Wolfgang Schuster

mf schrieb am 10.12.2019 um 12:27:

Hello list, is there a way to achieve this?

\def\FlushRightFromNextLine{\relax}
\setupnarrower[left=0cm,right=11cm]
\setupalign[stretch]
\starttext
This is what I'd like to type in my source:\par
\blank
\type{This is the text of an index term, that is normally justified,
but I'd like the page numbers to be flushed to the right from
their second line \FlushRightFromNextLine 34, 57, 101-104, 276, 345, 
401-403.}\par

\blank
This is the normal result:\par
\blank
\startnarrower[right]
This is the text of an index term, that is normally justified,
but I'd like the page numbers to be flushed to the right from
their second line \FlushRightFromNextLine 34, 57, 101-104, 276, 345, 
401-403.

\stopnarrower
\blank
This is the expected result:\par
\blank
\startnarrower[right]
\parfillskip=0pt This is the text of an index term, that is normally 
justified,

but I'd like the page numbers to be flushed to the right from
their second line 34, 57,\par
\penalty1 % no page break in the middle of page numbers
\startalignment[flushright]
101-104, 276, 345, 401-403.\par
\stopalignment
\stopnarrower
\stoptext

The expected result is to be intended visually, because there might be 
no need to break the text into two paragraphs.


Use the "end" keyword for the alignment.

\starttext

\startbuffer
This is the text of an index term, that is normally justified,
but I'd like the page numbers to be flushed to the right from
their second line 34, 57, 101-104, 276, 345, 401–403.
\stopbuffer

\typebuffer \getbuffer

\startbuffer
\startalignment[end]
This is the text of an index term, that is normally justified,
but I'd like the page numbers to be flushed to the right from
their second line 34, 57, 101-104, 276, 345, 401–403.
\stopalignment
\stopbuffer

\typebuffer \getbuffer

\stoptext

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] Ebooks with ConTeXt?

2019-12-10 Thread Henning Hraban Ramm

> Am 2019-12-10 um 16:53 schrieb Denis Maier :
>> 
>> Perhaps this is a silly question (excuse my ignorance about the topic):
>> what if you want to add some stylistic touches to your ebooks, such as
>> initials? Or Non-breaking spaces? How about adding, say, a text box with
>> a different background and a smaller font?
>> 
>> Or fine control page numbering, headers, footnotes, ligatures, or the
>> spacing between paragraphs, or center a separator as above? Do you need
>> to modify the generated CSS for that, or would ConTeXt (or Pandoc)
>> allow you to take care of (some of) those things?
>> 
>> Nicola
> 
> For Pandoc: Some things can be tweaked with pandoc, but for anything that is 
> a bit more advanced you'll probably need a custom CSS. For special content 
> you can use spans and divs. In your custom CSS you can define how those 
> elements should be rendered. Sounds pretty similar to what Hans wrote in his 
> response. Probably the main questions are if you prefer to work with pandoc 
> markdown or with ConTeXt sources, and if you need additional output formats.

The problem is that custom CSS must be tuned for every single ePub reader (app 
or device), it’s like the browser wars. Most readers interprete only a strange 
subset of CSS2, it’s completely unreliable in my (limited) experience.

Have a look at https://wiki.contextgarden.net/ePub WRT ePub ot of ConTeXt, also 
at the old docs; unfortunately I never finished writing these pages, but I must 
review my ePub workflow soon-ish.


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
___


Re: [NTG-context] Ebooks with ConTeXt?

2019-12-10 Thread Denis Maier



Sorry, no info concerning ConTeXT.

You don't have to use proprietary tools. An easy way to create ebooks
from Markdown files (or other sources) is Pandoc. https://pandoc.org/

I produce all of my ebooks in this way. In most cases they validate
without errors. If there are some errors though I use Calibre to fix
them manually.

Thanks, I didn't think of Pandoc, I'll give it a try. In the past,
I have tried to create some simple content (slides) with Markdown, but
my conclusion was that if you know TeX, it doesn't make sense to use
Markdown :)

Perhaps this is a silly question (excuse my ignorance about the topic):
what if you want to add some stylistic touches to your ebooks, such as
initials? Or Non-breaking spaces? How about adding, say, a text box with
a different background and a smaller font?

***

Or fine control page numbering, headers, footnotes, ligatures, or the
spacing between paragraphs, or center a separator as above? Do you need
to modify the generated CSS for that, or would ConTeXt (or Pandoc)
allow you to take care of (some of) those things?

Nicola


For Pandoc: Some things can be tweaked with pandoc, but for anything 
that is a bit more advanced you'll probably need a custom CSS. For 
special content you can use spans and divs. In your custom CSS you can 
define how those elements should be rendered. Sounds pretty similar to 
what Hans wrote in his response. Probably the main questions are if you 
prefer to work with pandoc markdown or with ConTeXt sources, and if you 
need additional output formats.


Denis
___
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] Problems with new beta

2019-12-10 Thread Ursula Hermann
Hello Hans!

Thanks for your answer.  How can I do this. You mean, going in texm-cache, and 
open cmd on Windows and write context--make en? Is that the right way? 

Uschi 



-Ursprüngliche Nachricht-
Von: ntg-context  Im Auftrag von Hans Hagen
Gesendet: Montag, 09. Dezember 2019 19:49
An: ntg-context@ntg.nl
Betreff: Re: [NTG-context] Problems with new beta

On 12/9/2019 3:34 PM, Ursula Hermann wrote:
> Dear List!
> 
> If I want to do the test from the new beta on WinEdt (I have Windows 
> 10) , normaly the test works fine. But today as I wanted to make the 
> test, it did not work.
> 
> \starttext
> 
> \startmode[mkiv]
> 
>      \startluacode
> 
>      tex.sprint("hello")
> 
>      \stopluacode
> 
>      \startMPcode
> 
>      draw textext("hello") rotated 45 ;
> 
>      \stopMPcode
> 
>      \framed{hello}
> 
> \stopmode
> 
> \startnotmode[mkiv]
> 
>      \startMPcode
> 
>      draw textext("hello") rotated -45 ;
> 
>      \stopMPcode
> 
>      \framed{hello}
> 
> \stopnotmode
> 
> \stoptext
> 
> After Compiling with ConTeXt it does not work. I have the following 
> mistake?
> 
> Command Line:   context.exe --synctex=-1 "context-test.tex"
If this is lmtx, can you wipe the cache (texm-cache) and run

context --make en

then?

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
___
___
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] changing alignment inside a paragraph

2019-12-10 Thread mf

Hello list, is there a way to achieve this?

\def\FlushRightFromNextLine{\relax}
\setupnarrower[left=0cm,right=11cm]
\setupalign[stretch]
\starttext
This is what I'd like to type in my source:\par
\blank
\type{This is the text of an index term, that is normally justified,
but I'd like the page numbers to be flushed to the right from
their second line \FlushRightFromNextLine 34, 57, 101-104, 276, 345, 
401-403.}\par

\blank
This is the normal result:\par
\blank
\startnarrower[right]
This is the text of an index term, that is normally justified,
but I'd like the page numbers to be flushed to the right from
their second line \FlushRightFromNextLine 34, 57, 101-104, 276, 345, 
401-403.

\stopnarrower
\blank
This is the expected result:\par
\blank
\startnarrower[right]
\parfillskip=0pt This is the text of an index term, that is normally 
justified,

but I'd like the page numbers to be flushed to the right from
their second line 34, 57,\par
\penalty1 % no page break in the middle of page numbers
\startalignment[flushright]
101-104, 276, 345, 401-403.\par
\stopalignment
\stopnarrower
\stoptext

The expected result is to be intended visually, because there might be 
no need to break the text into two paragraphs.


Thanks,
Massi
___
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] Ebooks with ConTeXt?

2019-12-10 Thread Hans Hagen

On 12/9/2019 10:13 PM, Nicola wrote:

What is the current status of epub support in ConTeXt?

I have never followed ConTeXt's development on the XML front too
closely, but recently I have been asked to help format a text-only
manuscript for publishing on platforms such as Kindle or Apple Books
Store. Can ConTeXt be used (or perhaps even recommended) for that? Or
would I have better luck with the proprietary tools (Kindle Create,
iBooks Author)?
context has an xml export (a few variants) and one can start from that 
... in the end it all boils down to some css (depends on the book i 
guess) and tagged content (one can use the divs and spans output or 
transform the xml to whatever wanted) ... for more complex setups i 
think there are no generic solutions (unless all books should look 
alike) ... of course for 'proze, itemize, simple table, simple 
sectioning' not much is needed


(i gave away my ebook device so i can't check what's the fashion right 
now but as color e-ink seems to be on it's way ...)


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
___