[NTG-context] PDF bookmarks - missing interactivity of some items

2013-11-16 Thread honyk
Dear All,

when bookmarks are placed to my file, only several of them are interactive.
I cannot find any rule for this behaviour nor to reproduce it on a
simplified example.

\setupinteraction[state=start]
\placebookmarks[chapter]
\setupinteractionscreen[option=bookmark]

...
\chapter{Chapter A}
...
\chapter{Chapter B}
...

Is there any known issue related to this?
ConTeXt 2013.11.14 (Mark IV), Windows 7 64-bit.

I can provide my file for testing (off the list).

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


[NTG-context] EPUB woes

2013-11-16 Thread Bill Meahan
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.


Sign me, Frustrated!

--
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] announcement and call

2013-11-16 Thread Keith J. Schultz

Am 15.11.2013 um 13:06 schrieb Hans Hagen pra...@wxs.nl:

 On 11/15/2013 11:31 AM, Keith J. Schultz wrote:
 Hi Thomas,
 
[snip, snip
]
 The problem with the two page setup is synchronizing the comments, notes, 
 discussion of the critical edition's author. For a half way pleasing layout 
 these should interplaced between the contrasted editions across the two 
 pages. Yes, not an easy task.
 
 a lot depends on proper coding ... typesetting parallel texts is not per se 
 the same as multiple streams ... it all depends on what one wants to achieve
Like I had said in my post, a critical editions is a special case of 
parallel texts. How the different versions are brought together is a different 
matter.
That one can have the texts in different files and bringing them 
together.

Also, one way of looking at a two page layout is to assmune a 
multicolumn layout of a page that is 2 pages wide and 1  page high. After the 
columns
have been layout, rearrange the columns onto the proper page size. That 
is the approriate boxes! I do not how difficult this would be.
 
 
 also, if  1 page is used then we should not limit to 2 pages (or columns) in 
 parallel
Like I said above there are approaches which facilitate a modular 
layout. True enough, this is not necessarily a TeX way of approaching the 
problem,
yet should help to make the process as automated as possible. True 
enough that such an approach is not efficient, yet get the job done.

I believe a modular approach should be chosen. It allows for the best 
possible flexibility and using the parallel text for the low-level typeset gives
the author the best way of laying out the critical edition, instead of 
just putting simply texts next to each. That would not be academically 
sensible, because
creating a critical edition is far far more!
 
 I agree that it is hard to automate the synchronization of text passages. 
 The only viable approach would be at the paragraph level. A line level 
 approach can only be achieved by
 interaction of the author of the critical edition with synchronization marks 
 of some sort inside the editions.
 
 indeed. one cannot have the best of all worlds (perfect justification, 
 perfect note handling, perfect synchronization) because the solition space 
 gets too small
 
 (one thing Thomas and I discussed shortly is more advanced pdf's with more 
 embedded info and so ... something for later)
 
 we also need to look into ebook like things ...
This is something quite different an IMHO can be done relatively easily 
and lots of coding by creating commands for proper ebook production
 (mainly HTML 5 for epub and mobi output) and mapping those commands 
back to the ConTeXt commands for the production of pdfs if needed.
 
 Early, in my education in Computer Linguistics, decades ago, we had project 
 where we wrote a program for entry of critical editions. The editions/texts 
 and comments were
 entered in parallel on the tty-terminal screen and stored in a database. At 
 that time we where no interested in fancy output and used a simple stacked 
 output.
 
 As you probably know yourself, it is the entry and synchronization of the 
 editions that  is the problem an not as much the layout itself, though that 
 is hard enough by itself.
 I do not see any way to do this in a normal linear single pass process. The 
 question is in how far ConTeXt can support this task.
  ...
 
 time, motivation, etc ...
 
 I have just a brain stormed possible starting point. It as you can see it 
 has quite some felixiblity as to how the texts
 is entered and ConTeXt does some rearranging during typesetting.
 
 One type of critical edition we have not discussed is when the author whats 
 to work on a word basis. But, that is even a bigger can
 of worms for collating the data/texts.
 
 Most of what I have describe it probably obvious to you, yet
 
 well, keep collecting demands and examples ... best that we know what is 
 needed (and by how many people, for how many years to come, as it makes no 
 sense to develop code that is used once and then discarded because one moves 
 to newer technologies) ...
 
 we also need to keep in mind that this kind of things are author driven as 
 publishers are not paying for this kind of things nor willing to invest / 
 support development of tools (if they are interested in anything else than 
 25-50% profits at all).
