[NTG-context] epub-mkiv-demo.epub

2015-04-11 Thread Piotr Kopszak
Hello list,

I am trying to compile example epub file epub-mkiv-demo.tex which is
provided with the recent beta, however I'm getting following errors
when I run:mtxrun --script epub --make epub-mkiv-demo

resolvers   | trees | analyzing 'home:texmf'
mtx-epub| using specification file
'epub-mkiv-demo-export/epub-mkiv-demo-pub.lua'
mtx-epub| the 'mudraw' binary is not present
mtx-epub| cover page image 'cover.xhtml' is not present
mtx-epub| saving dummy coverpage to
'epub-mkiv-demo-export/cover.xhtml'...42015/tex/texmf-context/scripts/context/lua/mtx-epub.lua:606:
bad argument #1 to 'gsub' (string expected, got nil)

No epub file is generated.

Any help would be greatly appreciated

Piotr

-- 
http://okle.pl
___
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
___

Re: [NTG-context] Why mode not recognized?

2020-03-03 Thread Wolfgang Schuster
On Tue, 3 Mar 2020 22:07:51 +0100
Hans van der Meer  wrote:

> Calling ConTeXt with:
> 
> mtxrun --autogenerate --mode=epub --script context "$1"
> 
> and in the tex-file called:
> \starttext
> \startmode[epub]
>   Producing EPUB\crlf
> \stopmode
> \startnotmode[epub]
>   Not producing EPUB\crlf
> \stopnotmode
> \stoptext
> 
> This produces "Not producing EPUB" Why?

I guess parameters which are passed to the context script have to come after 
you call the script, e.g.

mtxrun --autogenerate --script context --mode=epub "$1"

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] ePUB creation problems

2015-03-18 Thread Gerben Wierda
I’m getting to the next phase of ePUB creation. My project now exports and with 
mtxrun —script epub, I can create an actual ePUB, but there are issues I need 
to fix.

One is the lack of a cover image. The command for epub creation works, but says:

(. /usr/local/src/ConTeXt/tex/setuptex  mtxrun --script epub --make 
prd_book)

mtx-epub| using specification file 'prd_book-export/prd_book-pub.lua'
mtx-epub| the 'mudraw' binary is not present
mtx-epub| cover page image 'cover.xhtml' is not present
mtx-epub| saving dummy coverpage to 'prd_book-export/cover.xhtml'

I’m using in the env file:
\setupbackend
 [export=yes]
\setupexport
   [title={Chess and the Art of Enterprise Architecture},
author={Gerben Wierda},
firstpage={9789081984058-CoverFront.jpeg},
   ]

So, what seems to be ignored is

\setupexport
   [title={Chess and the Art of Enterprise Architecture},
author={Gerben Wierda},
firstpage={9789081984058-CoverFront.jpeg},
   ]

What am I missing?

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

Re: [NTG-context] Error in ePub script

2015-08-06 Thread Hans Hagen

On 8/6/2015 6:33 AM, Henning Hraban Ramm wrote:

Hi, I’m at creating an ePub once again and run into an error:

$ mtxrun --script epub --make prd_MBL

resolvers   | caching | skipping 'files' for 'home:texmf' from 
'/Users/hraban/Library/texmf/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/54be04d87dd160089f572b19cb5c97e9'
 (version mismatch)
mtx-epub| using specification file 'prd_MBL-export/prd_MBL-pub.lua'
mtx-epub| cover page image 'cover.xhtml' is not present
mtx-epub| saving dummy coverpage to 'prd_MBL-export/cover.xhtml'
mtx-epub| 17 images checked, 0 updated, 17 kept, 0 skipped
mtx-epub| creating paths in tree 'prd_MBL-epub'
mtx-epub| removing 'prd_MBL-epub/OEBPS/styles/prd_MBL-images.css'
mtx-epub| checking image 'prd_MBL-export/images/MT-Logo_grau-page-1.svg' 
- 'prd_MBL-epub/OEBPS/images/MT-Logo_grau-page-1.svg'
mtx-epub| copying 'prd_MBL-export/images/MT-Logo_grau-page-1.svg' to 
'prd_MBL-epub/OEBPS/images/MT-Logo_grau-page-1.svg'
mtx-epub| checking image 'prd_MBL-export/images/blatt_esche.jpg' - 
'prd_MBL-epub/OEBPS/images/blatt_esche.jpg‘
...
mtx-epub| checking image 'prd_MBL-export/styles/prd_MBL-defaults.css' 
- 'prd_MBL-epub/OEBPS/styles/prd_MBL-defaults.css'
mtx-epub| copying 'prd_MBL-export/styles/prd_MBL-defaults.css' to 
'prd_MBL-epub/OEBPS/styles/prd_MBL-defaults.css'
mtx-epub| checking image 'prd_MBL-export/styles/prd_MBL-images.css' - 
'prd_MBL-epub/OEBPS/styles/prd_MBL-images.css'
mtx-epub| copying 'prd_MBL-export/styles/prd_MBL-images.css' to 
'prd_MBL-epub/OEBPS/styles/prd_MBL-images.css'
mtx-epub| checking image 'prd_MBL-export/styles/prd_MBL-styles.css' - 
'prd_MBL-epub/OEBPS/styles/prd_MBL-styles.css'
mtx-epub| copying 'prd_MBL-export/styles/prd_MBL-styles.css' to 
'prd_MBL-epub/OEBPS/styles/prd_MBL-styles.css'
mtx-epub| copying 'prd_MBL-export/prd_MBL-div.xhtml' to 
'prd_MBL-epub/OEBPS/prd_MBL-div.xhtml'
mtx-epub| copying 'prd_MBL-export/cover.xhtml' to 
'prd_MBL-epub/OEBPS/cover.xhtml'
mtx-epub| relocating 
images...texmf/tex/texmf-context/scripts/context/lua/mtx-epub.lua:285: attempt 
to index field '?' (a nil value)

The error is in this function:

local function relocateimages(imagedata,oldname,newname,subpath,rename)
 local data = io.loaddata(oldname)
 if data then
 subpath = joinfile(..,subpath)
 report(relocating images)
 local n = 0
 local done = gsub(data,[[(id=)(.-)(.-background%-image *: 
*url%()(.-)(%))]], function(s1,id,s2,name,s3)
 local newname = imagedata[id].newname
--  imagedata[id].newname throws the above error
 if newname then
 if subpath then
 name = joinfile(subpath,basename(newname))
 else
 name = basename(newname)
 end
  -- name = url.addscheme(name)
 end
 if newname then
 n = n + 1
 if rename then
 name = joinfile(subpath,addsuffix(id,suffix(name)))
 end
 return s1 .. id .. s2 .. name .. s3
 end
 end)
 report(%s images relocated in %a,n,newname)
 if newname then
 io.savedata(newname,done)
 end
 end
 return images
end

My prd_MBL-pub.lua looks like:

return {
  [author]=Henning Hraban Ramm,
  [htmlfiles]={ prd_MBL-div.xhtml },
  [htmlroot]=prd_MBL-div.xhtml,
  [identifier]=96f59e0d-454d-93e6-3fa9-5a126440a831,
  [imagefile]=styles/prd_MBL-images.css,
  [imagepath]=images,
  [images]={
   [image1]={
[element]=image,
[height]=1.875cm,
[id]=image-1,
[name]=MT-Logo_grau,
[url]=file:///MT-Logo_grau,
[used]=img/MT-Logo_grau.pdf,
[width]=2.671cm,
   },
   [image10]={
[element]=image,
[height]=3.750cm,
[id]=image-10,
[name]=blatt_esche,
[url]=file:///blatt_esche,
[used]=img/blatt_esche.jpg,
[width]=4.038cm,
   },
...
  },
  [language]=de,
  [name]=prd_MBL,
  [stylepath]=styles,
  [styles]={ prd_MBL-defaults.css, prd_MBL-images.css, 
prd_MBL-styles.css },
  [title]=MBL,
  [xhtmlfiles]={ prd_MBL-tag.xhtml },
  [xmlfiles]={ prd_MBL-raw.xml },
}

What’s wrong?


looks like an old mtx-epub, the latest one has a check

-
  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-context] Why mode not recognized?

2020-03-03 Thread Hans van der Meer
Calling ConTeXt with:

mtxrun --autogenerate --mode=epub --script context "$1"

and in the tex-file called:
\starttext
\startmode[epub]
Producing EPUB\crlf
\stopmode
\startnotmode[epub]
Not producing EPUB\crlf
\stopnotmode
\stoptext

This produces "Not producing EPUB" Why?

dr. Hans van der Meer


___
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] Error in ePub script

2015-08-05 Thread Henning Hraban Ramm
Hi, I’m at creating an ePub once again and run into an error:

$ mtxrun --script epub --make prd_MBL

resolvers   | caching | skipping 'files' for 'home:texmf' from 
'/Users/hraban/Library/texmf/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/54be04d87dd160089f572b19cb5c97e9'
 (version mismatch)
mtx-epub| using specification file 'prd_MBL-export/prd_MBL-pub.lua'
mtx-epub| cover page image 'cover.xhtml' is not present
mtx-epub| saving dummy coverpage to 'prd_MBL-export/cover.xhtml'
mtx-epub| 17 images checked, 0 updated, 17 kept, 0 skipped
mtx-epub| creating paths in tree 'prd_MBL-epub'
mtx-epub| removing 'prd_MBL-epub/OEBPS/styles/prd_MBL-images.css'
mtx-epub| checking image 
'prd_MBL-export/images/MT-Logo_grau-page-1.svg' - 
'prd_MBL-epub/OEBPS/images/MT-Logo_grau-page-1.svg'
mtx-epub| copying 'prd_MBL-export/images/MT-Logo_grau-page-1.svg' to 
'prd_MBL-epub/OEBPS/images/MT-Logo_grau-page-1.svg'
mtx-epub| checking image 'prd_MBL-export/images/blatt_esche.jpg' - 
'prd_MBL-epub/OEBPS/images/blatt_esche.jpg‘
...
mtx-epub| checking image 'prd_MBL-export/styles/prd_MBL-defaults.css' 
- 'prd_MBL-epub/OEBPS/styles/prd_MBL-defaults.css'
mtx-epub| copying 'prd_MBL-export/styles/prd_MBL-defaults.css' to 
'prd_MBL-epub/OEBPS/styles/prd_MBL-defaults.css'
mtx-epub| checking image 'prd_MBL-export/styles/prd_MBL-images.css' - 
'prd_MBL-epub/OEBPS/styles/prd_MBL-images.css'
mtx-epub| copying 'prd_MBL-export/styles/prd_MBL-images.css' to 
'prd_MBL-epub/OEBPS/styles/prd_MBL-images.css'
mtx-epub| checking image 'prd_MBL-export/styles/prd_MBL-styles.css' - 
'prd_MBL-epub/OEBPS/styles/prd_MBL-styles.css'
mtx-epub| copying 'prd_MBL-export/styles/prd_MBL-styles.css' to 
'prd_MBL-epub/OEBPS/styles/prd_MBL-styles.css'
mtx-epub| copying 'prd_MBL-export/prd_MBL-div.xhtml' to 
'prd_MBL-epub/OEBPS/prd_MBL-div.xhtml'
mtx-epub| copying 'prd_MBL-export/cover.xhtml' to 
'prd_MBL-epub/OEBPS/cover.xhtml'
mtx-epub| relocating 
images...texmf/tex/texmf-context/scripts/context/lua/mtx-epub.lua:285: attempt 
to index field '?' (a nil value)

The error is in this function:

local function relocateimages(imagedata,oldname,newname,subpath,rename)
local data = io.loaddata(oldname)
if data then
subpath = joinfile(..,subpath)
report(relocating images)
local n = 0
local done = gsub(data,[[(id=)(.-)(.-background%-image *: 
*url%()(.-)(%))]], function(s1,id,s2,name,s3)
local newname = imagedata[id].newname
--  imagedata[id].newname throws the above error
if newname then
if subpath then
name = joinfile(subpath,basename(newname))
else
name = basename(newname)
end
 -- name = url.addscheme(name)
end
if newname then
n = n + 1
if rename then
name = joinfile(subpath,addsuffix(id,suffix(name)))
end
return s1 .. id .. s2 .. name .. s3
end
end)
report(%s images relocated in %a,n,newname)
if newname then
io.savedata(newname,done)
end
end
return images
end

My prd_MBL-pub.lua looks like:

return {
 [author]=Henning Hraban Ramm,
 [htmlfiles]={ prd_MBL-div.xhtml },
 [htmlroot]=prd_MBL-div.xhtml,
 [identifier]=96f59e0d-454d-93e6-3fa9-5a126440a831,
 [imagefile]=styles/prd_MBL-images.css,
 [imagepath]=images,
 [images]={
  [image1]={
   [element]=image,
   [height]=1.875cm,
   [id]=image-1,
   [name]=MT-Logo_grau,
   [url]=file:///MT-Logo_grau,
   [used]=img/MT-Logo_grau.pdf,
   [width]=2.671cm,
  },
  [image10]={
   [element]=image,
   [height]=3.750cm,
   [id]=image-10,
   [name]=blatt_esche,
   [url]=file:///blatt_esche,
   [used]=img/blatt_esche.jpg,
   [width]=4.038cm,
  },
...
 },
 [language]=de,
 [name]=prd_MBL,
 [stylepath]=styles,
 [styles]={ prd_MBL-defaults.css, prd_MBL-images.css, 
prd_MBL-styles.css },
 [title]=MBL,
 [xhtmlfiles]={ prd_MBL-tag.xhtml },
 [xmlfiles]={ prd_MBL-raw.xml },
}

What’s wrong?

Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

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

Re: [NTG-context] epub-mkiv-demo.epub

2015-04-13 Thread Hans Hagen

On 4/13/2015 3:37 PM, Piotr Kopszak wrote:

Thanks Hans!

That did the trick, just a README mentioning mudraw as dependency in
the source directory would do, however the file which is generated
contains errors, at least according to epubcheck and kindlegen, which
prevents conversion of resulting epub file to mobi format, what I
would ultimately like to do.

epubcheck output

Validating against EPUB version 3.0 - custom validation
Validating using EPUB version 3.0 rules.
ERROR(RSC-005): epub-mkiv-demo.epub/OEBPS/epub-mkiv-demo.opf(26,79):
Error while parsing file 'assertion failed: Duplicate ID 'cow-svg''.
ERROR(RSC-005): epub-mkiv-demo.epub/OEBPS/epub-mkiv-demo.opf(27,79):
Error while parsing file 'assertion failed: Duplicate ID 'cow-svg''.
ERROR(RSC-005): epub-mkiv-demo.epub/OEBPS/epub-mkiv-demo.opf(27,79):
Error while parsing file 'duplicate resource: OEBPS/images/cow.svg'.
WARNING(ACC-009):
epub-mkiv-demo.epub/OEBPS/epub-mkiv-demo-div.xhtml(38,120): MathML
should either have an alt text attribute or annotation-xml child
element.
WARNING(ACC-009):
epub-mkiv-demo.epub/OEBPS/epub-mkiv-demo-div.xhtml(42,120): MathML
should either have an alt text attribute or annotation-xml child
element.
WARNING(ACC-009):
epub-mkiv-demo.epub/OEBPS/epub-mkiv-demo-div.xhtml(54,198): MathML
should either have an alt text attribute or annotation-xml child
element.

Check finished with errors


hm, last time i checked it was ok .. epub is such a mess (to put it 
mildly) ... one manages to satisfy one checker/viewer and in the end it 
breaks another (which is probably why there are so many converters ... 
vendors don't care as they love to lock you in)


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
___

Re: [NTG-context] epub-mkiv-demo.epub

2015-04-11 Thread Hans Hagen

On 4/11/2015 9:12 AM, Piotr Kopszak wrote:

Hello list,

I am trying to compile example epub file epub-mkiv-demo.tex which is
provided with the recent beta, however I'm getting following errors
when I run:mtxrun --script epub --make epub-mkiv-demo

resolvers   | trees | analyzing 'home:texmf'
mtx-epub| using specification file
'epub-mkiv-demo-export/epub-mkiv-demo-pub.lua'
mtx-epub| the 'mudraw' binary is not present


install mudraw


mtx-epub| cover page image 'cover.xhtml' is not present
mtx-epub| saving dummy coverpage to
'epub-mkiv-demo-export/cover.xhtml'...42015/tex/texmf-context/scripts/context/lua/mtx-epub.lua:606:
bad argument #1 to 'gsub' (string expected, got nil)

No epub file is generated.

Any help would be greatly appreciated


i'll add a check

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

Re: [NTG-context] Creating bibliographies with ox-context

2021-11-23 Thread Henning Hraban Ramm via ntg-context

Am 23.11.21 um 18:02 schrieb juh via ntg-context:

Hi all,

I am kind of lost with references and ox-context and ox-epub.


What do you mean with "ox"?


Is there a tutorial how to integrate a bibliography in ConTeXt and
epub-Export?


Did you read the bibliography manual (mkiv-publications.pdf)?

ePub is hard (IMO); there’s the ePub manual (epub-mkiv.pdf) and the wiki 
pages Export and ePub:

https://wiki.contextgarden.net/Export
https://wiki.contextgarden.net/ePub

Esp. the latter is incomplete (WIP abandoned – mea culpa).

Since I need to produce an ePub myself, I’ll revisit that subject soon.
Don’t expect it to work automatically – I’m using XSLT to transform 
ConTeXt’s export into HTML.


Hraban
___
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] Export to epub

