[NTG-context] bibliography - maybeyear

2013-11-20 Thread Alan Braslau
Hello,

Using
  \setuppublications [alternative=num]
for example, should not append letters to the publication years when
encountering multiple publications by the same author(s) per year.

So, in the use of bibliographies, I have not understood how to control
\maybeyear.

In the bibl-xxx.tex files, it is defined as
  \def\maybeyear#1{#1}
or
  \def\maybeyear#1{}
as needed. Perhaps this is for mkii.

In bibl-bib.mkiv, one has
  \appendtoks
 \doifelse{\bibtexpublicationsparameter\c!maybeyear}\v!off
   {\let\maybeyear\gobbleoneargument}
   {\let\maybeyear\firstofoneargument}%
  \to \everysetupbibtexlistplacement
which seems to then use the keyword maybeyear.

I guess that
  \setupbibtexpublications [maybeyear=off]
in my source would turn off the appended letters, but this is not
correct. I have tried many variants (\setuppublications, \setupbibtex).
What am I misunderstanding? Or is this a bug?

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

2013-11-20 Thread Keith J. Schultz
Hi Mica,

Am 19.11.2013 um 22:39 schrieb Mica Semrick :

> Keith,
> 
> Maybe you should explore an XML format that can be transformed directly to 
> epub. You'd also be able to write a style sheet with ConTeXt that would out 
> put a PDF as well. I think TEI-Lite is a good starting point.
While XML is one approach and using XML-Styles and DocBook I could even 
do without ConTeXt completely. Yet, from a general
user standpoint this way of marking up ebooks is tedious. XML has 
become the standard for storing all kinds of data. A a storage
format it is great and allows for conversion to other formats for ages 
to come. YET, one has to know what XML is how to use it
how to make tools to process it. That is something that I would not 
like to enforce on the average author. 
> 
> Since you can make your own commands in ConTeXt, it will never be able to 
> intelligently map all commands on to simple HTML.
How true. That is the problem with any system that is and can handle 
more complex structures than a simpler system.
That is why any module geared to creating ebooks has to only allow what 
is needed and can be done in any EREADER, 
(notice I wrote reader not / Book or EPub!)

My Idea is to use the Lua capabilities of ConTeXt to get the job done.
I will try to exemplify.

suggest MWE:
\usemodule[ebook]

\setupcss[…]{…}% see comment #1

\setupmapping[…]{…} % used for when author has his/her own ideas #2

%normal ConTeXt sets see comment #3

% possibly set a mode or set externally

\starttext
\startebook
\chapter… %see comment #4
\startparagraph{leftmargin=20%, …] % see 
comment #5
% text
\stopparagraph
\starttable…
\stoptable
…
\stopebook
\stoptext

OK, this pretty much looks like standard ConTeXt
Comments:
1) Here is where the author can define the CSS he wants
It will integrated into the CSS used for the ebook

2) The author can setup how the ebook commands are mapped to
 ConTeXt commands

3) Here are setups for the  NORMAL ConTeXt commands for producing PDFs

4)  if mode is PDF command is mapped to normal ConTeXt injected into 
stream
 if mode ebook, gather information for spine, etc, start a new file 
for the chapter
 start writing to this file as HTML 

5)  if in mode PDF map to ConTeXt command, whereby the leftmargin is 
used as the
 basis for the calculation .2\textwidth or if you wish

This approach is ebook centric. Allows for rapid prototyping and proofing of 
the ebook using a PDF
This approach alleviates the need to attempt to dumb down ConTeXt markup. 
Through the use mappings te author has the possibility of producing a higher 
quality PDF if wanted.
The system could be designed to produce a file with the ConTeXt commands that 
can be edited for even
higher quality PDFs of printed versions. 

There could be even XML or whatever mode in the ebook module.

Another advantage would be is that we are a module that will produce HTML out 
of a ConTeXt styled syntax
that can be directly converted to a PDF directly, without worrying about lose 
of formatting or using tools over
which features are supported or not. This is a straight forward approach.

True, enough, ConTeXt is not designed to be a  HTML editor. 

