[NTG-context] resetting footnotes number

2014-10-14 Thread Andrea Valle
Dear list, 

As I have a book with many chapters, I’d like to reset footnote numbering at 
each chapter. 
How can I achieve this?
I’m looking here:
http://wiki.contextgarden.net/Footnotes

but can’t find a solution

I looked also at  \setupfootnotes but it says: 

way bytext bysection
Start numbering from 1 again at the start of every section? 

BTW on mkiv, so I guess I should use \setupnotation

Thanks

Best
-a-

--
Andrea Valle
--
CIRMA - StudiUm
Università degli Studi di Torino
-- http://www.cirma.unito.it/andrea/
-- http://www.fonurgia.unito.it/andrea/
-- http://www.flickr.com/photos/vanderaalle/sets/
-- http://vimeo.com/vanderaalle
-- andrea.va...@unito.it
--

This is a very complicated case, Maude. You know, a lotta ins, a lotta outs, a 
lotta what-have-yous. 
(Jeffrey 'The Dude' Lebowski)

___
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] Starting with bibliography / international entries

2014-10-14 Thread Ulrike Fischer
Am Mon, 13 Oct 2014 18:22:09 +0200 schrieb Hans Hagen:

 I found this about BibLaTeX / Babel:
 http://tex.stackexchange.com/questions/28010/how-to-create-multilingual-english-japanese-bibliographies-with-biblatex-bib
 It’s nearly the same problem as mine.

 BibLaTeX 3.0 + Biber 2.0 are advertised to support this syntax:

Well actually (after a renumbering) one needs biblatex 4.0 and biber
3.0.


 @COLLECTION{yanagida_zengaku_sosho_1975,
LANGID = {japanese},
EDITOR = {柳田聖山},
EDITOR_romanised = {Yanagida, Seizan},
TITLE = {禪學叢書},
TITLE_romanised = {Chūbun shuppansha},
TITLE_translated_english = {Collected Materials for the Study of Zen},
LOCATION = {京都},
LOCATION_romanised = {Kyōto},
LOCATION_translated_english = {Kyoto},
PUBLISHER = {中文出版社},
PUBLISHER_romanised = {Chūbun shuppansha},
DATE = {1974/1977}
 }

 … and extract the right version according to configuration.
 Is there support for these constructed keys in ConTeXt?
 
 sure, you can use any field you like and you can adapt yoru rendering 
 setups to use them
 
 the problem is not so much to support variants of fields (although I 
 really dislike this mixed upper/lowercase mess)

You can write everything in lowercase if you want. The syntax only
expects the _ to separate the main field and the variant/language. 

 the main question is: how mixed is this used? are EDITOR and 
 EDITOR_whatever used at the same time?

You can. There are commands to choose a specific variant, but you
can also define fallbacks. So something like 
Editor (Editor_translated) or Editor translated but fall back to
editor if it doesn't exist is possible. 

The main problem is not to get lost in the variants/fallback chains. 

Another problem is to get name lists right: After all it is possible
that only some authors needs to be romanised. But with the help of
the name hashes I was at the end able to do something like Müller
and  柳田聖山 (Yanagida, Seizan) ...

Smaller problems are how to write the names correctly -- after all
not everywhere in the world names follows the lastname, fistname
convention. 

I had some longer discussion about this with the
biber/biblatex-maintainer:
https://github.com/plk/biblatex/issues/132



-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

___
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] resetting footnotes number

2014-10-14 Thread Wolfgang Schuster

Am 14.10.2014 um 10:13 schrieb Andrea Valle va...@di.unito.it:

 Dear list, 
 
 As I have a book with many chapters, I’d like to reset footnote numbering at 
 each chapter. 
 How can I achieve this?
 I’m looking here:
 http://wiki.contextgarden.net/Footnotes
 
 but can’t find a solution
 
 I looked also at  \setupfootnotes but it says: 
 
 way   bytext bysection
 Start numbering from 1 again at the start of every section? 
 
 BTW on mkiv, so I guess I should use \setupnotation

Yes, you have to use the \setupnotation command to set every counter related 
setting for footnotes.

\setupnotation[footnote][way=bychapter]

\starttext

\dorecurse{10}
  {\chapter{Chapter #1}
   \dorecurse{10}{\input knuth\footnote{\input ward }}}

\stoptext

Wolfgang

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

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

[NTG-context] new mechanism

2014-10-14 Thread Hans Hagen

Hi,

As we needed it for a project, I made this:

\showinjector

\setinjector[register][3][\column]
\setinjector[list][2][{\blank[3*big]}]

\starttext
\placelist[section][criterium=text]
\blank[3*big]
\placeregister[index][criterium=text]
\page
\startsection[title=Alpha] first  \index{first}  \stopsection
\startsection[title=Beta]  second \index{second} \stopsection
\startsection[title=Gamma] third  \index{third}  \stopsection
\startsection[title=Delta] fourth \index{fourth} \stopsection
\stoptext

A typical ugly last-resort hack. Only for auto-generated lists and 
registers. It's in the beta.


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] Starting with bibliography / international entries

2014-10-14 Thread Hans Hagen