2011-11-27 Thread Keith McKay

Hi

I've been playing about with Export in Context with a view to producing 
ePubs.


When I run the script:

/mtxrun --script epub --make test.specification

/the test.tree is prepared but no epub file.  The output shown below has 
a couple or 'error' messages which are probably due to the way my text 
editor is set up (Scite Version 2.02).  If anyone is using Scite and 
producing ePubs I be grateful for some hints on how to set this up so 
that inkscape and zip works.


%%Script Output

mtx-epub| creating paths in tree test.tree
mtx-epub| copying toc.ncx to test.tree/OPS/toc.ncx
mtx-epub| copying test-styles.css to test.tree/OPS/test-styles.css
mtx-epub| copying test-images.css to test.tree/OPS/test-images.css
mtx-epub| copying test.css to test.tree/OPS/test.css
mtx-epub| copying test.xhtml to test.tree/OPS/test.xhtml
mtx-epub| running command 'inkscape --export-plain-svg=cow.svg 
cow.pdf'


'inkscape' is not recognized as an internal or external command,
operable program or batch file.

mtx-epub| copying cow.svg to test.tree/OPS/cow.svg
mtx-epub| copying hacker.jpg to test.tree/OPS/hacker.jpg
mtx-epub| copying mill.png to test.tree/OPS/mill.png
mtx-epub| creating archive

'zip' is not recognized as an internal or external command,
operable program or batch file.
'zip' is not recognized as an internal or external command,
operable program or batch file.
'zip' is not recognized as an internal or external command,
operable program or batch file.

mtx-epub| epub archive: test.tree/test.epubExit code: 0

%%End Script Output

I'm using Minimals ConTeXt  ver: 2011.09.27 20:05 MKIV  fmt: 2011.11.19  
int: english/english on a Windows 7 machine and the test.tex file is the 
|export-example.tex file renamed from the Minimals distribution|.


Thanks
Keith McKay

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

Re: [NTG-context] epub-mkiv-demo.epub

2015-04-13 Thread Piotr Kopszak
Thanks Hans!

That did the trick, just a README mentioning mudraw as dependency in
the source directory would do, however the file which is generated
contains errors, at least according to epubcheck and kindlegen, which
prevents conversion of resulting epub file to mobi format, what I
would ultimately like to do.

epubcheck output

Validating against EPUB version 3.0 - custom validation
Validating using EPUB version 3.0 rules.
ERROR(RSC-005): epub-mkiv-demo.epub/OEBPS/epub-mkiv-demo.opf(26,79):
Error while parsing file 'assertion failed: Duplicate ID 'cow-svg''.
ERROR(RSC-005): epub-mkiv-demo.epub/OEBPS/epub-mkiv-demo.opf(27,79):
Error while parsing file 'assertion failed: Duplicate ID 'cow-svg''.
ERROR(RSC-005): epub-mkiv-demo.epub/OEBPS/epub-mkiv-demo.opf(27,79):
Error while parsing file 'duplicate resource: OEBPS/images/cow.svg'.
WARNING(ACC-009):
epub-mkiv-demo.epub/OEBPS/epub-mkiv-demo-div.xhtml(38,120): MathML
should either have an alt text attribute or annotation-xml child
element.
WARNING(ACC-009):
epub-mkiv-demo.epub/OEBPS/epub-mkiv-demo-div.xhtml(42,120): MathML
should either have an alt text attribute or annotation-xml child
element.
WARNING(ACC-009):
epub-mkiv-demo.epub/OEBPS/epub-mkiv-demo-div.xhtml(54,198): MathML
should either have an alt text attribute or annotation-xml child
element.

Check finished with errors

epubcheck completed
---

kindlegen output
--
*
 Amazon kindlegen(Windows) V2.9 build 1029-0897292
 A command line e-book compiler
 Copyright Amazon.com and its Affiliates 2014
*

Info:I9026:option: (hidden) amazon creator tool or pipeline

Info:I9014:option: -verbose: Verbose output

Info(prcgen):I1048: Unpacking ePub file

Error(xmlmake):E27012: Item or process id already used: cow-svg
-

Any chance these might be fixed?

Best

Piotr


2015-04-11 12:52 GMT+02:00 Hans Hagen pra...@wxs.nl:
 On 4/11/2015 9:12 AM, Piotr Kopszak wrote:

 Hello list,

 I am trying to compile example epub file epub-mkiv-demo.tex which is
 provided with the recent beta, however I'm getting following errors
 when I run:mtxrun --script epub --make epub-mkiv-demo

 resolvers   | trees | analyzing 'home:texmf'
 mtx-epub| using specification file
 'epub-mkiv-demo-export/epub-mkiv-demo-pub.lua'
 mtx-epub| the 'mudraw' binary is not present


 install mudraw

 mtx-epub| cover page image 'cover.xhtml' is not present
 mtx-epub| saving dummy coverpage to

 'epub-mkiv-demo-export/cover.xhtml'...42015/tex/texmf-context/scripts/context/lua/mtx-epub.lua:606:
 bad argument #1 to 'gsub' (string expected, got nil)

 No epub file is generated.

 Any help would be greatly appreciated


 i'll add a check

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



-- 
http://okle.pl


epub-mkiv-demo.epub
Description: application/epub
___
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
___

[NTG-context] Epub format Was: Re: Context to epub: itemize

2015-02-16 Thread Keith J. Schultz
Hi Axel, All,

You have mentioned that most current ebook readers can not display MathML.

Well, the problem lies in the epub guidelines for the readers.

The problem is even worse. many readers do not even implement the full HTML5
standard. though that is the standard used in the latest epub stadnard.
The fact is to be considered epub readers the do not have to, it is a problem
of the epub reader definition.

The problem is what should ConTeXt output?
Should it output code that implements according to the full epub standard 
OR JUST 
what is handled by most epub readers!

IMHO : ConTeXt should not output XHMTL for epub, but HMTL5.
Yes, yes, I know XHMTL is part of HMTL5.

Another question for me is if ConTeXt should also output code for
the iBooks epub format, (Basicaly epub, but some extras).
There are thing you can do in/with ConTeXt that would work with iBooks
that do not in „ordinary“ epub books.

Then, there is the Kindle format one might want to consider!

Another, question which needs investigation is if the ConTeXt output for epub,
also, implementing the fallbacks for missing features which is required?

Just some added thoughts.

Basically, you can only expect ConTeXts epub output to be a starting point that
then has to be tweak.

regards
Keith.

 Am 17.02.2015 um 07:11 schrieb Axel Kielhorn t...@axelkielhorn.de:
 
 [...]
 Yes I know.
 Let me rephrase the question:
 
 Should the symbols used in epub be identical to those used in the pdf or 
 should the css determine the look of the symbols?
 Especially when one considers that most current ebook readers can't display 
 MathML.
 
 Even if I substitute the Symbols:
 
 \definesymbol[uni1][•]
 \definesymbol[uni2][–]
 \definesymbol[uni3][*]
 \definesymbol[uni4][·]
 
 \setupitemgroup [itemize] [1] [symbol=uni1]
 \setupitemgroup [itemize] [2] [symbol=uni2]
 \setupitemgroup [itemize] [3] [symbol=uni3]
 \setupitemgroup [itemize] [4] [symbol=uni4]
 
 I get a result that neither ADE nor Calibre interprets as a list.
 (Wrapping it in ul /ul doesn't help.) 
 

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

[NTG-context] Compiling to EPUB

2014-01-15 Thread H. Özoguz

Hi,

I tried to compile one of my projects to a EPUB by adding


\setupbackend[export=yes,xhtml=yes]
\setupexport
   [title={A nice book},
author={John Doe},
firstpage={huhn.jpg},
   ]


to the main-file. After that I began the compiling by


C:\Users\diretorymtxrun --script epub --make filename.specification


like I found it in the wiki: http://wiki.contextgarden.net/Epub

That is the output:


mtx-epub| creating paths in tree main_wilayatfaqih.tree
mtx-epub| copying cover.xhtml to 
main_wilayatfaqih.tree/OEBPS/cover.xhtml

mtx-epub| copying toc.ncx to main_wilayatfaqih.tree/OEBPS/toc.ncx
mtx-epub| copying main_wilayatfaqih.xhtml to 
main_wilayatfaqih.tree/OEBPS/main_wilayatfaqih.xhtml
mtx-epub| copying huhn.jpg to 
main_wilayatfaqih.tree/OEBPS/huhn.jpg

mtx-epub| creating archive

Der Befehl zip ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
Der Befehl zip ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
Der Befehl zip ist entweder falsch geschrieben oder
konnte nicht gefunden werden.


After that I could found the new directorys: filename.tree, but no 
EPUB-file in it. What was my mistake?


Thank you!
Huseyin

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


Re: [NTG-context] EPUB XHTML Format

2013-09-07 Thread Thangalin
Hi,

so, i'd never claim that context produces epub but it can be used in a
 workflow that involves epub as it outputs xml which can be transformed


That's a distinction that either might not matter or sometimes is lost:

http://tex.stackexchange.com/a/17642/2148
http://wiki.contextgarden.net/epub
ConTeXt has preliminary epub http://en.wikipedia.org/wiki/EPUBsupport...

Does ConTeXt refer to a suite of tools, or only the context command?
Either way, it appears that the line between the command and the tool set
is blurred a bit. This is completely understandable, too, as you wouldn't
want to write, the ConTeXt suite of tools includes a command, mtxrun, that
can produce EPUB files all the time when talking about EPUBs.


 supporting all variants of epub in the backend would be the same as
 hardcoding all kind of xml dts in the frontend (docbook, tei, whatever);
 instead we provide a general xml handler and a general xml export


That paragraph would be an excellent addition to the wiki; not sure where
though.

Kind regards.
___
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
___

[NTG-context] ConTeXt epub workflow

2014-07-02 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear gang,

I have an urgent project that needs three outputs: pdf, epub, and kindle.  
The formatting needs are pretty basic. In your experience:


What is the recommended, more efficient workflow for this sort of thing?  
Should I start with markdown and then generate context and epub (then  
convert epub=kindle I presume)? Or does one context file with pdf and  
epub outputs work well? Many years ago I did some documents in ConTeXt  
with both print and screen pdfs from a single source. Can we do the latter  
in ConTeXt now? Does anyone have any examples?


According to

http://wiki.contextgarden.net/epub

There is no support for graphics in ConTeXt epub output. Are there  
workarounds?


In any case, all advice for an efficient workflow for this project will be  
greatly appreciated!


Best wishes
Idris
--
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523
___
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
___


[NTG-context] Current status of epub export and documentation

2015-12-01 Thread Jan U. Hasecke
Hi all,

I am interested in the epub export feature of ConTeXt/MKIV.

There are a some hints in

epub-mkiv-demo.tex
epub-mkiv.pdf
http://wiki.contextgarden.net/ePub

I am looking for a more detailed example (or documentation) to learn
what is possible and what not.

(Eg. \showsetup{command-name} is not exported to epub)

Does anybody already made a full validated epub ebook with ConTeXt
including cover, titlepage, appendix etc. ?

Is there more information about the current status of the export
feature? A release schedule or roadmap?

Background of my question is that I am looking for a single source
publishing tool for printed books and ebooks.

TIA
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Quick question about dual output pdf and epub

2020-03-03 Thread Wolfgang Schuster
On Tue, 3 Mar 2020 19:37:47 +0100
Hans van der Meer  wrote:

> > 
> > and then run with --mode=epub
> 
> I am running with:
> mtxrun --autogenerate --mode=epub --script context "$1"
> but no epub document is generated, just the same result.pdf I get without 
> that mode.

You need

  \setupbackend[export=yes]

in your document. When you put the setup above in a "epub"
mode you create a epub-document only when you enable the mode
which is recommended because it can have side effects for
the normal PDF.

To avoid these side effects make an extra ConTeXt run
by enabling the mode to get the epub file.

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] EPUB woes

2013-11-18 Thread Keith J. Schultz
Hi All,

I find that the ConTeXt approach to creating the EPub is flawed is a 
fundemental way!

NOT TECHNICALLY.

The EPub Standard is a big mess and if you really look at not a true standard 
in a
true sense.

Let me explain. 
1) The file structure is well documented and properly defines
 the way a EPub file MUST contain and how file therein must
 be structure and listed. (notice that I use the word MUST)

2) Now, what a EPub-READER must implement to handle is very
 little. There are HARDLY ANY provisions that a certified 
EPuB-READER has
 to implement any particular engine or features therein to 
display/render
 the information contain in the EPub-file/wrapper.

In other words it is simply a wrapper file format. and truly nothing more.
There is NO REQUIREMENT in the standard that perfectly valid xhtml or
HTML5 will be  properly displayed in a certified EPub Reader!

The standard has become more strict in recent years, yet still lacking.


Am 16.11.2013 um 18:37 schrieb Aditya Mahajan adit...@umich.edu:

[snip, snip]

 When you run `mtxrun --script epub --make test`, it just takes the files 
 specificied in the files field, and zips them in as a epub file.
 
 Now, in principle, any epub reader should support the any XHTML file; in 
 practice, they only support the default XHTML tags. The XML+CSS file that 
 ConTeXt generates are not handled correctly by most (all?) EPUB readers.
Here is where my critic of ConTeXt approach grabs. What good is if one 
produces a perfectly correct EPub, yet hardly any EPub reader can
handle. 
I remember correctly, an EPub Reader need not implement the handling of 
xhtml inorder to be certified or, if you wish, adhere to the standard.
The basic reason why xhtml is handled is because most html renders 
handle xhtml. 
Yet, the standard only requires that very basic html features be 
implemented and the author is required to offer fallbacks incase features are 
not
 supported.

 So there are three options:
 
 1. Wait until the EPUB readers catch up. It took almost 10-15 years for the 
 browsers to catch up with the HTML standards, and I don't have much hope for 
 EPUB readers here. Last I checked, none of them supported even MATHML-2.
Like I mentioned above a EPub reader is not REQUIRED to support it!
 
 2. Write a script (either using xmlproc, or using you favorite XML parser in 
 your favorite language) that converts the XML generated by ConTeXt into a 
 standard XHTML file. This is the easiest and the least time consuming 
 alternative.
AGAIN, as mentioned above there is no guarantee that it will be 
displayed properly.
Support/export of HTML5 would seem to me to be a better option, but 
then the HTML5 standard is not
complete and not fully supported by most newer ereaders, also.
 
 3. Modify the way in which ConTeXt generates the XML files. Ideally, I should 
 be able to write something like
Would be nice if there where commands in ConTeXt or a module for 
defining what should go into the CSS and a 
mode epub where the ConTeXt commands are converted to suitible HTML5 
structures that are suitiable for
most ereaders. 
Features: 
   1) margins in percentages
   2) font sizes based on em
   3) a new file for every chapter optional for sections 
user defined
Just a few. Lots more can be found in any decent documentation on 
writing ebooks.


regards
Keith.

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


Re: [NTG-context] Export to epub

2011-11-27 Thread Hans Hagen

On 27-11-2011 14:03, Keith McKay wrote:

Hi

I've been playing about with Export in Context with a view to producing
ePubs.

When I run the script:

/mtxrun --script epub --make test.specification

/the test.tree is prepared but no epub file. The output shown below has
a couple or 'error' messages which are probably due to the way my text
editor is set up (Scite Version 2.02). If anyone is using Scite and
producing ePubs I be grateful for some hints on how to set this up so
that inkscape and zip works.


This is unrelated to scite (btw, you run a pretty old scite).


%%Script Output

mtx-epub | creating paths in tree test.tree
mtx-epub | copying toc.ncx to test.tree/OPS/toc.ncx
mtx-epub | copying test-styles.css to test.tree/OPS/test-styles.css
mtx-epub | copying test-images.css to test.tree/OPS/test-images.css
mtx-epub | copying test.css to test.tree/OPS/test.css
mtx-epub | copying test.xhtml to test.tree/OPS/test.xhtml
mtx-epub | running command 'inkscape --export-plain-svg=cow.svg cow.pdf'

'inkscape' is not recognized as an internal or external command,
operable program or batch file.
'zip' is not recognized as an internal or external command,
operable program or batch file.


you need to install inkscape (just google for it) as well as zip (often 
part of gnu binutils)


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
___


Re: [NTG-context] ConTeXt epub workflow

2014-07-02 Thread Aditya Mahajan

On Wed, 2 Jul 2014, Idris Samawi Hamid ادريس   سماوي حامد wrote:


Dear gang,