It is a matter of design policy! The philosophy of going from TeX/ConTeXt 
centric to HTML is IMHO far inferior than
going from HTML/ebook centric to ConTeXt. One can always make things more 
intricate/complicated and taking something
complicated and morphing onto a less sophisticated system.

What one has to keep in mind is that ConTeXt "renders" to PDF and that is what 
is not needed when producing a ebook.
The rendering is done by the ereader. ConTeXt does have any information about 
screen size or  orientation. ConTeXt is built upon 
a page morphology. ebooks are not! So any decent approach has to keep this in 
mind.

regards
Keith.

> 
> 
> On Mon, Nov 18, 2013 at 10:12 AM, Keith J. Schultz  
> wrote:
> 
> Am 18.11.2013 um 16:33 schrieb 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 :
>>> 
 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 t

Re: [NTG-context] bibliography - maybeyear

2013-11-20 Thread Hans Hagen

On 11/20/2013 9:12 AM, Alan Braslau wrote:

Hello,

Using
   \setuppublications [alternative=num]
for example, should not append letters to the publication years when
encountering multiple publications by the same author(s) per year.

So, in the use of bibliographies, I have not understood how to control
\maybeyear.

In the bibl-xxx.tex files, it is defined as
   \def\maybeyear#1{#1}
or
   \def\maybeyear#1{}
as needed. Perhaps this is for mkii.

In bibl-bib.mkiv, one has
   \appendtoks
  \doifelse{\bibtexpublicationsparameter\c!maybeyear}\v!off
{\let\maybeyear\gobbleoneargument}
{\let\maybeyear\firstofoneargument}%
   \to \everysetupbibtexlistplacement
which seems to then use the keyword maybeyear.

I guess that
   \setupbibtexpublications [maybeyear=off]
in my source would turn off the appended letters, but this is not
correct. I have tried many variants (\setuppublications, \setupbibtex).
What am I misunderstanding? Or is this a bug?



example needed

-
  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] bibliography - maybeyear

2013-11-20 Thread Alan Braslau
On Wed, 20 Nov 2013 13:38:16 +0100
Hans Hagen  wrote:

> example needed

Of course:


\setupbibtex [database=test]
\setuppublications [alternative=num]
\starttext
\cite [Peirce1878V,Peirce1878VI]

\placepublications [criterium=text]
\stoptext


test.bib:

@ARTICLE{Peirce1878V,
  author = {Peirce, C. S.},
  title = {Illustrations of the logic of science. {F}ifth paper – The order
of nature},
  journal = {Popular Science Monthly},
  year = {1878},
  volume = {9},
  pages = {203–217}
}
@ARTICLE{Peirce1878VI,
  author = {Peirce, C. S.},
  title = {Illustrations of the logic of science. {S}ixth paper – Deduction,
induction, and hypothesis},
  journal = {Popular Science Monthly},
  year = {1878},
  volume = {9},
  pages = {470–482}
}



___
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-20 Thread Aditya Mahajan

On Wed, 20 Nov 2013, Keith J. Schultz wrote:


\usemodule[ebook]

\setupcss[…]{…}% see comment #1

\setupmapping[…]{…} % used for when author has his/her own ideas #2

%normal ConTeXt sets see comment #3

% possibly set a mode or set externally

\starttext
\startebook
\chapter… %see comment #4
\startparagraph{leftmargin=20%, …] % see 
comment #5
% text
\stopparagraph
\starttable…
\stoptable
…
   \stopebook
\stoptext


To me, the biggest advantage of a TeX based system is the ease of 
extensibility. If you want to restrict to a specific subset, then might as 
well use XML:






 text




or using one of the existing XML schemas rather than inventing your own 
(perhaps even HTML5).


As far as ConTeXt is concerned, you can process the above XML quite 
easily. Come to think of it, it may be a useful to provide a module that

maps HTML5 to PDF.

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

2013-11-20 Thread Bill Meahan

On 11/20/2013 8:59 AM, Aditya Mahajan wrote:


As far as ConTeXt is concerned, you can process the above XML quite 
easily. Come to think of it, it may be a useful to provide a module that

maps HTML5 to PDF.

Aditya


