[NTG-context] XML filtering and \setupcombinations

2015-05-19 Thread Michael Eidenbenz
Hello,

I'm enjoying the power of the new publication framework and started to manage 
my images with it. 
This works quite nice. But now I reached the point where my (limited) context 
knowledge comes to an end.

I  would like to print a contact sheet of my large image database. To save 
paper I want combine floats next to each other.

I use the XML framework to filter my images according the 'keywords' field:


\usebtxdataset[image][../../4_source/2_image/1_image.bib]
\convertbtxdatasettoxml[image]

\startxmlsetups btx:render
\xmlfilter {#1} {
/bibtex
/entry[@category='image']
/field[@name='keywords' and (find(text(), 'one'))]
/..
/command(btx:figure)
}
\stopxmlsetups

\startxmlsetups btx:figure
\externalfigure [\xmlfirst{#1}{/field[@name='file']}]
\stopxmlsetups

\setupexternalfigures [location=global, directory={../../4_source/2_image}, 
width=3cm]

\xmlsetup {btx:image} {btx:initialize}

\starttext
\xmlsetup {btx:image} {btx:render}
\stoptext


the file 1_image.bib has the following structure:

@image{test_1,
keywords = {one, two, three},
file = {test_1.png}
}


my problem is that I cant figure out how to process the filtered entries to 
form groups of let's say (3x4) twelve and use it with \ setupcombinations [3*4]

Thanks for any help.

Michael
___
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] replacement for \getcitedata

2016-07-12 Thread Michael Eidenbenz
is there a way to extract data from the bib database to use it in a macro?

something like a replacement for the old \getcitedata

thanks!
___
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] replacement for \getcitedata

2016-07-12 Thread Michael Eidenbenz
thanks.
but i'm encountering my old problem:

\externalfigure[\cite[file][Eidenbenz2016]]

gives me an error.
Do I need a lua approach here?

Michael



> On 12 Jul 2016, at 16:09, Alan BRASLAU <alan.bras...@cea.fr> wrote:
> 
> On Tue, 12 Jul 2016 10:51:06 +0200
> Michael Eidenbenz <pri...@eidenbenz.net> wrote:
> 
>> is there a way to extract data from the bib database to use it in a
>> macro?
>> 
>> something like a replacement for the old \getcitedata
> 
> \cite[title] [Eidenbenz2016]
> 
> (Any field can be obtained with this mechanism.)
> 
> Alan

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

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

Re: [NTG-context] caption in margin

2016-08-22 Thread Michael Eidenbenz
self-answering (for the record)

rightmargin / leftmargin has to be used in combination with an additional 
position keyword (low, middle, key), otherwise the caption is missing. 
I think a default position (low) would be nice in this case.

Best Michael

this works:

\useMPlibrary[dum]

\starttext

\showframe

\setupcaption [figure][]
\placefloat[][]{default}{\externalfigure[dummy][]}

\setupcaption [figure][location={rightmargin,low}]
\placefloat[][]{right}{\externalfigure[dummy][]}



> On 19 Aug 2016, at 17:25, eidenbenz  wrote:
> 
> I want to place the caption of floats in the margin. 
> I thought the locationparameter of setupcaption can be used to do this. 
> But it doesnt work.
> 
> What am I missing? Thanks Michael
> 
> 
> \useMPlibrary[dum]
> 
> \starttext
> 
> \showframe
> 
> \setupcaption [figure][]
> \placefloat[][]{default}{\externalfigure[dummy][]}
> 
> \setupcaption [figure][location=inner]
> \placefloat[][]{inner}{\externalfigure[dummy][]}
> 
> \setupcaption [figure][location=outer]
> \placefloat[][]{outer}{\externalfigure[dummy][]}
> 
> \setupcaption [figure][location=innermargin]
> \placefloat[][]{innermargin}{\externalfigure[dummy][]}
> 
> \setupcaption [figure][location=outermargin]
> \placefloat[][]{outermargin}{\externalfigure[dummy][]}
> 
> \setupcaption [figure][location=leftmargin]
> \placefloat[][]{leftmargin}{\externalfigure[dummy][]}
> 
> \setupcaption [figure][location=rightmargin]
> \placefloat[][]{rightmargin}{\externalfigure[dummy][]}
> 
> \setupcaption [figure][location=lefthanging]
> \placefloat[][]{lefthanging}{\externalfigure[dummy][]}
> 
> \setupcaption [figure][location=righthanging]
> \placefloat[][]{righthanging}{\externalfigure[dummy][]}
> 
> \setupcaption [figure][location=hang]
> \placefloat[][]{hang}{\externalfigure[dummy][]}
> 
> \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
> ___

___
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] Typset Text on odd pages only

2016-09-06 Thread Michael Eidenbenz
Hello,

I'm looking for a way to produce a doublesided document with text on the odd 
pages only and floats on the even pages. 

Can somebody guide me in the right direction?

Will something like \doifoddpageelse {typsettext} {\page} work? 

Thanks Michael
___
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] Typset Text on odd pages only

2016-09-11 Thread Michael Eidenbenz
thanks a lot.
I definitely have to look at the basics of TeX sooner or later.

michael


> On 09 Sep 2016, at 08:10, Hans Hagen <pra...@wxs.nl> wrote:
> 
> On 9/6/2016 5:48 PM, Michael Eidenbenz wrote:
>> Hello,
>> 
>> I'm looking for a way to produce a doublesided document with text on the odd 
>> pages only and floats on the even pages.
>> 
>> Can somebody guide me in the right direction?
>> 
>> Will something like \doifoddpageelse {typsettext} {\page} work?
> 
> \setuppagenumbering
>  [alternative=doublesided]
> 
> \starttext
> 
>\newtoks \SavedFloats
> 
>\appendtoks
>\the\SavedFloats
>\global\SavedFloats\emptytoks
>\page
>\to \everybeforeoutput
> 
>\page[right]
> 
>\dorecurse{100}{
>\input tufte
>\par
>\appendtoks
>\placefigure[here]{}{}
>\to \SavedFloats
>\input ward
>\par
>}
> 
> \stoptext
> 
> better is to hook it into the otr (flush spreads) and collect floats 
> differently so that the output routine can flush only as much as can be on 
> one page
> 
> i can't make time now to write that (can be a quick hack but that's not ideal)
> 
> Hans
> 
> 
> 
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___

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

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

Re: [NTG-context] avoid newline after definestartstop

2016-10-26 Thread Michael Eidenbenz
after some readings in the TeX book I came up with the following solution that 
works for me without having to change all my instances of startstopCitation in 
the text.

\definestartstop
  [Citation]
  [
before={\hangindent=20mm\hangafter=0\symbol[leftquotation]},
after={\removeunwantedspaces\symbol[rightquotation]},
  ]

\starttext
\startCitation
  \input tufte
\stopCitation
\footnote{This is a Quote of Donald Knuth}

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

Re: [NTG-context] Emacs24 + AucTeX + ConTeXt

2016-10-29 Thread Michael Eidenbenz
the command should be:

(eval-after-load "tex"
'(add-to-list 'TeX-command-list
'("context"
 "source /home/fab/context/tex/setuptex && context"
  TeX-run-TeX
  nil
  (context-mode)
  :help "Run ConTeXt") t))