I have an urgent project that needs three outputs: pdf, epub, and kindle. The 
formatting needs are pretty basic. In your experience:


What is the recommended, more efficient workflow for this sort of thing? 
Should I start with markdown and then generate context and epub (then convert 
epub=kindle I presume)? Or does one context file with pdf and epub outputs 
work well?


If you are short on time and your formatting needs are basic, I would 
suggest that you start with markdown as your input format and use pandoc 
to convert it to epub and context. There are various tools to do epub to 
kindle conversion.


Markdown in a very primitive input format. For anything non-trivial 
(multiple types of floats, multiple types of emphasis, etc.) you have to 
resort to some sort of pre-processing of input.


Pandoc is the only tool that does Markdown to ConTeXt conversion. There 
are more tools for Markdown to LaTeX conversion. The ConTeXt markup 
generated by pandoc is not ideal (\bf, \em, etc instead of semantic 
markup); it is possible to change the output, but you need to learn how to 
program in Haskell.


You can start with ConTeXt and generate epub. However, ConTeXt generates 
XML+CSS rather than pure XHTML. Most browsers can handle XML+CSS, but 
most (all?) epub readers cannot. So, the output is not usable without some 
post-processing (this might have changed, I haven't tested ConTeXt epub in 
a year or so).


In the long run, I think that the easiest way to generate multiple 
output formats for non-trivial input text is to use XML as your input 
format.


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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

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] epub and pdf not the same

2020-03-04 Thread Hans van der Meer

On 3 Mar 2020, at 22:04, Rik Kabel <cont...@rik.users.panix.com> wrote:Instructions for creating the .epub from the export are contained in the log file.In the log comes:    create epub with: mtxrun --script epub --make "kookboek" --purge --rename --svgmathThis I did.The log gives: adding: mimetype (stored 0%)  adding: META-INF/ (stored 0%)  adding: META-INF/container.xml (deflated 32%)  adding: OEBPS/ (stored 0%)  adding: OEBPS/nav.xhtml (deflated 49%)  adding: OEBPS/images/ (stored 0%)  adding: OEBPS/kookboek.opf (deflated 65%)  adding: OEBPS/styles/ (stored 0%)  adding: OEBPS/styles/kookboek-styles.css (deflated 35%)  adding: OEBPS/styles/kookboek-defaults.css (deflated 80%)  adding: OEBPS/styles/kookboek-images.css (deflated 7%)  adding: OEBPS/cover.xhtml (deflated 38%)  adding: OEBPS/kookboek-div.html (deflated 67%)  adding: OEBPS/toc.ncx (deflated 53%)mtx-epub        | epub archive made using zip: kookboek.epubBut, the resulting epub is bad. Compare the output as pdf with the output as epub and it is immediately clear that something is wrong in the production of the epub. See also the corresponding -raw.xml. Unless I am making a gross mistake.

kookboek.epub
Description: application/epub


kookboek.pdf
Description: Adobe PDF document


kookboek-raw.xml
Description: XML document
dr. Hans van der Meer___
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] ConTeXt epub workflow

2014-07-03 Thread Keith McKay

Dear Idris

If your document is simple I would consider the following workflow. I 
use this method for simple novels to produce both ePubs and Kindle 
output relatively quickly from a word docs which authors send me.


Load the word doc into OpenOffice and save in OpenOffice format (.odt). 
Using the Writer2ePub extension in OpenOffice convert to ePub. You will 
get a reasonable looking ePub if you have taken a little care to style 
the document beforehand. Load the ePub into Sigil and tidy up the ePub. 
I Usually split the ePub into Chapters, embed fonts and add any images 
where I want them to go at this point. Once you are happy with the ePub 
you should test it on the various eReaders to make sure it looks as 
expected, don't be surprised to see differences and you may have to 
create different ePubs for the different eReaders. I have to do that for 
iBooks and Kobo eReaders. The idpf have an online ePub validator for 
ePubs which you should use to check for ePub standard compliance. Adobe 
Digital Editions is a useful tool here. You can now convert it into 
Kindle format using Kindle Previewer. If it requires changes, do that in 
Sigil and then run through Kindle Previewer again.


To get pdf output I have been experimenting with pandoc quite recently 
with some success. I take the ePub and rename as a zip file and open it 
to expose its directory structure. Using pandoc I convert it to ConText 
code and tidy up a wee bit but, on the whole, Pandoc gives a not bad 
conversion even if images are present. Again you will probably have to 
tidy up the Context code and play about with fonts etc.


This workflow looks a wee bit complicated but it does work well once you 
get the hang of it. I had originally tried using the Context to ePub but 
as previous correspondents have intimated you only get xml output rather 
than xhtml which is what eReaders require.


If you need help feel free to email me privately.

Best Wishes
Keith McKay
Hamilton, Scotland

On 02/07/2014 22:12, Idris Samawi Hamid ادريس سماوي حامد wrote:

Dear gang,

I have an urgent project that needs three outputs: pdf, epub, and 
kindle. The formatting needs are pretty basic. In your experience:


What is the recommended, more efficient workflow for this sort of 
thing? Should I start with markdown and then generate context and epub 
(then convert epub=kindle I presume)? Or does one context file with 
pdf and epub outputs work well? Many years ago I did some documents in 
ConTeXt with both print and screen pdfs from a single source. Can we 
do the latter in ConTeXt now? Does anyone have any examples?


According to

http://wiki.contextgarden.net/epub

There is no support for graphics in ConTeXt epub output. Are there 
workarounds?


In any case, all advice for an efficient workflow for this project 
will be greatly appreciated!


Best wishes
Idris


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

[NTG-context] epub

2012-02-16 Thread Jörg Hagmann
I would like to prepare some student material in epub format and tried the 
export-example.tex as follows:

- context export-example (by the way, gives an error with the latest beta, not 
with 2011.12.19 22:53,  but produces the output; shouldn't matter here).
- mtxrun --script epub --make export-example (tells me sh: 7z: command not 
found, but produces an epub file. Zipping manually doesn't make a difference).

In Calibre, only the text appears -- no paragraphs or anything else. The same 
happens when I try a minimal example with just paragraphs, bold, italic and 
sections.

Most likely I misunderstood something, or is epub support still too preliminary 
(see http://wiki.contextgarden.net/epub)?

I'm using current version: 2012.02.16 09:55 on a Mac (Lion).

Thanks, Jörg___
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
___

Re: [NTG-context] EPUB XHTML Format

2013-09-06 Thread Aditya Mahajan

On Fri, 6 Sep 2013, Thangalin wrote:


Hi,

never mind not being able to add the books to online marketplaces (such as

Amazon) because, again, the output does not validate.



I think the simplest thing to do would be to update the wiki and have a
note that informs readers that while ConTeXt can be used to generate an
EPUB, it is likely that that EPUB will be unusable for devices without
further transformation of the XML content. At least that way the knowledge
is out there and people are forewarned that not all EPUB documents are
equivalent.


It will also be nice to add a table that lists the EPUB readers (hardware 
and software) and tells whether ConTeXt produced EPUB documents work on 
them.


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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Error with export=yes

2011-05-09 Thread Reviczky, Adam
I still must miss something, because the epub doesn't seem to contain anything.

So here's a simple example:

\setupbackend[export=yes,xhtml=test.xhtml]
\starttext
Hello world!
\stoptext

Then after running context:

mtxrun --script epub --make test.specification
table={
 [files]={ test.xhtml },
 [identifier]=89a4fe19-4610-b806-b0dd-5fad6ede3dde,
 [name]=test,
 [root]=test.xhtml,
}
  adding: mimetype (stored 0%)
  adding: META-INF/ (stored 0%)
  adding: META-INF/container.xml (deflated 32%)
  adding: OPS/ (stored 0%)
  adding: OPS/test.opf (deflated 49%)

mtx-epub| epub archive: test.tree/test.epub

The xhtml seems to be missing from OPS, but even putting that in there doesn't 
give me a working epub (even though it increases the epub size).

Help?

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


Re: [NTG-context] TeX as an eBook engine?

2009-12-03 Thread William Adams

On Dec 3, 2009, at 4:12 AM, luigi scarso wrote:


Maybe epub as backend is a more interesting  idea:
given (some kind of gentle )  tex file one can produce an epub file  
as  result.



You're putting the cart before the horse.

Sadly, epub is rather lacking in markup capabilities.

Instead, one should use a full-fledged markup scheme such as TEI, then  
one can convert that using an XSLT and add a nicely designed CSS to  
create a .epub which will be as good as it gets, but unfortunately,  
won't be as nice to read as a nicely formatted .pdf due to limitations  
of the HJ capabilities of .epub viewing programs.


An excellent example of the limitations of the .epub format in  
comparison to .pdf is _Introduction to Mathematical Philosophy_:


http://people.umass.edu/klement/russell-imp.html

William

--
William Adams
senior graphic designer
Fry Communications
Sphinx of black quartz, judge my vow.

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


Re: [NTG-context] What happened to the ePub script?

2015-01-18 Thread Henning Hraban Ramm
Am 2015-01-18 um 20:45 schrieb Keith Schultz keithjschu...@icloud.com:

 I started documenting ConTeXt’s current ePub/export behaviour in 
 http://wiki.contextgarden.net/ePub and will merge/delete the content of the 
 current wiki pages as soon as I’m content with its content ;)
 
 * Do you think it would be better to document export and ePub separately?
 
   I think it best that they be handle separately.
   Especially, if you want to be thorough.

Already did the split after sending my previous message, so there’s now ePub 
and http://wiki.contextgarden.net/Export

I’ll probably create more pages on specific ePub topics like images and cover 
pages.


Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

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

Re: [NTG-context] epub-mkiv-demo.epub

2015-04-13 Thread Hans Hagen

On 4/13/2015 3:37 PM, Piotr Kopszak wrote:


ERROR(RSC-005): epub-mkiv-demo.epub/OEBPS/epub-mkiv-demo.opf(26,79):
Error while parsing file 'assertion failed: Duplicate ID 'cow-svg''.


we can probably catch that one


epub-mkiv-demo.epub/OEBPS/epub-mkiv-demo-div.xhtml(38,120): MathML
should either have an alt text attribute or annotation-xml child
element.


but this is crap .. i see no tex user adding an alternate to each formula

in fact, the epub script has the option to turn the mathml into svg, 
this was added after google decided to kick out mathml (ok, we could 
push some svg into the annotation-xml i guess)


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
___

Re: [NTG-context] Quick question about dual output pdf and epub

2020-03-03 Thread Jan U. Hasecke
Am 03.03.20 um 22:04 schrieb Rik Kabel:
> Instructions for creating the .epub from the export are contained in the
> log file.

Has anyone ever got an epub that validates?

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] EPUB XHTML Format

2013-09-06 Thread Thangalin
Hi,

never mind not being able to add the books to online marketplaces (such as
 Amazon) because, again, the output does not validate.


I think the simplest thing to do would be to update the wiki and have a
note that informs readers that while ConTeXt can be used to generate an
EPUB, it is likely that that EPUB will be unusable for devices without
further transformation of the XML content. At least that way the knowledge
is out there and people are forewarned that not all EPUB documents are
equivalent.

Kindest regards.
___
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
___

Re: [NTG-context] EPUB woes

2013-11-18 Thread Keith J. Schultz

Am 16.11.2013 um 17:51 schrieb Bill Meahan subscribed_li...@meahan.net:

 On 11/16/2013 11:00 AM, Keith J. Schultz wrote:
 Hi Bill,
 
 Using a PDF as a basis for creating an Epub ebook is actually a lost cause.
 EPUB is a container format that just wraps around your PDF. I do not know of 
 any
 ereader that can actually adjust the formatting/layout of a pdf in any 
 significantly
 useful way. You are stuck with the formatting in the PDF.
 
 For a EPUB-ebook to adjust properly you need to use HTML5 and CSS. Producing 
 PDF an sticking it into a
 EPUB or MOBI wrapper just does not make sense.
 
 regards
  Keith.
 
 You are totally misreading what I wrote!
Sorry.  But, from your original statement:
I have followed the steps on the wiki to the letter, using the export-example 
file provided with the standalone distribution. A PDF generated from the file 
is exactly what I would expect from an example. The generated epub, however, is 
useless - all the text is jammed together into one continuous block with no 
formatting whatsoever.

I assumed that the PDF was be put in the EPub- wrapper! According to the 
EPub standard this can be done!
I have to admit that I have not been following the progress done in ConTeXt 
for creating EPubs/eBooks.

Others have answered, and explain what you need to do to get a possibly 
working EPub.
See my comments in my replies to their posts.

regards
Keith. 


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

Re: [NTG-context] What happened to the ePub script?

2015-01-18 Thread Keith Schultz
Hi Henning,

 Am 17.01.2015 um 13:52 schrieb Henning Hraban Ramm te...@fiee.net:
 
 Hi there,
 
 I started documenting ConTeXt’s current ePub/export behaviour in 
 http://wiki.contextgarden.net/ePub and will merge/delete the content of the 
 current wiki pages as soon as I’m content with its content ;)
 
 * Do you think it would be better to document export and ePub separately?
 
I think it best that they be handle separately.
Especially, if you want to be thorough.

regards
Keith.

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

Re: [NTG-context] Epub format Was: Re: Context to epub: itemize

2015-02-17 Thread Hans Hagen

On 2/17/2015 8:24 AM, Keith J. Schultz wrote:

Hi Axel, All,

You have mentioned that most current ebook readers can not display MathML.

Well, the problem lies in the epub guidelines for the readers.

The problem is even worse. many readers do not even implement the full HTML5
standard. though that is the standard used in the latest epub stadnard.
The fact is to be considered epub readers the do not have to, it is a
problem
of the epub reader definition.

The problem is what should ConTeXt output?
Should it output code that implements according to the full epub standard
OR JUST
what is handled by most epub readers!

IMHO : ConTeXt should not output XHMTL for epub, but HMTL5.
Yes, yes, I know XHMTL is part of HMTL5.


And html 5 is just html with some extras (and assuming javascript i 
guess) ... marketing.



Another question for me is if ConTeXt should also output code for
the iBooks epub format, (Basicaly epub, but some extras).


