Re: [NTG-context] Bibliography (bug compiling components-001.tex?) (now with sample files)

2015-07-10 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello Alan,

thanks for the idea. Now I have:

 Bib6.mkiv, UTF-8
\startbuffer[biblio]
@article{Angell,
   Author = {Marcia Angell},
   Journal = {New York Review of Books},
   Month = {July 15},
   Title = {The Truth About the Drug Companies},
   Year = {2004},
}
@article{Me,
   Author = {Štěpán Čech},
   Journal = {New York Review of Books},
   Month = {July 15},
   Title = {The Truth About the Drug Companies},
   Year = {2004},
}
@article{101,
   Author = {Štěpán Čech},
   Journal = {New York Review of Books},
   Month = {July 15},
   Title = {The Truth About the Drug Companies},
   Year = {2004},
}
\stopbuffer

%%

\usebtxdataset[biblio.buffer]

\if+- % (1)
   \def\bracketed#1{\hbox to 20pt{\hfill [#1]}}

   \setuppublications
 [sorttype=bbl,
  autohang=no,
  refcommand=num,
  criterium=all,
  numbering=bib,
  %numbercommand=\bracketed,
 ]
\fi

%%

\starttext
   Hello \cite[Angell] \cite[Me] \cite[101]!

   \hairline
   \placelistofpublications[criterium=all]
   \hairline
   %\placepublications[criterium=all] % (2)
\stoptext


Some more questions:

1) Is \placepublications deprecated?

I'm getting Undefined control sequence when I uncomment (2);
even though \placepublications is widely cited on wiki (e.g. 
http://wiki.contextgarden.net/Bibliography_mkiv ) and is also mentioned in 
bibmod-doc.pdf 
(http://www.let.rug.nl/alfa/texmf/tetex30/context/bib/bibmod-doc.pdf ).

2) When I turn (1) on (\if+- - \if++), the Ctx doesn't crash but citations are 
broken and no list of pubs is generated.

I copied \setuppublications from 
http://wiki.contextgarden.net/Theory_book_style ;
strange for me that also empty \setuppublications (i.e.

   \setuppublications
 [%sorttype=bbl,
  %autohang=no,
  %refcommand=num,
  %criterium=all,
  %numbering=bib,
  %numbercommand=\bracketed,
 ]

) produces the same no-result.

3) I would like to alter citation style from [1] to MA2004; I guess this could be 
done by \setuppublications[refcommand=author] (see bibmod-doc.pdf, art. 2.1, pg. 2);
but - as mentioned at 2) - it doesn't work.

4) Finally, in list of publications, I'd rather enumerate publications in [1] style 
rather than simple 1, i.e. enclose the publication number into [].

In http://wiki.contextgarden.net/Theory_book_style , 
\setuppublications[numbercommand=\bracketed] provided that, but again, it 
doesn't work here due to 2).

So, how to overcome all these obstacles?

Best regards,

Lukas


On Thu, 09 Jul 2015 20:30:27 +0200, Alan BRASLAU alan.bras...@cea.fr wrote:


On Wed, 8 Jul 2015 22:21:36 +0200
Lukáš Procházka l...@pontex.cz wrote:


- have a DB of publications (preferably in standard ConTeXt
space, not in a .bib file)


MKiv bibliographies:

\startbuffer[biblio]
entries in .bib format
\stopbuffer

\usebtxdataset[biblio.buffer]

\cite[bibkey]

\placelistofpublications



Alan




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

Bib6.log
Description: Binary data


Bib6.mkiv
Description: Binary data


Bib6.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] Bibliography (bug compiling components-001.tex?) (now with sample files)

2015-07-10 Thread Alan BRASLAU
On Fri, 10 Jul 2015 08:47:35 +0200
Procházka Lukáš Ing. - Pontex s. r. o. l...@pontex.cz wrote:

 I'm getting Undefined control sequence when I uncomment (2);
 even though \placepublications is widely cited on wiki (e.g.
 http://wiki.contextgarden.net/Bibliography_mkiv ) and is also
 mentioned in bibmod-doc.pdf
 (http://www.let.rug.nl/alfa/texmf/tetex30/context/bib/bibmod-doc.pdf
 ).

Do not mix-up the bibmod (mkii, also adapted for mkiv)
with the mkiv bibliography dataset system (which is completely new).

I do not know anything about the wiki on this subject but it must be
completely obsolete as the development of this new system has been very
active over the past year.

Hans and I are (still) working on the documentation that has been
promised.

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] Bibliography (bug compiling components-001.tex?) (now with sample files)