On 10/14/2014 10:19 AM, Ulrike Fischer wrote:

Am Mon, 13 Oct 2014 18:22:09 +0200 schrieb Hans Hagen:


I found this about BibLaTeX / Babel:
http://tex.stackexchange.com/questions/28010/how-to-create-multilingual-english-japanese-bibliographies-with-biblatex-bib
It’s nearly the same problem as mine.

BibLaTeX 3.0 + Biber 2.0 are advertised to support this syntax:


Well actually (after a renumbering) one needs biblatex 4.0 and biber
3.0.



@COLLECTION{yanagida_zengaku_sosho_1975,
LANGID = {japanese},
EDITOR = {柳田聖山},
EDITOR_romanised = {Yanagida, Seizan},
TITLE = {禪學叢書},
TITLE_romanised = {Chūbun shuppansha},
TITLE_translated_english = {Collected Materials for the Study of Zen},
LOCATION = {京都},
LOCATION_romanised = {Kyōto},
LOCATION_translated_english = {Kyoto},
PUBLISHER = {中文出版社},
PUBLISHER_romanised = {Chūbun shuppansha},
DATE = {1974/1977}
}

… and extract the right version according to configuration.
Is there support for these constructed keys in ConTeXt?


sure, you can use any field you like and you can adapt yoru rendering
setups to use them

the problem is not so much to support variants of fields (although I
really dislike this mixed upper/lowercase mess)


You can write everything in lowercase if you want. The syntax only
expects the _ to separate the main field and the variant/language.


the main question is: how mixed is this used? are EDITOR and
EDITOR_whatever used at the same time?


You can. There are commands to choose a specific variant, but you
can also define fallbacks. So something like
Editor (Editor_translated) or Editor translated but fall back to
editor if it doesn't exist is possible.

The main problem is not to get lost in the variants/fallback chains.


That was my initial impression too. There are simply too many 
combination possible. In such a case it makes more sense to tune the 
rendering than to figure out all the options. So, in context speak that 
would mean something:


\btxdoif {title} {
\btxspace
\btxflush{title}
\btxdoifelse {title_variant_b} {
\btxleftparenthesis
\btxflush{title_variant_b}
\btxrightparenthesis
} {
\btxdoif {title_variant_a} {
\btxleftparenthesis
\btxflush{title_variant_a}
\btxrightparenthesis
}
}
\btxperiod
}

Authors are of course somewhat more complex as there one needs to deal 
with the way names are constructed. But even then, in such cases 
adapting a few setups is not most work.



Another problem is to get name lists right: After all it is possible
that only some authors needs to be romanised. But with the help of
the name hashes I was at the end able to do something like Müller
and  柳田聖山 (Yanagida, Seizan) ...


so basically you order by a mix of name and romanized name (or romanized 
name with name as fallback)?



Smaller problems are how to write the names correctly -- after all
not everywhere in the world names follows the lastname, fistname
convention.