Isn't a book supposed to be independent and kind of portable + long term 
visible? So no way that a context epub will be specific for a device. (I 
probably can't even get it on / test it on my outdated ipad 1 anyway.)



There are thing you can do in/with ConTeXt that would work with iBooks
that do not in „ordinary“ epub books.

Then, there is the Kindle format one might want to consider!


Another lock-in device.


Another, question which needs investigation is if the ConTeXt output for
epub,
also, implementing the fallbacks for missing features which is required?


Context outputs three varants: regular xml, xhtml, and stupified xhtml 
with div/class tagging. The last one is supposed to work on all devices 
as it doesn't demands anything beyond css.



Just some added thoughts.

Basically, you can only expect ConTeXts epub output to be a starting
point that
then has to be tweak.


Indeed, as it's all xml one can process it into something 'better'. 
There is no way we can adapt to every change in specs, so the best we 
can do is something generic.


Hans


regards
Keith.


Am 17.02.2015 um 07:11 schrieb Axel Kielhorn t...@axelkielhorn.de
mailto:t...@axelkielhorn.de:

[...]
Yes I know.
Let me rephrase the question:

Should the symbols used in epub be identical to those used in the pdf
or should the css determine the look of the symbols?
Especially when one considers that most current ebook readers can't
display MathML.

Even if I substitute the Symbols:

\definesymbol[uni1][•]
\definesymbol[uni2][–]
\definesymbol[uni3][*]
\definesymbol[uni4][·]

\setupitemgroup [itemize] [1] [symbol=uni1]
\setupitemgroup [itemize] [2] [symbol=uni2]
\setupitemgroup [itemize] [3] [symbol=uni3]
\setupitemgroup [itemize] [4] [symbol=uni4]

I get a result that neither ADE nor Calibre interprets as a list.
(Wrapping it in ul /ul doesn't help.)





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

Re: [NTG-context] What happened to the ePub script?

2015-01-13 Thread Henning Hraban Ramm
Am 2015-01-13 um 15:58 schrieb Hans Hagen pra...@wxs.nl:

 the whole generation of epub was cleanup up (already a while ago)

I know, but it seems I have to recreate my whole workflow again.

 just use:
 
 \setupbackend[export=yes]
 
 all happens in dedicated sub directories now
 
 jobname-export
 jobname-epub
 
 also, there have been some changes in the output (more detail in sectioning 
 and so i.e. chains and levels) ... just look at the files produced
 
 there is also div based output

Didn’t have enough time to look into everything in detail, but if I just run 
the epub script after the context run, it fails:


$ mtxrun --script epub --make solo

resolvers   | caching | skipping 'files' for 'home:texmf' from 
'/Users/hraban/Library/texmf/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/54be04d87dd160089f572b19cb5c97e9'
 (version mismatch)
mtx-epub| using specification file 'solo-export/solo-pub.lua'
mtx-epub| the 'mudraw' binary is not present
mtx-epub| using cover page 'giraffe.pdf'
mtx-epub| copying coverpage 'giraffe.pdf' to 
'solo-export/giraffe.pdf'...texmf/tex/texmf-context/scripts/context/lua/mtx-epub.lua:557:
 bad argument #1 to 'gsub' (string expected, got nil)


I’ll investigate further tomorrow.

Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

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

Re: [NTG-context] epub and pdf not the same

2020-03-04 Thread Wolfgang Schuster

Hans van der Meer schrieb am 04.03.2020 um 13:23:
On 3 Mar 2020, at 22:04, Rik Kabel <mailto:cont...@rik.users.panix.com>> wrote:


Instructions for creating the .epub from the export are contained in 
the log file.


In the log comes:
    create epub with: mtxrun --script epub --make "kookboek" --purge 
--rename --svgmath

This I did.

The log gives:
 adding: mimetype (stored 0%)
  adding: META-INF/ (stored 0%)
  adding: META-INF/container.xml (deflated 32%)
  adding: OEBPS/ (stored 0%)
  adding: OEBPS/nav.xhtml (deflated 49%)
  adding: OEBPS/images/ (stored 0%)
  adding: OEBPS/kookboek.opf (deflated 65%)
  adding: OEBPS/styles/ (stored 0%)
  adding: OEBPS/styles/kookboek-styles.css (deflated 35%)
  adding: OEBPS/styles/kookboek-defaults.css (deflated 80%)
  adding: OEBPS/styles/kookboek-images.css (deflated 7%)
  adding: OEBPS/cover.xhtml (deflated 38%)
  adding: OEBPS/kookboek-div.html (deflated 67%)
  adding: OEBPS/toc.ncx (deflated 53%)
mtx-epub     | epub archive made using zip: kookboek.epub


But, the resulting epub is bad. Compare the output as pdf with the 
output as epub and it is immediately clear that something is wrong in 
the production of the epub. See also the corresponding -raw.xml. 
Unless I am making a gross mistake.


You make things easier when you show your TeX file.

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] Quick question about dual output pdf and epub

2020-03-03 Thread Hans van der Meer
I followed your advice and added the setup:

> You need
>  \setupbackend[export=yes]
> in your document. 

This, however, does not result in an .epub file but an export directory 
containing an html and xhtml file (only partially conformant to the equivalent 
pdf).

Can I get the output as an .epub file? Some more changes needed?

> 
> On Tue, 3 Mar 2020 19:37:47 +0100
> Hans van der Meer  wrote:
> 
>>> 
>>> and then run with --mode=epub
>> 
>> I am running with:
>>mtxrun --autogenerate --mode=epub --script context "$1"
>> but no epub document is generated, just the same result.pdf I get without 
>> that mode.
> 
> You need
> 
>  \setupbackend[export=yes]
> 
> in your document. When you put the setup above in a "epub"
> mode you create a epub-document only when you enable the mode
> which is recommended because it can have side effects for
> the normal PDF.
> 
> To avoid these side effects make an extra ConTeXt run
> by enabling the mode to get the epub file.
> 
> 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
> ___

___
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] Bugs in XML export (for ePub)

2014-03-11 Thread Thangalin
Hi Hraban,

I tried to create ePubs using ConTeXt late last year (it was a driving
factor for me to switch from LaTeX).

In practice, ConTeXt cannot actually produce ePub content of any
sufficient complexity that an ePub reader (such as Kindle) can read. I
abandoned that development line a while ago. That said, ConTeXt is
orders of magnitude easier to work with than LaTeX (for me) and has an
architecture that holds a promising future.

Since my project exports XML, I began an ePub solution using XSLT and
DocBook. The ant4docbook Java application can produce ePub files from
DocBook using an ant task, making the API simple to use. The resulting
ePub archive can be read by various e-readers.

http://ant4docbook.sourceforge.net/

Unless anyone says otherwise (or there have been momentous
improvements in this area), I would recommend that you do not use
ConTeXt to create ePub files. While technically it can produce an ePub
archive, you will waste countless hours hitting wall after wall.
___
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
___


[NTG-context] ePub and Metapost

2015-10-20 Thread Fabrice Couvreur
Hi,
Is it possible to produce a epub file from a file containing a figure made with 
Metapost ? 
Thanks,
Fabrice

Envoyé de mon iPad___
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
___

Re: [NTG-context] Current status of epub export and documentation

2015-12-01 Thread Henning Hraban Ramm
Am 2015-12-01 um 21:54 schrieb Jan U. Hasecke <juh+ntg-cont...@mailbox.org>:

> Hi all,

Hi Jan,

> I am interested in the epub export feature of ConTeXt/MKIV.
> ...
> I am looking for a more detailed example (or documentation) to learn
> what is possible and what not.
...
> Does anybody already made a full validated epub ebook with ConTeXt
> including cover, titlepage, appendix etc. ?

> Background of my question is that I am looking for a single source
> publishing tool for printed books and ebooks.

The current bad documentation on the Wiki is by me.

I produced two commercial ePubs with ConTeXt, but it’s really no fun, and I 
needed my own scripts that replace ConTeXt’s ePub script.

I’m starting with the "raw" XML export and use XSL (Saxon) to transform it to 
HTML plus the ePub special ePub files.
After all, a Python (or whatever) script would have been the better solution 
for this complex conversion.
A CSS that works with most important readers needed also a lot of time. (But 
that’s a problem of ePub/Readers, not of ConTeXt, of course.)

I can’t recommend ConTeXt as a source for ePub. But I would try it again - and 
probably start to rewrite the wiki anew, because ConTeXt is a moving target…


Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

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

Re: [NTG-context] ConTeXt epub workflow

2014-07-02 Thread Idris Samawi Hamid ادريس سماوي حامد
On Wed, 02 Jul 2014 15:12:10 -0600, Idris Samawi Hamid ادريس   سماوي حامد  
isha...@colostate.edu wrote:


What is the recommended, more efficient workflow for this sort of thing?  
Should I start with markdown and then generate context and epub (then  
convert epub=kindle I presume)? Or does one context file with pdf and  
epub outputs work well? Many years ago I did some documents in ConTeXt  
with both print and screen pdfs from a single source. Can we do the  
latter in ConTeXt now?



Er, Can we do the *former* in ConTeXt? Viz., generate both pdf and epub  
from a single source.


Best wishes
Idris
--
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523
___
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
___

Re: [NTG-context] ConTeXt epub workflow

2014-07-02 Thread Andres Conrado
I've been using a workflow to generate epub + PDF for several books so far,
and in my experience, using Markdown base files is very good: you can
include images, links, etc., and then you can use pandoc (
http://johnmacfarlane.net/pandoc/) to generate both epub and context
source, also you can customize the templates used by pandoc to generate the
context source; that way you can handle the pdf layout; however, you must
remember that epub can't handle mathml; you must include equations as
images, if you have them, and you won't have any real presentational
features: epub is as simple as it can be. Like HTML in the early 90s. But
this way works for me.

Andrés Conrado Montoya
___
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
___

Re: [NTG-context] What happened to the ePub script?

2015-01-17 Thread Henning Hraban Ramm
Hi there,

I started documenting ConTeXt’s current ePub/export behaviour in 
http://wiki.contextgarden.net/ePub and will merge/delete the content of the 
current wiki pages as soon as I’m content with its content ;)

* Do you think it would be better to document export and ePub separately?


Of course I have questions, e.g.:

* How can I set the current \date in a metadata variable?
(I know it’s also in the date tag of document, but I know how to format \date 
…)

This doesn’t work (i.e. I get „\date“ in XML/XHTML):

\settaggedmetadata[
version={\date}
]

* Can I influence the directory/file names of the export from within the source?
E.g. if I compile „minimal.tex“, I get minimal-export and minimal-epub
The —result switch doesn’t change anything.

* BTW: Can I set —result from within my ConTeXt source?

More to follow ;)



Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

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

Re: [NTG-context] ePUB creation problems

2015-03-18 Thread Hans Hagen

On 3/18/2015 1:00 PM, Gerben Wierda wrote:

I’m getting to the next phase of ePUB creation. My project now exports
and with mtxrun —script epub, I can create an actual ePUB, but there are
issues I need to fix.


attached a manual i'm on-and-off working on .. i have no time now for 
more info


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
-


epub-mkiv.pdf
Description: Adobe PDF document
___
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
___

Re: [NTG-context] Epub broken

2018-07-05 Thread Rik Kabel

On 7/5/2018 10:27, Hans Hagen wrote:

On 7/4/2018 3:17 PM, Rik Kabel wrote:

The following example fails with recent betas, but not with TL18:

define fails


Sorry to be so terse in the original note. By failure, I mean that the 
generated .epub document is incorrect; parts are out of order, as:



(When one section is removed, the disorder is gone, so a smaller test 
file will not exhibit this problem.)


In a larger document, endnotes are scrambled as well, with two index 
marks for some and none for others. The generated .pdf (which is a 
throw-away when trying to produce epub) does not show the same problems.


The .epub file is attached.

--
RIk


test.epub
Description: application/epub
___
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] Quick question about dual output pdf and epub

2020-03-03 Thread Wolfgang Schuster
On Tue, 3 Mar 2020 21:58:16 +0100
Hans van der Meer  wrote:

> I followed your advice and added the setup:
> 
> > You need
> >  \setupbackend[export=yes]
> > in your document. 
> 
> This, however, does not result in an .epub file but an export directory 
> containing an html and xhtml file (only partially conformant to the 
> equivalent pdf).
> 
> Can I get the output as an .epub file? Some more changes needed?

Your log file should have a line like this when you put the \setupbackend 
setting in your document:

backend > export > create epub with: mtxrun --script epub --make "test" 
[--purge --rename --svgmath]

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] EPUB XHTML Format

2013-09-07 Thread Hans Hagen

On 9/6/2013 10:20 PM, Thangalin wrote:

Hi,

The best reader imho is iBooks on the iPad, nothing else, from what
I've seen, comes close. But that is one expensive eReader. :(


We'll just have everybody in the world who has a Kindle, Kobo, or other
reader exchange their existing hardware, and then purchase an iPad plus
iBook. Problem solved? ;-)

ConTeXT TeX reading xml - export - optional transform - EPUB + CSS*
you want 'direct epub html from context' (no xslt) but on the other
hand use xslt to map onto context while context can do xml directly
... chicken egg


Well, given that ConTeXt doesn't actually produce validating EPUB
documents, I suspect not many people will actually use that feature.
It's great in theory, but if it produces books that don't actually work
on the Kindle or Kobo, then it's unusable in practice -- never mind not
being able to add the books to online marketplaces (such as Amazon)
because, again, the output does not validate.


context doesn't produce epub (which at this moment is so floating that i 
would keep updating, which is fine if i'd use it myself or in projects 
at pragma, but not for the sake of keeping up) but does an export to xml 
(*.export)


as a bonus it can output some extra stuff so that in a browser that can 
deal with xml+css (and a few xhtml tags for hyperlinks) we can preview


then there is mtx-epub that can make an epub but that is a moving target 
(at some point we stopped extending waiting for a decent standard)


so, i'd never claim that context produces epub but it can be used in a 
workflow that involves epub as it outputs xml which can be transformed


supporting all variants of epub in the backend would be the same as 
hardcoding all kind of xml dts in the frontend (docbook, tei, whatever); 
instead we provide a general xml handler and a general xml export


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
___


Re: [NTG-context] EPUB woes

2013-11-16 Thread Bill Meahan

On 11/16/2013 11:00 AM, Keith J. Schultz wrote:

Hi Bill,

Using a PDF as a basis for creating an Epub ebook is actually a lost cause.
EPUB is a container format that just wraps around your PDF. I do not know of any
ereader that can actually adjust the formatting/layout of a pdf in any 
significantly
useful way. You are stuck with the formatting in the PDF.

For a EPUB-ebook to adjust properly you need to use HTML5 and CSS. Producing 
PDF an sticking it into a
EPUB or MOBI wrapper just does not make sense.

regards
Keith.


You are totally misreading what I wrote!

I know there is no direct PDF - EPUB route and it's a fool's errand to 
think there is. However, with appropriate headers, ConTeXt is supposed 
to create either a PDF or and EPUB from a common source file marked up 
for ConTeXt. Hence, if I run


wwm$ context options export-example.tex

I expect to get a PDF *but* if I run

wwm$ mtxrun --script epub --make export-example.tex  - the same 
export-example.tex as above


I would /expect/ to get a valid EPUB file, or so I'm lead to believe.

At the moment, I'm simply trying it out using Hans' export-example.tex 
file that comes as part of the standard ConTeXt distribution, either 
Standalone or part of one of the other distributions. I haven't even 
opened the export-example.tex file in an editor (yet) in this round of 
trials and I've even run the script against it right in the /base/ 
directory where it is found in the distribution so I don't understand 
why it is not producing a valid EPUB. Once I've got that sorted out, I 
can try applying the lessons learned to my own documents.


--
Bill Meahan, Westland, Michigan

 
  “Writing is like getting married. One should never

   commit oneself until one is amazed at one's luck.”

   —Iris Murdoch

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


Re: [NTG-context] Quick question about dual output pdf and epub

2020-03-03 Thread Rik Kabel
Instructions for creating the .epub from the export are contained in the 
log file.


On 3/3/2020 15:58, Hans van der Meer wrote:

I followed your advice and added the setup:


You need
  \setupbackend[export=yes]
in your document.

This, however, does not result in an .epub file but an export directory 
containing an html and xhtml file (only partially conformant to the equivalent 
pdf).

Can I get the output as an .epub file? Some more changes needed?


On Tue, 3 Mar 2020 19:37:47 +0100
Hans van der Meer  wrote:


and then run with --mode=epub

I am running with:
mtxrun --autogenerate --mode=epub --script context "$1"
but no epub document is generated, just the same result.pdf I get without that 
mode.

You need

  \setupbackend[export=yes]

in your document. When you put the setup above in a "epub"
mode you create a epub-document only when you enable the mode
which is recommended because it can have side effects for
the normal PDF.

To avoid these side effects make an extra ConTeXt run
by enabling the mode to get the epub file.

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
___

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