I would vote for that approach. It is pretty much analogous to what I 
have decided to do. I'm doing my actual writing in HTML. creating CSS 
for ebooks and ConTeXt environment files for PDF. I'll probably hack the 
html2latex Perl script to do the mapping. Pandoc will /not/ meet my 
needs because Markdown does not distinguish between emphasized text and 
italic text and Pandoc compels all other input markup to behave like 
Markdown. Textile would be perfect but only outputs HTML well. The 
RedCloth implementation does output LaTeX but ignores CSS-style classes 
applied to paragraphs et. al.


My needs are much simpler than the majority of people on this list. I 
have no need for math, no need for indexes, no need for bibliographies, 
footnotes or citations. BUT I want really top-notch visual output 
whether in PDF or printed on dead trees. The latter is usually the 
result of giving the printer process PDF files anyway so for the visuals 
I want, PDF is the common denominator and TeX (whether LaTeX or ConTeXt) 
is the most reasonable path, InDesign is not for poverty-stricken 
wretches like me.


Unfortunately (for many reasons) the market for the stuff I write is 
hell-bent to replace printed books and even replace high-quality 
electronic presentation with formats in which the reader chooses almost 
everything, regardless of whether it compliments the text or not. EPUB 
(especially EPUB3) does appear to /want/ to provide 
author/designer-determined presentation but it can still be ignored or 
overridden by the reader. I don't want to  even imagine the visual 
discordance of reading something like /Jane Eyre/ with double-spaced 
Comic Sans but if the e-reader allows it


I'll crawl back under my rock, now.

--
Bill Meahan, Westland, Michigan

 
 


___
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-20 Thread Keith J. Schultz
Hi,

You do not understand my point. I one uses XML why use ConTeXt.
Yet, I one wants to use ConTeXt and do ebooks and they have experience why 
force them
to XML. 

As I stated the idea use ConTeXt to do the markup with commands that will 
ensure proper input of
HTML5  for making ebooks that will render well on MOST ereaders and at the same 
time be typeset
by ConTeXt to good quality PDF! 

ereaders need the html code to adhere to special guidelines in order to create 
a high quality display for the ebook.
That is why special commands are needed to restirct the features available! 

regards
Keith.

Am 20.11.2013 um 14:59 schrieb Aditya Mahajan :

[snip, snip]
> 
> To me, the biggest advantage of a TeX based system is the ease of 
> extensibility. If you want to restrict to a specific subset, then might as 
> well use XML:
> 
> 
> 
> 
> 
> text
> 
> 
> 
> 
> or using one of the existing XML schemas rather than inventing your own 
> (perhaps even HTML5).
> 
> As far as ConTeXt is concerned, you can process the above XML quite easily. 
> Come to think of it, it may be a useful to provide a module that
> maps HTML5 to PDF.
> 
> 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
> ___

___
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-20 Thread Jan Tosovsky
On 2013-11-20 Bill Meahan wrote:
> On 11/20/2013 8:59 AM, Aditya Mahajan wrote:
> >
> > As far as ConTeXt is concerned, you can process the above XML quite
> > easily. Come to think of it, it may be a useful to provide a module
> > that maps HTML5 to PDF.
> >
> 
> I would vote for that approach. It is pretty much analogous to what I
> have decided to do. I'm doing my actual writing in HTML. creating CSS
> for ebooks and ConTeXt environment files for PDF.
> ...
> 
> My needs are much simpler than the majority of people on this list. I
> have no need for math, no need for indexes, no need for bibliographies,
> footnotes or citations. BUT I want really top-notch visual output
> whether in PDF or printed on dead trees. 

This is exactly my situation ;-)

Two outputs ideally from the same data. But thanks to my XML background and
experience in the single source publishing it was clear from the very
beginning that I need a well structured and also semantically rich
vocabulary like DocBook.

Generating ePub3 outputs is very straighforward (things gets complicated
when you need customize it). It is same for PDF outputs. These outputs are
generated using XSL-FO processors. But to be honest, outputs are not so
visually appealing as they lack many microtypographic features (expansion,
hanging punctuation etc).

This is the reason why I do a noise here in this forum.

There is a db-context tool (set of XSLT stylesheets):
http://dblatex.sourceforge.net/releases/download.html