> On 29 Oct 2016, at 23:41, Fabrice Couvreur <fabrice1.couvr...@gmail.com> 
> wrote:
> 
> Hi,
> @Tobias
> 
> If I add this to my .emacs I get
> 
> (setenv "PATH"/Users/fab/tex/texmf-linux-64/bin/ ":$PATH" t) 
> (add-to-list 'load-path "/home/fab/context/tex/texmf-linux-64/bin/context")
> 
> Warning (initialization): An error occurred while loading `/home/fab/.emacs':
> 
> Symbol's value as variable is void: /Users/fab/tex/texmf-linux-64/bin
> 
> 
> @Michael
> 
> fab@debian:~$ which context
> /home/fab/bin/context
> fab@debian:~$ source context/tex/setuptex
> Setting "/home/fab/context/tex" as ConTeXt root.
> fab@debian:~$ which context
> /home/fab/context/tex/texmf-linux-64/bin/context
> fab@debian:~$ 
> 
> If I add this to my .emacs is always texlive 2016 is invoked when I compile
> 
> (eval-after-load "tex"
> '(add-to-list 'TeX-command-list
> '("context"
>  "(/home/fab/context)/setuptex&"
>   TeX-run-TeX
>   nil
>   (context-mode)
>   :help "Run ConTeXt") t))
> 
> 
> Thanks,
> Fabrice
> 
> 
> 2016-10-29 12:50 GMT+02:00 Michael Eidenbenz <eidenb...@arch.ethz.ch>:
> sorry that should be:
> 
> (path to textree)/setuptex && context .
> 
> 
>> 
>> cd (path to textree) && setuptex && context etc...
> 
> 
> ___
> 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
> ___
> 
> ___
> 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
> ___

___
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] Emacs24 + AucTeX + ConTeXt

2016-10-30 Thread Michael Eidenbenz
It looks like auctex is still choosing the wrong command.

Please read this information:
https://www.gnu.org/software/auctex/manual/auctex/Selecting-a-Command.html

maybe this helps

(eval-after-load "tex"
'(add-to-list 'TeX-command-list
'("context_standalone"
 "source /home/fab/context/tex/setuptex && context"
  TeX-run-TeX
  nil
  (context-mode)
  :help "Run ConTeXt") t))

then choose the command "context_standalone" explicitly in the minibuffer

(and try without the local variables in your buffer)


> On 30 Oct 2016, at 10:10, Fabrice Couvreur <fabrice1.couvr...@gmail.com> 
> wrote:
> 
> ​Hi Michael,
> ​
> Thank you for your help but it does not work, maybe a problem with the Emacs 
> shell.
> 
> Running `ConTeXt' on `ntg32' with ``context --once --texutil  --nonstop 
> ntg32.tex''
> 
> resolvers   | trees | analyzing 'home:texmf'
> mtx-context | run 1: luatex 
> --fmt="/home/fab/texlive/2016/texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/formats/luatex/cont-en"
>  --interaction="nonstopmode" --jobname="ntg32" 
> --lua="/home/fab/texlive/2016/texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/formats/luatex/cont-en.lui"
>  --no-parse-first-line --c:currentrun=1 --c:fulljobname="./ntg32.tex" 
> --c:input="./ntg32.tex" --c:kindofrun=3 --c:maxnofruns=1 --c:nonstopmode 
> --c:once --c:texutil "cont-yes.mkiv"
> This is LuaTeX, Version 0.95.0 (TeX Live 2016) 
>  system commands enabled.
> 
> resolvers   > trees > analyzing 'home:texmf'
> open source > 1 > 1 > 
> /home/fab/texlive/2016/texmf-dist/tex/context/base/mkiv/cont-yes.mkiv
> 
> ConTeXt  ver: 2016.05.17 19:20 MKIV current  fmt: 2016.10.29  int: 
> english/english
> 
> system  > 'cont-new.mkiv' loaded
> open source > 2 > 2 > 
> /home/fab/texlive/2016/texmf-dist/tex/context/base/mkiv/cont-new.mkiv
> close source> 2 > 2 > 
> /home/fab/texlive/2016/texmf-dist/tex/context/base/mkiv/cont-new.mkiv
> 
> system  > files > jobname 'ntg32', input './ntg32', result 'ntg32'
> fonts   > latin modern fonts are not preloaded
> languages   > language 'en' is active
> open source > 2 > 3 > /home/fab/ntg32.tex
> fonts   > preloading latin modern fonts (second stage)
> fonts   > 'fallback modern-designsize rm 12pt' is loaded
> backend > xmp > using file 
> '/home/fab/texlive/2016/texmf-dist/tex/context/base/mkiv/lpdf-pdx.xml'
> pages   > flushing realpage 1, userpage 1
> close source> 2 > 3 > /home/fab/ntg32.tex
> close source> 1 > 3 > 
> /home/fab/texlive/2016/texmf-dist/tex/context/base/mkiv/cont-yes.mkiv
> 
> mkiv lua stats  > used config file: 
> selfautoparent:/texmfcnf.lua;selfautoparent:/texmf-dist/web2c/texmfcnf.lua
> mkiv lua stats  > used cache path: 
> /home/fab/texlive/2016/texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9
> mkiv lua stats  > resource resolver: loadtime 0.104 seconds, 1 scans with 
> scantime 0.021 seconds, 0 shared scans, 9 found files, scanned paths: 
> /home/fab/texmf
> mkiv lua stats  > stored bytecode data: 387 modules (0.366 sec), 82 tables 
> (0.011 sec), 469 chunks (0.377 sec)
> mkiv lua stats  > traced context: maxstack: 1176, freed: 1, unreachable: 1175
> mkiv lua stats  > cleaned up reserved nodes: 47 nodes, 9 lists of 444
> mkiv lua stats  > node memory usage: 15 glue, 2 penalty, 22 attribute, 38 
> glue_spec, 8 attribute_list, 2 temp
> mkiv lua stats  > node list callback tasks: 6 unique task lists, 5 instances 
> (re)created, 32 calls
> mkiv lua stats  > used backend: pdf (backend for directly generating pdf 
> output)mkiv lua stats  > jobdata time: 0.001 seconds saving, 0.001 seconds 
> loading
> mkiv lua stats  > callbacks: 136 direct, 245 indirect, 381 total
> mkiv lua stats  > randomizer: resumed with value 0.17602822472156
> mkiv lua stats  > positions: 13 collected, 8 regulars, 5 regions, 0 
> unresolved regions
> mkiv lua stats  > loaded patterns: en::2, load time: 0.000
> mkiv lua stats  > result saved in file: ntg32.pdf, compresslevel 3, 
> objectcompresslevel 3
> mkiv lua stats  > loaded fonts: 2 files: latinmodern-math.otf, 
> lmroman12-regular.otf
> mkiv lua stats  > font engine: otf 3.020, afm 1.512, tfm 1.000, 4 instances, 
> load time 0.161 seconds 
> mkiv lua stats  > used platform: linux-64, type: unix, binary subtree: bin
> mkiv lua stats  > luatex banner: this is lua

[NTG-context] floats in xtable flush with frame

2016-11-05 Thread Michael Eidenbenz
Hello,

I want to place floats in an xtable but cannot get rid of the gap between the 
float and the frame.
I sort of can eliminate the gap on the top with
\setupfloat [offset=-2.5pt]
but this doesnt seem to be the right way.

Is there a parameter to control this?

Thanks 

Michael


\showframe
\starttext

\startxtable
  \startxrow
\startxcell
  \placefloat{}{\externalfigure[][width=\textwidth/2]}
\stopxcell
\startxcell
  \placefloat{}{\externalfigure[][width=\textwidth/2]}
 \stopxcell 
   \stopxrow
\stopxtable
\page

\setupfloat [offset=-2.5pt]
\startxtable
  \startxrow
\startxcell
  \placefloat{}{\externalfigure[][width=\textwidth/2]}
\stopxcell
\startxcell
  \placefloat{}{\externalfigure[][width=\textwidth/2]}
 \stopxcell 
   \stopxrow
\stopxtable

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

[NTG-context] avoid newline after definestartstop

2016-10-20 Thread Michael Eidenbenz
hello,

how can I put the footnote number right after the quotationmarks without having 
a newline?
dontleavehmode does not work.

thanks michael




\definestartstop[Citation]
[before={\startnarrower[left,right]\startquotation},
 after={\stopquotation\stopnarrower\dontleavehmode}]

\starttext
\input tufte
\startCitation
  \input knuth
\stopCitation
\footnote{This is a Quote of Donald Knuth}
\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] avoid newline after definestartstop

2016-10-25 Thread Michael Eidenbenz
thanks everybody for their input.

michael
___
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] avoid newline after definestartstop

