ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \setupbackend and manual hyphenation
@ 2015-02-12 10:13 Axel Kielhorn
  2015-02-12 14:47 ` Hans Hagen
  2015-02-12 15:10 ` Hans Hagen
  0 siblings, 2 replies; 5+ messages in thread
From: Axel Kielhorn @ 2015-02-12 10:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

Hi!

I'm trying to use Context to export a document to epub.
Following the instructions on Contextgarden everything works up to a point:

When I add manual hyphenation for the word "Trennalgorithmus" and
\setupbackend[export=yes,xhtml=yes]
I get:

lua error       > error on line 1 in file /Volumes/Macintosh HD/Users/axel/Documents/Text/Dokumente_LaTeX/context/Dante 2015/Dominik Wagenführ - ePub/epub/epub_bug.tex:

.../context/tex/texmf-context/tex/context/base/back-exp.lua:2516: bad argument #1 to 'utfchar' (invalid value)
stack traceback:
	[C]: in function 'utfchar'
	.../context/tex/texmf-context/tex/context/base/back-exp.lua:2516: in function 'collectresults'
	.../context/tex/texmf-context/tex/context/base/back-exp.lua:2687: in function 'collectresults'
	.../context/tex/texmf-context/tex/context/base/back-exp.lua:2687: in function 'collectresults'
	.../context/tex/texmf-context/tex/context/base/back-exp.lua:2687: in function 'collectresults'
	.../context/tex/texmf-context/tex/context/base/back-exp.lua:2687: in function 'collectresults'
	.../context/tex/texmf-context/tex/context/base/back-exp.lua:2687: in function 'collectresults'
	.../context/tex/texmf-context/tex/context/base/back-exp.lua:2687: in function 'collectresults'
	.../context/tex/texmf-context/tex/context/base/back-exp.lua:2687: in function 'collectresults'
	.../context/tex/texmf-context/tex/context/base/back-exp.lua:2687: in function 'collectresults'
	.../context/tex/texmf-context/tex/context/base/back-exp.lua:2687: in function 'collectresults'
	.../context/tex/texmf-context/tex/context/base/back-exp.lua:2687: in function 'collectresults'
	.../context/tex/texmf-context/tex/context/base/back-exp.lua:2687: in function 'collectresults'
	.../context/tex/texmf-context/tex/context/base/back-exp.lua:2687: in function 'collectresults'
	.../context/tex/texmf-context/tex/context/base/back-exp.lua:2687: in function 'collectresults'
	.../context/tex/texmf-context/tex/context/base/back-exp.lua:2687: in function 'collectresults'
	.../context/tex/texmf-context/tex/context/base/back-exp.lua:2687: in function 'collectresults'
	.../context/tex/texmf-context/tex/context/base/back-exp.lua:2752: in function 'nodes_handlers_export'
	[string "local nodes_handlers_cleanuppage = nodes.hand..."]:18: in function <[string "local nodes_handlers_cleanuppage = nodes.hand..."]:10>
	(...tail calls...)
	.../context/tex/texmf-context/tex/context/base/node-shp.lua:171: in function 'finalizebox'
	[\directlua]:1: in main chunk

 1 >>  % !TEX encoding = UTF-8 Unicode

See attached log file.

If I remove the hyphenation, everything works, but the hyphenation is wrong.

I'm using:
current version: 2015.02.03 23:55

Greetings Axel



