Re: [NTG-context] Setting and measuring boxes TeX/Lua

2020-11-27 Thread Hans Hagen
) context.writestatus("JANO","ZERO") token.expand_macro("MacroJano",true,id) context("%p",tex.box[0].width) context.writestatus("JANO","TWO") end \stopluacode \startbuffer[doc] one one two one two three \stop

Re: [NTG-context] Setting and measuring boxes TeX/Lua

2020-11-27 Thread Jano Kula
\bgroup% \vbox\bgroup} \def\StopBox{\egroup\egroup\egroup}% close vbox, framed, hbox \def\MeasureBuffer[#1]{\setbox0\hbox{\getbuffer[#1]}% ht: \the\ht0\par} % XML \startbuffer[doc] section

Re: [NTG-context] bizarre bug in xml

2020-11-20 Thread Wolfgang Schuster
Thomas A. Schmitz schrieb am 20.11.2020 um 22:44: Hi all, this is the most bizarre bug I've ever seen in context. I would be grateful if others could try to replicate it. Test file: \startbuffer[test]     Materiam vati da Venus alma tuo. \stopbuffer \startxmlsetups xml:testsetups

[NTG-context] bizarre bug in xml

2020-11-20 Thread Thomas A. Schmitz
Hi all, this is the most bizarre bug I've ever seen in context. I would be grateful if others could try to replicate it. Test file: \startbuffer[test] Materiam vati da Venus alma tuo. \stopbuffer \startxmlsetups xml:testsetups \xmlsetsetup{#1}{*}{-} \xmlsetsetup{#1

[NTG-context] XML Namespaces and XML Setups

2020-11-16 Thread Christoph Reller
Dear List, Consider the following MWE: \startxmlsetups xml:demo:base \xmlsetsetup{#1}{tag}{xml:demo:tag} \stopxmlsetups \xmlregisterdocumentsetup{demo}{xml:demo:base} \startxmlsetups xml:demo:tag %\doif{\xmlnamespace{#1}}{o}{NameSpaceO:} \xmlflush{#1} \stopxmlsetups \starttext \startbuffer

Re: [NTG-context] \type{...} as macro argument

2020-11-08 Thread Sylvain Hubert
> > One way to work around this is to use a buffer for the content of the loop. > > \startbuffer[type] > \type{ab c} > \stopbuffer > > \starttext > \dorecurse{10}{\inlinebuffer[type]\par} > \stoptext > Many thanks for the answer! It seems t

Re: [NTG-context] \type{...} as macro argument

2020-11-08 Thread Wolfgang Schuster
in case with \dorecurse the loop reads the content before it is passed to type, as a result of this process all spaces are collapsed. One way to work around this is to use a buffer for the content of the loop. \startbuffer[type] \type{ab c} \stopbuffer \starttext \dorecurse{10}{\inlinebuffer

Re: [NTG-context] \switchtobodyfont behaves differenctly with splitted parameters

2020-11-08 Thread Sylvain Hubert
he problematic behavior. > > I don’t get diffferent results: > > \definefontfamily[mainface][rm][TeX Gyre Pagella] > \definefontfamily[face][rm][TeX Gyre Heros] > \setupbodyfont[mainface] > \startbuffer > In my case, the latter is the correct one, while the

Re: [NTG-context] \switchtobodyfont behaves differenctly with splitted parameters

2020-11-08 Thread Pablo Rodriguez
I don’t get diffferent results: \definefontfamily[mainface][rm][TeX Gyre Pagella] \definefontfamily[face][rm][TeX Gyre Heros] \setupbodyfont[mainface] \startbuffer In my case, the latter is the correct one, while the former does nothing but falling back to latinmodern.\par \stopbuf

Re: [NTG-context] \define in conflict with \startxtable[]

2020-11-08 Thread Wolfgang Schuster
txcell 123\stopxcell     \stopxrow     \stopxtablehead     \stopxtable     }     \sample     \stoptext \starttext \define\sample {\startembeddedxtable \startxrow \startxcell \unknown \stopxcell \stopxrow \stopembeddedxtable} \sample \stoptext or \starttext \startbuf

Re: [NTG-context] lmtx

2020-10-30 Thread Jairo A. del Rio
as a trigger. Here are a few examples of usage: 162 163 \startbuffer 164 discrete---discrete 165 \stopbuffer 166 >> \typebuffer \startnarrower \dontcomplain \hsize 1pt \getbuffer \par \stopnarrower 167 \startbuffer 168 discrete\discretionary{}{}{---}discrete 169 \stop

[NTG-context] URLs in XML, escaping special characters

2020-10-07 Thread Denis Maier
    \xmlsetsetup{#1}{article|ext-link}{xml:*} \stopxmlsetups \xmlregistersetup{xml:test} \startxmlsetups xml:article \starttext     \xmlflush{#1} \stoptext \stopxmlsetups \startxmlsetups xml:ext-link     \goto{\hyphenatedurl{\xmlflush{#1}}}[url(\xmlflush{#1})] \stopxmlsetups \startbuffer[test

[NTG-context] \dorecurse{}{} problem

2020-09-21 Thread Jeong Dal
is wrong in this MWE? Thank you for reading. Best regards, Dalyoung * \startbuffer[AdjacencyList1] \starttabulate[|c|cw(2cm)|] \HL \dorecurse{8} {\NC \recurselevel \NC \NC\NR \HL} \stoptabulate \stopbuffer \startbuffer[AdjacencyList2] \starttabulate[|c|cw(2cm)|] \HL \doloop{ \ifnum

[NTG-context] How to get the last item from an XML node

2020-09-21 Thread Denis Maier
=on,bottomframe=on] \setupxtable[body][] \setupxtable[foot][bottomframe=on] \startbuffer[test]          5   A               7   B               2   C       \stopbuffer \startxmlsetups xml:test     \xmlsetsetup{#1}{*}{-}     \xmlsetsetup{#1}{article}{xml

Re: [NTG-context] Extreme tables and XML conflict?

2020-09-21 Thread Wolfgang Schuster
Denis Maier schrieb am 21.09.2020 um 16:38: Hi, I'm a bit confused, but this here won't compile: = \startbuffer[test] Test \stopbuffer \startxmlsetups xml:test     \xmlsetsetup{#1}{*}{-}     \xmlsetsetup{#1}{article}{xml:*}     \xmlsetsetup{#1}{table[@content-type

Re: [NTG-context] \dorecurse{}{} problem

2020-09-21 Thread Otared Kavian
but \recurselevel is not increased, all are 0 in the first > example and only two rows are created with the \recurselevel 0 and 2 only in > the second example. > > Does the tabulate cause the error? > What is wrong in this MWE? > > Thank you for reading. > > Best regards, > >

Re: [NTG-context] \dorecurse{}{} problem

2020-09-21 Thread Jairo A. del Rio
0 and 2 > only in the second example. > > Does the tabulate cause the error? > What is wrong in this MWE? > > Thank you for reading. > > Best regards, > > Dalyoung > > * > \startbuffer[AdjacencyList1] > \starttabulate[|c|cw(2cm)|] > \HL > \do

[NTG-context] Extreme tables and XML conflict?

2020-09-21 Thread Denis Maier
Hi, I'm a bit confused, but this here won't compile: = \startbuffer[test] Test \stopbuffer \startxmlsetups xml:test     \xmlsetsetup{#1}{*}{-}     \xmlsetsetup{#1}{article}{xml:*}     \xmlsetsetup{#1}{table[@content-type!='parallel']}{xml:table}     \stopxmlsetups

Re: [NTG-context] Best way to store text for later use

2020-09-18 Thread Hans van der Meer
mmand(xml:article-meta:title-group:article-title)}, > author={\AuthorList}, > ] > \startbuffer[abstract] > \xmlfilter{#1}{/abstract/command(xml:article-meta:abstract)} > \stopbuffer >\xmlflush{#1} > \stopxmlsetups > > \startxmlsetups xml:article-meta:abstract >

[NTG-context] Best way to store text for later use

2020-09-18 Thread Denis Maier
-group:article-title)},         author={\AuthorList},     ]   \startbuffer[abstract]   \xmlfilter{#1}{/abstract/command(xml:article-meta:abstract)}   \stopbuffer    \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:article-meta:abstract     \xmlflush{#1} \stopxmlsetups

Re: [NTG-context] Combining modes and MetaFun

2020-09-06 Thread Jan Willem Flamma
Flamma wrote:> Dear list members,> > Is it possible to combine modes and MetaFun?> > In the below MWE, the \doifmode construction does not work.> > Kind regards,> > Jan Willem Flamma> > ===> > \enablemode[en]> > %\enablemode[nl]> > \starttext>

Re: [NTG-context] Typing efficiency

2020-09-04 Thread Taco Hoekwater
tartmode[nl] > \getbuffer[nl] > \stopmode > > after every block of text? > > I tried to define a new start/stop pair as follows: > \definestartstop[Bufen][ > before={\startmode[en] > \startbuffer[en]}, > after={\stopbuffer > \getbuffer[en

Re: [NTG-context] Combining modes and MetaFun

2020-09-04 Thread Hans Hagen
On 9/4/2020 2:20 PM, Jan Willem Flamma wrote: Dear list members, Is it possible to combine modes and MetaFun? In the below MWE, the \doifmode construction does not work. Kind regards, Jan Willem Flamma === \enablemode[en] %\enablemode[nl] \starttext \startbuffer[square]     u := 2cm

[NTG-context] Combining modes and MetaFun

2020-09-04 Thread Jan Willem Flamma
Dear list members, Is it possible to combine modes and MetaFun? In the below MWE, the \doifmode construction does not work. Kind regards,Jan Willem Flamma ===\enablemode[en]%\enablemode[nl] \starttext \startbuffer[square]    u := 2cm ;    draw unitsquare scaled u ; drawdblarrow (0,-0.2u)..(u

[NTG-context] Typing efficiency

2020-09-04 Thread Jan Willem Flamma
to define a new start/stop pair as follows:\definestartstop[Bufen][    before={\startmode[en]    \startbuffer[en]},    after={\stopbuffer    \getbuffer[en]    \stopmode}] but that fails. No doubt a clever solution exists that minimizes the typing.  Kind regards,Jan Willem

[NTG-context] wrong 2TOPSIDE?

2020-08-27 Thread Pablo Rodriguez
Dear list, I have the following sample: \startmode[*first] \startbuffer[abcde] \setuppapersize[A5, landscape] \setupbodyfont[100pt] \starttext \dorecurse{158}{% \startmakeup[page][style=\bf\ss, align=center, pagestatus=start

Re: [NTG-context] catch % in gsub("%", "\\letterpercent")

2020-08-27 Thread Wolfgang Schuster
.3/manual.html#6.4.1 , but the mention of %% is a bit hidden. Many thanks for your replies, Taco and Hans. I’m afraid this doesn’t work (and I need \xmlraw there): \startbuffer[demo] The % best paragraph. \stopbuffer \startxmlsetups xml:initialize \

Re: [NTG-context] catch % in gsub("%", "\\letterpercent")

2020-08-27 Thread Pablo Rodriguez
l#6.4.1 , but the > mention of %% is a bit hidden. Many thanks for your replies, Taco and Hans. I’m afraid this doesn’t work (and I need \xmlraw there): \startbuffer[demo] The % best paragraph. \stopbuffer \startxmlsetups xml:initialize \xmlsetset

Re: [NTG-context] removing word in filtered XML

2020-08-20 Thread Hans Hagen
On 8/19/2020 6:10 PM, Pablo Rodriguez wrote: Dear list, I have the following sample: \startbuffer[demo] This is One of the best a paragraph. This is another paragraph. This is another Two of the best paragraph

Re: [NTG-context] removing word in filtered XML

2020-08-20 Thread Taco Hoekwater
> On 19 Aug 2020, at 18:10, Pablo Rodriguez wrote: > > Dear list, > > I have the following sample: > > \startbuffer[demo] > > > >This is > One of the best a paragraph. >This is another paragraph. >

[NTG-context] removing word in filtered XML

2020-08-19 Thread Pablo Rodriguez
Dear list, I have the following sample: \startbuffer[demo] This is One of the best a paragraph. This is another paragraph. This is another Two of the best paragraph. This is another Three paragraph

Re: [NTG-context] reading a single element from XML

2020-08-16 Thread Pablo Rodriguez
. My final solution required nesting filters, which worked perfectly fine (included below). Many thanks for your help, Pablo Just for the record: \startbuffer[demo] This is One a paragraph. This is another paragraph. This is another

Re: [NTG-context] reading a single element from XML

2020-08-16 Thread Taco Hoekwater
\bgroup\bfd\ssd\xmlflush{#1}\egroup \stopxmlsetups Best wishes, Taco > On 16 Aug 2020, at 11:02, Pablo Rodriguez wrote: > > Dear list, > > I have the following sample: > > \startbuffer[demo] > > > >This is Only a paragraph. &

[NTG-context] reading a single element from XML

2020-08-16 Thread Pablo Rodriguez
Dear list, I have the following sample: \startbuffer[demo] This is Only a paragraph. This is another paragraph. This is another paragraph. This is another paragraph. This is another paragraph. \stopbuffer

[NTG-context] new upload - hyphenation

2020-08-11 Thread Hans Hagen
Hi, One can suppress hyphenation with: \setupalign[nothyphenated] but it has some limitations. The low level switches are \nohyphens and \dohyphens. Anyway, this mechanism has now been improved a bit: \starttext \startbuffer NEDERLANDS\par Nederlands\par nederlands\par \CONTEXT \par

[NTG-context] Wrong counting of lines and paragraphs

2020-08-07 Thread Marcus Vinicius Mesquita
] \setuphead[subject][alternative=text,style=bolditalic] \setuphead[subsubject][alternative=text,style=\ss] \setuphead[subsubsubject][alternative=text,style=\ss\it] \startbuffer[waltham] \input waltham \stopbuffer \starttext \startlinenumbering \starttitle[title={Waltham}] \dorecurse{4}{\getbuffer

[NTG-context] About the numbering of theorems

2020-08-07 Thread Fabrice Couvreur
,align=flushleft]{#1\blank#2}} \startbuffer[mybuffer] \starttheorem \input ward \stoptheorem \stopbuffer \setuphead [chapter] [style=\bfd, align={flushleft,broad}, command=\Title] \setuphead [section] [style=\bfc, distance=\zeropoint, sectionsegments=section, conversion

Re: [NTG-context] Bug with lmtx and color in table

2020-07-22 Thread Wolfgang Schuster
from it. \starttext \startbuffer \vrule width 4cm height 4cm depth 0pt\relax \stopbuffer \typebuffer \getbuffer \startbuffer \hrule width 4cm height 4cm depth 0pt\relax \stopbuffer \typebuffer \getbuffer \startbuffer \frule width 4cm height 4cm type fill\relax \stopbuffer \typebuffer

Re: [NTG-context] Code lua in a table

2020-07-20 Thread Jeong Dal
p.print(userdata.P.ncr(" & decimal n & "," & decimal r & " > ))"); > > replaced by > >tt := lua.MP.pascal_ncr(n,r); > > which looks nicer. > > \startbuffer[pt1] >numeric n, r, s, u, dx, dy, tt; >path p, q;

Re: [NTG-context] Code lua in a table

2020-07-20 Thread Fabrice Couvreur
act, > ncr = ncr, > } > > function MP.pascal_ncr(n, r) > mp.print(ncr(n,r)) > end > > \stopluacode > > Watch the last definition. This permits > >% tt := lua("mp.print(userdata.P.ncr(" & decimal n & "

Re: [NTG-context] Code lua in a table

2020-07-20 Thread Jeong Dal
ode for Pascal’s triangle in two different ways using Lua, Metafun and ConTeXt. You may enhance the code. \startbuffer[pt1] numeric n,r,s,u,dx,dy,tt; u := 1.8cm; path p, q; pair A,B,start,now; A := dir(210)*u; B := dir(-30)*u; dy := sind(30)*u; dx := 2*cosd(30)*u; for n=0 upto 4: start := n*dir(210

Re: [NTG-context] Code lua in a table

2020-07-20 Thread Hans Hagen
the last definition. This permits % tt := lua("mp.print(userdata.P.ncr(" & decimal n & "," & decimal r & " ))"); replaced by tt := lua.MP.pascal_ncr(n,r); which looks nicer. \startbuffer[pt1] numeric n, r, s, u, dx, dy, tt;

Re: [NTG-context] lpath to select last item

2020-07-08 Thread Pablo Rodriguez
On 7/8/20 11:59 AM, Hans Hagen wrote: > On 7/7/2020 10:46 PM, Pablo Rodriguez wrote: >> [...] >> Which would be the right lpath to select the last item in each list? > This should work but we're one off so i need to fix that. > > \startbuffer[demo] > > >

Re: [NTG-context] lpath to select last item

2020-07-08 Thread Hans Hagen
On 7/7/2020 10:46 PM, Pablo Rodriguez wrote: Dear list, I have the following sample: \startbuffer[demo] Heading list Heading list list Heading list

[NTG-context] lpath to select last item

2020-07-07 Thread Pablo Rodriguez
Dear list, I have the following sample: \startbuffer[demo] Heading list Heading list list Heading list list list

Re: [NTG-context] Avoid indentation after \typebuffer

2020-07-01 Thread Mikael Sundqvist
t; > example file below should have worked: > > > > \setupindenting[yes,medium] > > > > \setuptyping[buffer][ > > indentnext=no, > > ] > > > > \starttext > > > > \startbuffer > > \startformula > > \int_a^b f'(x)\,dx > >

Re: [NTG-context] Avoid indentation after \typebuffer

2020-07-01 Thread Hans Hagen
][ indentnext=no, ] \starttext \startbuffer \startformula \int_a^b f'(x)\,dx \stopformula \stopbuffer \typebuffer I do not want this line to be indented. \stoptext Compiled with an updated lmxt, and resulting pdf file is attached. \setuptyping [buffer] [before=\blank, after={\blank

[NTG-context] Avoid indentation after \typebuffer

2020-06-30 Thread Mikael Sundqvist
Hi, I want to avoid indentation after \typebuffer (or set indentnext to auto perhaps). I am probably missing something simple, but I thought that the example file below should have worked: \setupindenting[yes,medium] \setuptyping[buffer][ indentnext=no, ] \starttext \startbuffer \startformula

Re: [NTG-context] missing command for xmlinfo in latest?

2020-06-29 Thread Hans Hagen
On 6/29/2020 8:32 PM, Pablo Rodriguez wrote: Dear list, I have the following sample: \startbuffer[demo] text \stopbuffer \startxmlsetups xml:demo:base \xmlsetsetup{#1}{document}{xml:demo:doc} \stopxmlsetups \xmlregistersetup

[NTG-context] missing command for xmlinfo in latest?

2020-06-29 Thread Pablo Rodriguez
Dear list, I have the following sample: \startbuffer[demo] text \stopbuffer \startxmlsetups xml:demo:base \xmlsetsetup{#1}{document}{xml:demo:doc} \stopxmlsetups \xmlregistersetup{xml:demo:base} \startxmlsetups xml:demo:doc

[NTG-context] loading xml error

2020-06-23 Thread Hans van der Meer
MLProcessBuffer{#1}% % simply does an \xmlprocessbuffer{}{}{} } The following buffer gives the error: \startbuffer[german] \stopbuffer \loadvocabularyfrombuffer{german} But the others below are ok and load as expected. \startbuffer[german] \stopbuffer and \startbuffer[german] \stop

Re: [NTG-context] How could I find the 'depth' of an element found with xml.first()?

2020-06-18 Thread Hans Hagen
ding the ‘depth’ of an item in the XML when using the LMTX built-in functions to work with XML. I don’t think there is a default function for that, is there? You don't deserve an answer because this is not a MWE! \startbuffer[test] here \stopbuffer

Re: [NTG-context] Filter module for R

2020-06-15 Thread Aditya Mahajan
\startleftbartext[framecolor=darkgreen, backgroundcolor=lightgreen] \setupalign[flushleft, verytolerant] \typefile[range={3,-1}]{#1} \stopleftbartext} \startbuffer[locale] Sys.setlocale(category="LC_ALL", locale="en_US.UTF-8") \stopbuffer \defineexternalfil

Re: [NTG-context] Filter module for R

2020-06-15 Thread Aditya Mahajan
os.execute("locale") from context is different from that from my shell. But I don't know why locale should affect UTF characters in R. Perhaps someone with more knowledge of R can comment on that. \starttext \startluacode lfs.mkdir("output/") \stopluacode \st

Re: [NTG-context] Styling of included buffers or files

2020-05-18 Thread Jan U. Hasecke
nehighlight > [BufferStyle] > [style=smallitalic, >color=blue] > > \startbuffer > \samplefile{knuth} > \stopbuffer > > \starttext > \samplefile{knuth} > \getbuffer > \samplefile{knuth} > > \stop

Re: [NTG-context] Styling of included buffers or files

2020-05-17 Thread Marco Patzer
ght [BufferStyle] [style=smallitalic, color=blue] \startbuffer \samplefile{knuth} \stopbuffer \starttext \samplefile{knuth} \getbuffer \samplefile{knuth} \stoptext Marco ___ If your question is of inter

Re: [NTG-context] conditional not working in \setuphead

2020-04-20 Thread Wolfgang Schuster
Pablo Rodriguez schrieb am 20.04.2020 um 18:55: Dear list, I have the following sample: \startbuffer[demo] first second \stopbuffer \startxmlsetups xml:initialize \xmlsetsetup{#1}{doc|section}{xml:*} \stopxmlsetups

[NTG-context] conditional not working in \setuphead

2020-04-20 Thread Pablo Rodriguez
Dear list, I have the following sample: \startbuffer[demo] first second \stopbuffer \startxmlsetups xml:initialize \xmlsetsetup{#1}{doc|section}{xml:*} \stopxmlsetups \xmlregistersetup{xml:initialize} \startxmlsetups xml:doc

Re: [NTG-context] running lua in metafun and in ConTeXt

2020-04-11 Thread Jeong Dal
en >> return 1 >> else >> return n * P.fact(n-1) >> end >> end >> function P.ncr(n,r) >> return P.fact(n)/(P.fact(r)*P.fact(n-r)) >> end >> combi = { >> fact = fact, >> ncr = ncr, >> } >> \stopluacode >> \startbuffer[

Re: [NTG-context] running lua in metafun and in ConTeXt

2020-04-11 Thread Hans Hagen
P.fact (n) if n <= 0 then return 1 else return n * P.fact(n-1) end end function P.ncr(n,r) return P.fact(n)/(P.fact(r)*P.fact(n-r)) end combi = { fact = fact, ncr = ncr, } \stopluacode \startbuffer[fig121] numeric n,r,s,u,dx,dy,tt; u := 1.8cm; path p, q; pair A,B,start,now; A := dir(210)*u; B :=

[NTG-context] running lua in metafun and in ConTeXt

2020-04-11 Thread Jeong Dal
n 1 else return n * P.fact(n-1) end end function P.ncr(n,r) return P.fact(n)/(P.fact(r)*P.fact(n-r)) end combi = { fact = fact, ncr = ncr, } \stopluacode \startbuffer[fig121] numeric n,r,s,u,dx,dy,tt; u := 1.8cm; path p, q; pair A,B,start,now; A := dir(210)*u; B := dir(-30)*u; dy := s

Re: [NTG-context] running lua in metafun and in ConTeXt

2020-04-11 Thread Otared Kavian
;; > > I don’t know why the same code treated differently. > I think that I have to do something more in luacode which I don’t know. > Comments are wellcome! > > Best regards, > > Dalyoung > > %%% > > \startluacode > functio

[NTG-context] running lua in metafun and in ConTeXt

2020-04-11 Thread Jeong Dal
at I have to do something more in luacode which I don’t know. Comments are wellcome! Best regards, Dalyoung %%% \startluacode function fact (n) if n <= 0 then return 1 else return n * fact(n-1) end end function combi(n,r) return fact(n)/(fact(r)*fact(n-r)) end \stopluacode \

Re: [NTG-context] startMPpage..stopMPpage written to a separate PDF?

2020-04-06 Thread Wolfgang Schuster
) but Yes, I was thinking about some low level open/writeout stuff in TeX but was scared to try. Still, a \startMPfile{pdffilename}..\stopMPfile (instead of page) would have been great... Something like this: \starttext \startbuffer[square] \startMPpage draw fullsquare scaled 10

Re: [NTG-context] splitted xtable with repeating headers and placetable

2020-04-05 Thread Wolfgang Schuster
,height=max,] % frame=off,topframe=on,bottomframe=on some text in the middle block \stopframed \startframed[width=0.25\hsize,height=max] some text in the right block \stopframed \stopframed \stopframed \stopsetups

[NTG-context] splitted xtable with repeating headers and placetable

2020-04-04 Thread Geert Dobbels
align=middle] \setupxtable[head][background=color, backgroundcolor=gray, topframe=on, bottomframe=on, framecolor=black, foregroundcolor=blue] \setupxtable[left][align=right] \starttext Some lines of text. This text must come just before the table, but only on the first page of the table \st

Re: [NTG-context] xtable headers and handlecsv loop

2020-04-03 Thread Geert Dobbels
sv file. So in my second \doloopfromto I give >> the second argument a number high enough to be sure it reads all the >> lines. It works fine, but I would like to know if there is a way to >> read the number of lines in the csv file to use the exact number of >> lines, instead

Re: [NTG-context] xtable headers and handlecsv loop

2020-04-03 Thread Wolfgang Schuster
of lines, instead of guessing. \usemodule[handlecsv] \opencsvfile{systaprov2.csv} \starttext \startbuffer[loop] \startxrow \startxcell[left] \cA \stopxcell \startxcell[left] \cB \stopxcell \startxcell[left] \cC \stopxcell \startxcell[left] \cD \stopxcell \startxcell \cE \stopxcell \startxcell[left]

[NTG-context] xtable headers and handlecsv loop

2020-04-03 Thread Geert Dobbels
le{systaprov2.csv} \starttext \startbuffer[loop] \startxrow \startxcell[left] \cA \stopxcell \startxcell[left] \cB \stopxcell \startxcell[left] \cC \stopxcell \startxcell[left] \cD \stopxcell \startxcell \cE \stopxcell \startxcell[left] \cF \stopxcell \startxcell \cG \stopxcell \startxcell \

Re: [NTG-context] XML to ConTeXt: converting date attribute from ISO date

2020-03-11 Thread Hans Hagen
. The following works but seems to me inefficient. Grateful for any pointers. Mike Here is my MWE: \startbuffer[demo] 10.I.08 19 Mar '08

Re: [NTG-context] XML to ConTeXt: converting date attribute from ISO date

2020-03-11 Thread Axel Kielhorn
t can take any ISO value and output >> the readable form. The following works but seems to me inefficient. >> Grateful for any pointers. >> Mike >> Here is my MWE: >> \startbuffer[demo] >> >> >> >>

Re: [NTG-context] Customizing \cite alternatives

2020-02-20 Thread Philipp A.
Makes sense, seems like no default is defined anymore, so it won’t render without using a style. I use apa, and the attached screenshot shows my problem. \startbuffer[testbib] @Article{testone, author={Testperson, A. B.}, title={Thing with one author}, year={2001}, } @Article{testtwo

Re: [NTG-context] margintext and floats in the margin

2020-01-31 Thread Jan Willem Flamma
[align=raggedright, > stack=yes, > location=outer, > style={\rm}] > > \showframe > \startbuffer[sine] > numeric u ; u = 5mm ; > draw function (1,"x","1.5*sin(x)",0,710/113,.01) scaled u > withcolor transparent(1,.5,d

[NTG-context] margintext and floats in the margin

2020-01-29 Thread Otared Kavian
, location=outer, style={\rm}] \showframe \startbuffer[sine] numeric u ; u = 5mm ; draw function (1,"x","1.5*sin(x)",0,710/113,.01) scaled u withcolor transparent(1,.5,darkblue) withpen pencircle scaled 2pt ; \stopbuffer \starttext This is s

[NTG-context] margintext and floats in the margin

2020-01-26 Thread Otared Kavian
, location=outer, style={\rm}] \showframe \startbuffer[sine] numeric u ; u = 5mm ; draw function (1,"x","1.5*sin(x)",0,710/113,.01) scaled u withcolor transparent(1,.5,darkblue) withpen pencircle scaled 2pt ; \stopbuffer \starttext This is s

Re: [NTG-context] fancy chapter setup

2020-01-12 Thread Henning Hraban Ramm
ad[chapter][ page=yes, before={\directsetup{FancyChapter}}, ] \setuppagenumbering[alternative=doublesided] \starttext \completecontent \startchapter[title={My Normal Text}] \input knuth \stopchapter \def\PreImg{Real} \startbuffer[Quote] I thought that was real. \stopbuffer \startchapter[title

Re: [NTG-context] fancy chapter setup

2020-01-11 Thread Rik Kabel
tyle=smallcaps]% and so on as you like \definefirstline [1L][alternative=line, style=smallcaps] ... \starttext ... \startbuffer[ChapterEpigraph] \startEpigraph% brings in its own formatting The stuff of the epigraph \stopEpigraph \stopbuffer \startcha

Re: [NTG-context] Adjust kern for one character

2019-12-26 Thread Rik Kabel
}    }    }    fonts.handlers.otf.addfeature {    name = "xkern",    type = "kern",    data = {    ["x"] = { ["x"] = 500 },    [" "] = { ["J"] = 500 }    }    }     \stopluac

Re: [NTG-context] Adjust kern for one character

2019-12-26 Thread Hans Hagen
fonts.handlers.otf.addfeature { name = "xkern", type = "kern", data = { ["x"] = { ["x"] = 500 }, [" "] = { ["J"] = 500 } } } \stopluacode \startbu

Re: [NTG-context] Adjust kern for one character

2019-12-26 Thread Rik Kabel
= "kern", data = { ["x"] = { ["x"] = -300 }, [" "] = { ["A"] = 1000 } } } fonts.handlers.otf.addfeature { name = "xkern", type = "kern", data = {

Re: [NTG-context] Tent style cards

2019-12-22 Thread Pavneet Arora
, as well as using \startuseMPgraphic for direct compilation from ConTeXt. Many thanks for all the help. >>> SNIPPET <<< \startbuffer[tblcard] \strut \definelayer[tblplacecard] \setlayer[tblplacecard][x=-1em,y=1em]{% \externalfigure[figures/apollonius/apo

Re: [NTG-context] Disappearing font feature

2019-12-22 Thread Hans Hagen
-blackitalic] \startbuffer [Sampler] A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z à ë í ô ç 1 2 3 4 5 6 7 8 9 0 ` \texttilde\ - = ! @ \# \$ \letterpercent\ ^ \& * ( ) _ + [ ] \textbacks

Re: [NTG-context] Tent style cards

2019-12-21 Thread Pablo Rodriguez
bottomspace=0in, footer=0in, backspace=0.0in, %% location=middle, marking=on, ] \startbuffer[tblcard] \startframedtext [frame=off, width=\textwidth, height=\textheight, align={lohi, middle}] \tfd A Name

[NTG-context] Disappearing font feature

2019-12-21 Thread Rik Kabel
][jost-500-mediumitalic] \definefont [JSemiI][jost-600-semiitalic] \definefont [JBoldI][jost-700-bolditalic] \definefont [JHeavI][jost-800-heavyitalic] \definefont [JBlacI][jost-900-blackitalic] \startbuffer [Sampler] A B C D E F G H I

[NTG-context] Tent style cards

2019-12-21 Thread Pavneet Arora
ppapersize[tblcard][letter,portrait] \setuparranging[2TOP] \setuplayout[ height=3in, width=4in, topspace=0in, header=0in, bottomspace=0in, footer=0in, backspace=0.0in, %% location=middle, marking=on, ] \startbuffer[tblcard] \strut \tfd A Name \stop

Re: [NTG-context] Moving horizontally a whole ensemble of layers in the same run?

2019-12-18 Thread Rudolf Bahr
rs. > > 2. You can use \setlayerframed to put paragraphs in a layer. > > > \setuppapersize[A4,landscape] > > \setupexternalfigures[location=default] > > \definelayer[LAY] > > \starttext > > \startbuffer > > \setlayerframed >   [LAY] >   [x=0

Re: [NTG-context] Moving horizontally a whole ensemble of layers in the same run?

2019-12-18 Thread Wolfgang Schuster
in a layer. \setuppapersize[A4,landscape] \setupexternalfigures[location=default] \definelayer[LAY] \starttext \startbuffer \setlayerframed   [LAY]   [x=0pt,    y=-8pt]   [frame=off,    width=.35\textwidth,    align={normal,tolerant}]   {\externalfigure[cow][width=\hsize]    \blank[line

Re: [NTG-context] Line numbering in two column layout conflicts with marking

2019-12-18 Thread Oliver von Criegern
. Consider the following example: \setupcolumns[n=2] \setuplinenumbering     [     step=5,     method=page,     align=flushright,     ] \definemarking[Test] \setupheadertexts[{\fetchmark[Test][top] -- \fetchmark[Test][bottom]}] \startbuffer \dorecurse{12}{words } \stopbuffer \starttext

Re: [NTG-context] changing alignment inside a paragraph

2019-12-12 Thread mf
Il 11/12/19 21:25, Wolfgang Schuster ha scritto: \starttext \startbuffer This is the text of an index term, that is normally justified, but I'd like the page numbers to be flushed to the right from their second line\par \startalignment[flushright] \ifdim\dimexpr\hsize-\lastlinewidth\relax&g

Re: [NTG-context] changing alignment inside a paragraph

2019-12-11 Thread Wolfgang Schuster
to \SBPN{}\fi #2\par \stopalignment} \starttext \startbuffer This is the text of an index term, that is normally justified, but I'd like the page numbers to be flushed to the right from their second line\par \startalignment[flushright] \ifdim\dimexpr\hsize-\lastlinewidth\relax>2\emwidth     \b

Re: [NTG-context] changing alignment inside a paragraph

2019-12-10 Thread Wolfgang Schuster
, because there might be no need to break the text into two paragraphs. Use the "end" keyword for the alignment. \starttext \startbuffer This is the text of an index term, that is normally justified, but I'd like the page numbers to be flushed to the right from their second line 34, 57, 10

Re: [NTG-context] Line numbering in two column layout conflicts with marking

2019-12-09 Thread Oliver von Criegern
,     method=page,     align=flushright,     ] \definemarking[Test] \setupheadertexts[{\fetchmark[Test][top] -- \fetchmark[Test][bottom]}] \startbuffer \dorecurse{12}{words } \stopbuffer \starttext \startcolumns \startlinenumbering \marking[Test]{ONE}ONE \dorecurse{12}{\getbuffer}\par \marking

Re: [NTG-context] issue with beta from 2019.11.29 21:47 in Windows

2019-12-02 Thread Wolfgang Schuster
] \definefontfamily[mainface][cg][Arial Narrow][tf=file:ARIALN.TTF] \setupbodyfont[mainface] \startbuffer \ConTeXt\ is awesome!\par \stopbuffer \starttext \startTEXpage[offset=1em] \getbuffer \ss\getbuffer \tt\getbuffer \cg\getbuffer \stopTEXpage

[NTG-context] Line numbering in two column layout conflicts with marking

2019-12-02 Thread Oliver von Criegern
[{\fetchmark[Test][top] -- \fetchmark[Test][bottom]}] \startbuffer \dorecurse{12}{words } \stopbuffer \starttext \startcolumns \startlinenumbering \marking[Test]{ONE}ONE \dorecurse{12}{\getbuffer}\par \marking[Test]{TWO}TWO \dorecurse{29}{\getbuffer}\par \marking[Test]{THREE}THREE \dorecurse{12}{\getbuffer

[NTG-context] hz / expansion

2019-12-02 Thread Hans Hagen
tep=1, stretch=50, shrink=20] \definefontfeature [basea] [default] [expansion=qualitya] \definefontfeature [baseb] [default] [expansion=qualityb] \definefont[FontA][Serif*basea] \definefont[FontB][Serif*baseb] \setupalign[verytolerant,stretch,hz] \starttext \startbuffer \dorecurse {30} {%

Re: [NTG-context] issue with beta from 2019.11.29 21:47 in Windows

2019-12-02 Thread Pablo Rodriguez
e][cg][Arial Narrow][tf=file:ARIALN.TTF] \setupbodyfont[mainface] \startbuffer \ConTeXt\ is awesome!\par \stopbuffer \starttext \startTEXpage[offset=1em] \getbuffer \ss\getbuffer \tt\getbuffer \cg\getbuffer \stopTEXpage \stoptext https://mailman.ntg.nl/piperma

Re: [NTG-context] ASCII mode within \footnote

2019-11-08 Thread context
is to use a slash a path separator instead of the backslash. Another way to get rid of it is to save the path a buffer and print the content of the buffer with the \typeinlinebuffer command. \starttext \startbuffer %APPDATA%\file.txt \stopbuffer \footnote{\typeinlinebuffer} \stoptext Another option

Re: [NTG-context] ASCII mode within \footnote

2019-11-08 Thread Hans Hagen
with the \typeinlinebuffer command. \starttext \startbuffer %APPDATA%\file.txt \stopbuffer \footnote{\typeinlinebuffer} \stoptext Another option, if you have many such files is to define a macro: \define[1]\APPDATA{\mono{\letterpercent APPDATA\letterpercent\letterbackslash#1}} And then use: \footnote

Re: [NTG-context] ASCII mode within \footnote

2019-11-07 Thread Aditya Mahajan
On Thu, 7 Nov 2019, Wolfgang Schuster wrote: A way to avoid this problem is to use a slash a path separator instead of the backslash. Another way to get rid of it is to save the path a buffer and print the content of the buffer with the \typeinlinebuffer command. \starttext \startbuffer

Re: [NTG-context] ASCII mode within \footnote

2019-11-07 Thread Wolfgang Schuster
ash a path separator instead of the backslash. Another way to get rid of it is to save the path a buffer and print the content of the buffer with the \typeinlinebuffer command. \starttext \startbuffer %APPDATA%\file.txt \stopbuffer \footnote{\typeinlinebuffer} \stoptext Wolfgang ___

  1   2   3   4   5   6   7   8   9   10   >