2016-10-24 Thread Michael Eidenbenz
hello,

I found this old mail below, that is related to my problem.
is there still no workaround for this problem?
putting a (foot)note after a quotation mark is quite common and I don't want to 
put the marks by hand.

i was looking at spac-hor.mkiv and tried setupnarrower[after=]. 
but this did not work.

any help is appreciated

thanks michael


> Am 21.08.2014 um 23:42 schrieb Gerben Wierda <gerben.wie...@rna.nl>:
> 
>> Is it possible to use \startquotation..\stopquotation and have an endnote 
>> number follow the closing ''? If the \endnote is before \stopquotation, it 
>> ends up inside the '' character at the end. If it is after \stopquotation, 
>> it 
>> becomes the beginning of the next paragraph.
> 
> 
> AFAIK this is only possible when you place the quotation marks by hand.
> 
> Wolfgang



> 
> On 20 Oct 2016, at 11:13, Michael Eidenbenz <eidenb...@arch.ethz.ch> wrote:
> 
> hello,
> 
> how can I put the footnote number right after the quotationmarks without 
> having a newline?
> dontleavehmode does not work.
> 
> thanks michael
> 
> 
> 
> 
> \definestartstop[Citation]
>[before={\startnarrower[left,right]\startquotation},
> after={\stopquotation\stopnarrower\dontleavehmode}]
> 
> \starttext
> \input tufte
> \startCitation
>  \input knuth
> \stopCitation
> \footnote{This is a Quote of Donald Knuth}
> \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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Text editors

2016-10-24 Thread Michael Eidenbenz
Hi,

I use emacs with the spacemacs distribution.
To manage my bibliographies (and also images) I use ebib 
(http://joostkremers.github.io/ebib/ ) 
instead of reftex.

Regards, Michael

> On 24 Oct 2016, at 13:41, Henning Hraban Ramm  wrote:
> 
> Hi all,
> 
> I just edited http://wiki.contextgarden.net/Text_Editors,
> reordered, updated, killed some discontinued programs etc.
> 
> I didn’t delete wiki pages of outdated apps, though.
> 
> There’s still a lot of room for enhancement, e.g. the feature columns make no 
> sense this way.
> 
> I’d like to know:
> - What editor(s) do you use for ConTeXt?
> - Are there any other editors with ConTeXt (not only LaTeX) support?
> 
> How about including the vim support files in the distribution (like the SciTE 
> support files)?
> 
> I recently discovered Textadept, a relative of SciTe’s, also available for 
> OSX - did anyone try to adapt SciTE ConTeXt support for that?
> 
> 
> Greetlings, Hraban
> ---
> http://www.fiee.net
> http://wiki.contextgarden.net
> https://www.cacert.org (I'm an assurer)
> GPG Key ID 1C9B22FD
> 
> ___
> 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
> ___

___
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] avoid newline after definestartstop

2016-10-24 Thread Michael Eidenbenz
Thanks!

sometimes the moste obvious is hidden...
although I would consider this a hack, it works perfectly.
but I'm still wondering, if there is no soultion for the more "canonical" way.

Regards Michael

> On 24 Oct 2016, at 17:08, Otared Kavian <ota...@gmail.com> wrote:
> 
> Hi Michael,
> 
> Maybe what Wolfgang meant by « putting the marks by hand » is something like: 
> you define \StartCitation and \StopCitation in the following way:
> 
> % begin quotation-note.tex
> 
> \define\StartCitation{\startnarrower[left,right]«~}
> \define[1]\StopCitation{~»\footnote{#1}\stopnarrower}
> 
> \starttext
> \input tufte
> \StartCitation
>  \input knuth
> \StopCitation{This is a Quote of Donald Knuth}
> \stoptext
> % end quotation-note.tex
> 
> Indeed instead of the quotation marks « and » you can put whatever you wish.
> If you have quotations without footnotes, then you may define another 
> start-stop.
> 
> Best regards: OK
> 
>> On 24 Oct 2016, at 12:42, Michael Eidenbenz <eidenb...@arch.ethz.ch 
>> <mailto:eidenb...@arch.ethz.ch>> wrote:
>> 
>> hello,
>> 
>> I found this old mail below, that is related to my problem.
>> is there still no workaround for this problem?
>> putting a (foot)note after a quotation mark is quite common and I don't want 
>> to put the marks by hand.
>> 
>> i was looking at spac-hor.mkiv and tried setupnarrower[after=]. 
>> but this did not work.
>> 
>> any help is appreciated
>> 
>> thanks michael
>> 
>> 
>>> Am 21.08.2014 um 23:42 schrieb Gerben Wierda <gerben.wie...@rna.nl 
>>> <http://rna.nl/>>:
>>> 
>>>> Is it possible to use \startquotation..\stopquotation and have an endnote 
>>>> number follow the closing ''? If the \endnote is before \stopquotation, it 
>>>> ends up inside the '' character at the end. If it is after \stopquotation, 
>>>> it 
>>>> becomes the beginning of the next paragraph.
>>> 
>>> 
>>> AFAIK this is only possible when you place the quotation marks by hand.
>>> 
>>> Wolfgang
>> 
>> 
>> 
>>> 
>>> On 20 Oct 2016, at 11:13, Michael Eidenbenz <eidenb...@arch.ethz.ch 
>>> <mailto:eidenb...@arch.ethz.ch>> wrote:
>>> 
>>> hello,
>>> 
>>> how can I put the footnote number right after the quotationmarks without 
>>> having a newline?
>>> dontleavehmode does not work.
>>> 
>>> thanks michael
>>> 
>>> 
>>> 
>>> 
>>> \definestartstop[Citation]
>>>[before={\startnarrower[left,right]\startquotation},
>>> after={\stopquotation\stopnarrower\dontleavehmode}]
>>> 
>>> \starttext
>>> \input tufte
>>> \startCitation
>>>  \input knuth
>>> \stopCitation
>>> \footnote{This is a Quote of Donald Knuth}
>>> \stoptext
>>> ___
>>> If your question is of interest to others as well, please add an entry to 
>>> the Wiki!
>>> 
>>> maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / 
>>> http://www.ntg.nl/mailman/listinfo/ntg-context 
>>> <http://www.ntg.nl/mailman/listinfo/ntg-context>
>>> webpage  : http://www.pragma-ade.nl <http://www.pragma-ade.nl/> / 
>>> http://context.aanhet.net <http://context.aanhet.net/>
>>> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
>>> <https://bitbucket.org/phg/context-mirror/commits/>
>>> wiki : http://contextgarden.net <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 <mailto:ntg-context@ntg.nl> / 
>> http://www.ntg.nl/mailman/listinfo/ntg-context 
>> <http://www.ntg.nl/mailman/listinfo/ntg-context>
>> webpage  : http://www.pragma-ade.nl <http://www.pragma-ade.nl/> / 
>> http://context.aanhet.net <http://context.aanhet.net/>
>> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
>> <https://bitbucket.org/phg/context-mirror/commits/>
>> wiki : http://contextgarden.net <http://contextgarden.net/>
>> __

[NTG-context] startxtable, stopxtable in macro

2016-11-25 Thread Michael Eidenbenz
why does this produce an TeX capacity exeeded error?
thanks 
Michael



\define\startTable{\startxtable}

\define\stopTable{\stopxtable}


\starttext
  \startTable
\startxrow
  \startxcell hello \stopxcell
\stopxrow
  \stopTable
\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] startxtable, stopxtable in macro

2016-11-25 Thread Michael Eidenbenz
hmm.
I still get an error with this (ConTeXt  ver: 2016.11.24 12:05 MKIV beta)

\define\startTable{\startembeddedxtable}
\define\stopTable{\stopembeddedxtable}

\starttext
  \startTable
\startxrow
  \startxcell hallo \stopxcell
\stopxrow
  \stopTable
\stoptext


> On 25 Nov 2016, at 23:02, Pablo Rodriguez <oi...@gmx.es> wrote:
> 
> On 11/25/2016 08:46 PM, Michael Eidenbenz wrote:
>> why does this produce an TeX capacity exeeded error?
>> thanks 
> 
> Hi Michael,
> 
> I don’t know, but replacing your definitions with the following ones
> removes the error:
> 
>\define\startTable{\startembeddedxtable}
>\define\stopTable{\stopembeddedxtable}
> 
> I hope it helps,
> 
> Pablo
> -- 
> http://www.ousia.tk
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] error with floats in xtables with defined width