2015-07-10 Thread Procházka Lukáš Ing . - Pontex s . r . o .

On Fri, 10 Jul 2015 10:29:52 +0200, Alan BRASLAU alan.bras...@cea.fr wrote:


On Fri, 10 Jul 2015 08:47:35 +0200
Procházka Lukáš Ing. - Pontex s. r. o. l...@pontex.cz wrote:


I'm getting Undefined control sequence when I uncomment (2);
even though \placepublications is widely cited on wiki (e.g.
http://wiki.contextgarden.net/Bibliography_mkiv ) and is also
mentioned in bibmod-doc.pdf
(http://www.let.rug.nl/alfa/texmf/tetex30/context/bib/bibmod-doc.pdf
).


Do not mix-up the bibmod (mkii, also adapted for mkiv)
with the mkiv bibliography dataset system (which is completely new).


OK. I studied MkIV related part on bibliography on wiki, probably too archaic.


I do not know anything about the wiki on this subject but it must be
completely obsolete as the development of this new system has been very
active over the past year.

Hans and I are (still) working on the documentation that has been
promised.


Great.

Back to my questions:

3) I would like to alter citation style from [1] to MA2004; I guess this could be 
done by \setuppublications[refcommand=author]...

4) Finally, in list of publications, I'd rather enumerate publications in [1] style 
rather than simple 1, i.e. enclose the publication number into [].

Are / will be points 3) a 4) achievable anyhow - now, in near future, any day?

Thank you anyway.

Best regards,

Lukas


Alan




--
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] new beta

2015-07-10 Thread Hans Hagen

On 7/10/2015 7:13 PM, Pablo Rodriguez wrote:

On 07/10/2015 05:05 PM, Thomas A. Schmitz wrote:

On 07/09/2015 03:39 PM, Hans Hagen wrote:

Of course there will be bugs although the test suite runs without
crashing. I will use the new code on my machine but you can test it with:

\usemodule[newotf]

before \starttext (or in cont-loc.mkiv).


Hi Hans,

did the new font mechanism really make it into the beta you uploaded? I get

resolversmodules  'newotf' is not found

with

version: 2015.07.10 00:05


Hi Hans and Thomas

the module seems to be missing also in beta from 2015.07.09 15:23.

In beta from 2015.07.10 00:05 cont-loc.mkiv seems to be gone.


that one is not in the distribution ... you can create it

cont-new.mkiv : in distribution (patch file)
cont-loc.mkiv : local file (persistent, not replaced)
cont-exp.mkiv : experimental code (on my machine)

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
-
%D \module
%D   [   file=m-newotf,
%Dversion=2015.07.08,
%D  title=\CONTEXT\ Extra Modules,
%D   subtitle=Experimental OTF Loader,
%D author=Hans Hagen,
%D   date=\currentdate,
%D  copyright={PRAGMA ADE \ \CONTEXT\ Development Team}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

%D This module will go away as soon as we use the new loader code by default.
%D That will happen after extensive testing. Generic support will happen after
%D that.

\unprotect

\startluacode
local files = {
font-otr, font-cff, font-ttf, font-dsp, font-oup,
font-otl, font-ots, font-oto, font-otd, font-otc,
font-osd, font-map, font-fbk, font-gds,
}

logs.report(fonts)
if tex.modes.atpragma then
logs.report(fonts,replacing font loader code by experimental code 
(at pragma))
logs.report(fonts)
for i=1,#files do require(file.join(t:/sources,files[i])) end
else
logs.report(fonts,replacing font loader code by experimental code)
logs.report(fonts)
for i=1,#files do require(files[i]) end
end
\stopluacode

\protect \endinput
___
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] new beta

2015-07-10 Thread Hans Hagen

On 7/10/2015 5:05 PM, Thomas A. Schmitz wrote:

On 07/09/2015 03:39 PM, Hans Hagen wrote:

Of course there will be bugs although the test suite runs without
crashing. I will use the new code on my machine but you can test it with:

\usemodule[newotf]

before \starttext (or in cont-loc.mkiv).


Hi Hans,

did the new font mechanism really make it into the beta you uploaded? I get

resolversmodules  'newotf' is not found


i had a typo in the zip maker ... that file is missing (the rest is there)

(i've send the file send in another mail to list)

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] new beta

2015-07-10 Thread Pablo Rodriguez
On 07/11/2015 01:33 AM, Hans Hagen wrote:
 On 7/10/2015 5:05 PM, Thomas A. Schmitz wrote:
 [...]
 resolversmodules  'newotf' is not found
 
 i had a typo in the zip maker ... that file is missing (the rest is there)
 
 (i've send the file send in another mail to list)

Many thanks for the module file, Hans.

I’m afraid that newotf crashes with this sample:

\definefallbackfamily
[mainface]
[rm]
[GFS Didot]
[preset=range:greek]

\definefontfamily
[mainface]
[rm]
[TeX Gyre Pagella]

\setupbodyfont
[mainface]

\starttext
αβγ
\stoptext


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
___

Re: [NTG-context] new beta

2015-07-10 Thread Thomas A. Schmitz

On 07/09/2015 03:39 PM, Hans Hagen wrote:

Of course there will be bugs although the test suite runs without
crashing. I will use the new code on my machine but you can test it with:

\usemodule[newotf]

before \starttext (or in cont-loc.mkiv).


Hi Hans,

did the new font mechanism really make it into the beta you uploaded? I get

resolversmodules  'newotf' is not found

with

version: 2015.07.10 00:05

Thomas
___
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) from pandoc to ConTeXt

2015-07-10 Thread Pablo Rodriguez
On 07/09/2015 07:05 PM, Wolfgang Schuster wrote:
 
 Pablo Rodriguez
 9. Juli 2015 18:32
 [...]
 Here you have the websites:

 http://www.from-pandoc-to-context.tk
 https://github.com/ousia/from-pandoc-to-context
 
 Just a few comments on your code.

Many thanks for your comments, Wolfgang. I really appreciate your help.

Many thanks for all the improvements. The original code only shows my
ignorance related to ConTeXt matters :-).

 5. Use \define[2]\... or \unexpanded\def\... to create your \href command.

Sorry, but I don’t get it. Why do I need expansion when having more than
one arguments?

BTW, it isn’t clear to me what expansion may be.

 6. ConTeXt already has a \url command.

To avoid name clashes, I replaced the command with \mypersonalurl.

 7. Your \url command has two font changes (\tt and \hw) and one should
 be removed.

Yes, but this is the workaround that came to my mind to solve the
following scenario: I may want to a special mono typeface only for urls.
This mono typeface would be different from the general mono font.

The problem when using \setupbodyfont or \switchtobodyfont is that it
doesn’t work with other sizes than the default one.

This sample shows the issue:

\definefontfamily
[anothermono]
[ss]
[DejaVu Sans Mono]

\starttext
\tfxx smaller text with \anothermono\ss second mono.
\stoptext

Either I define the handwriting or calligraphy font for the same font
family, or I get wrong sizes when using other than the default.

Is this a bug or is my approach wrong?

BTW, if you allow me a question, I’d be very interested in setting up a
\hiddentitle that adds no extra vertical space (I need the \hiddentitle
to be displayed in the PDF bookmarks).

\setupinteraction[state=start]
\placebookmarks[chapter,hiddentitle]
\definehead[hiddentitle][chapter]
\setuphead
[hiddentitle]
[placehead=empty,
 incrementnumber=list,
 number=no,
 before=,
 after=]
\starttext
 \completecontent
 \startmakeup[copyright][top=]
 \hiddentitle{[Copyright]}
 This document is released to the public...
 \stopmakeup
 \chapter{Foreword}
 aa
 \chapter{Introduction}
\stoptext

I need to have no space inserted by \hiddentitle. Otherwise, vertical
spacing in makeups won’t work.

Many thanks for your help again,


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
___