2012-02-16 Thread luigi scarso
On Thu, Feb 16, 2012 at 11:51 AM, Jörg Hagmann joerg.hagm...@unibas.ch wrote:
 I would like to prepare some student material in epub format and tried the
 export-example.tex as follows:

 - context export-example (by the way, gives an error with the latest beta,
 not with 2011.12.19 22:53,  but produces the output; shouldn't matter here).
 - mtxrun --script epub --make export-example (tells me sh: 7z: command not
 found, but produces an epub file. Zipping manually doesn't make a
 difference).

 In Calibre, only the text appears -- no paragraphs or anything else. The
 same happens when I try a minimal example with just paragraphs, bold, italic
 and sections.

 Most likely I misunderstood something, or is epub support still too
 preliminary (see http://wiki.contextgarden.net/epub)?

 I'm using current version: 2012.02.16 09:55 on a Mac (Lion).

 Thanks, Jörg

Comment
%\starttabulate[|l|r|p|]
%\NC left \NC right \NC \input ward \NC \NR
%\NC l\NC r \NC \input ward \NC \NR
%\stoptabulate

and be sure to have all the images in the same folder, to have 7z and
inkscape --- otherwise comment

%\placefigure
%  {}
%  {\externalfigure[cow.pdf]}


I've just made the epub, if you want I can send you.

-- 
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Epub woes

2012-11-15 Thread Bill Meahan

On 11/15/2012 07:13 PM, Aditya Mahajan wrote:


Have you considered using pandoc to generate epub?

If your text is relatively simple (no multiline math, no fancy image 
scaling, no complicated tables, etc.), then Markdown is a reasonable 
input format. You can use pandoc to translate the text to multiple 
output formats (including ConTeXt).


In general, I have found pandoc's XHTML export to be more predictable 
than that of ConTeXt. I have used pandoc's epub export only for short 
articles, but from what I remember, it does handle cover images and 
toc correctly.


Aditya
__

Nice idea Aditya but in this particular case it won't suffice.

I'm working on a rather long novel, not a technical document, and my 
/primary/ target electronic format is PDF. That PDF can be distributed 
electronically or submitted directly to a printer. In the current 
market, however, so many people want to read books on their smartphone, 
dedicated ebook reader or tablet an author really limits their market if 
they don't distribute an ebook version.


Of course, the two primary ebook formats (in terms of market) are epub 
and Kindle which is easy to generate from an epub. Sticking to ConTeXt 
allows me to generate PDF, Process PDF and epub from a single source. I 
can easily touch up the epub in Sigil if I need to.


For this kind of document, typography and excellent typesetting are 
extremely important (in the printed/PDF version, anyway). ConTeXt gives 
me that.


I'll keep pandoc in mind for some other documents, though. Thanks for 
the lead.


--
Bill Meahan
Westland, Michigan USA

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


Re: [NTG-context] Documentation for EPUB conversion

2013-08-28 Thread Mica Semrick
You will probably need CSS styling.

Maybe you can use one of the popular CSS reset or normalize stylesheets
available. I haven't tested, but http://necolas.github.io/normalize.css/ is
pretty popular.

Beware, a lot of EPUB rendering engines are crap, and there is not a lot of
conformity throughout various products. This seems sad... since it is just
XHTML.

-Mica


On Wed, Aug 28, 2013 at 9:29 AM, Thangalin thanga...@gmail.com wrote:

 Hi,

 I ran the following simple document through ConTeXt:

 \setupbackend[export=yes,xhtml=yes]

 \enableregime[utf-8]
 \mainlanguage[en]
 \language[en]

 \setupexport[
   title={A nice book},
   author={John Doe},
   firstpage={cover.jpg},
 ]

 \starttext
   \startitemize
 \item First
 \item Second
 \item Third
   \stopitemize

 \stoptext

 I then ran mtxrun:

 mtxrun --script epub --make t.specification

 This produced a document with the cover page correctly; however, the items
 were listed on a single line in the EPUB, instead of on lines by themselves.

 I have a couple of questions:

- *Styling.* Is custom styling required to format bullet or numbered
lists in the resulting EPUB XHTML document?
- *Knowledge.* Would anyone be willing to share their experiences (and
tips) for transforming ConTeXt documents to EPUB?
- *Examples.* Where can I find examples of simple and complex ConTeXt
documents being converted to EPUB documents having a similar layout?

 Many thanks and kind regards.


 ___
 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

 ___

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

[NTG-context] EPUB XHTML Format

2013-09-03 Thread Thangalin
Hi,

The attached t.tex file produces the attached t.xhtml file. I have looked
at the following documents:

   - http://en.wikipedia.org/wiki/EPUB#Open_Publication_Structure_2.0.1
   - http://en.wikipedia.org/wiki/DTBook
   - http://www.idpf.org/epub/20/spec/OPS_2.0.1_draft.htm
   - http://www.w3.org/TR/xhtml11/doctype.html
   - http://www.w3.org/TR/html5/sections.html

It seems that the macros in t.tex are being written out as XML elements,
verbatim. It is my understanding that these XML elements, however, do not
conform to the minimal content models associated with XHTML 1.1.

What needs to happen to take a minimal ConTeXt file (such as the attached)
to produce a minimum viable EPUB that:

   - Generates XHTML headers (including !DOCTYPE and html...)
   - Produces images as img tags, rather than float tags.
   - Uses typical XHTML tags for body elements (e.g., ol for ordered
   lists).

Ideally, I would like to do something such as:

   - context t.tex
   - mtxrun --script epub --make t.specification

to generate an EPUB that passes validation of
epubcheckhttp://code.google.com/p/epubcheck/wiki/Library,
with an output XHTML file that more closely matches the XHTML specification.

How can I help?

Kind regards.


t.tex
Description: TeX document


t.xhtml
Description: application/xhtml


epub-errors.log
Description: Binary data
___
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
___

Re: [NTG-context] Now that I have something working on mkiv, I'd like to try ePUB

2015-03-17 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

there are some ePUB and XML conversion/processing questions time to time here 
in the forum.

Try to search or to ask directly someone who asked for ePUB conversion.

(I have no experience with ePUB.)

Lukas


On Sun, 15 Mar 2015 22:12:33 +0100, Gerben Wierda gerben.wie...@rna.nl wrote:


Now that I have my book project basically running on mkiv (the layout probably 
has a few problems left, the main one currently being extra whitespace after a 
chapter heading  compared to mkii), I’d like to try producing ePUB from it.

ConTeXtgarden says I have to add a backend and points me to the info on the 
standard project structure (which I use), but there I don’t find anything about 
a backend. The extended example says that starting january 2015, things have 
changed with ePUB, which probably also applies to me as I only recently started 
with a fresh download of a current ConTeXt mkiv.

So, can someone tell me what I need to do to get a basic ePUB output?

And what command do I run to update my separate ConTeXt tree?

And which one to find out what version I’m running?

G



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038

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

Re: [NTG-context] Why mode not recognized?

2020-03-03 Thread Hans van der Meer

> On 3 Mar 2020, at 22:21, Wolfgang Schuster 
>  wrote:
> 
> On Tue, 3 Mar 2020 22:07:51 +0100
> Hans van der Meer  wrote:
> 
>> Calling ConTeXt with:
>> 
>> mtxrun --autogenerate --mode=epub --script context "$1"
>> 
>> and in the tex-file called:
>> \starttext
>> \startmode[epub]
>>  Producing EPUB\crlf
>> \stopmode
>> \startnotmode[epub]
>>  Not producing EPUB\crlf
>> \stopnotmode
>> \stoptext
>> 
>> This produces "Not producing EPUB" Why?
> 
> I guess parameters which are passed to the context script have to come after 
> you call the script, e.g.
> 
> mtxrun --autogenerate --script context --mode=epub "$1"
> 
> Wolfgang

Indeed. That sets the mode. Thanks.

Hans van der Meer

> ___
> 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] Quick question about dual output pdf and epub

2020-02-28 Thread Hans Hagen

On 2/28/2020 11:48 AM, Christoph Hintermüller wrote:

Hi
Hust not to miss something or mess up every thing.
Can i setup my document preamble such that i can without any switching
create pdf and epub output at the same time.

Want to provide my lecture notes in pdf and epub format.

In other words does it have any side effects on pdf output, if i put
\setuptoutput command preparing document for xhtml/epub output in my
document preamble/main document?

Or would i have to enclose this in some \ifelse conditional block? If
is there a possibility to control condition from mtxrun command line?
Currently it is created at the same time but it runs slower. Indeed 
using some mode makes sense because you might also want to have a 
different layout (the simpler, the less possible side effects, actually 
when doing epub or export using some very large page also makes sense as 
then there can be less interference of page breaks and so).


\startmode [epub]
  
\stopmode

and then run with --mode=epub

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] EPUB workflow from ConTeXt source?

2011-02-17 Thread Daniel Lyons

On Feb 17, 2011, at 12:59 AM, Hans Hagen wrote:

 On 17-2-2011 8:14, Gerben Wierda wrote:
 On 16 Feb 2011, at 17:47, Wolfgang Schuster wrote:
 
 
 Am 16.02.2011 um 17:42 schrieb gerben.wie...@rna.nl:
 
 I'd like to keep working in one format so I was wondering if there is a
 ConTeXt based workflow/setup that can produce EPUB (next to normal PDF)?
 
 With MkIV you can get a xml version of document with 
 \setupbackend[export=yes].
 
 But that XML is not ePUB's XML, I assume.
 
 no, but one can of course convert one kind of xml into another
 
 for epub one has to provice css etc anyway (and epub is not much more than 
 packaged html + css)

This would also be useful to me. In my experience, the unpleasant part of 
generating ePub is making correctly formatted manifests and putting them in the 
right places inside the right kinds of zip files. If ConTeXt could do this for 
me, it would certainly make life easier. On the other hand, it may not be 
appropriate to bother because there are other tools that will convert HTML to 
ePub for you and make the manifests (Calibre, for example). 

I consider CSS intractable so that's not something I would worry about ConTeXt 
generating for me, if it were on the table.

 going the other way around, processing an epub file also demands some 
 handywork as the source code is not by definition well structured


ePub is definitely structured. I would say too structured, since it makes you 
provide both a ToC manifest and a navigation manifest that necessarily must 
include almost identical information ;) Of course, depending on a simplified 
browser for your document viewing and having lots of secret failover modes to 
handle poorly formatted documents makes the structure less meaningful than it 
ought to be.

You are free to break your document into as many HTML chunks as you wish, but 
you are limited to fairly prosaic HTML and CSS. I'm of the impression the HTML 
documents generally map onto chapters so as not to distress the hardware's 
memory constraints too much.

Overall, ePub and Kindle's format strike me as too much and too little 
respectively. I should be able to change the font and the formatting, but I 
definitely consider HTML + CSS is too much complexity.

— 
Daniel Lyons

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


Re: [NTG-context] EPUB woes

2013-11-18 Thread Keith J. Schultz
Hi Hans,


Am 18.11.2013 um 13:21 schrieb Hans Hagen pra...@wxs.nl:

 On 11/18/2013 10:00 AM, Keith J. Schultz wrote:
 
  2) Now, what a EPub-READER must implement to handle is very
   little. There are HARDLY ANY provisions that a certified 
 EPuB-READER has
  to implement any particular engine or features therein to 
 display/render
   the information contain in the EPub-file/wrapper.
 
 right, and I'm not going to waste time on it till i have a decent ebook 
 reader that behaves well
The point you are missing is that the ereaders are behaving well. They 
are following the epub 
 standard, and that to the letter of the standard. The problem is that 
the standard does not 
enforce any particular implementation. If you look at the slow progress 
of the standard that 
actually requires a full implementation of the HTML5 standard. That  
wait will very long.

Furthermore, ereaders are made by companies more interested in profits 
than spending a few Euros
more to put decent HTML engines into their readers. Why they do not do 
that is beyond me!
 
 3. Modify the way in which ConTeXt generates the XML files. Ideally, I 
 should be able to write something like
  Would be nice if there where commands in ConTeXt or a module for 
 defining what should go into the CSS and a
  mode epub where the ConTeXt commands are converted to suitible HTML5 
 structures that are suitiable for
  most ereaders.
  Features:
1) margins in percentages
2) font sizes based on em
 3) a new file for every chapter optional for sections 
 user defined
  Just a few. Lots more can be found in any decent documentation on 
 writing ebooks.
 
 context outputs xml and as a bonus provides a css too ... one can always 
 convert that xml to his/her ebooks liking .. maybe at some point the mtx-epub 
 script will do that

I always to like to look at programming as modular and would think that 
a epub/ebook module would be nice that maps
there are commands for layingout ebooks. these commands can then be 
mapped back to standard context commands.
For some interested in producing a epub then can use the conventions 
for producing ebooks and ConTeXt can provide the
math conversions to regular page dimensions used in PDFs for proofing 
or creating a printed version. It would also make the
creation of EPubs from ConTeXt a simple parsing exercise.   

regards
Keith.
___
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
___


Re: [NTG-context] ConTeXt epub workflow

2014-07-03 Thread Hans Hagen

On 7/2/2014 11:12 PM, Idris Samawi Hamid ادريس   سماوي حامد wrote:

Dear gang,

I have an urgent project that needs three outputs: pdf, epub, and
kindle. The formatting needs are pretty basic. In your experience:

What is the recommended, more efficient workflow for this sort of thing?
Should I start with markdown and then generate context and epub (then
convert epub=kindle I presume)? Or does one context file with pdf and
epub outputs work well? Many years ago I did some documents in ConTeXt
with both print and screen pdfs from a single source. Can we do the
latter in ConTeXt now? Does anyone have any examples?


the export is xml reflecting the structure etc and as the whole idea of 
xml is that it can be transformed one can map that to anything needed


there is mtx-epub but i need to look into that again as one problem with 
epub is that all these substandards and devices differ a bit


context can produce xhtml which then with a css can be viewed in full 
blown browsers (i used mozilla) although for some constructs (like 
hyperlinks) html like thingies have to be used (not part of css)


as xhtml is not becoming the standard it should be, i'm considering a 
variant output where everything is a div or span which then even 
more moves things to css (outputting html tags makes no sense as we then 
would end up in tag abuse due to the limited number of tags)



According to

http://wiki.contextgarden.net/epub

There is no support for graphics in ConTeXt epub output. Are there
workarounds?


all relevant info is embedded and output (with a css mapping to graphics 
that one can supply as png/jpg/whatever)



In any case, all advice for an efficient workflow for this project will
be greatly appreciated!


(luigi is working on some stuff that transforms the export into wiki 
pages for the garden, e.g. the new publications manual)


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
___

Re: [NTG-context] Epub format Was: Re: Context to epub: itemize

2015-02-17 Thread Keith Schultz

 Am 17.02.2015 um 21:16 schrieb Hans Hagen pra...@wxs.nl:
 
 On 2/17/2015 8:24 AM, Keith J. Schultz wrote:
 Hi Axel, All,
 
 
[snip, snip]
 IMHO : ConTeXt should not output XHMTL for epub, but HMTL5.
 Yes, yes, I know XHMTL is part of HMTL5.
 
 And html 5 is just html with some extras (and assuming javascript i guess) 
 ... marketing.