2016-11-29 Thread Michael Eidenbenz
Hello, 

this M(not)WE gives me the following error:

You can't use `\prevdepth' in restricted horizontal mode

Is this a bug?
I'm running: 2016.11.24 12:05 MKIV beta

thanks Michael


\starttext
\startxtable
\startxrow
  % \startxcell
  \startxcell[width=10cm] % this leads to an error
\placefigure[][]{}{\externalfigure[][]}
  \stopxcell
\stopxrow
\stopxtable
\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] grid, interlinespace

2016-11-02 Thread Michael Eidenbenz
Hello

I want my text on a grid and there should be no gap between the top and the 
capital letters of the first line.
I managed to get this by changing the height parameter of \setupinterlinespace
with a factor I calculated for the font with this formula:

CapHeight/exheight / line = height

CapHeight and exheight are font specific numbers that I got from 
https://tug.org/TUGboat/tb34-2/tb107sharpe.pdf
for  lmroman this gives me: 683 / 431 / 2.8 = .566 for height in interlinespace

Although there is no gap to the top lines are jumping.
making the factor bigger helps. 
but smaller fonts wont snap to the grid.

What is happening here? 
And is this method of changing the height the right one?

Thanks Michael


--

\showgrid
\setuplayout [grid=yes]
\starttext
\setupinterlinespace
  [
height=.566,
line=2.8ex, 
 ]

\setupbodyfont [10pt]
MM on grid but jumping\par
\dorecurse{3}{\input tufte \par}
\page

\setupinterlinespace
  [
height=.575, 
line=2.8ex, 
 ]

\setupbodyfont [10pt]
MM on grid\par
\dorecurse{6}{\input tufte \par}
\page

\setupbodyfont [18pt]
MM on grid\par
\dorecurse{2}{\input tufte \par}
\page

\setupbodyfont [7pt]
MM on grid\par
\dorecurse{10}{\input tufte\par}
\page

\setupbodyfont [6pt]
MM NOT on grid\par
\dorecurse{10}{\input tufte \par}
\page

\setupinterlinespace
  [
height=.615, 
line=2.8ex, 
 ]
\setupbodyfont [6pt]
MM on grid but gap to top\par
\dorecurse{10}{\input tufte \par}
\page

\setupbodyfont [18pt]
MM on grid but gap to top\par
\dorecurse{2}{\input tufte \par}
\page

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

Re: [NTG-context] Emacs24 + AucTeX + ConTeXt

2016-10-28 Thread Michael Eidenbenz
you can add any TeX command (the ones you call with C-c C-c) to your init.el 
like this:

  '(add-to-list 'TeX-command-list
'("contex"
  "context %t --nonstopmode --purgeall" % change the command to 
your needs
  TeX-run-TeX
  nil
  (context-mode)
  :help "Run ConTeXt")
t))

I run emacs25 and auctex 11.89.5 without problems.
although i use auctex only for C-c C-c.

Michael


> On 28 Oct 2016, at 23:57, Fabrice Couvreur  
> wrote:
> 
> Hi Mica,
> I added this  (custom-set-variables  ' (ConTeXt-Mark-version "IV"))  in my 
> .emacs and it seems to work, thank you. 
> Another question : when I do a C-c C-c is texlive context of 2016 is called. 
> How to be it standalone context ? 
> Fabrice
> 
> 2016-10-28 19:07 GMT+02:00 Mica Semrick  >:
> I haven't checked in a while, since this is already set in my init.el file, 
> but auxtex was using mkii/texexec a few years ago. Have you checked you're 
> using mkiv/context?
> 
> On October 28, 2016 6:04:27 AM PDT, Fabrice Couvreur 
> > wrote:
> Hello,
> I just upgraded to emacs24 and am having problems compiling my files who 
> compiled perfectly with emacs23.
> I installed AUCTeX with M-x-install package and that's it !
> I deleted my old init.el file and start over !
> The ~/.emacs.d only contains this :
> 
> fab @ debian: ~ $ cd .emacs.d /
> fab @ debian: ~ / .emacs.d $ ls -l
> total 8
> drwx -- 2 fab fab 4096 October 28 2:37 p.m. auto-save-list
> drwxr-xr-x 5 fab fab 4096 October 28 2:26 p.m. ELPA
> fab @ debian: ~ / $ .emacs.d
> 
> Consider the following file:
> If I make a C-c C-c, all I get is the text in italics, the macro is not 
> compiled.
> Thanks,
> Fabrice
> 
> % macros=mkvi
> 
> \setupcolors[state=start]
> \definecolor[MyColorB][c=0.00, m=0.62, y=1.00, k=0.00]
> \definecolor[MyColorA][c=0.00, m=0.10, y=0.20, k=0.00]
> 
> 
> \defineframedtext
>   [MyDefinition]
>   [before={\blank[line,halfline]},
>after={\blank},
>frame=off,
>background=MyFrame,
>width=\textwidth,
>height=fit,
>location=left,
>style=italic]
> 
> \defineoverlay
>   [MyFrame]
>   [\useMPgraphic{MyFrame}]
> 
> \definelabel
>   [Définition]
>   [headstyle=\bf\smallcaps]
> 
> \startuseMPgraphic{MyFrame}
> path b ;
> picture p ;
> p := textext.rt("\white\Définition") ;
> p := p shifted (2BodyFontSize,OverlayHeight-ypart center p+.25ExHeight) ;
> b := boundingbox p leftenlarged .5EmWidth rightenlarged .5EmWidth ;
> fill OverlayBox withcolor \MPcolor{MyColorA} ;
> fill b withcolor \MPcolor{MyColorB} ;
> draw leftboundary OverlayBox ;
> draw p ;
> setbounds currentpicture to OverlayBox ;
>   \stopuseMPgraphic
>   
> \starttext
> \startMyDefinition
> \input knuth
> \stopMyDefinition
> 
> \stoptext
> 
> %%% Local Variables: 
> %%% mode: context
> %%% End: 
> 
> 
> 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 
> 
> ___
> 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 
> ___
> 
> ___
> 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
> ___

___
If your question is of interest to 

Re: [NTG-context] avoid newline after definestartstop

2016-10-26 Thread Michael Eidenbenz
Dear Wolfgang, 

thanks for your mail, that led me to the source in syst-aux where I found the 
TeX approach, my final solution.

\def\startCitation%
  { \startnarrower[left,right]
\symbol[leftquotation]
\removeunwantedspaces}

\def\stopCitation#1\par%
  { \removeunwantedspaces
\symbol[rightquotation]
#1
\stopnarrower}
  
\starttext
  
\startCitation
  \input knuth
\stopCitation
\footnote{This is a Quote of Donald Knuth}

\input knuth

\stoptext

> On 26 Oct 2016, at 18:40, Wolfgang Schuster <schuster.wolfg...@gmail.com> 
> wrote:
> 
>> Michael Eidenbenz <mailto:eidenb...@arch.ethz.ch> 26. Oktober 2016 um 16:30
>> after some readings in the TeX book I came up with the following solution 
>> that works for me without having to change all my instances of 
>> startstopCitation in the text.
> This doesn’t work when you have more than one paragraph in the Citation 
> environment.
>> \definestartstop
>> [Citation]
>> [
>> before={\hangindent=20mm\hangafter=0\symbol[leftquotation]},
>> after={\removeunwantedspaces\symbol[rightquotation]},
>> ]
>> 
>> \starttext
>> \startCitation
>> \input tufte
>> \stopCitation
>> \footnote{This is a Quote of Donald Knuth}
>> 
>> \input tufte
>> \stoptext
> Here is a alternative version but you need a empty line or \par after 
> \stopCitation.
> 
> \define\startCitation
>   {\startnarrower[left]
>\symbol[leftquotation]\ignorespaces}
> 
> \define\stopCitation
>   {\BeforePar{\removeunwantedspaces\symbol[rightquotation]}%
>\AfterPar {\endgraf\stopnarrower}%
>\GetPar}
> 
> \starttext
> 
> \startCitation
>   \input knuth
> \stopCitation
> \footnote{This is a Quote of Donald Knuth}
> 
> \input knuth
> 
> \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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Emacs24 + AucTeX + ConTeXt

2016-10-29 Thread Michael Eidenbenz
check which binary is used with

which context

and correct our PATH according to your needs.
you can always add more C-c C-c commands for multiple installations (beta, 
current, texlive ..) as I wrote before.
just change the command to 

cd (path to textree) && setuptex && context etc...

Michael


> On 29 Oct 2016, at 09:55, Fabrice Couvreur  
> wrote:
> 
> Hi,
> If I add this (add-to-list 'load-path 
> "/home/fab/context/tex/texmf-linux-64/bin") in the .emacs, one C-c C-c 
> invokes the executable texlive, not the context of standalone.
> Fabrice

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Emacs24 + AucTeX + ConTeXt

2016-10-29 Thread Michael Eidenbenz
sorry that should be:

(path to textree)/setuptex && context .


> 
> cd (path to textree) && setuptex && context etc...

___
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] error with floats in xtables with defined width