Critical editions are very special and not that wide spread. Why do you 
think that there are not any very useful tools out in the wild. 
They are almost always coming from the Humanities and such authors are 
generally that computer savvy or versed in TeX let alone xml.
That is why I strongly suggest using a modular approach, with a 
simplistic interface as possible. 
Most that are looking for tools in ConTeXt will say well if I have to 
learn that much first forget it. 

 

Re: [NTG-context] EPUB woes

2013-11-16 Thread Keith J. Schultz
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.


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.
 
 Sign me, Frustrated!
 
 -- 
 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
 ___

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


[NTG-context] [***SPAM***] Textile

2013-11-16 Thread Bill Meahan
To save possibly reinventing the wheel, has anyone written a filter for 
processing Textile markup analogous to the filters for Markdown and 
reStructuredText?


I tried using Pandoc to provide multiple formats of output (ConTeXt, 
EPUB, MS Word) from a common source but Pandoc is excessively tied to 
Markdown which does not understand the difference between emphasized 
text and italic text and only outputs {\em word}, emword/em, 
\emph{word} and so forth which means I have to go through every instance 
of the tag and change tags where I want explicit italics as I use other 
typographical techniques (small-caps or sans-serif or ...) for emphasis 
but some things (book titles, ship names, foreign words/phrases et. al) 
are always set in italics by convention. Pandoc continues its map 
everything to em ways even if the input is textile or (X)HTML. There 
are some other neat advantages to Textile as well such as local styling 
(CSS or \begin{environment}... or \startenvironment ...)


I know a lot of computer languages now and I really don't want to learn 
Lua or Haskell -- I'm retired! :)


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

2013-11-16 Thread Aditya Mahajan

On Sat, 16 Nov 2013, Bill Meahan wrote:


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.


ConTeXt provides two types of exports. The first is an XML export. 
Consider a sample file:


~~~ {test.tex}
\setupbackend[export=yes]

\starttext
\startsection[title={This is a test}]
  \startparagraph
Some random text
\startitemize
  \item First
  \item Second
\stopitemize
  \stopparagraph
\stopsection

\stoptext
~~~

Running `context test.tex` generates a `test.export` file that looks as 
follows:


~~~ {test.export}
?xml version='1.0' encoding='UTF-8' standalone='yes' ?

!-- input filename   : test  --
!-- processing date  : Sat Nov 16 12:19:59 2013 --
!-- context version  : 2013.11.01 15:02  --
!-- exporter version : 0.30  --


 document language=en file=test date=Sat Nov 16 12:19:59 2013 
context=2013.11.01 15:02 version=0.30 
xmlns:m=http://www.w3.org/1998/Math/MathML;

  section detail=section location='aut:1'
sectionnumber1/sectionnumber
   sectiontitleThis is a test/sectiontitle
   sectioncontent
  paragraphSome random text itemgroup detail=itemize 
symbol=1itemitemtagm:math display=inline!-- begin m:mrow 
--m:mo•/m:mo!-- end m:mrow 
--/m:math/itemtagitemcontentFirst/itemcontent/item 
itemitemtagm:math display=inline!-- begin m:mrow 
--m:mo•/m:mo!-- end m:mrow 
--/m:math/itemtagitemcontentSecond/itemcontent/item/itemgroup/paragraph

   /sectioncontent
  /section
 /document
~~~

which is simply an XML representation of the document.

In prinicple, if one adds an appropriate CSS file with that XML, any 
recent browser will be able to display it. So, if you change the first 
line of `test.tex` to


~~~
\setupbackend[export=yes, xhtml=yes, css=yes]
~~~

and run `context test.tex`, you will get four additional files: 
`test.xhtml`, `test-styles.css`, `test-images.css`, and 
`test.specification`.


The `test.xhtml` file look as follows:

~~~{test.xhtml}
?xml version='1.0' encoding='UTF-8' standalone='yes' ?

!-- input filename   : test  --
!-- processing date  : Sat Nov 16 12:22:58 2013 --
!-- context version  : 2013.11.01 15:02  --
!-- exporter version : 0.30  --

?xml-stylesheet type=text/css href=test-styles.css?
?xml-stylesheet type=text/css href=test-images.css?
?xml-stylesheet type=text/css href=export-example.css?

 document language=en version=0.30 file=test 
xmlns:xhtml=http://www.w3.org/1999/xhtml; 
xmlns:m=http://www.w3.org/1998/Math/MathML; date=Sat Nov 16 12:22:58 
2013 context=2013.11.01 15:02

  xhtml:a name=aut_1section location=aut:1 detail=section
