Re: [NTG-context] final thoughts on experiments with lua

2019-01-10 Thread Schmitz Thomas A.


> On 10. Jan 2019, at 01:08, Hans Hagen  wrote:
> 
> it all depends on use ... if you can be more specific ...

Hans, Luigi,

thanks for your hints on list sorting - they are appreciated, but I’ve been 
there many many times: it’s impossible to be more specific because numbering 
can be unexpectedly weird. Combinations of Greek and Roman letters, sometimes 
(for historic reasons) even lines that are out of numeric sequence. I’ve tried 
to catch these exceptions in sort functions, only to have to add even more ifs 
and buts when I was processing the next author. And I’m pretty sure that the 
solution is not in sorting a table index: the correct sequence is already in 
the source, it just has to be preserved. What I do now, in a nutshell: I have 
tables such as

sections = { “1”, “2”, “2a” }

words = { [“1”] = { “a”, “b” },
  [“2a”] = { “c”, “d” } }

so I can iterate through ipairs(sections) in sequence and pick up the word 
lists for each section. In the greater scheme of things, as Hraban pointed out: 
if there were an “ordered table” structure in Lua, this is precisely what it 
would do behind the scenes; it would just make it easier for the user.

Best

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Font installation help needed!

2018-09-30 Thread Schmitz Thomas A.


> On 30. Sep 2018, at 20:56, Geert Verhaag  wrote:
> 
> I'd like to use the Advent Pro font, so I downloaded the font and have 7 ttf 
> files available.
> 
> After looking around for some manual I found: "Integrating TrueType Fonts 
> into ConTEXt" by Thomas A. Schmitz.
> 
> Immediately I run into problems when trying to run the texfont command.
> 
> My Linux (ubuntu 14.04) says:
> 
> The program 'texfont' is currently not installed.
> 
> I did a standalone installation years ago of this version of ConTeXt, and 
> don't dare to upgrade because I might run into other issues, sorry!
> 
> Any hints on how to procede installing the Advent Pro font to this version of 
> ConTeXt are very much welcomed!

Ah, you like old systems! Ubuntu 14.04 and context 2013, what a wonderful 
combination, back in the days! texfont is still part of the distribution, but 
you will have to invoke it with its full path. I just tried (with a current 
standalone), and it still works as expected. I had to copy texnansi.enc into 
the working directory, and then I invoked

perl ~/context/tex/texmf-context/scripts/context/perl/texfont.pl —fontroot=<> 
—ve=<> —co=<> --en=texnansi

Try this (replacing the variables with your values, of course).

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] typesetting information from git

2018-02-23 Thread Schmitz Thomas A.


> On 23. Feb 2018, at 22:00, Hans Hagen  wrote:
> 
> maybe you mean
> 
> \startluacode
> 
> context.setupdocument {
>gitversion = string.strip(
>os.resultof("git --no-pager log --pretty='%h of %aD' -1 " .. 
> environment.jobfilefullname) or "")
> }
> 
> \stopluacode
> 
> \setupfootertexts
> [this is from file: \documentvariable{gitversion}]
> 
> \starttext
> 
> [[\ctxlua{context(environment.jobfilefullname)}]]
> 
> [[\ctxlua{context(environment.jobfilename)}]]
> 
> \ctxlua{inspect(table.sortedkeys(environment))}
> 
> test
> 
> \stoptext

Yes, sorry, I wasn’t clear enough. environment.jobfilefullname is excellent, I 
can work from here. Just to provide a clearer explanation: I have an 
environment style.tex. With it, I process a number of xml files: foo.xml, 
bar.xml, arg.xml with the call

context —environment style foo.xml etc.

and I want the git revision of the xml file printed not of the style file, 
obviously). jobfilefullname does what I want, and I’ll look into the other 
variables as well. Very handy, thanks!

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] typesetting information from git

2018-02-23 Thread Schmitz Thomas A.
Hi,

I like to add a sort of watermark with info about the git revision at the 
bottom of some files that I typeset. I’m using Lua, so I have:

context(os.resultof("git --no-pager log --pretty='%h of %aD' -1 foo.xml”))

which gives something like "git revision b085c92a of Wed, 14 Feb 2018 12:49:35 
+0100.” Suppose I want to make this more general. What would be the easiest way 
to either say “the xml file that is being processed” (something like arg[1]) or 
“the xml file whose name is in the Lua variable ‘foo?’”

Thanks!

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] rulecolor in columns

2018-02-23 Thread Schmitz Thomas A.


> On 23. Feb 2018, at 12:04, Gerard  wrote:
> 
> Why does not work "rulecolor" in my example below ? it keeps the color of 
> textcolor...
> 
> The other options of setcolumns (background...) work well but I fail on that 
> one. Have I understood everything?
> 

If you look into the source (page-mul.mkiv), there is no key “rulecolor” for 
\setupcolumns. I don’t think that the color can be set separately?

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] XITS Math

2018-02-05 Thread Schmitz Thomas A.


> On 5. Feb 2018, at 16:51, Hans Hagen  wrote:
> 
> here i get
> 
> loaded fonts: 4 files: xits-math.otf, dejavusans.ttf, dejavusansmono.ttf, 
> dejavuserif.ttf


You’re right: after deleting and remaking the cache, it works here too. Sorry 
for the noise!

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] XITS Math

2018-02-05 Thread Schmitz Thomas A.
The following test file runs without errors in the texlive version (2017.05.15 
21:48) but fails with the current beta (2018.01.24 10:47); several errors "font 
with asked name 'xits-math' is not found":


\definefontfamily [test] [serif] [DejaVu Serif]
\definefontfamily [test] [sans]  [DejaVu Sans]
\definefontfamily [test] [mono]  [DejaVu Sans Mono]
\definefontfamily [test] [math]  [XITS Math]

\setupbodyfont [test,10pt]

\starttext

Hello world. {\ss Sans} {\tt Mono}

\math{a^2 + b^2 = c^2} 

\stoptext

Looks like there is a bug somewhere in the font selection mechanism. 

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] How to remove that "Oxford Comma" in a bibliography?

2017-11-08 Thread Schmitz Thomas A.

> \usebtxdefinitions[aps]

Here you’re loading the *aps* definitions.

> 
> \setupbtx
> [apa:list:author]
> [separator:3={\btxnobreakspace\textampersand\space}] % last of a list
> 

And here you’re modifying the *apa* setups. That won’t work. This works:

\startbuffer[references]
@misc{test,
 author= {P. Wolf and H. Fuchs and V. Hase and L. Löwe},
 title = {Irgendwelche Viecher},
 year = {2017},
}
\stopbuffer

\usebtxdataset[references.buffer]

\usebtxdefinitions[aps]

\setupbtx
[aps:list]
[separator:names:3={\btxnobreakspace\textampersand\space}] % last of a list

\starttext

\cite[test]

\placelistofpublications

\stoptext

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Thicker \cdot ?

2017-11-06 Thread Schmitz Thomas A.


> On 6. Nov 2017, at 21:44, Weber, Matthias  wrote:
> 
> It looks like Metapost is a good way of doing this.
> If anybody knows a better way, please let me know.

Not “better,” but maybe simpler: you can just scale the cdot; if you want to be 
fancy, you can make a macro and center it vertically, but the basic process 
would be:

\starttext