2016-11-29 Thread Michael Eidenbenz
\vbox{\placefigure[][]{}{\externalfigure[][]}}

does the trick (but why?)


> On 29 Nov 2016, at 09:29, Michael Eidenbenz <eidenb...@arch.ethz.ch> wrote:
> 
> Hello, 
> 
> this M(not)WE gives me the following error:
> 
> You can't use `\prevdepth' in restricted horizontal mode
> 
> Is this a bug?
> I'm running: 2016.11.24 12:05 MKIV beta
> 
> thanks Michael
> 
> 
> \starttext
> \startxtable
>\startxrow
>  % \startxcell
>  \startxcell[width=10cm] % this leads to an error
>\placefigure[][]{}{\externalfigure[][]}
>  \stopxcell
>\stopxrow
> \stopxtable
> \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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] (another) bug with embeddedxtables

2016-12-02 Thread Michael Eidenbenz
Settings made to \startembeddedxtable or \startxrow they will only work in the 
first call of the macro.
In every further call the settings are ignored.

On the other hand, settings made to \startxcell work for every call of the 
macro.

I assume this is a bug.

Regards Michael


\unexpanded\def\Table#1{%
  \startembeddedxtable[height=5cm]
  \startxrow
\startxcell #1 \stopxcell
  \stopxrow
\stopembeddedxtable
}

\unexpanded\def\TableCell#1{%
  \startembeddedxtable
  \startxrow
\startxcell[height=5cm] #1 \stopxcell
  \stopxrow
\stopembeddedxtable
}

\starttext
\Table{height is 5cm}
\Table{height should be 5cm}
\TableCell{height is 5cm}
\TableCell{height is 5cm}
\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] error with floats in xtables with defined width

2016-11-29 Thread Michael Eidenbenz
sorry, but what does "mlv" stand for?


> On 29 Nov 2016, at 11:23, Hans Hagen <pra...@wxs.nl> wrote:
> 
> On 11/29/2016 11:01 AM, Michael Eidenbenz wrote:
>> \vbox{\placefigure[][]{}{\externalfigure[][]}}
>> 
>> does the trick (but why?)
> 
> because \placefigure is a mlv command i.e. it is not supposed to be used in a 
> box
> 
>>> On 29 Nov 2016, at 09:29, Michael Eidenbenz <eidenb...@arch.ethz.ch> wrote:
>>> 
>>> Hello,
>>> 
>>> this M(not)WE gives me the following error:
>>> 
>>> You can't use `\prevdepth' in restricted horizontal mode
>>> 
>>> Is this a bug?
>>> I'm running: 2016.11.24 12:05 MKIV beta
>>> 
>>> thanks Michael
>>> 
>>> 
>>> \starttext
>>> \startxtable
>>>   \startxrow
>>> % \startxcell
>>> \startxcell[width=10cm] % this leads to an error
>>>   \placefigure[][]{}{\externalfigure[][]}
>>> \stopxcell
>>>   \stopxrow
>>> \stopxtable
>>> \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://context.aanhet.net
>>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>>> 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://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> wiki : http://contextgarden.net
>> ___
>> 
> 
> 
> -- 
> 
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] bug in xtables with spanning and spacing

2016-11-30 Thread Michael Eidenbenz
the spanned cells should be aligned.

\startxtable[distance=5mm,spaceinbetween=5mm]
\startxrow
\startxcell[ny=2] one + alpha\stopxcell
\startxcell[nx=2] two + three \stopxcell
\stopxrow
\startxrow
\startxcell beta \stopxcell
\startxcell gamma \stopxcell
\stopxrow
\stopxtable
___
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] error with floats in xtables with defined width

2016-11-29 Thread Michael Eidenbenz
thanks wolfgang.

> On 29 Nov 2016, at 15:55, Wolfgang Schuster <schuster.wolfg...@gmail.com> 
> wrote:
> 
>> Michael Eidenbenz <mailto:eidenb...@arch.ethz.ch> 29. November 2016 um 15:30
>> sorry, but what does "mlv" stand for?
> It’s mvl which stands for main vertical list.
> 
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] hbox after \page[disable]

2016-12-04 Thread Michael Eidenbenz
I have a doublesided layout. 
On the right side i place the text, figures (if i have any) go on the left side.
the MWE below works quite nice.

But if i want the figure to be full height, two pages are skipped.
This is becaus the hbox right below of the figure.
I think it is placed during the \page[disable] pass. 

What can I do to avoid this hbox?

Thanks Michael


\enabletrackers 
[visualizers.hbox]

\useMPlibrary[dum]

\setuppagenumbering
 [alternative=doublesided]

\definelayout[odd][width=10cm]
\definelayout[even][width=15cm]

\newtoks \EvenPage

\appendtoks
\the\EvenPage
\global\EvenPage\emptytoks
\page[odd]
\to\everyafteroutput

\unexpanded\def\Figure#1{%
  \appendtoks
  \page[even]
  #1
  \page[disable]
  \to\EvenPage}
 
\showframe

\starttext

\dorecurse{4}{\input{tufte}\par}\page
\Figure{\externalfigure[dummy][factor=fit]}
\dorecurse{4}{\input{knuth}\par}\page
\Figure{\externalfigure[dummy][height=\textheight]}  %
\dorecurse{8}{\input{ward}\par}
\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] hbox after \page[disable]

2016-12-05 Thread Michael Eidenbenz
Ok I got it.

page[disable] is not taken into account by page[odd] so I changed it in
page-brk.mkiv: 

  \installpagebreakmethod \v!odd
  {\relax\ifconditional\c_page_breaks_enabled
   \page
   \doifelseoddpage\donothing\page_reset_marks_and_insert_dummy
   \else 
   \resetpagebreak
   \fi}

with this my MWE works perfectly. 
But will this break other things?
I dont really know what I'm doing just hacking.

Michael

-

\enabletrackers 
[visualizers.hbox]

\useMPlibrary[dum]

\setuppagenumbering
[alternative=doublesided]

\definelayout[odd][width=10cm]
\definelayout[even][width=15cm]

\newtoks \EvenPage

\appendtoks
\the\EvenPage
\global\EvenPage\emptytoks
\page[odd]
\to\everyafteroutput

\unexpanded\def\Figure#1{%
 \appendtoks
 \page[even]
 #1
 \page
 \page[disable] %disable the next \page[odd]
 \to\EvenPage}

\showframe

\starttext

\dorecurse{4}{\input{tufte}\par}