Re: [NTG-context] new beta

2015-07-10 Thread Pablo Rodriguez
On 07/10/2015 05:05 PM, Thomas A. Schmitz wrote:
 On 07/09/2015 03:39 PM, Hans Hagen wrote:
 Of course there will be bugs although the test suite runs without
 crashing. I will use the new code on my machine but you can test it with:

 \usemodule[newotf]

 before \starttext (or in cont-loc.mkiv).
 
 Hi Hans,
 
 did the new font mechanism really make it into the beta you uploaded? I get
 
 resolversmodules  'newotf' is not found
 
 with
 
 version: 2015.07.10 00:05

Hi Hans and Thomas

the module seems to be missing also in beta from 2015.07.09 15:23.

In beta from 2015.07.10 00:05 cont-loc.mkiv seems to be gone.


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
___

Re: [NTG-context] new beta

2015-07-10 Thread Dominik Gerstorfer
Hi Hans,

the new beta, 2015.07.10 00:05, messes up punctuation (.:,;) for some fonts
like Calluna. This happens with and without \usemodule[newotf]:

\definefontfamily  [default] [rm] [Calluna]\setupbodyfont [default]
\starttext
This is not, as it should be; Email: em...@example.net\stoptext

​

renders as:

This is not’ as it should be’ Email’ email@example’net

[image: Inline-Bild 1]

 ​
Dominik

2015-07-09 15:39 GMT+02:00 Hans Hagen pra...@wxs.nl:

 Hi,

 I uploaded a new beta. As a prelude to some updates / improvements in the
 font handling an experimental new otf fontloader/handler is present. This
 one is not used by default but will likely replace the current one (only
 when it has been tested enough). At that time also some other pending
 changes will happen (no functional differences, only improvements).

 There are a few advantages to the new approach:

 - Indentifying fonts goes a bit faster (some 20 times) but that is already
 in the core.
 - The mem footprint of initial loading a font is smaller.
 - Initial loading can a bit slower depending on the kind of font (no big
 deal as we cache files) and if really needed can be sped up a bit.
 - The cached instance is smaller.
 - Loading the cached font is faster (not that it was slow but still).
 - Some bits and pieces have been optimized (there is room for more but
 I might decide not to do that).
 - Extra substitution features like tlig and trep are now runtime and not
 cached.
 - Processing in node mode can be somewhat faster for complex fonts.
 - The generic font code will stay as it is for at least a while after the
 new code has become stable and the current method will stay around too.

 Of course there will be bugs although the test suite runs without
 crashing. I will use the new code on my machine but you can test it with:

 \usemodule[newotf]

 before \starttext (or in cont-loc.mkiv).

 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
___

Re: [NTG-context] Using lua to define a macro with one optional parameter in brackets

2015-07-10 Thread Jaroslav Hajtmar

Thanks Hans.
At this moment, it works fine. For me it is quite essential novelty and 
it is very much handy for me.
It seems that works only in the standalone version because version in 
TeXlive 2014 version it tells an error message (but does not matter on 
it). I want to even ask how you can write a macro with one or more 
parameters?
Now the parameter in square brackets displayed together with the 
contents of the macro. You can do this at all? It would get any minimal 
example?

Thanks again for your support.

Jaroslav Hajtmar


Dne 9. 7. 2015 v 17:24 Hans Hagen napsal(a):

On 7/9/2015 5:05 PM, Jaroslav Hajtmar wrote:

Thanx to Hans and Taco too,

ad Taco) ala Perhaps interfaces.definecommand could be extended with a
way to do global definitions?
Indeed it seems to me. Changes in lua code does not affect the results
in ConTeXt.

ad Hans) interfaces.setmacro(name,value)

Thanx, II tried to use it, but somehow I can not realize what I wanted.
Not available somewhere a minimal example? I tried to scan codes in the
folder with the installation of ConTeXt, but I never encountered a
working example of where you could bounce.
Thanks Jaroslav Hajtmar


\starttext

\startluacode
interfaces.setmacro(foo,bar)
\stopluacode

\foo

\start
\startluacode
interfaces.setmacro(foo,foo,global)
\stopluacode
\stop

\foo

\stoptext

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