[-- Attachment #2: epub_bug.tex --]
[-- Type: application/octet-stream, Size: 1407 bytes --]

% !TEX encoding = UTF-8 Unicode
% -TEX TS-program = ConTeXt (LuaTeX)

\setupexport
   [title={hyphenation-test},
    author={Axel Kielhorn},
    firstpage={Cow},
   ]

%\setupbackend[export=yes,xhtml=yes] % <- enable to show problem

\mainlanguage[de]
\setbreakpoints[compound]

\setuppapersize [A4][A4]
\setuplayout    [width=middle,  backspace=1.5in, cutspace=1.5in,
                 height=middle, topspace=0.75in, bottomspace=0.75in]

\setupbodyfont[11pt]

\starttext

\section[trennungen]{Trennungen}

Auch wenn der Trennalgorithmus von LaTeX nicht schlecht ist, gibt es
wieder wieder Wörter, die man gerne anders oder gar nicht trennen würde.
Aus dem Grund gibt es verschiedene Möglichkeit, Worttrennungen zu
forcieren bzw. zu empfehlen. Diese sind in einem E-Book unnötig und
müssen daher von den Konvertern ignoriert werden.
\startitemize[margin=3.8cm]
\item
  Dies ist ein etwas längerer Text, der das Wort „Trennalgorithmus“
  trennen soll, wie es LaTeX normalerweise trennen würde. (Und zumindest
  bei mir trennt LaTeX fehlerhaft mit „Tren-nalgorithmus“.)
\item
  Dies ist ein etwas längerer Text, der das Wort „Trenn\-algorithmus“
  trennen soll. Hier wurde die Trennung mit \type{\-} forciert.
\item
  Hier etwas  Fülltext als zuvor, der das Wort „Floss/Libre“ trennen
  soll. Es ragt über den Rand.
\stopitemize

\stoptext

[-- Attachment #3: epub_bug.log --]
[-- Type: application/octet-stream, Size: 10441 bytes --]

open source     > 1 > 1 > /Volumes/Macintosh HD/usr/local/texlive/context/tex/texmf-context/tex/context/base/cont-yes.mkiv
                >
ConTeXt  ver: 2015.02.03 23:55 MKIV beta  fmt: 2015.2.8  int: english/english >
                >
system          > 'cont-new.mkiv' loaded
open source     > 2 > 2 > /Volumes/Macintosh HD/usr/local/texlive/context/tex/texmf-context/tex/context/base/cont-new.mkiv
close source    > 2 > 2 > /Volumes/Macintosh HD/usr/local/texlive/context/tex/texmf-context/tex/context/base/cont-new.mkiv
system          > files > jobname 'epub_bug', input './epub_bug', result 'epub_bug'
fonts           > latin modern fonts are not preloaded
languages       > language 'en' is active
open source     > 2 > 3 > /Volumes/Macintosh HD/Users/axel/Documents/Text/Dokumente_LaTeX/context/Dante 2015/Dominik Wagenführ - ePub/epub/epub_bug.tex
backend         > export > enabling export to xml
fonts           > preloading latin modern fonts (third stage)
fonts           > 'fallback modern-designsize rm 11pt' is loaded
structure       > sectioning > section @ level 3 : 0.0.1 -> Trennungen

lua error       > error on line 1 in file /Volumes/Macintosh HD/Users/axel/Documents/Text/Dokumente_LaTeX/context/Dante 2015/Dominik Wagenführ - ePub/epub/epub_bug.tex:

.../context/tex/texmf-context/tex/context/base/back-exp.lua:2516: bad argument #1 to 'utfchar' (invalid value)
stack traceback:
	[C]: in function 'utfchar'
	.../context/tex/texmf-context/tex/context/base/back-exp.lua:2516: in function 'collectresults'
	.../context/tex/texmf-context/tex/context/base/back-exp.lua:2687: in function 'collectresults'
	.../context/tex/texmf-context/tex/context/base/back-exp.lua:2687: in function 'collectresults'
	.../context/tex/texmf-context/tex/context/base/back-exp.lua:2687: in function 'collectresults'
	.../context/tex/texmf-context/tex/context/base/back-exp.lua:2687: in function 'collectresults'
	.../context/tex/texmf-context/tex/context/base/back-exp.lua:2687: in function 'collectresults'
	.../context/tex/texmf-context/tex/context/base/back-exp.lua:2687: in function 'collectresults'
	.../context/tex/texmf-context/tex/context/base/back-exp.lua:2687: in function 'collectresults'
	.../context/tex/texmf-context/tex/context/base/back-exp.lua:2687: in function 'collectresults'
	.../context/tex/texmf-context/tex/context/base/back-exp.lua:2687: in function 'collectresults'
	.../context/tex/texmf-context/tex/context/base/back-exp.lua:2687: in function 'collectresults'
	.../context/tex/texmf-context/tex/context/base/back-exp.lua:2687: in function 'collectresults'
	.../context/tex/texmf-context/tex/context/base/back-exp.lua:2687: in function 'collectresults'
	.../context/tex/texmf-context/tex/context/base/back-exp.lua:2687: in function 'collectresults'
	.../context/tex/texmf-context/tex/context/base/back-exp.lua:2687: in function 'collectresults'
	.../context/tex/texmf-context/tex/context/base/back-exp.lua:2687: in function 'collectresults'
	.../context/tex/texmf-context/tex/context/base/back-exp.lua:2752: in function 'nodes_handlers_export'
	[string "local nodes_handlers_cleanuppage = nodes.hand..."]:18: in function <[string "local nodes_handlers_cleanuppage = nodes.hand..."]:10>
	(...tail calls...)
	.../context/tex/texmf-context/tex/context/base/node-shp.lua:171: in function 'finalizebox'
	[\directlua]:1: in main chunk

 1 >>  % !TEX encoding = UTF-8 Unicode
 2     % -TEX TS-program = ConTeXt (LuaTeX)
 3     
 4     \setupexport
 5        [title={hyphenation-test},
 6         author={Axel Kielhorn},
 7         firstpage={Cow},
 8        ]
 9     
10     \setupbackend[export=yes,xhtml=yes] % <- enable to show problem
11     


? x

system          > structure > start used structure

used structure  > text: epub_bug

system          > structure > stop used structure


system          > files > start used files

used file       >    1: filename=cont-yes.mkiv filetype=tex foundname=/Volumes/Macintosh HD/usr/local/texlive/context/tex/texmf-context/tex/context/base/cont-yes.mkiv usedmethod=database
used file       >    2: filename=publ-imp-apa.lua filetype=lua foundname=/Volumes/Macintosh HD/usr/local/texlive/context/tex/texmf-context/tex/context/base/publ-imp-apa.lua usedmethod=database
used file       >    3: filename=cont-new.mkiv filetype=tex foundname=/Volumes/Macintosh HD/usr/local/texlive/context/tex/texmf-context/tex/context/base/cont-new.mkiv usedmethod=database
used file       >    4: filename=lang-us.lua filetype=lua foundname=/Volumes/Macintosh HD/usr/local/texlive/context/tex/texmf-context/tex/context/patterns/lang-us.lua usedmethod=database
used file       >    5: filename=/Volumes/Macintosh HD/Users/axel/Documents/Text/Dokumente_LaTeX/context/Dante 2015/Dominik Wagenführ - ePub/epub/epub_bug.tex foundname=/Volumes/Macintosh HD/Users/axel/Documents/Text/Dokumente_LaTeX/context/Dante 2015/Dominik Wagenführ - ePub/epub/epub_bug.tex usedmethod=direct
used file       >    6: filename=lang-de.lua filetype=lua foundname=/Volumes/Macintosh HD/usr/local/texlive/context/tex/texmf-context/tex/context/patterns/lang-de.lua usedmethod=database
used file       >    7: filename=lm.lfg filetype=tex foundname=/Volumes/Macintosh HD/usr/local/texlive/context/tex/texmf-context/tex/context/fonts/lm.lfg usedmethod=database
used file       >    8: filename=lmroman10-regular filetype=otf format=otf foundname=/Volumes/Macintosh HD/usr/local/texlive/context/tex/texmf/fonts/opentype/public/lm/lmroman10-regular.otf usedmethod=database
used file       >    9: filename=latinmodern-math.otf filetype=opentypefonts foundname=/Volumes/Macintosh HD/usr/local/texlive/context/tex/texmf/fonts/opentype/public/lm-math/latinmodern-math.otf usedmethod=database
used file       >   10: filename=lmmono10-regular filetype=otf format=otf foundname=/Volumes/Macintosh HD/usr/local/texlive/context/tex/texmf/fonts/opentype/public/lm/lmmono10-regular.otf usedmethod=database

system          > files > stop used files


system          > options > start commandline options

used option     > autogenerate="true"
used option     > currentrun="1"
used option     > fulljobname="./epub_bug.tex"
used option     > input="./epub_bug.tex"
used option     > kindofrun="1"
used option     > maxnofruns="8"
used option     > no-parse-first-line="true"
used option     > synctex="1"

system          > options > stop commandline options

system          > options > start commandline files

used file       >    1: ./epub_bug.tex

system          > options > stop commandline files

backend         > export > 
backend         > export > exporting xml, xhtml and html files
backend         > export > 
backend         > export > using exiting export path 'epub_bug-export'
backend         > export > using exiting images path 'epub_bug-export/images'
backend         > export > using exiting styles path 'epub_bug-export/styles'
backend         > export > adding css reference 'styles/epub_bug-defaults.css'
backend         > export > adding css reference 'styles/epub_bug-images.css'
backend         > export > adding css reference 'styles/epub_bug-styles.css'
backend         > export > saving xml data in 'epub_bug-export/epub_bug-raw.xml'
backend         > export > saving css image definitions in 'epub_bug-export/styles/epub_bug-images.css'
backend         > export > saving css style definitions in 'epub_bug-export/styles/epub_bug-styles.css'
backend         > export > saving css template in 'epub_bug-export/styles/epub_bug-templates.css'
backend         > export > saving xhtml variant in 'epub_bug-export/epub_bug-tag.xhtml'
backend         > export > saving specification in 'epub_bug-export/epub_bug-pub.lua'
backend         > export > saving div based alternative in 'epub_bug-export/epub_bug-div.xhtml'
backend         > export > 
backend         > export > create epub with: mtxrun --script epub --make "epub_bug" [--purge --rename --svgmath]
backend         > export > 

mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path: /Volumes/Macintosh HD/usr/local/texlive/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats  > synctex tracing: synctex has been enabled (extra log file generated)
mkiv lua stats  > resource resolver: loadtime 0.014 seconds, 0 scans with scantime 0.000 seconds, 0 shared scans, 11 found files, scanned paths: <none>
mkiv lua stats  > stored bytecode data: 364 modules (0.267 sec), 76 tables (0.007 sec), 440 chunks (0.273 sec)
mkiv lua stats  > running in nuts mode: yes
mkiv lua stats  > cleaned up reserved nodes: 41 nodes, 439 lists of 438
mkiv lua stats  > node memory usage: 1 hlist, 2 glue, 3 penalty, 21 attribute, 34 glue_spec, 4 attribute_list, 3 temp, 9 if_stack, 2 dir
mkiv lua stats  > node list callback tasks: 6 unique task lists, 6 instances (re)created, 94 calls
mkiv lua stats  > inserted spaces in output: 107
mkiv lua stats  > used backend: pdf (backend for directly generating pdf output)
mkiv lua stats  > loaded patterns: de::3 en::2, load time: 0.000
mkiv lua stats  > jobdata time: 0.001 seconds saving, 0.001 seconds loading
mkiv lua stats  > callbacks: 234 direct, 277 indirect, 511 total
mkiv lua stats  > randomizer: resumed with value 0.94663442016888
mkiv lua stats  > positions: 5 collected, 5 regulars, 0 regions, 0 unresolved regions
mkiv lua stats  > structure elements: 25 element chains identified, open chain: document>1 => section>1 => sectioncontent>1 
mkiv lua stats  > result saved in file: epub_bug.pdf, compresslevel 3, objectcompresslevel 3
mkiv lua stats  > loaded fonts: 3 files: latinmodern-math.otf, lmmono10-regular.otf, lmroman10-regular.otf
mkiv lua stats  > fonts load time: 0.256 seconds for 6 fonts, 1 shared in backend, 0 common vectors, 1 common hashes
mkiv lua stats  > xml exporting time: 0.000 seconds, version 0.33
mkiv lua stats  > used platform: osx-ppc, type: unix, binary subtree: texmf-osx-64
mkiv lua stats  > luatex banner: this is luatex, version beta-0.79.3 (tex live 2015/dev) (rev 5140)
mkiv lua stats  > control sequences: 40455 of 65536 + 100000
mkiv lua stats  > lua properties: engine: lua, used memory: 49 MB (ctx: 49 MB), hash type: lua, hash chars: min(64,40), symbol mask: utf (τεχ)
mkiv lua stats  > runtime: 35.231 seconds


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

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

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

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

* Re: \setupbackend and manual hyphenation
  2015-02-12 10:13 \setupbackend and manual hyphenation Axel Kielhorn
@ 2015-02-12 14:47 ` Hans Hagen
  2015-02-12 15:10 ` Hans Hagen
  1 sibling, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2015-02-12 14:47 UTC (permalink / raw)
  To: ntg-context

On 2/12/2015 11:13 AM, Axel Kielhorn wrote:
> Hi!
>
> I'm trying to use Context to export a document to epub.
> Following the instructions on Contextgarden everything works up to a point:

remark: in your example you say:

 > Auch wenn der Trennalgorithmus von LaTeX nicht schlecht ist, gibt es
 > wieder wieder Wörter, die man gerne anders oder gar nicht trennen würde

It's TeX's Trennalgorithmus; a macro package just relies on the tex 
machinery .

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: \setupbackend and manual hyphenation
  2015-02-12 10:13 \setupbackend and manual hyphenation Axel Kielhorn
  2015-02-12 14:47 ` Hans Hagen
@ 2015-02-12 15:10 ` Hans Hagen
  2015-02-12 16:10   ` Axel Kielhorn
  1 sibling, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2015-02-12 15:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 2/12/2015 11:13 AM, Axel Kielhorn wrote:
> Hi!
>
> I'm trying to use Context to export a document to epub.
> Following the instructions on Contextgarden everything works up to a point:
>
> When I add manual hyphenation for the word "Trennalgorithmus" and
> \setupbackend[export=yes,xhtml=yes]
> I get:
>
> lua error       > error on line 1 in file /Volumes/Macintosh HD/Users/axel/Documents/Text/Dokumente_LaTeX/context/Dante 2015/Dominik Wagenführ - ePub/epub/epub_bug.tex:

fixed in next beta (not uploaded before Alan and I reach a next stage in 
publications)

for the moment use

\setuphyphenation[method=expanded]




-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: \setupbackend and manual hyphenation
  2015-02-12 15:10 ` Hans Hagen
@ 2015-02-12 16:10   ` Axel Kielhorn
  2015-02-12 17:57     ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Axel Kielhorn @ 2015-02-12 16:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 12.02.2015 um 16:10 schrieb Hans Hagen <pragma@wxs.nl>:

> for the moment use
> 
> \setuphyphenation[method=expanded]

This works in the current beta, but not with the stable version in TeXLive 2014.

It doesn't matter since I need the beta to create epub, just wanted to mention it.

Thanks for the quick reply.

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

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

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

* Re: \setupbackend and manual hyphenation
  2015-02-12 16:10   ` Axel Kielhorn
@ 2015-02-12 17:57     ` Hans Hagen
  0 siblings, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2015-02-12 17:57 UTC (permalink / raw)
  To: ntg-context

On 2/12/2015 5:10 PM, Axel Kielhorn wrote:
>
> Am 12.02.2015 um 16:10 schrieb Hans Hagen <pragma@wxs.nl>:
>
>> for the moment use
>>
>> \setuphyphenation[method=expanded]
>
> This works in the current beta, but not with the stable version in TeXLive 2014.

indeed, as there is new hyphenation related code in the beta (already 
for a while); the expanded method might become default some day

> It doesn't matter since I need the beta to create epub, just wanted to mention it.
>
> Thanks for the quick reply.
>
> Axel
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
>


-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2015-02-12 17:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-12 10:13 \setupbackend and manual hyphenation Axel Kielhorn
2015-02-12 14:47 ` Hans Hagen
2015-02-12 15:10 ` Hans Hagen
2015-02-12 16:10   ` Axel Kielhorn
2015-02-12 17:57     ` Hans Hagen

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