\Figure{\externalfigure[dummy][factor=fit]}
\dorecurse{4}{\input{knuth}\par}
\Figure{\externalfigure[dummy][height=\textheight]}  %
\dorecurse{8}{\input{ward}\par}
\stoptext


> Am 04.12.2016 um 21:14 schrieb Michael Eidenbenz <eidenb...@arch.ethz.ch>:
> 
> Dear Hans,
> 
> thank you for your answer, but it doesnt solve the issue. 
> (or I dont understand what you mean)
> 
> the argument in the macro is acually (not in the MWE) a xtable filled with 
> \externalfigures.
> so I would like to avoid floats as it makes things more complicated and 
> slower.
> 
> I tried finding the \page[disable] definition in the code but could not find 
> it. 
> 
> any further suggestions how I can solve this issue?
> 
> thanks Michael
> 
> 
> 
>> Am 04.12.2016 um 18:13 schrieb Hans Hagen <pra...@wxs.nl>:
>> 
>> On 12/4/2016 2:12 PM, Michael Eidenbenz wrote:
>>> I have a doublesided layout.
>>> On the right side i place the text, figures (if i have any) go on the left 
>>> side.
>>> the MWE below works quite nice.
>>> 
>>> But if i want the figure to be full height, two pages are skipped.
>>> This is becaus the hbox right below of the figure.
>>> I think it is placed during the \page[disable] pass.
>>> 
>>> What can I do to avoid this hbox?
>> 
>> \def\Figure#1{\placefigure[location={page,none}]{}{#1}}
>> 
>> 
>>> Thanks Michael
>>> 
>>> 
>>> \enabletrackers
>>> [visualizers.hbox]
>>> 
>>> \useMPlibrary[dum]
>>> 
>>> \setuppagenumbering
>>> [alternative=doublesided]
>>> 
>>> \definelayout[odd][width=10cm]
>>> \definelayout[even][width=15cm]
>>> 
>>> \newtoks \EvenPage
>>> 
>>> \appendtoks
>>> \the\EvenPage
>>> \global\EvenPage\emptytoks
>>> \page[odd]
>>> \to\everyafteroutput
>>> 
>>> \unexpanded\def\Figure#1{%
>>> \appendtoks
>>> \page[even]
>>> #1
>>> \page[disable]
>>> \to\EvenPage}
>>> 
>>> \showframe
>>> 
>>> \starttext
>>> 
>>> \dorecurse{4}{\input{tufte}\par}\page
>>> \Figure{\externalfigure[dummy][factor=fit]}
>>> \dorecurse{4}{\input{knuth}\par}\page
>>> \Figure{\externalfigure[dummy][height=\textheight]}  %
>>> \dorecurse{8}{\input{ward}\par}
>>> \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://context.aanhet.net
>>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>>> wiki : http://contextgarden.net
>>> ___
>>> 
>> 
>> 
>> -- 
>> 
>> -
>> Hans Hagen | PRAGMA ADE
>> Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>>  tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
>> -
>> ___
>> If your question is of interest to others as well, please add an entry to 
>> the Wiki!
>> 
>> maillist : ntg-con

Re: [NTG-context] hbox after \page[disable]

2016-12-06 Thread Michael Eidenbenz

> Am 05.12.2016 um 22:21 schrieb Hans Hagen <pra...@wxs.nl>:
> 
> On 12/5/2016 9:32 PM, Michael Eidenbenz wrote:
>> Ok I got it.
>> 
>> page[disable] is not taken into account by page[odd] so I changed it in
>> page-brk.mkiv:
>> 
>>  \installpagebreakmethod \v!odd
>>  {\relax\ifconditional\c_page_breaks_enabled
>>   \page
>>   \doifelseoddpage\donothing\page_reset_marks_and_insert_dummy
>>   \else
>>   \resetpagebreak
>>   \fi}
>> 
>> with this my MWE works perfectly.
> 
> isn't that just
> 
> \definepagebreak[mypagebreak][yes,odd,reset]
> 
> and then
> 
> \page[mypagebreak]


hmm. 
I can't see that [yes, odd, reset] implements the conditional I need to 
override page[odd]. (see code comments below)
but I guess the real problem occurs because I have to inject this in  
\everyafteroutput.


\newtoks \EvenPage

\appendtoks
\the\EvenPage
\global\EvenPage\emptytoks
\page[odd]   % will be overridden by page[disable] 
\to\everyafteroutput

\unexpanded\def\Figure#1{%
\appendtoks
\page[even]
#1
\page
\page[disable] %disable the next \page[odd] because else it will insert
\to\EvenPage}


> 
>> But will this break other things?
>> I dont really know what I'm doing just hacking.
>> 
>> Michael
>> 
>> -
>> 
>> \enabletrackers
>> [visualizers.hbox]
>> 
>> \useMPlibrary[dum]
>> 
>> \setuppagenumbering
>> [alternative=doublesided]
>> 
>> \definelayout[odd][width=10cm]
>> \definelayout[even][width=15cm]
>> 
>> \newtoks \EvenPage
>> 
>> \appendtoks
>> \the\EvenPage
>> \global\EvenPage\emptytoks
>> \page[odd]
>> \to\everyafteroutput
>> 
>> \unexpanded\def\Figure#1{%
>> \appendtoks
>> \page[even]
>> #1
>> \page
>> \page[disable] %disable the next \page[odd]
>> \to\EvenPage}
>> 
>> \showframe
>> 
>> \starttext
>> 
>> \dorecurse{4}{\input{tufte}\par}
>> 
>> \Figure{\externalfigure[dummy][factor=fit]}
>> \dorecurse{4}{\input{knuth}\par}
>> \Figure{\externalfigure[dummy][height=\textheight]}  %
>> \dorecurse{8}{\input{ward}\par}
>> \stoptext
>> 
>> 
>>> Am 04.12.2016 um 21:14 schrieb Michael Eidenbenz <eidenb...@arch.ethz.ch>:
>>> 
>>> Dear Hans,
>>> 
>>> thank you for your answer, but it doesnt solve the issue.
>>> (or I dont understand what you mean)
>>> 
>>> the argument in the macro is acually (not in the MWE) a xtable filled with 
>>> \externalfigures.
>>> so I would like to avoid floats as it makes things more complicated and 
>>> slower.
>>> 
>>> I tried finding the \page[disable] definition in the code but could not 
>>> find it.
>>> 
>>> any further suggestions how I can solve this issue?
>>> 
>>> thanks Michael
>>> 
>>> 
>>> 
>>>> Am 04.12.2016 um 18:13 schrieb Hans Hagen <pra...@wxs.nl>:
>>>> 
>>>> On 12/4/2016 2:12 PM, Michael Eidenbenz wrote:
>>>>> I have a doublesided layout.
>>>>> On the right side i place the text, figures (if i have any) go on the 
>>>>> left side.
>>>>> the MWE below works quite nice.
>>>>> 
>>>>> But if i want the figure to be full height, two pages are skipped.
>>>>> This is becaus the hbox right below of the figure.
>>>>> I think it is placed during the \page[disable] pass.
>>>>> 
>>>>> What can I do to avoid this hbox?
>>>> 
>>>> \def\Figure#1{\placefigure[location={page,none}]{}{#1}}
>>>> 
>>>> 
>>>>> Thanks Michael
>>>>> 
>>>>> 
>>>>> \enabletrackers
>>>>> [visualizers.hbox]
>>>>> 
>>>>> \useMPlibrary[dum]
>>>>> 
>>>>> \setuppagenumbering
>>>>> [alternative=doublesided]
>>>>> 
>>>>> \definelayout[odd][width=10cm]
>>>>> \definelayout[even][width=15cm]
>>>>> 
>>>>> \newtoks \EvenPage
>>>>> 
>>>>> \appendtoks
>>>>> \the\EvenPage
>>>>> \global\EvenPage\emptytoks
>>>>> \page[odd]
>>>>> \to\everyafteroutput
>>>>> 
>>>>> \unexpanded\def\Figure#1{%
>>>>> \appendtoks
>>>>> \page[even]
>>&