It can convert DocBook XML into the ConTeXt source. I do some direct (local)
changes into it to avoid manual post-processing (which gets lost with every
generating - I still do some corrections in my source).

This solution requires some experience in XML processing, but I encourage
anybody who need multiple outputs from a single data to investigate it a
bit. It is so powerfull ;-)

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] (critical edition) index to line number

2013-11-20 Thread Pablo Rodriguez
Hi Thomas,

I think it would be important to be able to index to the line number.

Do you need a code sample for this?

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk
___
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] a way to implement \testcolumn in mixedcolumns

2013-11-20 Thread Lars Huttar
Hello,

On this list I've been advised that mixedcolumns is the latest and
greatest implementation of columns; the one to use. We have switched
over from columnsets to mixedcolumns, and have been very pleased with
the column balancing (for some reason we couldn't get column balancing
to work in columnsets).

However one thing we do miss from columnsets is the control over widows
& orphans in two ways: \testcolumn, and \setupcolumnsetlines.
\testcolumn[n] allowed us to do a conditional column break, so when we
were about to start a new subsection heading, we could prevent it being
an orphan at the bottom of the column; and when starting a paragraph
with a hangaround graphic framed flushright and bottom, we could
similarly use \testcolumn to prevent the graphic from hanging down into
the footer (which is what sometimes happened otherwise).

So I'm wondering, is there some way to achieve the equivalent of
\testcolumn in mixedcolumns?

Is it theoretically impossible to implement this in mixedcolumns because
the required information (how many lines are left in the current column)
is not yet known?
Or could that information be gleaned from somewhere?

I see in page-brk.mkiv the following definition for \testcolumn:

\def\testcolumn
  {\dodoubleempty\page_tests_columns_test}

\def\page_tests_columns_test[#1][#2]%
  {\endgraf
   \ifdim\pagegoal<\maxdimen
 \ifdim\pagetotal<\pagegoal
   \d_page_tests_test\dimexpr
 \pagegoal
-\pagetotal
 \ifdim\lastskip<\parskip+\parskip\fi
 \ifsecondargument+#2\fi
   \relax
   \getrawnoflines\d_page_tests_test % (raw)
   \ifnum#1>\noflines
 \column
   \fi
 \else
   \penalty-\plustenthousand % (untested)
 \fi
   \fi}


I'm not a low-level TeX programmer, and I don't understand a lot of
this, but it looks like
  \getrawnoflines\d_page_tests_test
puts the number of remaining lines into \noflines

Any suggestions are appreciated.
(And I should have a MWE soon.)

Lars

___
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] a way to implement \testcolumn in mixedcolumns

2013-11-20 Thread Lars Huttar
On 11/20/2013 4:47 PM, Lars Huttar wrote:
> However one thing we do miss from columnsets is the control over widows
> & orphans in two ways: \testcolumn, and \setupcolumnsetlines.
> \testcolumn[n] allowed us to do a conditional column break, so when we
> were about to start a new subsection heading, we could prevent it being
> an orphan at the bottom of the column; and when starting a paragraph
> with a hangaround graphic framed flushright and bottom, we could
> similarly use \testcolumn to prevent the graphic from hanging down into
> the footer (which is what sometimes happened otherwise).
>
> So I'm wondering, is there some way to achieve the equivalent of
> \testcolumn in mixedcolumns?

Here is a MWE:

\starttext


\startmixedcolumns[distance=5mm, balance=yes]

\dorecurse {20} {

\testcolumn[8]

\subsection{Subsection Heading} \input knuth \endgraf

}

\stopmixedcolumns


\stoptext


You can see that the heading for subsection 6 is an orphan at the bottom
of a column (at least, with the paper size settings I have; otherwise,
I'm sure it happens somewhere else). If \testcolumn worked, the
\testcolumn[8] would have shoved the subsection heading to the next
column, because there was not space for 8 lines left in the column at
that point.

Any thoughts on how to fix this kind of occurrence?

Thanks,
Lars

___
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] [OT] Crowdfunding project for improving math in ebooks (and the web)

2013-11-20 Thread Khaled Hosny
http://www.ulule.com/mathematics-ebooks/

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