sectionnumber1/sectionnumber
   sectiontitleThis is a test/sectiontitle
   sectioncontent
  paragraphSome random text itemgroup symbol=1 
detail=itemizeitemitemtagm:math display=inline!-- begin m:mrow 
--m:mo•/m:mo!-- end m:mrow 
--/m:math/itemtagitemcontentFirst/itemcontent/item 
itemitemtagm:math display=inline!-- begin m:mrow 
--m:mo•/m:mo!-- end m:mrow 
--/m:math/itemtagitemcontentSecond/itemcontent/item/itemgroup/paragraph

   /sectioncontent
  /section/xhtml:a
 /document
~~~

Notice that apart from the three lines specifying the CSS files, the rest 
of the document is the same as in XML export. The two css files, 
`test-styles.css` and `test-images.css` include the relevant code for the 
style modifications and images in the document. The css file 
`export-example.css` comes with the ConTeXt distribution and has the 
default values for most ConTeXt elements.


If you open the `test.xhtml` file in any browser, it will work correctly 
(because an XHTML markup is extensible and can use any XML tags as long as 
the behavior of the tag is specified in a CSS file). This is, however, not 
a XHTML file that includes the default XHTML markup (h1, p, ul, 
etc.)


Now, lets come back to the last file generated by the export: 
`test.specification`. This is a lua file that contains:


~~~{test.specification}
return {
 [files]={ test-styles.css, test-images.css, export-example.css, 
test.xhtml },

 [identifier]=e6a91a13-4e08-9494-3817-bfffe872be2c,
 [images]={},
 [language]=en,
 [name]=test,
 [root]=test.xhtml,
}


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 

Re: [NTG-context] EPUB woes

2013-11-16 Thread Bill Meahan

On 11/16/2013 12:37 PM, Aditya Mahajan wrote:

On Sat, 16 Nov 2013, Bill Meahan wrote:


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



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.


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.


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


~~~
\setupparagraph[tag=p, class=default]
~~~

to tell context that \startparagraph ... \stopparagraph should 
translate to `p class=default ... /p. Last I checked the code 
that generates the XML file, there was no easy way to change the tags 
and classes.


I hope that the above description clarifies the situation.

Aditya


Thanks for the clarification.

--
Bill Meahan, Westland, Michigan

 
  “Writing is like getting married. One should never

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

   —Iris Murdoch

This message is digitally signed with an X.509 certificate
to prove it is from me and has not been altered since it was sent.

___
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] Index entries - custom font size

2013-11-16 Thread honyk
Hello Everyone,

there are lot of index entries in my document and with the standard body
font size they occupy too much space. I've tried to decrease the size by the
textstyle parameter. It works, but it is applied recursively to every nested
level: secondary items are smaller twice and tertiary items three times... 

\setupregister[index][command=\Word, textstyle=small]
\starttext
\index{primary}\index{primary+secondary}\index{primary+secondary+tertiary}Te
xt
\completeindex
\stoptext

How can I set the same value to all the levels?

Thanks, 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] PDF bookmarks - missing interactivity of some items

2013-11-16 Thread Alan Braslau
On Sat, 16 Nov 2013 15:41:12 +0100
honyk j.tosov...@email.cz wrote:

 Dear All,
 
 when bookmarks are placed to my file, only several of them are
 interactive. I cannot find any rule for this behaviour nor to
 reproduce it on a simplified example.

Indeed, I find that the interaction does not always work on some
bookmarks. My impression was that, for example, a chapter title might
not be interactive whereas its first section title would be interactive.
However, I have not been able to produce a minimal example
demonstrating the behavior (nor have I really tried very hard yet).

Alan
___
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] PDF bookmarks - missing interactivity of some items

2013-11-16 Thread Hans Hagen

On 11/16/2013 3:41 PM, honyk wrote:

Dear All,

when bookmarks are placed to my file, only several of them are interactive.
I cannot find any rule for this behaviour nor to reproduce it on a
simplified example.

\setupinteraction[state=start]
\placebookmarks[chapter]
\setupinteractionscreen[option=bookmark]


\chapter{Chapter A}

\chapter{Chapter B}


Is there any known issue related to this?
ConTeXt 2013.11.14 (Mark IV), Windows 7 64-bit.

I can provide my file for testing (off the list).


indeed .. without a minimal test i won't look into 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
___