Re: [NTG-context] TEI to context XML mappings?

2016-08-13 Thread Mica Semrick

After doing some research, I stumbled upon saxon-lint 
(https://github.com/sputnick-dev/saxon-lint), a perl program
capable of using xpath3 expressions.

In the crudest form possible:

!# /bin/bash
for ELM in `saxon-lint.pl --xpath "distinct-values(//*/name())" file.xml`
do
echo -e "\\startxmlsetups xml:$ELM \n\t \\xmlflush{#1} \n 
\\stopxmlsetups"
done

I still need to write $ELM into an array to make it do the following:

\startxmlsetups xml:blank:map % xml:[filename] would be also fine
\xmlsetsetup{\xmldocument}
{xml:elements:from:the:variable:elm} % list the results from  saxon-lint
{xml:*}
\stopxmlsetups

That would give me the "blank" mapping file I want, saving me the
trouble of typing out the whole thing every time.

Best,
Mica

Pablo Rodriguez  @ 2016-02-24 01:10 PST:

> On 02/24/2016 09:20 AM, Hans Hagen wrote:
>> On 2/23/2016 10:26 PM, Mica Semrick wrote:
>>> Reading the docbook thread earlier today reminded me to ask this:
>>>
>>> Is there any feature or script that anyone can share that will read in
>>> an XML document and spit out a blank mapping file?
>>
>> what is a blank mapping file
>
> Just guessing (or that would be useful for me too), a file with the
> following scheme:
>
> \startxmlsetups xml:blank:map % xml:[filename] would be also fine
> \xmlsetsetup{\xmldocument}
> {xml:elements} % all elements used in document listed here
> {xml:*}
>
> \xmlsetsetup{\xmldocument}
> {h2[contains(@class,'author')]} % list also all elements
> {xml:title:author}  % with attributes
> \stopxmlsetups
>
> \xmlregistersetup{xml:pandoc}
>
> \startxmlsetups xml:elements % basic configuration for elements
> \xmlflush{#1}
> \stopxmlsetups
>
> \startxmlsetups xml:title:author % basic configuration for attributes
> \xmlflush{#1}
> \stopxmlsetups
>
> I guess that the usefulness of this is not the actual configuration, but
> to know what you have to configure.
>
> I hope it helps,
>
> Pablo
___
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] pdftex error message in TeXWorks

2016-08-13 Thread Vya. Y.
Hello,

After updating to the latest beta, TeXWorks shows an error message every
time I open and compile a document. ("The procedure entry point could not
be located in the dynamic link library").

I don't undestand how pdftex is involved when I compile to luatex.

Regards,
Vyacheslav
___
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] Interlining in a TwoColumns set

2016-08-13 Thread Jean-Pierre Delange
Thank you very much Wolfgang ! With Pablo help, I can manage this flyer. 
But how to insert a logo on the top right ?



Le 13/08/2016 à 08:52, Wolfgang Schuster a écrit :

Pablo Rodriguez 
12. August 2016 um 17:21
Interline spacing is set in an unorthodox way (to put it fine), but
there is no "setups" key for \setupparagraphs (or it doesn’t work).

Let us know whether you find more issues.

You can apply setups with the inner key:

\defineparagraphs[TwoColumns][n=2,align=verytolerant]

\startsetups[TwoColumns]
  \setupinterlinespace[line=5ex]
\stopsetups

\setupparagraphs[TwoColumns:2][inner=\directsetup{TwoColumns}]

\starttext

\startTwoColumns
\input knuth
\TwoColumns
\input tufte
\stopTwoColumns

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


___
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] Interlining in a TwoColumns set

2016-08-13 Thread Jean-Pierre Delange

Dear Pablo,

In order to understand which issues I was confronting to, I gave the 
whole stuff. I apologize if I have trespassed some rules I ought to know.


The only issue that matters is the place of the 
\setupinterlinespace[line=somenumber]command to manage the second 
column. Anyway, I'll try your sample.


Thank you very much for your help.

JP


Le 12/08/2016 à 17:21, Pablo Rodriguez a écrit :

On 08/12/2016 03:50 PM, Jean-Pierre Delange wrote:

Dear List,

In order to help somebody who wants to improve a kind presentation of
his own, I have set the sample below.

Dear Jean-Pierre,

we are happy to help, but samples should be minimal.

Otherwise, the sample should be fixed first (to have something to play
with).

Sorrym I tried to compile your sample, but even the simple clipboard
copy and paste adds extra blank lines to the code.


I am confronting to 2 issues :

1. In the second column it would be fine if one could play with the
interlining. But where to put this command :
\setupinterlinespace[line=2.8ex]}] which allow to define interlines
inside the 2nd column ?

Do you want a different interline space in the second column?