yes, although if you use APA it might have rules for that (but that is 
Alan's speciality)


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
___

[NTG-context] beta

2014-10-14 Thread Hans Hagen

Hi,

new in next beta:

\setuphead[alternative=reverse]

\starttext

\chapter{Foo}
\section{One}
\section{Two}
\section{Three}
\chapter{Bar}
\section{One}
\section{Two}
\section{Three}

\stoptext

renders

Foo 1
One 1.1

etc

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

[NTG-context] Strange error with bookmarks

2014-10-14 Thread Michał Goliński
It does indeed be somehow connected with the specific reader that
I use (okular). Nevertheless, evince gives the same error, and I have found out,
that even jpdfbookmarks_cli has problems as it raises an exception when I try
to dump the bookmarks:

  Exception in thread main java.lang.ClassCastException: 
com.lowagie.text.pdf.PdfNumber cannot be cast to com.lowagie.text.pdf.PdfString

Still, in Acrobat Readers it works perfectly.

In the meantime I have came up with a ConTeXt solution, so one can compare
the resulting PDF files. Unfortunately I have only a limited understanding
of the details of PDF files.

The file giving the error is:

\pdfcompresslevel=0 \pdfobjcompresslevel=0
\setupinteraction[state=start,focus=standard]
\placebookmarks[part,chapter][part,chapter][number=no]
\starttext
\chapter{0}
\startpart[title={A}]
  \chapter{1}
  \chapter{2}
\stoppart
\startpart[title={B}]
  \chapter{3}
  \chapter{4}
  \chapter{5}
  \chapter{6}
  \chapter{7}
  \chapter{8}
  \chapter{9}
  \chapter{10}
\stoppart
\completecontent[criterium=all]
\stoptext

While the following files gives no problems in the applications that I have
tested (note the last command):

\pdfcompresslevel=0 \pdfobjcompresslevel=0
\setupinteraction[state=start,focus=standard]
\placebookmarks[part,chapter][part,chapter][number=no]
\starttext
\chapter{0}
\startpart[title={A}]
  \chapter{1}
  \chapter{2}
\stoppart
\startpart[title={B}]
  \chapter{3}
  \chapter{4}
  \chapter{5}
  \chapter{6}
  \chapter{7}
  \chapter{8}
  \chapter{9}
  \chapter{10}
\stoppart
\placecontent[criterium=all]
\stoptext


On 8/29/2014 22:07 PM, Hans Hagen wrote:
 On 8/26/2014 1:45 PM, Michał Goliński wrote:
  While trying to make a longer document with ConTeXt I stumbled into a
  strange error with the latest beta (I spotted it for the first time some
  time ago). For the following file:
 
  \setupinteraction[state=start,focus=standard]
  \placebookmarks[part,chapter][part,chapter][number=no]
  \starttext
  \chapter{0}
  \startpart[title={A}]
 \chapter{1}
 \chapter{2}
  \stoppart
  \startpart[title={B}]
 \chapter{3}
 \chapter{4}
 \chapter{5}
 \chapter{6}
 \chapter{7}
 \chapter{8}
 \chapter{9}
 \chapter{10}
  \stoppart
  \completecontent[criterium=all]
  \stoptext
 
 
  ConTeXt would generate a file in which the link for chapter 6 is not
  working. Neither the link in the table of contents works nor the link in
  the generated PDF bookmarks. When removing the second line, the link in
  the table of contents doesn't work, but everyting is ok if one removes
  the table of contents. What seems even more weird for me, the problem
  goes away if one removes *any* chapter. It persists for chapter 6 even
  if chapters are distributed differently between parts without changing
  their order.
 
  Am I doing something wrong? I hope someone might be able to help.
 
 It works here (with summatrapdf) ... can it be a viewer issue? Do you 
 run the latest context?
 
 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
___

[NTG-context] Structure of titles in MkIV

2014-10-14 Thread Michał Goliński

Given a file:

\setupinteraction[state=start]
\placebookmarks[part,chapter][part,chapter]

\starttext

\startchapter[title=Prologue, number=no]
\input knuth
\stopchapter

\startpart[title={Part A}]
  \startchapter[title=One]
  \input knuth
  \stopchapter
\stoppart

\startchapter[title=Epilogue]
\input knuth
\stopchapter

\stoptext

I would expect to have the logical structure of titles as follows:

+ Prologue
+ Part A
- + One
+ Epilogue

i.e., Epilogue should be at the highest level, as Prologue is.
Context gives me an Epilogue that is a child of Part A.

Is it possible to have the chapter Epilogue not be a child of Part 
A?


Best regards
Michał Goliński

___
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] Starting with bibliography / international entries

2014-10-14 Thread Ulrike Fischer
Am Tue, 14 Oct 2014 11:41:19 +0200 schrieb Hans Hagen:

 The main problem is not to get lost in the variants/fallback chains.
 
 That was my initial impression too. There are simply too many 
 combination possible. In such a case it makes more sense to tune the 
 rendering than to figure out all the options. 

Well to tune the rendering one has to sort out the logic first ;-)

You first has to decide do I want title_variant_a always, or only
if the main language of the document is english, or only if an
option is set or only if  
What should happen if the language of the document is in japanese,
the bib-entry is a french book and there is a translated_chinese
variant of the title? 


 So, in context speak that would mean something:

In the end the biblatex code is similar. It has some more options to
access and handle variants. 

 Another problem is to get name lists right: After all it is possible
 that only some authors needs to be romanised. But with the help of
 the name hashes I was at the end able to do something like Müller
 and  柳田聖山 (Yanagida, Seizan) ...
 
 so basically you order by a mix of name and romanized name (or romanized 
 name with name as fallback)?

In this special case it seemed the logical thing to do. Müller
(Müller) and 柳田聖山 (Yanagida, Seizan) ... or Müller and 柳田聖山
(Müller and Yanagida, Seizan) ... would look odd. 



-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

___
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] Strange error with bookmarks

2014-10-14 Thread Hans Hagen

On 10/14/2014 1:41 PM, Michał Goliński wrote:

It does indeed be somehow connected with the specific reader that
I use (okular). Nevertheless, evince gives the same error, and I have found out,
that even jpdfbookmarks_cli has problems as it raises an exception when I try
to dump the bookmarks:

   Exception in thread main java.lang.ClassCastException: 
com.lowagie.text.pdf.PdfNumber cannot be cast to com.lowagie.text.pdf.PdfString

Still, in Acrobat Readers it works perfectly.


better in next beta

-
  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] Stopper and itemize

2014-10-14 Thread Fabrice

Hi,
My English is not perfect !
I mean bracket, that is to say, 1) instead of 1.
Best regards,
Fabrice
___
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] Stopper and itemize

2014-10-14 Thread Mikael P. Sundqvist
On Tue, Oct 14, 2014 at 6:54 PM, Fabrice couvreur.fabr...@wanadoo.fr wrote:
 Hi,
 My English is not perfect !
 I mean bracket, that is to say, 1) instead of 1.

 Best regards,
 Fabrice
 ___
 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
 ___


Hi,

what about

\starttext
\startitemize[columns,a,joinedup][stopper=)]
\item $f(0)$
\item $g(0,3)$
\item $f(\sqrt 2)$
\item $g(-4)$
\stopitemize
\stoptext

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