The html 5 standard is far more. For one is makes flash, java and more 
obsolete. Far more than a marketing gag! 
 
 Another question for me is if ConTeXt should also output code for
 the iBooks epub format, (Basicaly epub, but some extras).
 
 Isn't a book supposed to be independent and kind of portable + long term 
 visible? So no way that a context epub will be specific for a device. (I 
 probably can't even get it on / test it on my outdated ipad 1 anyway.)
I was thinking more along the line of the spine.
 
 There are thing you can do in/with ConTeXt that would work with iBooks
 that do not in „ordinary“ epub books.
 
 Then, there is the Kindle format one might want to consider!
 
 Another lock-in device.
 
 Another, question which needs investigation is if the ConTeXt output for
 epub,
 also, implementing the fallbacks for missing features which is required?
 
 Context outputs three varants: regular xml, xhtml, and stupified xhtml with 
 div/class tagging. The last one is supposed to work on all devices as it 
 doesn't demands anything beyond css.
If that is the case it is not very useful for a decent workflow. There 
would be to much to
tweak to make good looking output.

I have not investigated how it handles dimensions, widths, font sizes, 
spacing, etc.
These are important in order to create output that adjust proper to the
devices capabilities. 
One should avoid absolute values.

Of course if we want to emulate the printed output then we could simply
create a pdf or very page as pdf and put in an epub wrapper.


Not asking for anything, just mentioning it.

reagrds
Keith.

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

Re: [NTG-context] Export to epub

2011-11-27 Thread Keith McKay

Hans
Thanks for the hints.

I downloaded inkscape but but still get the same error message.  I'm not 
too concerned about that just now.  Unfortunately I couldn't find zip so 
I played about with 7-Zip and managed to get the script to work.  It's 
still work in progress since I'm not sure I have the switches right but 
I edited the epub generation part of mtx-epub.lua to look like this:


os.execute(format(7z a -tzip -mx0 %s %s,epubfile,mimetype))
os.execute(format(7z a -tzip %s %s,epubfile,META-INF))
os.execute(format(7z a -tzip %s %s,epubfile,OPS))

and using a simple css file I can view the test epub in Adobe Digital 
Editions.


I'm used to using Sigil to edit ePubs and Context but luatex is all new 
territory for me.


Thanks
Keith

On 27/11/2011 14:43, Hans Hagen wrote:

On 27-11-2011 14:03, Keith McKay wrote:

Hi

I've been playing about with Export in Context with a view to producing
ePubs.

When I run the script:

/mtxrun --script epub --make test.specification

/the test.tree is prepared but no epub file. The output shown below has
a couple or 'error' messages which are probably due to the way my text
editor is set up (Scite Version 2.02). If anyone is using Scite and
producing ePubs I be grateful for some hints on how to set this up so
that inkscape and zip works.


This is unrelated to scite (btw, you run a pretty old scite).


%%Script Output

mtx-epub | creating paths in tree test.tree
mtx-epub | copying toc.ncx to test.tree/OPS/toc.ncx
mtx-epub | copying test-styles.css to test.tree/OPS/test-styles.css
mtx-epub | copying test-images.css to test.tree/OPS/test-images.css
mtx-epub | copying test.css to test.tree/OPS/test.css
mtx-epub | copying test.xhtml to test.tree/OPS/test.xhtml
mtx-epub | running command 'inkscape --export-plain-svg=cow.svg cow.pdf'

'inkscape' is not recognized as an internal or external command,
operable program or batch file.
'zip' is not recognized as an internal or external command,
operable program or batch file.


you need to install inkscape (just google for it) as well as zip 
(often part of gnu binutils)


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
___


Re: [NTG-context] EPUB XHTML Format

2013-09-04 Thread Hans Hagen

On 9/4/2013 3:19 AM, Thangalin wrote:

Hi,

The attached t.tex file produces the attached t.xhtml file. I have
looked at the following documents:

  * http://en.wikipedia.org/wiki/EPUB#Open_Publication_Structure_2.0..1
http://en.wikipedia.org/wiki/EPUB#Open_Publication_Structure_2.0.1
  * http://en.wikipedia.org/wiki/DTBook
  * http://www.idpf.org/epub/20/spec/OPS_2.0.1_draft.htm
  * http://www.w3.org/TR/xhtml11/doctype.html
  * http://www.w3.org/TR/html5/sections.html

It seems that the macros in t.tex are being written out as XML elements,
verbatim. It is my understanding that these XML elements, however, do
not conform to the minimal content models associated with XHTML 1.1.


you get a representation in xml indeed, but not verbatim, but as close 
as possible to the genaric (parent) structure elements in context


of course we could alternatively export all as div 
class=tag-subtag-... but i don't like that too much; html itself is 
not rich enough for our purpose



What needs to happen to take a minimal ConTeXt file (such as the
attached) to produce a minimum viable EPUB that:

  * Generates XHTML headers (including !DOCTYPE and html...)


not needed as we're 'standalone'


  * Produces images as img tags, rather than float tags.


the css can deal with them (info is written to files for that)

the only real problematic thing is hyperlinks as css has no provision 
for that so there's an option to inject a...



  * Uses typical XHTML tags for body elements (e.g., ol for ordered
lists).


xhtml has no typical tags .. it's xml + css (or xslt) ... unfortunately 
browsers have messed up html so much (extensions, too tolerant support 
for unmatched tags, different rendering models) that xhtml never really 
took off


the export of context is in fact just xml, and by tagging it as xhtml we 
can apply css to it; but if someone has a workflow for producing epub an 
option if to postprocess that xml file into whatever epub one wants 
(i.e. the export is generic and carries as much info as possible)



Ideally, I would like to do something such as:

  * context t.tex
  * mtxrun --script epub --make t.specification

to generate an EPUB that passes validation of epubcheck
http://code.google.com/p/epubcheck/wiki/Library, with an output XHTML
file that more closely matches the XHTML specification.


Everytime we look into epub there's another issue ... it's not a 
standard but reversed engineered application mess (happen soften with 
xml: turn some application data structures into xml and call it a standard)


I only tested (long ago already) with some firefox plugin (i don't have 
a recent epub device, only an old firts generation one which is dead 
slow, never relly used, probably broken by now) and i refuse to buy a 
new one till resolution is decent (and i only want generic devices, not 
something bound to some shop)



How can I help?


by testing

as i have no real use/demand for epub it's not something i look into on 
a daily basis


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
___


Re: [NTG-context] EPUB XHTML Format

2013-09-05 Thread Thangalin
Hi,

handle XML+CSS well. However, most (all?) EPUB readers don't. So, the
 question is asking if instead ConTeXt could generate a XHTML


Precisely.


  If you need both EPUB and PDF, start with a semantically rich XML
 vocabulary, e.g. DocBook. In this case you can relatively easy transfrom


My database doesn't generate DocBook. It generates a custom XML document
from which I generate a web page, and a LaTeX document (though soon to be
ConTeXt!). There is no reason, technically, why I cannot convert the source
XML to either DocBook or directly to EPUB. There are, however, problems
doing that, which Aditya correctly surmises:


 - Automatic section numbering taking care of different conversions.
 - Automatic index generation and sorting
 - Inserting hyphenation points at the appropriate place in the generated
 output (so that the browser can effectively rely on TeX's hyphenation
 algorithm to do line-breaking).
 - Convert TeX math to MathML.

 The current ConTeXT XML source can translate a well formed ConTeXt
 document into a XML document with the above features.


Those are exactly the issues that I would love to resolve using ConTeXt for
generating an EPUB. (The MathML isn't as important to me, but I can see
other people wanting such a feature.)

What about accessibility? I expect that visually impaired people would
 depend on document structure rather than its visualisation.


That is a good point. The current XML structure produced by ConTeXt (Hans
correct me here if I'm mistaken) is not accessible, as it doesn't adhere to
strict XHTML. I suspect that div tags would not be accessible -- the only
way to provide true accessibility in EPUB format would be by using the
strict XHTML tags.

for instance, we have more levels than H1..H6, so how to do H7? if someone
 has to deal with that, he/she can as well transform all into H1 with some
 class which is a local solution then


I realize there is not going to be a one-to-one map of all possible ConTeXt
macros to XHTML. For someone who has 7 levels of nested sections they would
either have to rewrite some Lua or perform some post-processing (e.g., with
XSLT). I would posit that a document with 7 levels of nested sections is
not going to be a common occurrence.

When I talk about strict XHTML, I'm proposing that a _simple_ ConTeXt
document (up to 6 header levels, numbered and unnumbered lists, images,
text emphasis, etc.) should generate a simple, validating XHTML document.
Trying to attain 100% coverage of ConTeXt transmogrification to XHTML is
ridiculous when, I suspect, 80% coverage would meet most needs. :-)

It is definitely possible to translate the ConTeXt EPUB output to XHTML.
However, there are practical realities that hinder such an approach.
Architecturally, if anyone is going to translate an XML document to EPUB
format, it certainly won't be this way:

*XML + XSLT - ConTeXT File - ConTeXt EPUB XML + XSLT - EPUB + CSS*

It'll be this way, which is less time-consuming, less complex, and less
susceptible to err:

*XML + XSLT (or API) - EPUB + CSS*

However, it does not, as we all know, produce as feature rich output as
leveraging the ConTeXt abilities that Aditya mentioned, which was the point:

*XML + XSLT - ConTeXT TeX - EPUB + CSS*

Kindest regards.
___
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
___

Re: [NTG-context] EPUB workflow from ConTeXt source?

2011-02-17 Thread Gerben Wierda
On 17 Feb 2011, at 10:49, Hans Hagen wrote:

 i have a style somewhere that typesets an epub document (directly) but when 
 testing an epub file from somehwere it found out that there were artifacts 
 like
 
 H11/H1H3Chapter title/H3

Ugh. Yes, that clearly shows that the seemingly conceptual items like H1, H3 
are in fact used as graphical elements. Interesting to see how that then ends 
up in a table of contents for instance.

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


Re: [NTG-context] Compiling to EPUB

2014-01-15 Thread Henning Hraban Ramm

Am 2014-01-16 um 04:14 schrieb H. Özoguz h.oezo...@mmnetz.de:

 Der Befehl zip ist entweder falsch geschrieben oder
 konnte nicht gefunden werden.
 
 After that I could found the new directorys: filename.tree, but no 
 EPUB-file in it. What was my mistake?

Looks like you should install a command line „zip“ program.
ePub is a zipped format.



Greetlings, Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

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


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

2019-02-04 Thread Martin Bruchanov

Hi all,

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?

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?



Regards,

BruXy


___
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] Export to epub

2011-11-30 Thread Keith McKay

Hans

Updated Context and ran my test file.  It seems to work as I would 
expect on my computer.  The output from Scite is below.


Thanks again for your help.
Keith McKay


mtx-epub| creating paths in tree test.tree
mtx-epub| copying toc.ncx to test.tree/OPS/toc.ncx
mtx-epub| copying test-styles.css to test.tree/OPS/test-styles.css
mtx-epub| copying test-images.css to test.tree/OPS/test-images.css
mtx-epub| copying test.css to test.tree/OPS/test.css
mtx-epub| copying test.xhtml to test.tree/OPS/test.xhtml
mtx-epub| running command 'inkscape --export-plain-svg=cow.svg 
cow.pdf'


'inkscape' is not recognized as an internal or external command,
operable program or batch file.

mtx-epub| copying cow.svg to test.tree/OPS/cow.svg
mtx-epub| copying hacker.jpg to test.tree/OPS/hacker.jpg
mtx-epub| copying mill.png to test.tree/OPS/mill.png
mtx-epub| creating archive

'zip' is not recognized as an internal or external command,
operable program or batch file.
'zip' is not recognized as an internal or external command,
operable program or batch file.
'zip' is not recognized as an internal or external command,
operable program or batch file.

7-Zip 9.10 beta  Copyright (c) 1999-2009 Igor Pavlov  2009-12-22
Scanning

Creating archive test.epub

Compressing  mimetype

Everything is Ok

7-Zip 9.10 beta  Copyright (c) 1999-2009 Igor Pavlov  2009-12-22

Scanning

Updating archive test.epub

Compressing  META-INF\container.xml

Everything is Ok

7-Zip 9.10 beta  Copyright (c) 1999-2009 Igor Pavlov  2009-12-22

Scanning

Updating archive test.epub

Compressing  OPS\cow.svg
Compressing  OPS\hacker.jpg
Compressing  OPS\mill.png
Compressing  OPS\test-images.css
Compressing  OPS\test-styles.css
Compressing  OPS\test.css
Compressing  OPS\test.opf
Compressing  OPS\test.xhtml
Compressing  OPS\toc.ncx

Everything is Ok

mtx-epub| epub archive made using 7zip (7z): 
test.tree/test.epubExit code: 0


On 30/11/2011 07:05, Keith McKay wrote:

Hans

I'll update and try it tonight.

Thanks for your help

Keith

On 29/11/2011 18:07, Hans Hagen wrote:

On 27-11-2011 23:27, Keith McKay wrote:

Hans
Thanks for the hints.

I downloaded inkscape but but still get the same error message. I'm not
too concerned about that just now. Unfortunately I couldn't find zip so
I played about with 7-Zip and managed to get the script to work. It's
still work in progress since I'm not sure I have the switches right but
I edited the epub generation part of mtx-epub.lua to look like this:

os.execute(format(7z a -tzip -mx0 %s %s,epubfile,mimetype))
os.execute(format(7z a -tzip %s %s,epubfile,META-INF))
os.execute(format(7z a -tzip %s %s,epubfile,OPS))

and using a simple css file I can view the test epub in Adobe Digital
Editions.

I'm used to using Sigil to edit ePubs and Context but luatex is all new
territory for me.


I've added this method too, so when zip is not found, 7z is tried ... 
I didn't test it.


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
___


Re: [NTG-context] back-up.lua; mtx-epub.lua

2012-06-07 Thread Hans Hagen

On 7-6-2012 14:48, Henning Hraban Ramm wrote:

Am 2012-06-07 um 00:00 schrieb Andy Thomas:


Hello all,
I do not know, how many people are using the epub export, but here are
two more changes in order to achieve a valid epub file with
information from the context source:


Since I need ePub for my current project (even if th eprint version is
much more important), I’m very grateful for your enhancements! I hope
they end up in the distro ASAP.


I wonder if Luigi already tested the patches (as he's sort of in charge 
of the epub device/viewer testing) ..


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
___


Re: [NTG-context] back-up.lua; mtx-epub.lua

2012-06-07 Thread luigi scarso
On Thu, Jun 7, 2012 at 3:53 PM, Hans Hagen pra...@wxs.nl wrote:
 On 7-6-2012 14:48, Henning Hraban Ramm wrote:

 Am 2012-06-07 um 00:00 schrieb Andy Thomas:

 Hello all,
 I do not know, how many people are using the epub export, but here are
 two more changes in order to achieve a valid epub file with
 information from the context source:


 Since I need ePub for my current project (even if th eprint version is
 much more important), I’m very grateful for your enhancements! I hope
 they end up in the distro ASAP.


 I wonder if Luigi already tested the patches (as he's sort of in charge of
 the epub device/viewer testing) ..
no, still in my todo queue -- busy in other stuffs

-- 
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] EPUB XHTML Format

2013-09-05 Thread honyk
On 2013-09-04 Thangalin wrote:
 
 What needs to happen to take a minimal ConTeXt file (such as the
 attached) to produce a minimum viable EPUB that:
 

It is always difficult to parse and further process not well structured
plain text without advanced semantics. Garbage in, garbage out.

If you need both EPUB and PDF, start with a semantically rich XML
vocabulary, e.g. DocBook. In this case you can relatively easy transfrom
(XSLT) input data into almost any format. These basic outputs like EPUB or
PDF (via XSL-FO) you can get out-of-the-box. The Context output can be
generated using dbcontext: http://dblatex.sourceforge.net/

In sum, use XML as your primary source and from it derive everything else.

Jan

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


Re: [NTG-context] EPUB XHTML Format

2013-09-06 Thread Thangalin
Hi,

The best reader imho is iBooks on the iPad, nothing else, from what I've
 seen, comes close. But that is one expensive eReader. :(


We'll just have everybody in the world who has a Kindle, Kobo, or other
reader exchange their existing hardware, and then purchase an iPad plus
iBook. Problem solved? ;-)

ConTeXT TeX reading xml - export - optional transform - EPUB + CSS*
 you want 'direct epub html from context' (no xslt) but on the other hand
 use xslt to map onto context while context can do xml directly ... chicken
 egg


Well, given that ConTeXt doesn't actually produce validating EPUB
documents, I suspect not many people will actually use that feature. It's
great in theory, but if it produces books that don't actually work on the
Kindle or Kobo, then it's unusable in practice -- never mind not being able
to add the books to online marketplaces (such as Amazon) because, again,
the output does not validate.

Kind regards.
___
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
___

Re: [NTG-context] Epub format Was: Re: Context to epub: itemize

2015-02-18 Thread Henning Hraban Ramm

Am 2015-02-18 um 20:10 schrieb Keith J. Schultz keithjschu...@web.de:

 Hi Hraban,
 
 Good to know. I will investigate at another time and give feed back.
 I am in the middle of moving, so I do not have much time.
 
 We ought to think of making a export specific to epub in the long run!

For me, the regular export XML plus XSL conversion is the way to go; the „HTML“ 
is rather unusable.
The epub script is nice and all, it was important for me to get me running, but 
I guess I won’t use it in my final workflow.


Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

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

Re: [NTG-context] Now that I have something working on mkiv, I'd like to try ePUB

2015-03-18 Thread Gerben Wierda
On 18 Mar 2015, at 08:46, Hans Hagen pra...@wxs.nl wrote:

 On 3/18/2015 7:34 AM, Gerben Wierda wrote:
 On 18 Mar 2015, at 02:14, Hans Hagen pra...@wxs.nl
 mailto:pra...@wxs.nl wrote:
 
 On 3/17/2015 10:33 PM, Gerben Wierda wrote:
 On 17 Mar 2015, at 16:51, Hans Hagen pra...@wxs.nl
 mailto:pra...@wxs.nl wrote:
 
 On 3/17/2015 3:41 PM, Gerben Wierda wrote:
 Nobody?
 
 On 15 Mar 2015, at 22:12, Gerben Wierda gerben.wie...@rna.nl
 mailto:gerben.wie...@rna.nl wrote:
 
 Now that I have my book project basically running on mkiv (the
 layout probably has a few problems left, the main one currently
 being extra whitespace after a chapter heading  compared to mkii),
 I’d like to try producing ePUB from it.
 
 ConTeXtgarden says I have to add a backend and points me to the
 info on the standard project structure (which I use), but there I
 don’t find anything about a backend. The extended example says
 that starting january 2015, things have changed with ePUB, which
 probably also applies to me as I only recently started with a
 fresh download of a current ConTeXt mkiv.
 
 So, can someone tell me what I need to do to get a basic ePUB output?
 
 \setupbackend
 [export=yes]
 
 more on wiki
 
 The wiki doesn’t really help. Am I supposed to create another product
 file in …/products?
 
 no, just enable it ... export files end up in a subpath
 
 I did add this to the environment file and tried to create an ePub for
 the whole book and for an individual chapter, but no success yet:
 
 luna-wifi:chapters gerben$ (. /usr/local/src/ConTeXt/tex/setuptex 
 mtxrun --script epub --make c_loosely.specification)
 Setting /usr/local/src/ConTeXt/tex as ConTeXt root.
 
 mtx-epub| unknown specificaton file
 'c_loosely.specification-export/c_loosely.specification-pub' for
 'c_loosely.specification'
 luna-wifi:chapters gerben$ (. /usr/local/src/ConTeXt/tex/setuptex 
 mtxrun --script epub --make prd_book.specification)
 Setting /usr/local/src/ConTeXt/tex as ConTeXt root.
 
 mtx-epub| unknown specificaton file
 'prd_book.specification-export/prd_book.specification-pub' for
 'prd_book.specification'
 
 
 What am I missing? What is a specification file?
 
 you process the tex file as normal .. that will produce a specification file 
 that will be used if you use mtxrun --script epub later (the call is 
 mentioned at the end of a tex run that has the export enabled)

Ha, I’ve got my first ePUB!

(. /usr/local/src/ConTeXt/tex/setuptex  context --mode=editor  
../products/prd_book.tex)
(. /usr/local/src/ConTeXt/tex/setuptex  mtxrun --script epub --make 
prd_book)

Now, it’s time to see how I can tweak the ePUB.

Things I would like to do:
- The quotes that now appear on the LHS page facing the first page of a chapter 
should instead appear on the top of the RHS new chapter page above the heading
- manage footnotes. Probably best is to have them at the end of the chapter 
when producing for ePub. Basically, I need to know what to do if the structure 
of my document differs between PDF and ePUB.
- manage the index (empty now)
- manage bibliographic references (empty now)
 And of course I need to look into CSS and stuff to create a nice ePUB

G

 
 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
 ___

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

[NTG-context] Now that I have something working on mkiv, I'd like to try ePUB

2015-03-15 Thread Gerben Wierda
Now that I have my book project basically running on mkiv (the layout probably 
has a few problems left, the main one currently being extra whitespace after a 
chapter heading  compared to mkii), I’d like to try producing ePUB from it.

ConTeXtgarden says I have to add a backend and points me to the info on the 
standard project structure (which I use), but there I don’t find anything about 
a backend. The extended example says that starting january 2015, things have 
changed with ePUB, which probably also applies to me as I only recently started 
with a fresh download of a current ConTeXt mkiv.

So, can someone tell me what I need to do to get a basic ePUB output?