2. The Logo.svg picture (in /Images/Logo.svg within context repertory)
doesn't print : 'state: unknown'; is it an issue caused by a layer
definition ?

You have to set it (see sample below).


% Select language

\mainlanguage[fr]
\language[fr]

\mainlanguage also selects the language for the document. The second
command isn’t required.


% Normal A4 size paper

\setuppapersize[A4][A4]

Well, this is the default paper size in ConTeXt. No need to select it.


\setupcolors[state=start]

I’d say this is not required (at least, I had to stop colors to get rid
of them in one document).


\definelayer[logo_layer]

[state=start] is to be added here (see
http://wiki.contextgarden.net/Layers#State). Right after your closing
bracket.

And here you have a shorter sample:

 \mainlanguage[fr]

 \defineparagraphs[TwoColumns][n=2, align={hz,hanging}]
 \setupparagraphs[TwoColumns][1][width=200pt]
 \setupparagraphs[TwoColumns][2]
 [style={\setupinterlinespace[line=5ex]}]

 \setupexternalfigure[location=default]

 \definelayer[logo_layer][state=start]

 \setlayer[logo_layer][preset=lefttop, y=.01\paperheight,
 x=.82\paperwidth]{\externalfigure[spider][height=0.2\textwidth]}

 \setupbackgrounds[page][background={logo_layer}]

 \starttext

 \dorecurse{5}{\startTwoColumns

 \input knuth

 \TwoColumns

 \input tufte
 \stopTwoColumns}
 \stoptext

Interline spacing is set in an unorthodox way (to put it fine), but
there is no "setups" key for \setupparagraphs (or it doesn’t work).

Let us know whether you find more issues.

I hope it helps,


Pablo


___
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] Interlining in a TwoColumns set

2016-08-13 Thread Wolfgang Schuster

Pablo Rodriguez 
12. August 2016 um 17:21
Interline spacing is set in an unorthodox way (to put it fine), but
there is no "setups" key for \setupparagraphs (or it doesn’t work).

Let us know whether you find more issues.

You can apply setups with the inner key:

\defineparagraphs[TwoColumns][n=2,align=verytolerant]

\startsetups[TwoColumns]
  \setupinterlinespace[line=5ex]
\stopsetups

\setupparagraphs[TwoColumns:2][inner=\directsetup{TwoColumns}]

\starttext

\startTwoColumns
\input knuth
\TwoColumns
\input tufte
\stopTwoColumns

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

Re: [NTG-context] Problems with old style figures and particular font

2016-08-13 Thread Martin Oppegaard
On Fri, Aug 12 2016, Wolfgang Schuster wrote:
> 
> 
> Martin Oppegaard
> 11. August 2016 um 21:42
> 
> Hi Wolfgang, thank you for the quick reply.
> 
> 
> Moving \definefontfeature before \setupbodyfont doesn't change
> anything
> for me. Here is the output of running context:
> 
> You need also "script=latn" when you enable oldstyle numerals.
>
> You can use the mtxrun script to list the available features of a font
> where you also see the necessary script:
>
> $ mtxrun --script font --list --info fbbregular
>
> resolvers | trees | analyzing 'home:texmf'
> mtx-fonts |
> mtx-fonts | mapping : fbbregular
> mtx-fonts | fontname : fbbregular
> mtx-fonts | fullname : fbbregular
> mtx-fonts | filename : fbb-Regular.otf
> mtx-fonts | family : fbb
> mtx-fonts | weight : normal
> mtx-fonts | style : normal
> mtx-fonts | width : normal
> mtx-fonts | variant : normal
> mtx-fonts | fweight : conflict: regular
> mtx-fonts |
> ...
> mtx-fonts |
> mtx-fonts | gsub features:
> mtx-fonts |
> mtx-fonts | feature script languages
> mtx-fonts |
> ...
> mtx-fonts | onum grek dflt 
> mtx-fonts | latn dflt 
>
>  begin example
> \starttypescript [serif] [fbb]
> \setups[font:fallback:serif]
> \definefontsynonym [Serif] [file:fbbregular]
> \definefontsynonym [SerifItalic] [file:fbbitalic]
> \definefontsynonym [SerifBold] [file:fbbbold]
> \definefontsynonym [SerifBoldItalic] [file:fbbbolditalic]
> \stoptypescript
>
> \definefontfeature[default][default][script=latn,onum=yes]
>
> \definetypeface [fbb] [rm] [serif] [fbb] [default] [features=default]
> \definetypeface [fbb] [mm] [math] [modern] [default]
>
> \setupbodyfont[fbb]
>
> \starttext
> ABC abc 1234
> \stoptext
>  end example
>
> Wolfgang

Ah that solved it, thank you very much!

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