\getglyph{file:xits-math.otf}{\char"00B7}
\space
\getscaledglyph{1.2}{file:xits-math.otf}{\char"00B7}
\space
\getscaledglyph{1.6}{file:xits-math.otf}{\char"00B7}
\space
\getscaledglyph{2}{file:xits-math.otf}{\char"00B7}

\stoptext

So knock yourself out...

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] framed with titles

2017-11-05 Thread Schmitz Thomas A.


> On 5. Nov 2017, at 10:14, Javier M Mora  wrote:
> 
> Questions:
> 
> * what is the way for implement a title in the frame?

There are examples for titles in frames at 
http://wiki.contextgarden.net/Titles#Chapter_titles_in_new_line

> 
> * Could you write a minimal example witch allows me to complete it for my 
> needs?

In general, it behooves the OP to provide a minimal example.

HTH

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Wiki pages on Unicode blocks

2017-10-27 Thread Schmitz Thomas A.


> On 25. Oct 2017, at 15:47, N. Raghavendra  wrote:
> 
> Based on what I have learnt from the replies to my queries in the last
> few days, I have added the following Wiki pages on Unicode blocks in
> ConTeXt:

Very good articles, nice introduction and instructive overview. Very useful to 
have on the wiki, thank you!

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Line numbers in output

2017-08-21 Thread Schmitz Thomas A.

> On 21. Aug 2017, at 16:25, Roger Mason  wrote:
> 
> 
> Is there a switch to enable lines to be numbered in the output pdf
> document?  I have seen the garden entries on numbering for sections of
> verbatim text but I would like the whole document to have line numbers.

http://wiki.contextgarden.net/Command/startlinenumbering is what you find when 
you search for “linenumbering” on the wiki. 

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] question for metapost experts

2017-08-10 Thread Schmitz Thomas A.

> On 10. Aug 2017, at 14:18, Hans Hagen  wrote:
> 
> p intersection_point q
> 
> (also sets intersection_found)

Boy, impressive and wonderful, thanks a lot!!! It also made me see why I the 
error stopped the compilation: I had a naming conflict between the slide 
background and one of included metapost graphics, so now I can correct this!

All best

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] question for metapost experts

2017-08-10 Thread Schmitz Thomas A.
Hi all,

this one is for all the metapos/metafun experts out there (Alan, are you 
there?). For a counter in one of my slide backgrounds, I have to calculate an 
intersectionpoint, given in percentage of the difference between current page 
and last page. I have always had some difficulties on the first run, when the 
value of the last page isn’t known yet and hence not written to the tuc file, 
but the error 

> ! The paths don't intersect.
> 


used to disappear in subsequent runs. Now, ConTeXt doesn’t compile the file at 
all and stops on this error. There is an error message I haven’t seen before:

> intersectionpoint->...The paths don't intersect");
> origin.else:0.5[point.x_.o...
> 
> ;
> <*> ... ;z13 = (z11 -- z12) intersectionpoint qw ;
> draw z13 withcolor (0.1,0
> This error message was generated by an `errmessage'
> command, so I can't give any explicit help.
> Pretend that you're Miss Marple: Examine all clues,
> and deduce the truth by inspired guesses.

Is there a way to make this conditional, such as (pseudocode)

if q intersects p:
 z = q intersectionpoint p ;
else:
 z = (0,0) ;
fi ; 

I hope that this would allow ConTeXt to proceed and calculate the point 
correctly on the second run.

Thanks, and all best

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] xml verbatim in xml...

2017-08-09 Thread Schmitz Thomas A.

> On 8. Aug 2017, at 23:26, Pablo Rodriguez  wrote:
> 
> Thomas,
> 
> \xmlprettyprint seems an easier approach.

Thank you, I did’n know about \xmlprettyprint. But I want to define my own 
prettyprinters, so it’s not suitable for my purpose. And it doesn’t solve the 
issue I was asking about.

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] xml verbatim in xml...

2017-08-08 Thread Schmitz Thomas A.
Hi all,

excellent excuse to pester the list with a program: it’s for my presentation at 
the ConTeXt meeting (have YOU registered yet?)… So: I want to show verbatim 
xml, and I’m writing in xml. This solution: 
http://wiki.contextgarden.net/Verbatim_XML mostly works (for Lua and TeX code), 
except for one little detail: for verbatim xml, it also prints the  
tag. Example:

\startbuffer[test]

  
   
   
  ...
   
   
  ...
   
  
  

\stopbuffer

\startxmlsetups xml:testsetups
\xmlsetsetup{\xmldocument}{a|xmlcode}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:testsetups}

\startluacode
function xml.functions.processXML(t)
buffers.assign("MyXml", "\\startXML\n" .. tostring(xml.text(t)) .. 
"\n\\stopXML")
context.getbuffer { "MyXml" }
end
\stopluacode

\startxmlsetups xml:a
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:xmlcode
  \pushcatcodetable
\setcatcodetable\ctxcatcodes
\xmlfunction{#1}{processXML}
\popcatcodetable
\stopxmlsetups

\starttext
\xmlprocessbuffer{main}{test}{}

\stoptext

How can this be prevented? 

Thanks, and best wishes

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] letters in context mkiv

2017-08-01 Thread Schmitz Thomas A.

> On 1. Aug 2017, at 12:15, r.erm...@hccnet.nl wrote:
> 
> While understanding what it means, I guess this might imply that it is 
> difficult (?) or impossible (?) to correctly process files such as the knuth 
> text and for that matter any other letter text that contains regular Context 
> commands.
> 
> Nevertheless, for the moment this problem remains unsolved.
> 
> What would you advise as the next step?
> 
> Should the letter be somehow set-up outside xml setups rather than inside?
> Should the letter texts (and a specific knuth sample text) be reformatted as 
> xml?

So: you want to import the letter texts from an external file. Easiest 
solution: instead of simply \input knuth, try this:

{\pushcatcodetable
 \catcodetable\ctxcatcodes\input knuth
 \popcatcodetable}

As you can see, changing the catcode regime processes the file correctly. 
“Expansion” means something different in TeX speak.

Other possibilities: write your letter body in xml, or write the letters in 
buffers and use \processTEXbuffer.

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] letters in context mkiv

2017-08-01 Thread Schmitz Thomas A.
> However, the color and style instructions (\ss\tfa) have no effect. I tried 
> to solve that, as a first step, by putting \ss before the \xmlall instruction:
> 
> \startxmlsetups xlm:contact
> \setlayer[AddressBg]  {\framed[width=55mm,height=30mm,  
> align=right,background=color,
>  backgroundcolor=lightgray]{\ss\xmlall{#1}{/address}}}
> \strut
> ...
> \stopxmlsetups
> 
> This works (see pdf), but there are probably other and better ways.
> 
Have a look at the framed/setupframed command; they have foregroundstyle and 
foregroundcolor keys; that would be the most idiomatic way to set the style.



> Another persisting problem is that the commands are still not ‘expanded’ (see 
> Pablo’s remarks). According to Pablo for some reason there is only one 
> expansion level.
> 
> This means that after an \input command, all other commands are not expanded 
> (see pdf).
> 
> This also applies to your suggestions (see pdf brieven2mkiv5.pdf): in the 
> Knuth sample text the only command \TeX\, is not expanded either.

You’re working within xml setups, which means that the catcodes are not the 
same as in TeX, which means that the backslash is just a normal character. The 
question is: why would you need TeX commands from an external file? Is this 
where your letter text comes from? You keep us guessing and are not describing 
what your needs are.

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] letters in context mkiv

2017-07-31 Thread Schmitz Thomas A.

> On 31. Jul 2017, at 18:58, r.erm...@hccnet.nl wrote:
> 
> Would it be wise to perhaps follow the path set out by Thomas? In that case 
> there should be a way to shift the address.

What efforts have you made to “shift the address”? Here is one way:

\startbuffer[participants]

  
Hendriks
Karel
mr.
K.
Arnhem

  Mr. K. Hendriks
  Grotestraat 5
  1234 BB Arnhem

1234bb5
  
  
Janssen
Piet
P.
mr.
Nijmegen

 Mr. P. Janssen
 Kortestraat 8
 1234 AA Nijmegen

1234aa8
  

\stopbuffer

\startxmlsetups xml:setups
\xmlsetsetup{#1}{contacts|contact|p}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:setups}

\startxmlsetups xml:contacts
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:p
\xmlflush{#1}\par
\stopxmlsetups

\startxmlsetups xml:contact

\setlayer[address][x=20mm,y=40mm]{\framed[width=74mm,height=35mm,frame=on,offset=2mm,align=right]{\ignorespaces\xmltext{#1}{/address}}}
\strut
\blank [35mm]
Subject: your life in \xmltext{#1}{/city}
\blank [2*line]
Dear \xmltext{#1}{/prefix} \xmltext{#1}{/formalname},
\blank [line]
\input knuth \relax

Kind regards
\blank [line]
X
\page
\stopxmlsetups

\setuppagenumbering [state=stop]

\definelayer[address][width=\paperwidth,height=\paperheight]

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

\starttext
\xmlprocessbuffer{main}{participants}{}

\stoptext

I still don’t see you trying to learn a new language one step at a time. 

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] letters in context mkiv

2017-07-30 Thread Schmitz Thomas A.

> On 30. Jul 2017, at 14:15, r.erm...@hccnet.nl wrote:
> 
> Let me as a turcologist compare my problem to learning Kazakh: I am prepared 
> to give you a manual with the grammatical rules, provide you with lists of 
> nouns, verbs, adjectives and postpositions, explain the application of 
> phonological rules, transliterations of the alphabet, give you a insight in 
> the nominal cases and verb structure, and read with you a text in Kazakh. 
> Nevertheless, without being rude, I bet that even then you are unable to 
> flawlessly produce a poem or even a brief text in Kazakh yourself.

OK, I see your desperation, and I take your analogy (I’m a scholar myself, not 
a programmer): if someone came to you with the Iliad and explained that he 
doesn’t know a word of Kazakh but wants all of Homer’s poem, every line, every 
word, every nuance, expressed in Kazakh with the help of a grammar and a 
dictionary, you’d reply that this is not how learning languages works. You 
begin with simple sentences and work your way up. You have shown us several 
times examples that don’t work, and I have expressed my suspicion that this may 
be due to using the correspondence module. You weren’t sure whether you need it 
or not; which is something only you can know. What does this module offer that 
can’t be accomplished otherwise? If you look at the documentation of the 
module, you see that the \startletter … \stopletter pair starts an environment 
within a \starttext … \stoptext context document. When you look at your setup, 
you will see that you have a \startletter … \stopletter, then a few setups, and 
then a \starttext … \stoptext document. I’m not a programmer, but I see that 
this will not work. 

So for some simple rules: when you process an xml buffer (or document), you 
define xmlsetups for the different xml elements. When you write 
\xmlprocessbuffer, that’s when these elements will be processed - which means: 
that’s when your document will be built. You can’t go through your xml 
buffer/document and then add further text (well you can, but that’s more 
complicated), so what you have to do is add your text (for the sake of this 
example: \input knuth) WITHING THESE SETUPS. So let’s start with a simple 
document that will work:

\startbuffer[participants]

  
Hendriks
Karel
mr.
K.
Arnhem

  Mr. K. Hendriks
  Grotestraat 5
  1234 BB Arnhem

1234bb5
  
  
Janssen
Piet
P.
mr.
Nijmegen

 Mr. P. Janssen
 Kortestraat 8
 1234 AA Nijmegen

1234aa8
  

\stopbuffer

\startxmlsetups xml:setups
\xmlsetsetup{#1}{contacts|contact|formalname|informalname|prefix|initials|address|city|text|kix|p}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:setups}

\startxmlsetups xml:contacts
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:p
\xmlflush{#1}\par
\stopxmlsetups

\startxmlsetups xml:contact
\xmltext{#1}{/address}
\blank [3*line]
Subject: your life in \xmltext{#1}{/city}
\blank [2*line]
Dear \xmltext{#1}{/prefix} \xmltext{#1}{/formalname},
\blank [line]
\input knuth \relax

Kind regards
\blank [line]
X
\page
\stopxmlsetups

\setuppagenumbering [state=stop]

\starttext
\xmlprocessbuffer{main}{participants}{}
\stoptext

So you see what I’m doing here: I process every simple  element, and I 
add all the stuff that will go into the letter for every single contact. Start 
with this document and then find out what you need in addition: a logo, some 
fancy lines across the letters, a special placement for the address and the 
subject, etc.? I’m guessing that it would be easier to do this with simple 
setup commands rather than using the correspondence module, but we have no idea 
what you need to accomplish. Once you find out what’s missing, you can modify 
the example and ask additional questions. But, to take your analogy: don’t 
start with irregular verbs and special cases that will complicate the picture. 
How is this line

\setuplanguage[nl][date={year, –, mm, –, dd}] % ISO 8601 date

from your original example relevant to your problem? And again: please don’t 
give me the “I’m not a programmer” response; I’m not a programmer either, but I 
know that you have to reduce the complexity in problems to find a solution. 
You’re adding extra complexity.

The way I describe above is the easiest path. There are other approaches, of 
course: you can combine elements from several xml documents, or you can process 
the xml data with Lua. All of this may be unnecessary in your case, but nobody 
will be able to help unless we understand what you need. And to explain this, 
you will have to start with simple examples, not with a complex document.

Sorry for being somewhat stern, but I’m sure you would give similar advice to 
your students…

All best

Thomas

___
If your question is 

Re: [NTG-context] (again) index sorting of accented characters

2017-04-29 Thread Schmitz Thomas A.

> On 29. Apr 2017, at 16:51, Pablo Rodriguez  wrote:
> 
> An index with classical Greek words (or names) that follows the same
> principle as in German, English or Dutch: word sorting is the same as in
> most important dictionaries.
> 
> This is the main reason of having it as a default.

Sorry, but I still don't see your point here. 

1. You refer to “practice over centuries.” Can you point me to a traditional 
index that contains an entry such as ἐκτὸς (from your example file)?

2. Sorting in ConTeXt may be used for more purposes than for printed books. I 
use it to analyze the content of my TEI xml files.

3. You refer to a new edition of LSJ in 2017. If it sorted words the way you 
suggest, with every possible morphological form as its own entry, you would 
think that was “flawed” too.

So I’m sorry, I still don’t get your point: this is about your personal 
preference, and I still don’t see why you are pushing so hard to have this 
preference as a default. This really is a corner case that is of interest to so 
few users that I wouldn’t consider it a good use of a developer’s time. It’s 
easy to achieve what you want (have you looked into the luatex solution I 
provided?), what is insufficient about this? Who is going to profit from this 
long discussion?

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] (again) index sorting of accented characters

2017-04-29 Thread Schmitz Thomas A.

> On 29. Apr 2017, at 13:10, Pablo Rodriguez  wrote:
> 
> I don‘t know why "α" isn’t the first in sorting, but it is clear that
> letters with different diacritical marks are considered as different
> letters for word sorting.
> 
> Could you confirm that the right word order is the second list in this
> message instead of the first one that ConTeXt generates by default?

No, I don't see why yours should be “right” and the order that is produced now 
should be “wrong.” It really depends on the purpose of your sorting. I don’t 
know who contributed the current code to sort-ini.lua, but it makes consistent 
choices and produces a possible order. It’s not the order you would prefer, 
granted. It’s not the order I would prefer, granted again. But what is the 
purpose of pushing so hard to have your favorite order included as default? You 
know what to do to have this order, and that’s all that’s important for you. 
Other users may have different priorities (witness the long list in 
sort-ini.lua: someone went to great lengths to define this order). So I still 
don’t see what you’re trying to accomplish.

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] ConteXt and Slackware

2016-08-10 Thread Schmitz Thomas A.

> On 10 Aug 2016, at 05:36, Jose Luis Arellano  wrote:
> 
> Hi guys, am trying to install ConTeXt on this distribution, but when try to 
> install it i get this:
> 
> /usr/bin/env: 'texlua': No such file or directory 
> 
> Suggestions?
> 

Hi,

fancy telling us how you’re installing? We have absolutely no information to go 
on.

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] lua tables - how do you cope?

2016-07-30 Thread Schmitz Thomas A.

> On 30 Jul 2016, at 23:46, Lukas Prochazka  wrote:
> 
> Hello Thomas,
> 
> here is my "dump()" I've been using for several years:

Arthur, Lukas,

these are both great and very helpful, thanks a lot! I feel bad for not knowing 
table.serialize (which can even be used with the context() function to typeset 
the result, and I really like Lukas’ step-by-step breakdown of the table. Maybe 
I’ll try and think of a nice visual way to represent these Lua tables!

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] lua tables - how do you cope?

2016-07-30 Thread Schmitz Thomas A.
Thank you, but this is not what I’m looking for. I know how to sort a table, 
and I know the Lua table tutorial (the Lua wiki is, IMHO, really terrible and 
disorganized). I have to construct deeply nested tables and sometimes lose 
track of what is at what level of my table, so I was wondering if there was an 
easy way of visualizing a nested table. On the web, you can find a number of 
(mostly abandoned) projects; the one at 
http://siffiejoe.github.io/lua-microscope/ says: "Many Lua programmers have 
written their own pretty-printer or data dumper and some even use it for 
(de-)serializing Lua data structures.” So I was wondering if any of the Lua 
users here on the list has something they want to share.

Thomas


> On 30 Jul 2016, at 16:31, Wolfgang Schuster  
> wrote:
> 
>> If the requirement is to iterate on a table having the keys, values sorted 
>> by key (assuming the keys can be sorted), there are ways to do this. Please 
>> see http://lua-users.org/wiki/SortedIteration for an example (this just 
>> replaces pairs(t) with orderedPairs(t)). 
> 
> \starttext
> 
> \startluacode
> 
> local testtable = { z = "A", y = "B", x = "C" }
> 
> for i, j in next, testtable do
> context("%s:%s",i,j)
> context.par()
> end
> 
> context.blank()
> 
> for i, j in table.sortedhash(testtable) do
> context("%s:%s",i,j)
> context.par()
> end
> 
> \stopluacode
> 
> \stoptext
___
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] gmane might go off-line soon

2016-07-30 Thread Schmitz Thomas A.
Hi all (especially the gardeners),

have you seen this post? 
https://lars.ingebrigtsen.no/2016/07/28/the-end-of-gmane/

Long story short: the sole maintainer of gmane is getting fed up with ddos 
attacks and is thinking about terminating the service. If I’m not mistaken, for 
the time being, gmane is the only searchable archive of the context mailing 
list, so this would be a major setback. On the garden, there has been a note 
for five or six years (I think) that work is being done on 
archive.contextgarden.net. Maybe the approaching end of gmane would be a good 
motivation to really do this work? 

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
___

[NTG-context] lua tables - how do you cope?

2016-07-30 Thread Schmitz Thomas A.
This is less a specific question about ConTeXt than a hope for good advice: I’m 
maltreating my xml files with a mixture of TeX and Lua. I want to extract and 
typeset information in different forms, so I first collect everything in lua 
tables, rearrange and order these tables and typeset the results. All fine and 
dandy. My problem is that I have to have tables within tables within tables… 
you get the picture. One aspect of Lua that is really bugging me is the fact 
that associative tables have no order, which can be a pain in the butt for this 
kind of operation. So I have to be careful that I have to use constructs that 
will keep the order in which items have been added and loop through them via 
ipairs() instead of pairs(). I find it difficult to keep track of what’s inside 
my layers upon layers of tables. So my question is: how do those of you who are 
more experienced with this kind of question proceed? Do you have any handy tool 
to visualize a table? Any tips you want to share?

Thanks a lot!

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] Colors not showing inside metapost after \showcolor

2016-07-23 Thread Schmitz Thomas A.

> On 23 Jul 2016, at 09:24, Bou Salim  wrote:
> 
> Hi 
> I have this problem to show colors properly. I have defined color "myred",  
> but after \showcolor command  colors inside metapost can't be displayed.

Your example shows the correct colors here. Which version are you using? mkii 
or mkiv?

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] Recent changes in paragraph composing

2016-03-31 Thread Schmitz Thomas A.

> On 31 Mar 2016, at 22:17, Jan Tosovsky  wrote:
> 
> In time of producing the result image it was sufficient to set the tolerance
> to 'strict'.
> 
> (1) How can this be fixed efficiently?
> (2) What has changed internally?
> 
> Thanks for any hints, 

The example is missing the language setup:

\setuplanguage [en] [patterns={en,agr}]

\mainlanguage [en]

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] placelist not working in latest beta

2016-03-21 Thread Schmitz Thomas A.

> On 21 Mar 2016, at 15:28, Hans Hagen  wrote:
> 
> when playign with some new feature i commented too much
> 
> around line 722, uncomment:
> 
> \setuplistalternative
>  [\c!command=\strictlistparameter\c!command,
>   \c!symbol=.]
> 
> 

Done, and it works again! Thanks Hans!

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
___

[NTG-context] placelist not working in latest beta

2016-03-21 Thread Schmitz Thomas A.
Hi all,

example attached with output from latest beta and an older one. The \placelist 
command appears to have changed recently; the older beta I tested is from 
November, but this used to work in February as well, the change must be recent.

Thanks a lot

Thomas

\definelist[MyTopics][criterium=all]

\def\MyMark{}

\def\Topic%
  {\dosingleargument\doTopic}

\def\doTopic[#1]{%
  \gdef\MyMark{#1}%
  \writetolist[MyTopics][location=none]{#1}{}}

\define[3]\FancyEntry{%
  \doifelse{\rawstructurelistfirst}{\MyMark}%
{\quad\color[red]{#1}\quad}
{\quad #1\quad}}

\setuplist[MyTopics]
  [pagenumber=no,
   alternative=command,
   command=\FancyEntry]

\setupfootertexts [{\switchtobodyfont[8pt]\quad{\placelist[MyTopics]}}] 

\starttext

\Topic[First]
\contextversion

First Topic

\page

\Topic[Second]

Second Topic

\page

\Topic[Third]

Third Topic

\stoptext



2015_11_19.pdf
Description: Adobe PDF document


2016_03_13.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] kerning with \quotation

2016-03-06 Thread Schmitz Thomas A.

> On 06 Mar 2016, at 15:56, Hans Hagen  wrote:
> 
> \setupdelimitedtext
>  [method=font]

Excellent - thanks Hans!

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
___

[NTG-context] kerning with \quotation

2016-03-06 Thread Schmitz Thomas A.
Hi all,

short example in extra big size to make the effect visible:

\setupbodyfont [termes,48pt]

\mainlanguage [de]

\starttext

„Vater“

\quotation{Vater}

\stoptext

In the first line, the character „ has a bit of kerning with the following V 
(could be even more, to my taste). With \quotation, the gap between them is 
very large. Could the kerning be applied in this case too? Or is it better to 
use the raw „? (After I have taught emacs to auto-insert \quotation{ and } when 
I type a quotation mark…)

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] \replaceword and \setreplacements with xml files

2016-01-16 Thread Schmitz Thomas A.

> On 16 Jan 2016, at 12:24, Jan U. Hasecke  wrote:
> 
> Both solutions work fine if I use them in a simple context file, but I
> can't use neither solution in my xml processing.
> 
> I use a customized version of the from-pandoc-to-context solution of Pablo.
> 
> When I place the replacement commands somewhere in the style file I get
> no result. I can see no error message. The file is compiled just fine
> but without replacements.
> 
> Has anyone yet implemented replacements in xml processing and can give
> me a hint where to place the commands?

Please provide a minimal example of your problem. It’s impossible to help when 
we have no clue what you’re doing.

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] Error in latest beta: luat-exe.lua not found

2016-01-16 Thread Schmitz Thomas A.

> On 16 Jan 2016, at 00:32, Hans Hagen  wrote:
> 
> you're the only one with this issue (or the only one who reports it) so i 
> have no clue what to do
> 
> does a fresh install work ?

Everything works normally here after updating an existing minimal tree is all I 
can say. And I’m really glad about the separation of mkii and mkiv code, it’ll 
make it so much easier to look for macro definitions in the source.

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

2015-11-19 Thread Schmitz Thomas A.

> On 19 Nov 2015, at 22:45, Pablo Rodriguez  wrote:
> 
> I have just updated and compilation from XML sources works fine again
> (at least with the file I tested ;-)).

The problem with xml entities persists. They are not processed, but printed as 
is. I sent an example on Oct. 13.

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

2015-10-13 Thread Schmitz Thomas A.

> On 13 Oct 2015, at 13:41, Hans Hagen  wrote:
> 
> if you have a small example ... this whole entity stuff is a mess .. 
> officially entities are replaced at load time but tex code is delayed .. so 
> maybe i need to invent some other trick (there was an issue with & ; 
> sequences being replaced while being just text in that stage

Yes, it looks like the treatment of & has changed. Here’s an example:

\startbuffer[test]

 Random text with an entity: 

\stopbuffer

\startxmlsetups xml:testsetups
 \xmlsetsetup{#1}{text}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:testsetups}

\startxmlsetups xml:text
 \xmlflush{#1}\par
\stopxmlsetups

\xmltexentity{degree}{\textdegree}

\starttext
 \xmlprocessbuffer{main}{test}{}
\stoptext

Works with older betas, not with the current one.

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] footnote in title

2015-10-13 Thread Schmitz Thomas A.

> On 13 Oct 2015, at 11:56, Thomas A. Schmitz  
> wrote:
> 
> I thought something like this had been asked on the list recently, but a 
> search came up empty: how to get footnotes to titles typeset?
> 
> \automigrateinserts
> 
> \starttext
> 
> \startchapter [title={Silly title\footnote{With a silly footnote}}]
> 
> More text.\footnote{With more footnotes.}
> 
> \stoptext
> 
> I thought \automigrateinserts was the magic command, but the note symbol is 
> set, the content of the note disappears.
> 
> 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
> ___

Boy do I feel stupid now - I hadn’t even tested without this command. You’re 
right, and this also works in my real life files. I’ll just have to see what 
happens when I need automigrateinserts further down the road...

Thanks for your help!

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] Illegal parameter number in definition

2015-07-20 Thread Schmitz Thomas A.

 On 17 Jul 2015, at 19:26, juh juh+ntg-cont...@mailbox.org wrote:
 
 Hi all,
 
 I am totally new to ConTeXt. I am a long time LaTeX user and I got
 interested in ConTeXt by a posting from Pablo in the Pandoc mailing
 list. So he is to blame if you have to read silly questions from me in
 the future. ;-)
 
 To learn a bit more about ConTeXt I try to make an environment to
 typeset TEI-XML files from http://www.deutschestextarchiv.de (DTA)
 
 I ran into a problem with this XML from DTA:
 
 head
 hi rendition=#gZehenter Brief./hi
 /headlb/
 phi rendition=#inS/hiie sind also mit mir darinn einig, und
 durch den Innhalt meiner
 
 I tried to map the rendition attribute to ConTeXt with this code:
 
 \startxmlsetups xml:teisetups
\xmlsetsetup{#1}{*}{-}
\xmlsetsetup{#1}{TEI|text|body|div|head|p|lb}{xml:*}
\xmlsetsetup{#1}{hi[@rendition='#g']}{xml:hi}
 \stopxmlsetups
 
 The attribute of '#g' makes trouble. I get the following error message.

Hi, welcome to ConTeXt. We prefer to have complete minimal examples 
(http://www.tex.ac.uk/FAQ-minxampl.html) here so we can look into your 
questions, not just code snippets. As to your problem: indeed, you have to 
remove the hashtag. The same question was asked by Pablo just two months ago: 
http://thread.gmane.org/gmane.comp.tex.context/91354/ . Maybe it would be a 
good idea to add the solution provided by Hans to the wiki page on TEI xml 
typesetting http://wiki.contextgarden.net/TEI_xml since it’s a common problem.

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] Illegal parameter number in definition

2015-07-20 Thread Schmitz Thomas A.
 
 I see. Impressive (I think I have to learn lua, too)

You don’t have to, but you’ll see that it’s actually fun.

 
 But for now I am better off with the coontains statement.
 
 \xmlsetsetup{#1}{hi[contains(@rendition, 'in')]}{xml:hi:in}
 
 It matches
 
 hi rendition=#inS/hi
 
 without problems
 
 But of course, I am not sure if there are any side effects.

Well, only if you have other attributes which also contain “in.

 
 What is your Wiki policy? I am willing to help.
 
 I've made an account. Shall I just edit the page? I'd put a new subline
 at the end of the text.
 
 Removing hashmarks from the xml source

Yes, just edit the page - there is no official deciding body, but some people 
keep an eye on the wiki and will gently edit if you make a mistake.

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] E-books and XML.

2014-08-27 Thread Schmitz Thomas A.

On 27 Aug 2014, at 16:38, john Culleton j...@wexfordpress.com wrote:

 Some questions:
 What tool do you recommend for entering text etc.
 in XML format? I have the Bluefish Editor but
 usually code html in a plain editor (Gvim).

“Recommend” is too strong, because everything depends on the type of document 
you’re working on. I mainly use emacs + nxml mode. It validates on the fly, if 
your document is well defined, you can make it validate against a relax-ng 
scheme. To me, this is sufficient. I know that many serious users of nxml swear 
by oxygen. And I wouldn’t be surprised if Hans used his beloved Scite. (As for 
Lukas’s question: sorry, I don’t do Windows, I have no clue)

 
 I downloaded the manual Dealing with XML in
 MKIV but it presupposes that the user builds his
 own conversion system. And it is still somewhat
 exerimental. Is there a conversion system already
 in place somewhere?

I have been using it for a number of years now and have found it as stable as 
the rest of ConTeXt. Every once in a while, a bug will come up, and it will be 
fixed by Hans.

Have you seen the wiki page about TEI xml and about processing xml with Lua? 
That should be a good start.

 
 For the beginner (me) is the MKII method easier
 to implement?

No, I would say both are about equal in complexity, but the mkiv method is so 
much more powerful and consistent, I really wouldn’t bother with mkii anymore.

One reason for me to use xml: I generate presentations, manuscripts, handouts 
from the same source (all with context). When I’m not typesetting the book 
myself, editors usually want some sort of word or libreoffice document. When my 
input is xml, it is relatively trivial to transform it to valid html and load 
that into libreoffice. 

Again: much depends on the type of document you’re working on. If every 
document you write is its own piece of art with numerous font effects and 
special typesetting needs on every page, I would stay with context syntax. But 
if your documents have a pretty predictable structure and you don’t expect to 
be forced to tweak individual page breaks, I would have a very long look at 
xml. I have grown to like it. If you have ever looked at a tex source document 
and tried to figure out where the missing brace in your }} orgy came 
from, you will love the tags and their nice nesting.

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] reading modules broken?

2014-06-15 Thread Schmitz Thomas A.

On 07 Jun 2014, at 19:09, Hans Hagen pra...@wxs.nl wrote:

 s-simpleslides
 
 would have been a better choice

I have uploaded a new version with these changes, it appears to work. I don’t 
have time right now to look at all the styles (most work, some have small 
defects) and do the documentation, so this is just a version patched with the 
most important changes. And now that the last user of mkii, in a small country 
in central Europe, has switched, I have made the module mkiv only.

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] issues with greeknumerals

2014-04-07 Thread Schmitz Thomas A.

On 07 Apr 2014, at 23:24, Otared Kavian ota...@gmail.com wrote:

 Maybe not, since Roman numerals i, ii, iii, iv, etc correspond really to the 
 way Romans used to write numbers, while Greek numerals \alpha, \beta, \gamma, 
 \delta, etc are rather our modern way of numbering items, analogous to the 
 case one would say a), b), c), d) etc. 
 Would Thomas Schmitz give us some insight?

In fact, I was wondering what “Greeknumerals” would translate to. The most 
common system used in antiquity is the “Milesian” system: α=1, β=2 etc., but 6 
is expressed by ς; ι=10; ρ=100, with two archaic letters as 90 and 900; this is 
used in most papyri. There are other systems in use (especially in 
inscriptions), they involve special characters which most fonts don’t have. The 
simple system α=1 up to ω=24 is used to number the books in the Homeric epics, 
so it also has ancient precedents. If we want to be nitpicking, it shouldn’t be 
called “Greeknumerals,” but rather “Greekalphanumericalconversion,” which 
sounds like a really snappy, memorable way to express it, don’t you agree?

So: this is just the historical and philological aspect, Greeknumerals will 
make sense to most users.

All best

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
___

[NTG-context] quick and shallow question about layers

2014-03-26 Thread Schmitz Thomas A.
Hi,

this is pretty shallow, but maybe someone knows a way: for one of my 
presentation, every slide has a (different) picture as background. The title is 
typeset within a narrow colored frame which extends across the entire slide. Is 
there any way to make the background picture show through the letters of the 
title, i.e. make the letters transparent within the colored frame? I thought of 
metapost’s infill, but it appears that this only adds a background color, not 
real transparency.

Hope the question is clear enough - just in case someone has a suggestion; my 
life doesn’t depend on it!

Thanks and all best

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
___


[NTG-context] mp: choose colors randomly from list

2014-02-19 Thread Schmitz Thomas A.
Hi all,

I would like to have mp choose a (transparent) color randomly from a predefined 
list. My naive approach was (let’s restrict it to three colors):

\startuniqueMPgraphic{colortest}
save mycolor ; color mycolor[] ;
mycolor[1] := (0.07, 0.21, 0.65) ;
mycolor[2] := (0.6, 0.6, 0.4) ;
mycolor[3] := (0.5, 0.8, 0.5) ;
path p ;
p := unitsquare scaled 2cm ;
for i=1 upto 3:
fill p shifted (i*2.5cm, 0) withcolor transparent 
(1,0.3,mycolor[round(uniformdeviate(i))]) ;
endfor ;
\stopuniqueMPgraphic

\starttext

\uniqueMPgraphic{colortest}

\stoptext

Is there a better approach? The selection isn’t random enough for my taste :-) 
Sometimes, in my real document, I get black color, even though black isn’t in 
the list, so I suspect that mp doesn’t get a correct value for 
mycolor[round(uniformdeviate(i))]. And finally: how could I define the colors 
in a way that I could also use them outside of mp? Or do I have to copy-paste 
the definitions into \definecolor’s? 

All best

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] mp: choose colors randomly from list

2014-02-19 Thread Schmitz Thomas A.

On 19 Feb 2014, at 11:37, Alan BRASLAU alan.bras...@cea.fr wrote:

 uniformdeviate returns a random number between zero and the value of
 the argument. So you do not want (uniformdeviate i).

Ah, that explains it. Thanks a lot Alan!

Otared Kavian wrote:

 One way is to increase the « degree of randomness » by saying
   withcolor transparent (1,0.3,mycolor[round(uniformdeviate(10*i)/10)])
 or you can define a RandomColor as below:

I hate myself for not knowing more about math! I don’t see how mp picks its 
random numbers - when I recompile, I always get the same colors in the same 
order. They are “random” in the sense that there is no fixed order, but I was 
surprised that every run produces the same random order. RandomColor is nice, 
but not for my current purpose because I want to choose from a fixed list 
(colors are used as backgrounds, so I can only use dark colours, e.g.).

Thanks a lot!

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] mp: choose colors randomly from list

2014-02-19 Thread Schmitz Thomas A.

On 19 Feb 2014, at 12:16, Wolfgang Schuster schuster.wolfg...@gmail.com wrote:

 http://www.ntg.nl/pipermail/ntg-context/2012/065815.html
 
 Wolfgang

Not only I’m bad at math, I don’t even remember the answers to my own questions 
- thanks Wolfgang for reminding me! I’m getting old and senile, should look 
into early retirement...

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] MacOsX Mavericks and Luatex

2013-10-24 Thread Schmitz Thomas A.

On 24 Oct 2013, at 07:41, Pierre Bovet pierr...@me.com wrote:

 Hi all!
 
 It seems that Luatex (0.76 2013/04/05) don't works with Mavericks?
 
 Thank's in advanced for your help and testimonies
 
 Best wishes

I’m afraid you’re right! I installed Mavericks yesterday; trying to build the 
format, I get this:

fontsnames  globbing path '/Library/Fonts/**.ttf'
mtx-context | fatal error: no return code, message: luatex: execution 
interrupted

It may be a new wacky font in /Library/Fonts. But so far, I have not been able 
to unset OSFONTDIR and make context ignore this directory. (Unlike some people 
in a recent discussion, my preference would be to NOT include any system fonts 
by default: it slows rebuilding the formats down, people who want it can 
achieve it, and it’s generally a bad idea). I’ll see if I can figure out how to 
do this and will report back, but for the time being, context cannot be used on 
Mavericks…

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] MacOsX Mavericks and Luatex

2013-10-24 Thread Schmitz Thomas A.

On 24 Oct 2013, at 09:01, Schmitz Thomas A. thomas.schm...@uni-bonn.de wrote:

  But so far, I have not been able to unset OSFONTDIR and make context ignore 
 this directory. (Unlike some people in a recent discussion, my preference 
 would be to NOT include any system fonts by default: it slows rebuilding the 
 formats down, people who want it can achieve it, and it’s generally a bad 
 idea). I’ll see if I can figure out how to do this and will report back, but 
 for the time being, context cannot be used on Mavericks…

I’m getting slightly annoyed, please excuse my rant. I DO NOT want context to 
search for system fonts. What I have done is:

1. delete the lines 

  elseif osname==macosx then
ossetenv(OSFONTDIR,$HOME/Library/Fonts//;/System/Library/Fonts//“ etc.

in mtxrun.lua. Rebuild formats. Result when I compile a file:

fontsnames  globbing path '/Library/Fonts/**.ttf’
mtx-context | fatal error: no return code, message: luatex: execution 
interrupted

2. set an environment variable OSFONTDIR, rebuild formats. Result: same as above

Why, oh why is context doing this? Just because some lazy people want their 
“system fonts” used, why is it impossible to make a clean separation? I only 
want fonts in my tex-trees used and searched, nothing else.

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] MacOsX Mavericks and Luatex

2013-10-24 Thread Schmitz Thomas A.

On 24 Oct 2013, at 09:04, Wolfgang Schuster wolfgang.schus...@gmail.com wrote:

 There are no problems for me with the last version of the context suite and 
 OS 10.9.
 
 This is LuaTeX, Version beta-0.76.0-2013040508  (TeX Live 2013/dev)(rev 4627)
 
 Wolfgang

not on my system. I have this version and the latest suite, and context bails 
out (see my other messages).

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] MacOsX Mavericks and Luatex

2013-10-24 Thread Schmitz Thomas A.

On 24 Oct 2013, at 10:00, Wolfgang Schuster wolfgang.schus...@gmail.com wrote:

 Can you remove the Skia.ttf (copy it to another directory) font from 
 /Library/Fonts,
 this helped on my system to get rid of the error message.
 
 Wolfgang

Yes, that helped, and I can at least compile my documents again. (How did you 
find out it was this particular font?).

Thanks a lot

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] MacOsX Mavericks and Luatex

2013-10-24 Thread Schmitz Thomas A.

On 24 Oct 2013, at 16:17, Hans Hagen pra...@wxs.nl wrote:

 Hm. The problem is that we get some oscillation (with a few year cycle) 
 between the 'demand' for os fonts support vs tree only (as far as remember os 
 font support was mostly requested by osx users). Anyhow, we can make it an 
 option, but then the question is: what is the default (and who is going to 
 defend that choice to distributers and users).
 
 Hans

Yes, I’m aware that any default will make some users unhappy. I would prefer to 
have osfontdir unset by default because there’s a real speed penalty in having 
it set so I would agree with Alan on that one. (It would also abolish the 
inconsistency between platforms.) But for me the real question is: what do I 
have to do to have osfontdir unset as things are now? I tried some things, none 
worked. (see my earlier mail).

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] MacOsX Mavericks and Luatex

2013-10-24 Thread Schmitz Thomas A.

On 24 Oct 2013, at 16:44, Aditya Mahajan adit...@umich.edu wrote:

 You need to set it to a dummy directory! See: 
 http://tex.stackexchange.com/a/136073/323

No, even that doesn’t help:

echo $OSFONTDIR
/tmp/dummy

and then on a first run (after regnerating the format with this variable set), 
I get lines such as

fontsnames  'OSFONTDIR' specifies path '/Users/tas/Library/Fonts'
fontsnames  'OSFONTDIR' specifies path '/Library/Fonts'
fontsnames  'OSFONTDIR' specifies path '/System/Library/Fonts'
fontsnames  globbing path '/System/Library/Fonts/**.OTF'
fontsnames  68 system files identified, 2 skipped, 2 duplicates, 
66 hash entries added, runtime 43.223 seconds

So something appears to be overriding the variable that I set. But what? And 
why? And how do I stop it?

On 24 Oct 2013, at 23:40, Hans Hagen pra...@wxs.nl wrote:

 I don't understand the speed issue. We're talking about relatively few fonts 
 only and context will not scan them unless there is a change. After a remake 
 a rescan takes  9 sec on my laptop and  6 sec once the directories have 
 been cached (windows 8 / 64 bit / i7 / ssd).
 
 Only an initial full scan takes a while (deleted cache), but that's mostly 
 because I have a pretty large font collection in my texmf-fonts tree.

You’re right of course that it’s only the initial run when a new font cache has 
to be built, but the time I get on os x is much longer than what you report:

with rescanning of system fonts:
system  | total runtime: 114.131 (yes, that’s almost 2 minutes!)

And I don’t want to twiddle my thumbs for two minutes, and don’t want to use 
those “system fonts” (or if I want to use them, I will copy them to my texmf 
directories)!

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] error when installing ConTeXt Standalone

2013-10-04 Thread Schmitz Thomas A.

On Oct 3, 2013, at 8:57 PM, Pablo Rodríguez oi...@gmx.es wrote:

 
 Installing zsh gives the same error, but I don’t have zsh installed (I
 removed after installing it to test this).

I play around with quite a few linux distributions and use them on a regular 
basis. The error only crops up on fedora. It comes and goes away, without any 
apparent reason. I use zsh as my login shell, so I thought it may have 
something to do with the fedora version of this shell, but now it looks like 
it's a problem within fedora. But to sum up what I think we found in the 
previous discussion: it's a problem with fedora, not with context; there's 
nothing that the context developers can do about it. 

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
___


[NTG-context] bug in current beta

2013-08-15 Thread Schmitz Thomas A.
Hi Hans,

I get this error running 2013.08.14 15:25:

! LuaTeX error .../context/tex/texmf-context/tex/context/base/font-col.lua:180: 
table index is nil
stack traceback:
.../context/tex/texmf-context/tex/context/base/font-col.lua:180: in 
function 'fontcollectionclone'
[string \directlua ]:1: in main chunk.

system   tex  error on line 137 in file 
/Users/tas/context/tex/texmf-context/tex/context/base/cont-yes.mkiv: LuaTeX 
error  ...



\ctxcommand #1^^@-\directlua {commands.#1}

l.137 }
 
\ctxcommand #1^^@-\directlua {commands.#1}

\font_fallbacks_prepare_indeed ...backs_prepare #1
  \endgroup 
inserted text ...llbacks_prepare_indeed \m_font_class_fallbacks 
  \fi \else \font_fallbacks_...
\font_helpers_low_level_define ...everydefinefont 
  \c_font_feature_inheritanc...
...
l.91 \stopluacode

Unfortunately, I have no idea what triggers it, same document compiles fine 
with a July beta.

All best

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] bug in current beta

2013-08-15 Thread Schmitz Thomas A.

On Aug 15, 2013, at 1:43 PM, Hans Hagen pra...@wxs.nl wrote:

 as you know lua ... just look at those lines and a few lines above ... you 
 need to add
 
local unic = unicode + offset - start
 
 (new beta later, in the middle of something)

Ah, you're right, I could have seen that myself - that assignment was missing 
from the else branch. Thanks, that fixed the problem!

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] footnotes on wrong page

2013-07-24 Thread Schmitz Thomas A.

On Jul 24, 2013, at 11:57 AM, Marco Patzer home...@lavabit.com wrote:

 http://wiki.contextgarden.net/Unexpected_behavior#Footnotes:_The_Difference_between_.5Csetupnotation_and_.5Csetupnote

I wasn't aware of this page - thanks a lot, this is VERY useful!

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] ContML module?

2013-06-15 Thread Schmitz Thomas A.

On Jun 15, 2013, at 4:34 PM, Sander Maijers s.n.maij...@student.ru.nl wrote:

 I use a very recent version of ConTeXt MKIV, and I was following the 
 instructions on this Wiki 
 page:http://wiki.contextgarden.net/Mixing_XML_and_ConTeXt . However the 
 contml module cannot be found and the hyperlink to it on the Wiki page is 
 invalid.

Which is why this page can be found under Documents about XML in MKII 
(obsolete). This will not work with Mkiv.

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] ContML module?

2013-06-15 Thread Schmitz Thomas A.

On Jun 15, 2013, at 4:47 PM, Sander Maijers s.n.maij...@student.ru.nl wrote:

 I did not visit the page from the main XML page, but via Google. In the page 
 itself there is no mention of MkII. By the way, the dead link to the old 
 module shouldn't be there in any case.

OK, then thanks for fixing this!

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] Adobe Garamond Problems with letter combination fi

2013-04-27 Thread Schmitz Thomas A.

On Apr 27, 2013, at 12:16 AM, Hans Hagen pra...@wxs.nl wrote:

 Someone had to show me the first ligature years ago and when he did
 that, I had to check every single book and document I had at hand to
 check if ligatures were really commonly used. I simply couldn't
 believe my eyes and the fact that it took me some 15 years of literacy
 and a couple of years of using TeX without ever noticing any ligature
 anywhere.
 
 ha, and then you started recognizing tex docs by abundant use of frames 
 around tables and, emdashes, funny logos with lowered and raised characters, 
 and ...
 
 btw, i have something similar with metapost: once you notice how precise mp 
 is, you also notice how imprecise most other vector graphics are
 
 I consider this (the fact that one doesn't notice it) part of a good
 design. It's similar with kerning: one doesn't notice it until/unless
 it's bad. It's similar in the kitchen also. One doesn't notice that
 
 but i assume, as you were involved in lucida ot, that you know that this font 
 has no kerns ..
 
 (i remember seeing a monotype type one times that was advertized as being 
 very good because it had 4000+ kerning pairs .. on one of those expensive 
 sun-workstation typesetting systems that in the meantime disappeared)
 
 (already for years i wonder that when printing from firefox etc it looks like 
 the kerns are put on the wrong side of the glyphs)

Here's a nice one: http://xkcd.com/1015/ I feel that's what TeX does to you...

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
___


[NTG-context] processing xml with lua

2013-02-26 Thread Schmitz Thomas A.
Hi all,

one of my favorite topics… Here is a minimal example which shows something that 
I don't understand: when I process the subsection with the lua code, I want to 
get the value of the current section's label attribute in xml.attribute(r, 
../../section, label, X). So i was expecting that lua would go up 
(../../) and fetch the current section's label. But if you run the example, you 
see that it actually always gets the first section's label (value is always 1). 
How can I get the current section's label with a lua function?

THanks and all best

Thomas

\startbuffer[test]
chapter
  section label=1
subsection label=1
  content
text 1.1
  /content
/subsection
  /section
  section label=3
subsection label=1
  content
text 3.1
  /content
/subsection
subsection label=5
  content
text 3.5
  /content
/subsection
  /section
/chapter
\stopbuffer

\startxmlsetups xml:testsetups
\xmlsetsetup{\xmldocument}{chapter|section|subsection|content}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:testsetups}

\startxmlsetups xml:chapter
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:section
\xmlflush{#1} \par
\stopxmlsetups

\startxmlsetups xml:subsection
\xmlfunction{#1}{test}
\stopxmlsetups

\startluacode
outfile = io.open('temp.tmp', 'w')
function xml.functions.test(r)
  content = xml.text(r, content)
  section = xml.attribute(r, ../../section, label, X)
  context(This ) context(content) context( is in section ) context(section)
end
\stopluacode

\starttext
\xmlprocessbuffer{main}{test}{}

\enabletrackers[context.trace]

\xmlshow{main}
\stoptext

___
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] processing xml with lua

2013-02-26 Thread Schmitz Thomas A.

On Feb 26, 2013, at 1:54 PM, Hans Hagen pra...@wxs.nl wrote:

 you go up to the parent of sections which to far up, try:
 
  section = xml.attribute(r, .., label, X)
 
 or
 
  section = xml.filter(r, ../attribute(label))
 
 

Mojca, Hans,

thanks, that is exactly right! I wasn't too sure about ../../section, but now 
it makes sense. I have to study xpath a bit more, I guess.

All best

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] index: distinguish entries by pagestyle

2013-01-14 Thread Schmitz Thomas A.

On Jan 14, 2013, at 2:54 PM, Andreas Mang m...@imt.uni-luebeck.de wrote:

 Hi there,
 
 I got a question considering the registers. I'd like to distinguish between 
 the definition of some term and its appearance/use somewhere else (boldface 
 vs. normal font of page number for instance). The garden provides a solution, 
 which does not seem to work for me:
 
 %%%
 \setupregister[index][nb][pagestyle=bold]
 
 \starttext
 
 My \index[nb::dog]{dog}dog is a cat\index{cat}.
 
 \placeindex
 \stoptext
 %%%
 
 (modified from http://wiki.contextgarden.net/Registers).
 
 What I'd like to have is, that dog appears with a bold page number and that 
 cat doesn't.

Your example produces the expected output with Mkii, and your code is OK, so i 
assume this must be a bug in Mkiv. Hans?

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] here is ae

2012-12-16 Thread Schmitz Thomas A.

On Dec 16, 2012, at 2:46 PM, Hans Hagen pra...@wxs.nl wrote:

 Using xml sounds ok to me (esp as you know how to do it) ... with xinclude 
 you mean combining multiple files into one? It's what we do in all xml 
 related projects here. There is actually an \xmlinclude command
 
\xmlinclude{main}{include}{filename|href|name}
 
 this will include from elements with tags 'include' and one of the attributes 
 mentioned. Do this as one of the first steps as it merges xml trees.
 
 Hans

Hi Hans,

thanks for your suggestion. Yes, I mean combining multiple files into one 
document. Sorry that I didn't see \xmlinclude, that's of course just what I was 
looking for. But after searching the list, I saw a couple old messages by Hans 
dan der Meer which made me realise I have no idea yet how to use it. Something 
like this?

file chapter_1.xml
chapter
  text
/chapter

file chapter_2.xml
chapter
  text
/chapter

and then

file master.xml
document
  xi:include href=chapter_1.xml/
  xi:include href=chapter_2.xml/
/document

Would translate to 

\startxmlsetups xml:xi:include
  \startchapter
 \xmltext{#1}{chapter}
   \stopchapter
\stopchapter

Is that the basic structure, or am I misunderstanding the way this could be 
used? 

All best

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] here is ae

2012-12-16 Thread Schmitz Thomas A.

On Dec 16, 2012, at 11:08 PM, Sietse Brouwer sbbrou...@gmail.com wrote:

 http://wiki.contextgarden.net/Command/xmlinclude
 
 Wikified, but sans example for now. Thomas, could I leave that to you?
 Writing about things I don't understand is one thing, but producing
 working code that I don't understand is something I am happy to leave
 to the experts.  ;-)
 
 Cheers,
 Sietse

The horror :-) That was pseudo-code, and I have not the faintest idea if this 
works at all! But it's good you put this up on the wiki: it will create a 
disturbance in the space-time continuum which is so strong that Hans will have 
to tell us how it really works - otherwise, the Mayas may turn out to be right 
after all...

All best

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] Equivalent of Includeonly?

2012-11-19 Thread Schmitz Thomas A.

On Nov 19, 2012, at 9:47 AM, Wolfgang Schuster wolfgang.schus...@gmail.com 
wrote:

 No there isn’t.
 
 
 @Hans: With with \includeonly and \excludeonly command you can specify which 
 external files should be included in the document by the \inlcude{…} (a 
 special version of \input{…}) command.
 
 When you add \includeonly{one,three} in the following example only the files 
 “one.tex” and “three.tex” will be included and the other two are ignored. 
 With \excludeonly{two,three} the files “one.tex” and “four.tex” are read but 
 two and three are ignored.
 
 \startproduct mydocument
 
 \component one
 \component two
 \component three
 \component four
 
 \stopproduct
 
 Wolfgang
 _

That reminds me: at the context meeting 2011, we talked about the possibility 
of retaining page numbers, cross-references, etc. when compiling just one 
component. Hans. you, said this wasn't too complex (because all the information 
is already there in the tuc file). Is this possible now, or can we have that in 
the near future? :-)

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] The on-going process of the Proceedings for Context Meeting 2011

2012-10-27 Thread Schmitz Thomas A.
Dear John,

unfortunately, this is not, as I had hoped, a mail sending my completed article 
for the proceeding, but a request for an extension of the deadline. I will be 
in China next week; I had hoped I could finish before leaving, but that turned 
out to not work quite as I expected. So, I will see to it as soon as I'm back, 
around Nov 5. I hope you will be able to include the article nevertheless. 
Please accept my apologies for the delay.

Best wishes

Thomas

On Oct 20, 2012, at 4:17 PM, John Haltiwanger john.haltiwan...@gmail.com 
wrote:

 Hello all!
 
 It's been very quiet in regards to the Context Group's first publication, the 
 Proceedings for Context Meeting 2011. We've been hammering out the details of 
 a new design and house style with Adrian Egger. This process is almost 
 complete, and we are very excited for you all to see the inspiring new design!
 
 But there is, of course, the issue of getting the final content together for 
 this issue. And here is where I need the help of those who agreed at last 
 year's meeting to submit an article for the proceedings: 
 
 We would like to publish this years proceedings along with last years in a 
 double edition. I've lost the list of those who wanted to submit last year, 
 so if you remember being one of those nice and awesome people, please 
 consider writing up a short article and sending it!
 
 Of course we also welcome any Context-related articles! There has been a lot 
 of cool stuff happening in the community over the last year, and it would be 
 great to have some further documentation on them.
 
 A very warm thanks to those of you who sent me material already--know that it 
 was not in vain, and that your work will indeed be published.
 
 The deadline for submission is 1 November, with the double-edition 
 proceedings landing on doorsteps in time for the winter holidays. For those 
 of you who have not yet joined the Context Group, please considerdoing so!
 
 Looking forward to hearing from you,
 John

--
Prof. Dr. Thomas A. Schmitz
Abteilung für Griechische und Lateinische Philologie
Universität Bonn
Am Hof 1e
53113 Bonn
http://www.philologie.uni-bonn.de/personal/schmitz





___
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, unicode strings, @ELECTRONIC, sorting and bibtex

2012-09-18 Thread Schmitz Thomas A.

On Sep 18, 2012, at 12:28 PM, Marco Patzer home...@lavabit.com wrote:

 Hi,
 
 I have some questions regarding the bibliography.
 
 1)
 The style files bibl-ams.tex, bibl-ssa.tex, etc contain strings like
 ``, ~. This does not make sense to me. The `` ends up like that in
 the output and the tilde might interfere with the \asciimode
 setting. Wouldn't it be better to use the proper Unicode glyphs
 (U+201C, U+00A0, etc.) nowadays? I assume the files are old MkII
 files and not being updated since. Example:
 
 \setupbibtex   [database=sample]
 \setuppublications [alternative=ssa]
 \starttext
  \cite[hh2010a]
  \cite[Eijkhout1991]
  \cite[hh2010]
  \placepublications [criterium=cite]
 \stoptext
 
You're right, this is old code that needs to be fixed. The problem is that 
users of bibtex in ConTeXt are a minority, and users of such precooked styles a 
tiny minority - I use bibtex quite often, but wouldn't know how to fix these 
styles and have never used them. So if you're sure about what to do, fix them 
and send Hans a patch.

 2)
 The @ELECTRONIC type does not work (already mentioned in the wiki).
 It does not show up in the references list. I guess no one bothered
 adding them and it's up to me to add the corresponding entries.
 
 Maybe someone has already prepared a working file for the APA style?

Possible. I have @ELECTRONIC definitions in my own private style files, but 
have never used APA.

 
 3)
 How to sort the bibliography by author? According to the bib manual
 I expected this to work:
 
 \setupbibtex   [database=sample]
 \setuppublications [alternative=apa, criterium=cite, sort=author]

You haven't read carefully enough, it's sorttype=author

 \starttext
  \cite[hh2010a]
  \cite[Eijkhout1991]
  \placepublications
 \stoptext
 
 4)
 \completepublications produces an empty page. Is that intended?
 
 \setupbibtex   [database=sample]
 \setuppublications [alternative=ssa, criterium=cite]
 \starttext
 \cite[hh2010a]
 \completepublications
 \stoptext
 
http://archive.contextgarden.net/message/20110923.091734.6b388a11.en.html

 5) (side question)
 What is BibTeX used for in ConTeXt? As far as I can see, it reads
 the .bib database and generates a .bbl file which then is read in by
 ConTeXt. Why do we need an external tool for this? Why does ConTeXt
 not read in the .bib database and directly save it as a Lua table?

Because nobody has coded that part yet? This may not be as easy as you make it 
sound because quite a few heuristics go into parsing bibtex files (e.g., look 
at the way in which bibtex divides names into first name, last name, von-part, 
jr-part). Over the years, I have read and heard many complaints about bibtex 
and many announcements that something infinitely better is just around the 
corner, to be delivered in all its glory real soon now. For the time being, I 
don't see any real replacement, but I may be wrong.


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] Bibliography, unicode strings, @ELECTRONIC, sorting and bibtex

2012-09-18 Thread Schmitz Thomas A.

On Sep 18, 2012, at 2:25 PM, Marco Patzer home...@lavabit.com wrote:
 
 This doesn't work, either:
 
 \setupbibtex   [database=sample]
 \setuppublications [alternative=apa, criterium=cite, sorttype=author]
 \starttext
  \cite[hh2010a]
  \cite[Eijkhout1991]
  \placepublications
 \stoptext
 
This works for me, I get Eijkhout sorted before Hagen.

 
 I'm aware of that. So it basically boils down to the fact that
 bibliographies are not popular among ConTeXt users (including Hans)
 and therefore much functionality is not properly implemented or
 cared for. And BibTeX is used since it understands the semantics of
 bib files, although a pure ConTeXt/Lua solution would be possible.
 Without BibTeX this functionality would be missing since no one is
 willing to implement a parser for .bib databases.
 
 If I only had time…

Yes, had we but world enough and time… Anyway, Hans began playing with 
transforming bibtex to xml and loading this. There is no user interface yet, 
but if you want to see what's possible, have a look at bibl-bib.lua and 
bibl-tst.lua

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
___