And what command do I run to update my separate ConTeXt tree? 

And which one to find out what version I’m running?

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

Re: [NTG-context] Quick question about dual output pdf and epub

2020-03-04 Thread Hans Hagen

On 3/4/2020 8:49 AM, Jan U. Hasecke wrote:

Am 03.03.20 um 22:04 schrieb Rik Kabel:

Instructions for creating the .epub from the export are contained in the
log file.


Has anyone ever got an epub that validates?
last time i looked into it i found that there was no real consustency in 
checking (apart from device specific issues) so i gave up on that


anyway, an export is not per se an epub .. one might for instance add 
additional css


(in the meantime i actually gave away my ebook reader ... now i wait 
till color shows up in e-ink which might give me a reason to play a bit 
more)


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
___


[NTG-context] Quick question about dual output pdf and epub

2020-02-28 Thread Christoph Hintermüller
Hi 
Hust not to miss something or mess up every thing.
Can i setup my document preamble such that i can without any switching
create pdf and epub output at the same time.

Want to provide my lecture notes in pdf and epub format.

In other words does it have any side effects on pdf output, if i put
\setuptoutput command preparing document for xhtml/epub output in my
document preamble/main document?

Or would i have to enclose this in some \ifelse conditional block? If
is there a possibility to control condition from mtxrun command line?

Best 
Xristoph


___
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] Quick question about dual output pdf and epub

2020-02-28 Thread Henning Hraban Ramm


> Am 2020-02-28 um 12:07 schrieb Hans Hagen :
> 
> On 2/28/2020 11:48 AM, Christoph Hintermüller wrote:
>> Hi
>> Hust not to miss something or mess up every thing.
>> Can i setup my document preamble such that i can without any switching
>> create pdf and epub output at the same time.
>> Want to provide my lecture notes in pdf and epub format.
>> In other words does it have any side effects on pdf output, if i put
>> \setuptoutput command preparing document for xhtml/epub output in my
>> document preamble/main document?

Yes, it has (or at least used to have) side effects if you enable XML output – 
hyphenation and line breaking is affected.


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] EPUB workflow from ConTeXt source?

2011-02-17 Thread Mica Semrick
Have you considered authoring in something besides context? Say TEI XML or
Docbook, or even markdown (if possible)? If markdown is suitable, then you
can end up with both epub and context at the end. Or if using TEI or
docbook, you can write a map file (something I have been trying to do) and
typeset the xml file directly with context. I'm always happier knowing that
I can get as many different output types from a single source as possible.

BR,
Mica


 Message: 8
 Date: Thu, 17 Feb 2011 01:10:42 -0700
 From: Daniel Lyons fus...@storytotell.org
 To: mailing list for ConTeXt users ntg-context@ntg.nl
 Subject: Re: [NTG-context] EPUB workflow from ConTeXt source?
 Message-ID: d7225cf0-f6cf-485f-be01-c8a254efc...@storytotell.org
 Content-Type: text/plain; charset=windows-1252


 On Feb 17, 2011, at 12:59 AM, Hans Hagen wrote:

  On 17-2-2011 8:14, Gerben Wierda wrote:
  On 16 Feb 2011, at 17:47, Wolfgang Schuster wrote:
 
 
  Am 16.02.2011 um 17:42 schrieb gerben.wie...@rna.nl:
 
  I'd like to keep working in one format so I was wondering if there is
 a
  ConTeXt based workflow/setup that can produce EPUB (next to normal
 PDF)?
 
  With MkIV you can get a xml version of document with
 \setupbackend[export=yes].
 
  But that XML is not ePUB's XML, I assume.
 
  no, but one can of course convert one kind of xml into another
 
  for epub one has to provice css etc anyway (and epub is not much more
 than packaged html + css)

 This would also be useful to me. In my experience, the unpleasant part of
 generating ePub is making correctly formatted manifests and putting them in
 the right places inside the right kinds of zip files. If ConTeXt could do
 this for me, it would certainly make life easier. On the other hand, it may
 not be appropriate to bother because there are other tools that will convert
 HTML to ePub for you and make the manifests (Calibre, for example).

 I consider CSS intractable so that's not something I would worry about
 ConTeXt generating for me, if it were on the table.

  going the other way around, processing an epub file also demands some
 handywork as the source code is not by definition well structured


 ePub is definitely structured. I would say too structured, since it makes
 you provide both a ToC manifest and a navigation manifest that necessarily
 must include almost identical information ;) Of course, depending on a
 simplified browser for your document viewing and having lots of secret
 failover modes to handle poorly formatted documents makes the structure less
 meaningful than it ought to be.

 You are free to break your document into as many HTML chunks as you wish,
 but you are limited to fairly prosaic HTML and CSS. I'm of the impression
 the HTML documents generally map onto chapters so as not to distress the
 hardware's memory constraints too much.

 Overall, ePub and Kindle's format strike me as too much and too little
 respectively. I should be able to change the font and the formatting, but I
 definitely consider HTML + CSS is too much complexity.

 ?
 Daniel Lyons



 --


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


Re: [NTG-context] EPUB woes

2013-11-18 Thread Hans Hagen

On 11/18/2013 4:11 PM, Keith J. Schultz wrote:

Hi Hans,


Am 18.11.2013 um 13:21 schrieb Hans Hagen pra...@wxs.nl:


On 11/18/2013 10:00 AM, Keith J. Schultz wrote:


2) Now, what a EPub-READER must implement to handle is very
 little. There are HARDLY ANY provisions that a certified 
EPuB-READER has
  to implement any particular engine or features therein to 
display/render
 the information contain in the EPub-file/wrapper.


right, and I'm not going to waste time on it till i have a decent ebook reader 
that behaves well

The point you are missing is that the ereaders are behaving well. They 
are following the epub
  standard, and that to the letter of the standard. The problem is that 
the standard does not
enforce any particular implementation. If you look at the slow progress 
of the standard that
actually requires a full implementation of the HTML5 standard. That  
wait will very long.


sure, and every time i see an epub novel i realize that for something 
like that one really can stick to rather dumb html ... the point is that 
one cannot expect context to output simple everywhere accepted html from 
complex rendered input ...



Furthermore, ereaders are made by companies more interested in profits 
than spending a few Euros
more to put decent HTML engines into their readers. Why they do not do 
that is beyond me!



3. Modify the way in which ConTeXt generates the XML files. Ideally, I should 
be able to write something like

Would be nice if there where commands in ConTeXt or a module for 
defining what should go into the CSS and a
mode epub where the ConTeXt commands are converted to suitible HTML5 
structures that are suitiable for
most ereaders.
Features:
1) margins in percentages
2) font sizes based on em
   3) a new file for every chapter optional for sections 
user defined
Just a few. Lots more can be found in any decent documentation on 
writing ebooks.


context outputs xml and as a bonus provides a css too ... one can always 
convert that xml to his/her ebooks liking .. maybe at some point the mtx-epub 
script will do that


I always to like to look at programming as modular and would think that 
a epub/ebook module would be nice that maps
there are commands for layingout ebooks. these commands can then be 
mapped back to standard context commands.


in that case code in xml and either processit by context or transform it 
into something ebooks can render



For some interested in producing a epub then can use the conventions 
for producing ebooks and ConTeXt can provide the
math conversions to regular page dimensions used in PDFs for proofing 
or creating a printed version. It would also make the
creation of EPubs from ConTeXt a simple parsing exercise.


so far i had no projects where epub was needes so it has a low priority 
and i still read paper books (or when i would have ebooks i wouldn't 
need to render them) ... pdfs views quite well on e.g. nexus 7 devices 
and i assume the upcoming sony high res ebook will also do pdf well


concerning modular: you can consider the context export to be modular .. 
convertable


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
___


Re: [NTG-context] epub

2012-02-16 Thread Jörg Hagmann
Thanks, Luigi.
Is it not possible to run mtxrun --script epub --make export-example and then 
zip the files by

zip -X Filename.epub mimetype
zip -rg Filename.epub META-INF -x \*.DS_Store
zip -rg Filename.epub OPS -x \*.DS_Store

If 7z is the only way, I give up. I already spent about 30 minutes trying to 
find a mac version.

Ciao, Jörg

On Feb 16, 2012, at 12:13 PM, luigi scarso wrote:

 On Thu, Feb 16, 2012 at 11:51 AM, Jörg Hagmann joerg.hagm...@unibas.ch 
 wrote:
 I would like to prepare some student material in epub format and tried the
 export-example.tex as follows:
 
 - context export-example (by the way, gives an error with the latest beta,
 not with 2011.12.19 22:53,  but produces the output; shouldn't matter here).
 - mtxrun --script epub --make export-example (tells me sh: 7z: command not
 found, but produces an epub file. Zipping manually doesn't make a
 difference).
 
 In Calibre, only the text appears -- no paragraphs or anything else. The
 same happens when I try a minimal example with just paragraphs, bold, italic
 and sections.
 
 Most likely I misunderstood something, or is epub support still too
 preliminary (see http://wiki.contextgarden.net/epub)?
 
 I'm using current version: 2012.02.16 09:55 on a Mac (Lion).
 
 Thanks, Jörg
 
 Comment
 %\starttabulate[|l|r|p|]
 %\NC left \NC right \NC \input ward \NC \NR
 %\NC l\NC r \NC \input ward \NC \NR
 %\stoptabulate
 
 and be sure to have all the images in the same folder, to have 7z and
 inkscape --- otherwise comment
 
 %\placefigure
 %  {}
 %  {\externalfigure[cow.pdf]}
 
 
 I've just made the epub, if you want I can send you.
 
 -- 
 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://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Epub woes

2012-11-15 Thread Aditya Mahajan

On Thu, 15 Nov 2012, Bill Meahan wrote:


On 11/15/2012 07:13 PM, Aditya Mahajan wrote:


Have you considered using pandoc to generate epub?

If your text is relatively simple (no multiline math, no fancy image 
scaling, no complicated tables, etc.), then Markdown is a reasonable input 
format. You can use pandoc to translate the text to multiple output formats 
(including ConTeXt).


In general, I have found pandoc's XHTML export to be more predictable than 
that of ConTeXt. I have used pandoc's epub export only for short articles, 
but from what I remember, it does handle cover images and toc correctly.


Aditya
__

Nice idea Aditya but in this particular case it won't suffice.

I'm working on a rather long novel, not a technical document, and my 
/primary/ target electronic format is PDF. That PDF can be distributed 
electronically or submitted directly to a printer. In the current market, 
however, so many people want to read books on their smartphone, dedicated 
ebook reader or tablet an author really limits their market if they don't 
distribute an ebook version.


Of course, the two primary ebook formats (in terms of market) are epub and 
Kindle which is easy to generate from an epub. Sticking to ConTeXt allows me 
to generate PDF, Process PDF and epub from a single source. I can easily 
touch up the epub in Sigil if I need to.


For this kind of document, typography and excellent typesetting are 
extremely important (in the printed/PDF version, anyway). ConTeXt gives me 
that.


Pandoc does generate ConTeXt output as well, which you can then process 
the usual way to generate pdf.


The advantage of pandoc is that **in addition** to latex/context output, 
you can generate docbook/epub/html/doc/troff/ and other output formats as 
well.


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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Epub woes

2012-11-15 Thread luigi scarso
On Fri, Nov 16, 2012 at 7:49 AM, Andy Thomas andytho...@web.de wrote:




 I just started working on the epub output of my lecture notes again, since
 there were no readers able to output math until 2 weeks ago.

Is there any reader able to read mathml ?

-- 
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] EPUB workflow from ConTeXt source?

2011-02-16 Thread Gerben . Wierda
I'd like to keep working in one format so I was wondering if there is a
ConTeXt based workflow/setup that can produce EPUB (next to normal PDF)?

Thanks,

G

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


Re: [NTG-context] Error with export=yes

2011-05-09 Thread Reviczky, Adam
 The xhtml seems to be missing from OPS, but even putting that in there 
 doesn't give me a working epub (even though it increases the epub size).

Right, adding a title solves that, but still empty when trying to open it ...
___
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
___


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
___


[NTG-context] unwanted with epub

2020-03-03 Thread Hans van der Meer
In producing epub s are appearing (on the -raw.xml file) that are 
unwanted and seem spurious to me. For example aftersome macro's. 
Can someone tell me what triggers a ? In the pdf output such breaks are 
absent.

dr. Hans van der Meer


___
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] back-up.lua; mtx-epub.lua

2012-06-11 Thread Hans Hagen

On 11-6-2012 07:41, Andy Thomas wrote:


On Jun 11, 2012, at 12:21 AM, Hans Hagen wrote:


The validator likes it, next is the hard part: generating a valid xhtml. Is the 
xhtml generator only for the epub, i.e. can it be changed or is another output 
file just for the epub appropriate?


the only issue is that css has no method for mapping a link which is why the 
exporter produces two files (xml and xhtml)


I get an error by the epub validator if I feed it the generated epub. The 
content file is:

-START
?xml version='1.0' encoding='UTF-8' standalone='yes' ?

!-- input filename   : test_00   --
!-- processing date  : Mon Jun 11 07:03:39 2012 --
!-- context version  : 2012.06.11 00:21  --
!-- exporter version : 0.30  --


document xmlns:m=http://www.w3.org/1998/Math/MathML; version=0.30 language=de date=Mon Jun 11 07:03:39 
2012 file=test_00 context=2012.06.11 00:21 xmlns:xhtml=http://www.w3.org/1999/xhtml;
Hello world!
/document
-END

the error is:

-START
Epubcheck Version 3.0b5

Validating against EPUB version 2.0
ERROR: test_00.epub/OEBPS/test_00.xhtml(9,202): elements from namespace  are 
not allowed


maybe then mean that namespace mathml is not supported?

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


Re: [NTG-context] Epub woes

2012-11-15 Thread Aditya Mahajan

On Thu, 15 Nov 2012, Bill Meahan wrote:

I tried to generate an epub document using ConTeXt following the recipe on 
the wiki. Didn't work. So, I tried running the export-example.tex file that 
comes with the distribution, unmodified. Same bad results.


   Cover is not generated
   TOC is not generated (though it is noted this might be the state of the 
export)

   Sectioning doesn't happen.
   Paragraphing doesn't happen.
   The resultant epub file cannot even be opened with FBReader.

Importing the epub into Sigil shows one big blob of text, with only the 
between word spacing that's present in the source file. The \quotation{} 
markup did get turned into quotation marks, chapter numbers were generated 
and the rest of the markup was stripped out.


Same behavior with both the TeXLive 2012 version of ConTeXt and a quite 
recent beta.


What am I doing wrong?


Have you considered using pandoc to generate epub?

If your text is relatively simple (no multiline math, no fancy image 
scaling, no complicated tables, etc.), then Markdown is a reasonable input 
format. You can use pandoc to translate the text to multiple output 
formats (including ConTeXt).


In general, I have found pandoc's XHTML export to be more predictable than 
that of ConTeXt. I have used pandoc's epub export only for short articles, 
but from what I remember, it does handle cover images and toc correctly.


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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] EPUB XHTML Format

2013-09-06 Thread Hans Hagen

On 9/6/2013 12:00 AM, Thangalin wrote:


That is a good point. The current XML structure produced by ConTeXt
(Hans correct me here if I'm mistaken) is not accessible, as it doesn't
adhere to strict XHTML. I suspect that div tags would not be
accessible -- the only way to provide true accessibility in EPUB format
would be by using the strict XHTML tags.


html is not rich enough .. one ends up with abusing tags which in turn 
is confusing for accesibility ... i once saw an epub where h1 was used 
for the chapter number and h2 for the chapter title



When I talk about strict XHTML, I'm proposing that a _simple_ ConTeXt
document (up to 6 header levels, numbered and unnumbered lists, images,
text emphasis, etc.) should generate a simple, validating XHTML
document. Trying to attain 100% coverage of ConTeXt transmogrification
to XHTML is ridiculous when, I suspect, 80% coverage would meet most
needs.. :-)


in that case a few page transformation could do, isn't it?


*XML + XSLT - ConTeXT TeX - EPUB + CSS*


probably ok for novels but who there is no way to limit the user ... so 
in the end we still have a complex mix to deal with ... i'd rather have


ConTeXT TeX reading xml - export - optional transform - EPUB + CSS*

you want 'direct epub html from context' (no xslt) but on the other hand 
use xslt to map onto context while context can do xml directly ... 
chicken egg


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
___


Re: [NTG-context] EPUB woes

2013-11-16 Thread Wolfgang Schuster

Am 16.11.2013 um 16:16 schrieb Bill Meahan subscribed_li...@meahan.net:

 I have been trying for a very long time to generate an epub document via 
 context without success.
 
 I have followed the steps on the wiki to the letter, using the export-example 
 file provided with the standalone distribution. A PDF generated from the file 
 is exactly what I would expect from an example. The generated epub, however, 
 is useless - all the text is jammed together into one continuous block with 
 no formatting whatsoever.
 
 Adobe Digital Editions 2.0 crashes trying to open it. Sumatra and Sigil get 
 it open but the results are as described above. Obviously I am missing a step 
 or doing something wrong but I cannot see what.
 
 Context Standalone from a couple of days ago. Windows 7-64 (Home Premium) but 
 I got the same results several months ago on a Linux system so I do not think 
 it is OS-related.