Re: [NTG-context] hbox after \page[disable]

2016-12-04 Thread Michael Eidenbenz
Dear Hans,

thank you for your answer, but it doesnt solve the issue. 
(or I dont understand what you mean)

the argument in the macro is acually (not in the MWE) a xtable filled with 
\externalfigures.
so I would like to avoid floats as it makes things more complicated and slower.

I tried finding the \page[disable] definition in the code but could not find 
it. 

any further suggestions how I can solve this issue?

thanks Michael



> Am 04.12.2016 um 18:13 schrieb Hans Hagen <pra...@wxs.nl>:
> 
> On 12/4/2016 2:12 PM, Michael Eidenbenz wrote:
>> I have a doublesided layout.
>> On the right side i place the text, figures (if i have any) go on the left 
>> side.
>> the MWE below works quite nice.
>> 
>> But if i want the figure to be full height, two pages are skipped.
>> This is becaus the hbox right below of the figure.
>> I think it is placed during the \page[disable] pass.
>> 
>> What can I do to avoid this hbox?
> 
> \def\Figure#1{\placefigure[location={page,none}]{}{#1}}
> 
> 
>> Thanks Michael
>> 
>> 
>> \enabletrackers
>> [visualizers.hbox]
>> 
>> \useMPlibrary[dum]
>> 
>> \setuppagenumbering
>> [alternative=doublesided]
>> 
>> \definelayout[odd][width=10cm]
>> \definelayout[even][width=15cm]
>> 
>> \newtoks \EvenPage
>> 
>> \appendtoks
>> \the\EvenPage
>> \global\EvenPage\emptytoks
>> \page[odd]
>> \to\everyafteroutput
>> 
>> \unexpanded\def\Figure#1{%
>>  \appendtoks
>>  \page[even]
>>  #1
>>  \page[disable]
>>  \to\EvenPage}
>> 
>> \showframe
>> 
>> \starttext
>> 
>> \dorecurse{4}{\input{tufte}\par}\page
>> \Figure{\externalfigure[dummy][factor=fit]}
>> \dorecurse{4}{\input{knuth}\par}\page
>> \Figure{\externalfigure[dummy][height=\textheight]}  %
>> \dorecurse{8}{\input{ward}\par}
>> \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://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> wiki : http://contextgarden.net
>> ___
>> 
> 
> 
> -- 
> 
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] btx/xml tree - entry with missing field

2016-12-22 Thread Michael Eidenbenz
Hello

I use the xml interface to list all publications that dont match a search 
criteria:

 /field[@name='keywords'
and not (contains(text(),'alpha'))]

but there are entries where the keywords field is missing.
how can I include them (here "test-3") in the output? 

Thanks Michael

--

\startbuffer[bib]

@article{test-1,
   title= {Article One},
   author   = {A. Foo and X. Bar},
   year = {2001},
   keywords = {alpha},
}

@book{test-2,
   title= {Book Two},
   author   = {B. Foo},
   year = {2002},
   keywords = {beta},
}

@whatever{test-3,
   title= {Book Three},
   author   = {C. Foo},
   year = {2003},
}

\stopbuffer

\usebtxdataset [database] [bib.buffer]
\convertbtxdatasettoxml [database]

\startxmlsetups btx:tag
\hbox{\xmlatt{#1}{tag}}
\stopxmlsetups

\startxmlsetups btx:demo
   \xmlfilter {#1} {
 /bibtex
 /*
 /field[@name='keywords'
and not (contains(text(),'alpha'))]
 /..
 /command(btx:tag)
   }
\stopxmlsetups

\starttext
\xmlsetup{btx:database}{btx:demo}
\stoptext

Michael Eidenbenz / Senior Researcher
eidenb...@arch.ethz.ch <mailto:eidenb...@arch.ethz.ch>
Phone +41 44 632 33 46

Chair of Architecture and Building Process
ETH Zurich / Building HIB / Floor E / Room 33
Stefano-Franscini-Platz 1 / CH-8093 Zurich
www.bauprozess.arch.ethz.ch <http://www.bauprozess.arch.ethz.ch/>

/ ITA
Institute of Technology in Architecture
Faculty of Architecture / ETH Zurich
www.ita.arch.ethz.ch <http://www.ita.arch.ethz.ch/>

___
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] btx/xml tree - entry with missing field

2016-12-22 Thread Michael Eidenbenz
thanks a lot hans!

> Am 22.12.2016 um 18:30 schrieb Hans Hagen <pra...@wxs.nl>:
> 
> On 12/22/2016 6:06 PM, Michael Eidenbenz wrote:
>> Hello
>> 
>> I use the xml interface to list all publications that dont match a
>> search criteria:
>> 
>> /field[@name='keywords'
>>and not (contains(text(),'alpha'))]
>> 
>> but there are entries where the keywords field is missing.
>> how can I include them (here "test-3") in the output?
>> 
>> Thanks Michael
>> 
>> --
>> 
>> \startbuffer[bib]
>> 
>> @article{test-1,
>>   title= {Article One},
>>   author   = {A. Foo and X. Bar},
>>   year = {2001},
>>   keywords = {alpha},
>> }
>> 
>> @book{test-2,
>>   title= {Book Two},
>>   author   = {B. Foo},
>>   year = {2002},
>>   keywords = {beta},
>> }
>> 
>> @whatever{test-3,
>>   title= {Book Three},
>>   author   = {C. Foo},
>>   year = {2003},
>> }
>> 
>> \stopbuffer
>> 
>> \usebtxdataset [database] [bib.buffer]
>> \convertbtxdatasettoxml [database]
>> 
>> \startxmlsetups btx:tag
>> \hbox{\xmlatt{#1}{tag}}
>> \stopxmlsetups
>> 
>> \startxmlsetups btx:demo
>>   \xmlfilter {#1} {
>> /bibtex
>> /*
>> /field[@name='keywords'
>>and not (contains(text(),'alpha'))]
>> /..
>> /command(btx:tag)
>>   }
>> \stopxmlsetups
>> 
>> \starttext
>> \xmlsetup{btx:database}{btx:demo}
>> \stoptext
> 
> \startxmlsetups btx:demo
>   \xmlfilter {#1} {/bibtex/*/command(btx:demo:action)}
> \stopxmlsetups
> 
> \startxmlsetups btx:demo:action
>\xmldoifelse {#1} {/field[@name='keywords']} {
>\xmlfilter {#1} {
> /field[@name='keywords'
>and not contains(text(),'alpha')]
> /..
> /command(btx:tag)
>}
>} {
>\xmlsetup{#1}{btx:tag}
>   }
> \stopxmlsetups
> 
> 
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] bug in cldf-int.lua

2017-03-20 Thread Michael Eidenbenz
hello 

this bug shows up when using the lua function "interfaces.definecommand".

michael


cldf-int.lua


interfaces = interfaces or { }

- _clmh_ = utilities.parsers.settings_to_array
+ _clmh_ = utilities.parsers.settings_to_hash
_clma_ = utilities.parsers.settings_to_array



___
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] everybeforeoutput vs everyafteroutput

2017-03-10 Thread Michael Eidenbenz
hello,

i try to understand the difference of everybeforeoutput and everafteroutput to 
inject some pages. it seems as there is no difference. 
\the\everybeforeoutput is placed after the output of the page:

\newtoks\Before
\appendtoks
\the\Before  
\global\Before\emptytoks 
\to\everybeforeoutput

\newtoks\After
\appendtoks
\the\After 
\global\After\emptytoks 
\to\everyafteroutput

\starttext
\input{knuth}\par
\appendtoks{before}\to\Before
\appendtoks{after}\to\After
\stoptext


this code in page-otr.mkvi seems to put it before the content:

\def\page_otf_set_engine_output_routine#content%
  {\global\output
 {\inotrtrue
  \the\everybeforeoutput
  #content\relax
  \the\everyafteroutput}}

can this be fixed? 
thanks michael





___
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] everybeforeoutput vs everyafteroutput