When you use the export option context creates a xml file from your document. 
When you call not the epub script context creates epub file which contains this 
xml file which uses a custom format and not xhtml as you would expect. 

To get a epub file which can be used with most reader (a few programs on 
windows/mac/linux can read contexts output) you have to convert context xml 
file into valid xhtml.

What you have to do as well in your document to get proper tagged paragraphs is 
to add \startparagraph and \stopparagraph at the begin and end of each 
paragraph, otherwise context adds AFAIR br/ between them.

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

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


Re: [NTG-context] EPUB woes

2013-11-18 Thread Hans Hagen

On 11/18/2013 10:00 AM, Keith J. Schultz wrote:


2) Now, what a EPub-READER must implement to handle is very
 little. There are HARDLY ANY provisions that a certified 
EPuB-READER has
  to implement any particular engine or features therein to 
display/render
 the information contain in the EPub-file/wrapper.


right, and I'm not going to waste time on it till i have a decent ebook 
reader that behaves well



3. Modify the way in which ConTeXt generates the XML files. Ideally, I should 
be able to write something like

Would be nice if there where commands in ConTeXt or a module for 
defining what should go into the CSS and a
mode epub where the ConTeXt commands are converted to suitible HTML5 
structures that are suitiable for
most ereaders.
Features:
1) margins in percentages
2) font sizes based on em
   3) a new file for every chapter optional for sections 
user defined
Just a few. Lots more can be found in any decent documentation on 
writing ebooks.


context outputs xml and as a bonus provides a css too ... one can always 
convert that xml to his/her ebooks liking .. maybe at some point the 
mtx-epub script will do that


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
___


Re: [NTG-context] Bugs in XML export (for ePub)

2014-03-11 Thread Henning Hraban Ramm
Am 2014-03-11 um 12:42 schrieb Thangalin thanga...@gmail.com:

 In practice, ConTeXt cannot actually produce ePub content of any
 sufficient complexity that an ePub reader (such as Kindle) can read. I
 abandoned that development line a while ago. That said, ConTeXt is
 orders of magnitude easier to work with than LaTeX (for me) and has an
 architecture that holds a promising future.
 ...
 Unless anyone says otherwise (or there have been momentous
 improvements in this area), I would recommend that you do not use
 ConTeXt to create ePub files. While technically it can produce an ePub
 archive, you will waste countless hours hitting wall after wall.

I was thinking about starting with markdown or the like, but I *want* to use 
ConTeXt, and if it should be able to produce ePub, then I want it to succeed.
And maybe I can get on Hans’ and Wolfgang’s nerves enough to make it possible 
;-)


Greetlings, Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

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


Re: [NTG-context] ConTeXt epub workflow

2014-07-02 Thread Henning Hraban Ramm

Am 2014-07-03 um 03:12 schrieb Idris Samawi Hamid ادريس سماوي حامد 
isha...@colostate.edu:

 What is the recommended, more efficient workflow for this sort of thing? 
 Should I start with markdown and then generate context and epub (then convert 
 epub=kindle I presume)? Or does one context file with pdf and epub outputs 
 work well? Many years ago I did some documents in ConTeXt with both print and 
 screen pdfs from a single source. Can we do the latter in ConTeXt now? Does 
 anyone have any examples?
 

ConTeXt’s ePub output is not usable without conversion (to XHTML). Its XML 
output is even corrupt if you try with a project structure. You have to mark 
every structure like \start/\stopparagraph - very tedious!
Some other workflow is probably more efficient.

That said, I recently completed an ePub from a ConTeXt source, but I can’t 
recommend it, there was a lot of manual tweaking involved.


Greetlings, Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

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

Re: [NTG-context] ConTeXt epub workflow

2014-07-03 Thread Hans Hagen

On 7/2/2014 11:18 PM, Idris Samawi Hamid ادريس   سماوي حامد wrote:

On Wed, 02 Jul 2014 15:12:10 -0600, Idris Samawi Hamid ادريس   سماوي
حامد isha...@colostate.edu wrote:


What is the recommended, more efficient workflow for this sort of
thing? Should I start with markdown and then generate context and epub
(then convert epub=kindle I presume)? Or does one context file with
pdf and epub outputs work well? Many years ago I did some documents in
ConTeXt with both print and screen pdfs from a single source. Can we
do the latter in ConTeXt now?



Er, Can we do the *former* in ConTeXt? Viz., generate both pdf and epub
from a single source.


you can generate a pdf + export in xml from the same source; if you know 
what epub you want (and how it should look like) you can use a 
combination of transformation and css


the main boundary condition is that you tag wisely (and i think this is 
not an issue in your case as you always tag); there is some deduction 
built in with respect to where paragraphs begin and end so often it 
helps to tag paragraphs too (depends on the document)


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
___

Re: [NTG-context] Epub format Was: Re: Context to epub: itemize

2015-02-19 Thread Keith Schultz
Hi Hans,

I have been playing with the on using LaTeX and later LuaLaTeX
for create epub or ebook. Though I have not got around to.


The idea was to set enviorments, macros and commands that would depending
on a switch that would output the need HTML and epub structure or
call the normal *TeX ones.

In ConTeXt maybe the mode-system could be used.
Like I said I have not investigated deeply, yet.

regards
Keith.
 
 Am 18.02.2015 um 17:54 schrieb Hans Hagen pra...@wxs.nl:
 
 On 2/17/2015 10:01 PM, Keith Schultz wrote:
 
 
 Context outputs three varants: regular xml, xhtml, and stupified xhtml
 with div/class tagging. The last one is supposed to work on all
 devices as it doesn't demands anything beyond css.
 If that is the case it is not very useful for a decent workflow. There
 would be to much to
 tweak to make good looking output.
 
 i'm not sure what you have in mind but context is a typesetting system and as 
 such cannot produce an epub simply because epub is a blob of xml (html) with 
 a css packages in a zip
 

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

Re: [NTG-context] What happened to the ePub script?

2015-01-13 Thread Hans Hagen

On 1/13/2015 7:45 AM, Henning Hraban Ramm wrote:

Hi,
with the latest betas, the ePub script doesn’t work anymore.
Regardless with which file I call it, I get only:


the whole generation of epub was cleanup up (already a while ago)


$ mtxrun --script mtx-epub --make solo

resolvers   | caching | skipping 'files' for 'home:texmf' from 
'/Users/hraban/Library/texmf/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/54be04d87dd160089f572b19cb5c97e9'
 (version mismatch)
mtx-epub| unknown specificaton file for 'solo'


Previously, you didn’t need to call it with any specification file, but only 
with a plain ConTeXt file like


\setupbackend[
export=export.xml,xhtml=yes,
]
\setupexport[
firstpage={koe.png},
]
\settaggedmetadata[
author={Hraban},
]


\starttext

\startchapter[title={Chapter One}]

\startsection[title={Section One}]

\input tufte

\stopsection

\startsection[title={Section Two}]

\input knuth

\externalfigure[koe][width=\textwidth]

\stopsection

\stopchapter

\stoptext


An export.specification file was previously created by the script, I don’t know 
(anymore) for what. Calling the script with one of those also doesn’t do 
anything.


just use:

\setupbackend[export=yes]

all happens in dedicated sub directories now

jobname-export
jobname-epub

also, there have been some changes in the output (more detail in 
sectioning and so i.e. chains and levels) ... just look at the files 
produced


there is also div based output

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
___

Re: [NTG-context] Current status of epub export and documentation

2015-12-01 Thread Jan U. Hasecke
Am 01.12.2015 um 18:57 schrieb Henning Hraban Ramm:
> Am 2015-12-01 um 21:54 schrieb Jan U. Hasecke

> The current bad documentation on the Wiki is by me.
> 
> I produced two commercial ePubs with ConTeXt, but it’s really no fun,
> and I needed my own scripts that replace ConTeXt’s ePub script.
> 
> I’m starting with the "raw" XML export and use XSL (Saxon) to
> transform it to HTML plus the ePub special ePub files. After all, a
> Python (or whatever) script would have been the better solution for
> this complex conversion. A CSS that works with most important readers
> needed also a lot of time. (But that’s a problem of ePub/Readers, not
> of ConTeXt, of course.)
> 
> I can’t recommend ConTeXt as a source for ePub. But I would try it
> again - and probably start to rewrite the wiki anew, because ConTeXt
> is a moving target…

Thanks for these clarifications. So we have to wait for improvements. No
problem, in the meantime I'll learn ConTeXt. ;-)

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Epub woes

2012-11-15 Thread Andy Thomas
Please try the following example:

-- start code --

\setupbackend[export=yes,xhtml=test_00.xhtml]

\mainlanguage[de]
\language[de]

\setupexport
   [title={A nice book},
author={Andy Tom},
firstpage={huhn.jpg},
   ]



\starttext
Hello world!
\stoptext


-- end code --

The firstpage export value (huhn.jpg) is your cover image. Please put huhn.jpg 
or something else in the same directory as your tex file. I named the tex=file 
test_00.tex in my case.

After compiling with the latest context, you can run 'mtxrun --script epub 
--make test_00.specification' to generate the epub file.

Please note two more things: 
(1) The mtx-epub script was broken a couple of days ago. Well not actually 
broken, but somehow an old version sneaked in. If the author names and such do 
not get exported into the epub, this might as well be the case for you. The 
latest one (ver: 2012.11.14 11:37 MKIV  fmt: 2012.11.16) works fine again. 
(2) Calibre and other readers as well as e.g. the ipad have some nasty caching 
feature. In case you change little things and try to reload the same book in 
your reader, it might still show the old one from the cache. I found, that 
deleting the 'old' book first works most of the times.

I just started working on the epub output of my lecture notes again, since 
there were no readers able to output math until 2 weeks ago.

If I find some time later, I will update the epub page in the wiki.

I hope that helps.
 
Andy

On Nov 15, 2012, at 7:58 PM, Bill Meahan wrote:

 I tried to generate an epub document using ConTeXt following the recipe on 
 the wiki. Didn't work. So, I tried running the export-example.tex file that 
 comes with the distribution, unmodified. Same bad results.
 
Cover is not generated
TOC is not generated (though it is noted this might be the state of the 
 export)
Sectioning doesn't happen.
Paragraphing doesn't happen.
The resultant epub file cannot even be opened with FBReader.
 
 Importing the epub into Sigil shows one big blob of text, with only the 
 between word spacing that's present in the source file. The \quotation{} 
 markup did get turned into quotation marks, chapter numbers were generated 
 and the rest of the markup was stripped out.
 
 Same behavior with both the TeXLive 2012 version of ConTeXt and a quite 
 recent beta.
 
 Up-to-date Ubuntu 12.04
 
 Linux Escherton 3.2.0-32-generic #51-Ubuntu SMP Wed Sep 26 21:32:50 UTC 2012 
 i686 i686 i386 GNU/Linux
 
 What am I doing wrong?
 
 -- 
 Bill Meahan
 Westland, Michigan USA
 
 ___
 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
 ___

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


Re: [NTG-context] EPUB XHTML Format

2013-09-04 Thread Thangalin
Hi.

of course we could alternatively export all as div class=tag-subtag-...
 but i don't like that too much; html itself is not rich enough for our
 purpose


What about giving developers the ability to change the destination element?
For example:

\setuplist[chapter][
  xml={\starttag[h1]#1\stoptag}
]


Would produce, upon export:

h1Chapter/h1


Or (using export instead of xml; I don't care what it is named):

\setuplist[chapter][

export={\starttag[div]\startattribute[class]{chapter}#1\stopattribute\stoptag}}
]


Similarly, this would produce:

div class=chapterChapter/div


This would offer the flexibility of custom XML documents without affecting
the default behaviour.

  * Generates XHTML headers (including !DOCTYPE and html...)

 not needed as we're 'standalone'


Having the ability to produce the !DOCTYPE... and htmnl elements could
be as simple as:

\setupexport[
  standalone=no,
]



   * Produces images as img tags, rather than float tags.

 the css can deal with them (info is written to files for that)


Yes, but they aren't standard. There is an ecosystem of tools (e.g.,
Calibre, normalizing CSS templates, etc.), not to mention a widespread
knowledge-base, that groks the minimal XHTML specification. Plus, using XML
tags that are not in the minimal XHTML spec. means more testing on more
devices to make sure that their XHTML parsers render correctly.


 xhtml has no typical tags .. it's xml + css (or xslt) ... unfortunately
 browsers have


That is, a Strictly Conforming XHTML Document, as per:

http://www.w3.org/TR/2000/REC-xhtml1-2126/#docconf

the export of context is in fact just xml, and by tagging it as xhtml we
 can apply css to it; but if someone has a workflow for producing epub an
 option if to postprocess that xml file into whatever epub one wants


I could transform the ConTeXt-generated XML into strictly conforming XHTML,
but it was a step I was hoping to avoid. Right now my process is:

   1. Convert XML data to a ConTeXt .tex file.
   2. Convert ConTeXt to either PDF or EPUB.
   3. Stylize EPUB using CSS.

I want to use ConTeXt here (instead of going directly from XML data to
EPUB) because ConTeXt provides functionality such as multiple indexes,
table-of-contents, and bundling the .epub. Having an extra step to generate
strictly conforming XHTML is architecturally painful as it means
transforming the document three times (XML - ConTeXt, ConTeXt - XML, then
XML - XHTML).


 Everytime we look into epub there's another issue ... it's not a standard
 but reversed engineered application mess (happen soften with xml: turn some
 application data structures into xml and call it a standard)


Some book vendors only accept validating EPUBs. ConTeXt is documented as
being able to generate EPUBs. The documentation should state the EPUBs do
not validate and do not generate strictly conforming XHTML.

I have spent the last three weeks converting documents from LaTeX to
ConTeXt because the documentation stated that ConTeXt can produce EPUBs.
While true, the documentation did not mention its shortcomings. Had I known
in advance, I probably would have gone straight to EPUB using Java or, with
a little revulsion, PHP classes. ;-) That said, I probably should have
tested this feature sooner. :-)

as i have no real use/demand for epub it's not something i look into on a
 daily basis


How can I help resolve these issues?

Merely testing (which I am happy to do) isn't going to produce a strictly
conforming XHTML document.

Kindest regards.
___
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
___

Re: [NTG-context] Now that I have something working on mkiv, I'd like to try ePUB

2015-03-18 Thread Hans Hagen

On 3/18/2015 7:34 AM, Gerben Wierda wrote:

On 18 Mar 2015, at 02:14, Hans Hagen pra...@wxs.nl
mailto:pra...@wxs.nl wrote:


On 3/17/2015 10:33 PM, Gerben Wierda wrote:

On 17 Mar 2015, at 16:51, Hans Hagen pra...@wxs.nl
mailto:pra...@wxs.nl wrote:


On 3/17/2015 3:41 PM, Gerben Wierda wrote:

Nobody?

On 15 Mar 2015, at 22:12, Gerben Wierda gerben.wie...@rna.nl
mailto:gerben.wie...@rna.nl wrote:


Now that I have my book project basically running on mkiv (the
layout probably has a few problems left, the main one currently
being extra whitespace after a chapter heading  compared to mkii),
I’d like to try producing ePUB from it.

ConTeXtgarden says I have to add a backend and points me to the
info on the standard project structure (which I use), but there I
don’t find anything about a backend. The extended example says
that starting january 2015, things have changed with ePUB, which
probably also applies to me as I only recently started with a
fresh download of a current ConTeXt mkiv.

So, can someone tell me what I need to do to get a basic ePUB output?


\setupbackend
 [export=yes]

more on wiki


The wiki doesn’t really help. Am I supposed to create another product
file in …/products?


no, just enable it ... export files end up in a subpath


I did add this to the environment file and tried to create an ePub for
the whole book and for an individual chapter, but no success yet:

luna-wifi:chapters gerben$ (. /usr/local/src/ConTeXt/tex/setuptex 
mtxrun --script epub --make c_loosely.specification)
Setting /usr/local/src/ConTeXt/tex as ConTeXt root.

mtx-epub| unknown specificaton file
'c_loosely.specification-export/c_loosely.specification-pub' for
'c_loosely.specification'
luna-wifi:chapters gerben$ (. /usr/local/src/ConTeXt/tex/setuptex 
mtxrun --script epub --make prd_book.specification)
Setting /usr/local/src/ConTeXt/tex as ConTeXt root.

mtx-epub| unknown specificaton file
'prd_book.specification-export/prd_book.specification-pub' for
'prd_book.specification'


What am I missing? What is a specification file?


you process the tex file as normal .. that will produce a specification 
file that will be used if you use mtxrun --script epub later (the call 
is mentioned at the end of a tex run that has the export enabled)


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
___

  1   2   3   4   5   >