2017-03-11 Thread Michael Eidenbenz
what i'm looking for is a way to
1. postpone a page, just before it is shipped out
2. instead ship out a page with saved tokens (images)
3. and then ship out the postponed page.

it tried to hook into the output routine without success because the 
\everybeforeoutput is typeset after the page is shipped out.

pageinjection [previouspage] sort of does what i want, but its a blank page 
without the layout.

any hints how i can solve this?

many thanks michael



> On 10 Mar 2017, at 17:36, Hans Hagen <pra...@wxs.nl> wrote:
> 
> On 3/10/2017 10:07 AM, Michael Eidenbenz wrote:
>> hello,
>> 
>> i try to understand the difference of everybeforeoutput and everafteroutput 
>> to inject some pages. it seems as there is no difference.
>> \the\everybeforeoutput is placed after the output of the page:
>> 
>> \newtoks\Before
>> \appendtoks
>> \the\Before
>> \global\Before\emptytoks
>> \to\everybeforeoutput
>> 
>> \newtoks\After
>> \appendtoks
>> \the\After
>> \global\After\emptytoks
>> \to\everyafteroutput
>> 
>> \starttext
>> \input{knuth}\par
>> \appendtoks{before}\to\Before
>> \appendtoks{after}\to\After
>> \stoptext
>> 
>> 
>> this code in page-otr.mkvi seems to put it before the content:
>> 
>> \def\page_otf_set_engine_output_routine#content%
>>  {\global\output
>> {\inotrtrue
>>  \the\everybeforeoutput
>>  #content\relax
>>  \the\everyafteroutput}}
>> 
>> can this be fixed?
> 
> there is nothing wrong .. you feed something in the output routine there
> 
> you can try to use one of the other \before\after ones but be aware of 
> possible interferences with tex's state, hold content etc ... 
> \startpostponing ... might do what you want
> 
> Hans
> 
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | www.pragma-ade.nl <http://www.pragma-ade.nl/> | 
> www.pragma-pod.nl <http://www.pragma-pod.nl/>
> -
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] sql / swiglib doesnt find lib

2017-10-01 Thread Michael Eidenbenz
Hello,

I'm experimenting with the SQL interface in context.
My testfile compiles with: utilities.sql.setmethod("client"), but I don't 
manage to setup the swiglib method.

Following the instruction described in swiglib-mkiv.pdf,
I compiled the mysql library for osx, and put it into: 
context/tex/texmf-osx-64/bin/lib/luatex/lua/swiglib/mysql/core.dylib

But I get this error:
swiglib > unknown: 'swiglib.mysql.core'

my texmf.cnf has the line
CLUAINPUTS = .;$SELFAUTOLOC/lib/{$progname,$engine,}/lua//

Thanks!
___
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] sql / swiglib doesnt find lib

2017-10-02 Thread Michael Eidenbenz
this doesnt work either.
Do I haven't to install the luasql-mysql module?

...exp/tex/texmf-context/tex/context/base/mkiv/util-lib.lua:246: module 
'luasql.mysql' not found:
no field package.preload['luasql.mysql']
no file '/usr/local/share/lua/5.2/luasql/mysql.lua'
no file '/usr/local/share/lua/5.2/luasql/mysql/init.lua'
no file '/usr/local/lib/lua/5.2/luasql/mysql.lua'
no file '/usr/local/lib/lua/5.2/luasql/mysql/init.lua'
no file './luasql/mysql.lua'
no file '/usr/local/lib/lua/5.2/luasql/mysql.so'
no file '/usr/local/lib/lua/5.2/loadall.so'
no file './luasql/mysql.so'
no file '/usr/local/lib/lua/5.2/luasql.so'
no file '/usr/local/lib/lua/5.2/loadall.so'
no file './luasql.so'
stack traceback:
[C]: in function 'savedrequire'
...exp/tex/texmf-context/tex/context/base/mkiv/util-lib.lua:246: in 
function 'require'
...f-context/tex/context/base/mkiv/util-sql-imp-library.lua:74: in main 
chunk
[C]: in function 'savedrequire'
...exp/tex/texmf-context/tex/context/base/mkiv/util-lib.lua:246: in 
function 'require'
...exp/tex/texmf-context/tex/context/base/mkiv/util-sql.lua:114: in 
function '__index'
...exp/tex/texmf-context/tex/context/base/mkiv/util-sql.lua:288: in 
function 'execute'
[ctxlua]:19: in main chunk




> On 02 Oct 2017, at 09:29, Hans Hagen <pra...@wxs.nl> wrote:
> 
> On 10/1/2017 11:47 PM, Michael Eidenbenz wrote:
>> Hello,
>> I'm experimenting with the SQL interface in context.
>> My testfile compiles with: utilities.sql.setmethod("client"), but I don't 
>> manage to setup the swiglib method.
>> Following the instruction described in swiglib-mkiv.pdf,
>> I compiled the mysql library for osx, and put it into: 
>> context/tex/texmf-osx-64/bin/lib/luatex/lua/swiglib/mysql/core.dylib
>> But I get this error:
>> swiglib > unknown: 'swiglib.mysql.core'
>> my texmf.cnf has the line
>> CLUAINPUTS = .;$SELFAUTOLOC/lib/{$progname,$engine,}/lua//
> and how about 'library' (using the normal sql library)
> 
> Hans
> 
> 
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] sql / swiglib doesnt find lib

2017-10-02 Thread Michael Eidenbenz
ffi does look better. 
but i cant test right now, because I have no access to my dbserver.

what about swiglib method?
I compiled and installed the library but luatex doesnt find it.
is there a way to check the search path of luatex?

thanks michael


> On 02 Oct 2017, at 10:38, Hans Hagen <pra...@wxs.nl> wrote:
> 
> On 10/2/2017 10:26 AM, Michael Eidenbenz wrote:
>> this doesnt work either.
>> Do I haven't to install the luasql-mysql module?
>> ...exp/tex/texmf-context/tex/context/base/mkiv/util-lib.lua:246: module 
>> 'luasql.mysql' not found:
> 
> yes but another alternative that copuld work is installing th enormal mysql 
> libraries and then use the 'ffi' method (works on on windows and linux)
> 
> Hans
> 
> 
> 
> 
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] \cite not working with notes in xtables

2017-12-05 Thread Michael Eidenbenz
Hello List,

I have this MWE that reflects my current layout where I have images in an 
xtable with captions defined as note. Both, footnotes and captions are set in 
the margin.
The Example compiles correct with just one caption in a xcell. If there are two 
(as in the MWE) the \cite command doesnt work.

Could this be a conflict on the lua side of xtables/publication framework?

The second problem of course are the footnotes that are not placed on the 
correct side. 
I thought \automigrateinserts would help here. But it doesnt.

Any hints how to solve this?

Thanks Michael


---
\useMPlibrary[dum]

\startbuffer[bib]
@article{tufte, author = {Edward Tufte} }
\stopbuffer
\definebtxdataset[bib]
\usebtxdataset [bib][bib.buffer]
\definebtxrendering[bib][dataset=bib]

\setuplayout[backspace=80mm,width=120mm]

\setupnote  [footnote]
[location={none}]

\definenote [caption]
[location={none}]

\automigrateinserts

\setuptexttexts
  [margin]
  [{{\vbox to\textheight%
{\placenotes[caption]%
 \null\vfilll%
 \placenotes[footnote]}}}]
  []

\starttext

\input tufte
  \footnote{\cite[bib::tufte]}
  \par

  \startembeddedxtable[distance=10mm]
\startxrow
  \startxcell[width=55mm]
\externalfigure[dummy][factor=fit]
\caption[dummy]{caption}
  \stopxcell
  \startxcell[width=55mm]
\externalfigure[dummy][factor=fit]
% \caption[dummy]{caption} %without this note the \cite command compiles
  \stopxcell
\stopxrow
  \stopembeddedxtable

\input tufte
  \footnote{\cite[bib::tufte]}
  \par

\placebtxrendering [bib]

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