Re: [NTG-context] Problem with Filter Module in latent context beta

2018-04-16 Thread Hans Hagen
. This is a simplified version of what I use in the filter module:    \unprotect     \def\AnyFilename#1%     {\ctxcommand{getreadfilename("any",".","#1")}}     \def\ProcessFile#1%   {\edef\InputFile{\AnyFilename{#1}}%    \InputFile    \typefile[\InputFile]}

Re: [NTG-context] Problem with Filter Module in latent context beta

2018-04-16 Thread Aditya Mahajan
module: \unprotect \def\AnyFilename#1% {\ctxcommand{getreadfilename("any",".","#1")}} \def\ProcessFile#1% {\edef\InputFile{\AnyFilename{#1}}% \InputFile \typefile[\InputFile]} \protect \starttext \ProcessFile{http://cim

Re: [NTG-context] Testing value of a \def

2018-02-08 Thread Procházka Lukáš Ing .
ld be as the file name is "Test.mkiv". But the code: \starttext \jobname \doifelse{\jobname}{Test}{Yes}{No} \def\T{Test} \ifx\jobname\T True\else False\fi \ctxcommand{doifelse("\jobname" == "Test")}{1}{0} \stoptext yields "No", &

Re: [NTG-context] Testing value of a \def

2018-02-08 Thread Wolfgang Schuster
{No} \def\T{Test} \ifx\jobname\T True\else False\fi \ctxcommand{doifelse("\jobname" == "Test")}{1}{0} \stoptext yields "No", "False" and "1", so only the printed "1" is what I expect. Why \doifelse and \ifx are evaluated as false

[NTG-context] Testing value of a \def

2018-02-08 Thread Procházka Lukáš Ing .
Hello, I'm trying to test whether value of \jobname is "Test"; I suppose it should be as the file name is "Test.mkiv". But the code: \starttext \jobname \doifelse{\jobname}{Test}{Yes}{No} \def\T{Test} \ifx\jobname\T True\else False\fi \ctxcommand{doifelse

Re: [NTG-context] Problem with MkIV and TikZ picture remembering

2015-03-13 Thread Jörg Weger
% %D %%% Hans’ redefinition of write function: %%% \def\syst_write#1#2% {\ctxcommand{write(\number#1,\!!bs\normalunexpanded{#2}\!!es)}} \unexpanded\def\writeviatex#1#2% {\ifx\normalwrite\relax\else \normalwrite#1{#2}% \fi

Re: [NTG-context] crash with new beta (2015.03.09 19:27)

2015-03-09 Thread John Kitzmiller
\relax \the \everystarttext \global \everystarttext \e... l.1 \dostarttext \ctxcommand #1-\directlua {commands.#1} l.1 \starttext Could you fix this? it works here .. can others confirm the issue

[NTG-context] crash with new beta (2015.03.09 19:27)

2015-03-09 Thread Pablo Rodriguez
\dostarttext \ctxcommand #1-\directlua {commands.#1} l.1 \starttext Could you fix this? Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg

Re: [NTG-context] crash with new beta (2015.03.09 19:27)

2015-03-09 Thread Mikael P. Sundqvist
...ttext \relax \the \everystarttext \global \everystarttext \e... l.1 \dostarttext \ctxcommand #1-\directlua {commands.#1} l.1 \starttext Could you fix this? it works here .. can others confirm the issue? I can confirm the problem. I

Re: [NTG-context] Problem with MkIV and TikZ picture remembering

2015-03-08 Thread Hans Hagen
in a tex.write which is wrong so we need to revert to this: \def\syst_write_execute#1% {\ctxcommand{execute(\!!bs#1\!!es)}} \unexpanded\def\write#1#% {\ifnum#1=18 \expandafter\syst_write_execute \else \normalwrite#1% \fi} (context itself doesn't suffer from this as it does things

Re: [NTG-context] Problem with MkIV and TikZ picture remembering

2015-03-08 Thread Hans Hagen
values but at least they return something) but something like this works: \def\syst_write#1#2% {\ctxcommand{write(\number#1,\!!bs\normalunexpanded{#2}\!!es)}} \unexpanded\def\writeviatex#1#2% {\ifx\normalwrite\relax\else \normalwrite#1{#2}% \fi

Re: [NTG-context] No escape to TeX for inline typing?

2015-02-28 Thread Christoph Reller
!verbatim\currenttype\??type \ctxcommand{typestring{ data= \!!bs\detokenize{#1}\!!es, tab = \typeparameter\c!tab, method = \typeparameter\c!option, +escape = \!!bs\typeparameter\c!escape\!!es, nature = inline, compact = \typeparameter\c!compact

Re: [NTG-context] No escape to TeX for inline typing?

2015-02-17 Thread Christoph Reller
command doesn’t support a escape function but it can be added an additional line in the code (buff-ver.miv): \def\buff_verbatim_type_normal#1% {\buff_verbatim_initialize_type_two \dostarttaggedchained\t!verbatim\currenttype\??type \ctxcommand{typestring{ data= \!!bs\detokenize{#1

Re: [NTG-context] No escape to TeX for inline typing?

2015-02-17 Thread Wolfgang Schuster
% {\buff_verbatim_initialize_type_two \dostarttaggedchained\t!verbatim\currenttype\??type \ctxcommand{typestring{ data= \!!bs\detokenize{#1}\!!es, tab = \typeparameter\c!tab, method = \typeparameter\c!option, +escape = \!!bs\typeparameter\c!escape\!!es, nature = inline, compact

Re: [NTG-context] someone who can fix can fix

2015-01-13 Thread Hans Hagen
) \spac_vspacing_yes_indeed ...\ifmmode \else \par \ctxcommand {vspacing(#1... l.75 \blank[2*big] empty file I'm broken. Please show this to someone who can fix can fix I don’t know where to start looking, I guess it’s something with the letter

[NTG-context] someone who can fix can fix

2015-01-12 Thread Henning Hraban Ramm
\ctxcommand {vspacing(#1... l.75 \blank[2*big] empty file I'm broken. Please show this to someone who can fix can fix I don’t know where to start looking, I guess it’s something with the letter module. The same files used to work

Re: [NTG-context] dealing with footnotes and ol in XML

2015-01-11 Thread Pablo Rodriguez
\currentnotenumber{#id}% \edef\currentnote{#tag}% \strc_constructions_initialize{#tag}% \strc_notes_synchronize \edef\currentconstructionlistentry{\ctxcommand{notelistindex(\currentnote,#id)}}% \reinstateconstructionnumberentry\currentconstructionlistentry \dontcomplain

Re: [NTG-context] dealing with footnotes and ol in XML

2015-01-11 Thread Hans Hagen
}{demo}{} \unexpanded\def\handlenoteitself#tag#id% {\edef\currentnotenumber{#id}% \edef\currentnote{#tag}% \strc_constructions_initialize{#tag}% \strc_notes_synchronize \edef\currentconstructionlistentry{\ctxcommand{notelistindex(\currentnote,#id

Re: [NTG-context] dealing with footnotes and ol in XML

2015-01-10 Thread Hans Hagen
}% \strc_notes_synchronize \edef\currentconstructionlistentry{\ctxcommand{notelistindex(\currentnote,#id)}}% \reinstateconstructionnumberentry\currentconstructionlistentry \dontcomplain \strc_notes_interaction_check_display \strc_notes_set_reference_attribute_text \strc_constructions_stored_start

Re: [NTG-context] enumeration with the Spanish alphabet

2014-11-12 Thread Wolfgang Schuster
-con.miv \def\spanishnumerals #1{\ctxcommand{alphabetic(\number#1,spanish)}} \def\Spanishnumerals #1{\ctxcommand{Alphabetic(\number#1,spanish)}} and the following line in core-con.la counters['spanishnumerals'] = counters['spanish

Re: [NTG-context] enumeration with the Spanish alphabet

2014-11-12 Thread Hans Hagen
] [\spanishnumerals] \defineconversion [Spanishnumerals] [\Spanishnumerals] ah, it should be spanishcharacters What’s missing as well are these two definitions in core-con.miv \def\spanishnumerals #1{\ctxcommand{alphabetic(\number#1,spanish)}} \def\Spanishnumerals #1

Re: [NTG-context] xtables and xml and lua

2014-06-18 Thread Hans Hagen
\nointerlineskip ^^@-\prevdepth -\thousandpoint l.22 \nointerlineskip \ctxcommand #1o-\directlua {commands.#1} \tabl_x_process ...lse \tabl_x_flush_text_checked \fi \fi \ctxcommand {x_tab... l.8 } \ctxlxml #1h-\ctxlua {lxml.#1

[NTG-context] Line number in tex error

2014-04-24 Thread Mikael P. Sundqvist
/err.tex: ! Missing number, treated as zero to be read again f argument f oo \addaskedblankskip ..._vspacing_temp #1\dimexpr #2 \relax l.8 } \ctxcommand #12-\directlua {commands.#1} \spac_vspacing_yes_indeed ...mand {vspacing(#1

Re: [NTG-context] Request for metapost

2013-12-25 Thread Peter Rolf
\ctxluacode{inspect(metapost.variables)} \ctxcommand{mprunvar(x)} \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

Re: [NTG-context] Request for metapost

2013-12-23 Thread DesdeChaves
) ; passvariable(point,(1,2)) ; passvariable(triplet,(1,2,3)) ; passvariable(quad,(1,2,3,4)) ; passvariable(boolean,false) ; passvariable(path,fullcircle scaled 1cm) ; \stopMPcode \ctxluacode{inspect(metapost.variables)} \ctxcommand{mprunvar(array)} Thanks in advance that's less

Re: [NTG-context] Request for metapost

2013-12-22 Thread Hans Hagen
) ; passvariable(path,fullcircle scaled 1cm) ; \stopMPcode \ctxluacode{inspect(metapost.variables)} \ctxcommand{mprunvar(array)} Thanks in advance that's less trivial (as automatism) so i provide passarrayvariable now (next beta) ... of course the next request would concern complex arrays so i also made

Re: [NTG-context] Request for metapost

2013-12-22 Thread Hans Hagen
)) ; passvariable(boolean,false) ; passvariable(path,fullcircle scaled 1cm) ; \stopMPcode \ctxluacode{inspect(metapost.variables)} \ctxcommand{mprunvar(array)} Thanks in advance that's less trivial (as automatism) so i provide passarrayvariable now (next beta) ... of course the next request would

[NTG-context] Request for metapost

2013-12-21 Thread DesdeChaves
\ctxluacode{inspect(metapost.variables)} \ctxcommand{mprunvar(array)} Thanks in advance Jorge ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http

Re: [NTG-context] a way to implement \testcolumn in mixedcolumns

2013-12-03 Thread Lars Huttar
}{\input ward \par} 13 14 \stopmixedcolumns 15 16 \stoptext 17 \ctxcommand #1 -\directlua {commands.#1} \page_mix_routine_construct ...\else false\fi , }} \deadcycles \zerocount

Re: [NTG-context] a way to implement \testcolumn in mixedcolumns

2013-12-03 Thread Hans Hagen
\dorecurse{4}{\input ward \par} 8 9 %\testcolumn[10][-1pt] % 10 lines - 1pt slack 10 \column 11 12 \dorecurse{2}{\input ward \par} 13 14 \stopmixedcolumns 15 16 \stoptext 17 \ctxcommand #1 -\directlua {commands.#1} \page_mix_routine_construct ...\else false\fi

[NTG-context] Problem with urls.

2013-11-21 Thread Robert Blackstone
. --- \useURL[apurl][http://wiki.contextgarden.net/Category:Commands] \starttext \from[apurl] \url[apurl] \stoptext I use TeXshop. The console gives me the following cryptic message about a LuaTeX error: \ctxcommand #1

Re: [NTG-context] How to test the emptyness of a variable?

2013-11-07 Thread Procházka Lukáš Ing . - Pontex s . r . o .
Hello, Lua way: \setuplabeltext[chapter=] \define[1]\MyCommand{\ctxcommand{doifelse(1==\currentsectioncountervalue)}{ONE}{#1}} \setuphead[chapter][deepnumbercommand=\MyCommand] \starttext \chapter{Cool} \chapter{Cat} \chapter{Mouse} \stoptext I'm sure there is also a cleaner

[NTG-context] SimpleSlides

2013-11-01 Thread Vyatcheslav Y.
[textcolor=simpleslides:textcolor] 157 158 %D We use \METAPOST\ to draw backgrounds. 159 160 \startuseMPgraphic{simpleslides:MP:horizontal} \ctxcommand #1^^@-\directlua {commands.#1} \colo_basics_define ...lse,\v_colo_freeze_state )} \unexpanded \setvalue {#1}... l.150 ...:backgroundcolor

Re: [NTG-context] Mathdesign GD with simplefonts

2013-10-08 Thread Magnus J
... 1 2 \usetypescriptfile[mathdesign] 3 4 \usemodule[simplefonts] 5 6 \setmainfont[Adobe Garamond Pro] 7 \setmathfont[mathdesigngm] 8 9 \starttext 10 I want \m{x^2+y^2=z^2} in my text, and $\alpha\beta\gamma$ too. 11 \stoptext \ctxcommand #1^^@-\directlua

Re: [NTG-context] Conditional float references

2013-09-24 Thread Robert Blackstone
eft#right#dummy[#label] \ctxcommand #1i-\directlua {commands.#1} \syst_helpers_start_tex_definition_two ...n(#1)} {#2} l.32 \stoptexdefinition

Re: [NTG-context] startitemize bad with columns

2013-09-20 Thread Xan
, trobeu les seves descomposicions en forma de potència: 41 \startitemize[a,columns,three,packed] 42 \item 64 43 \item 16 44 \column 45 \item 81 \ctxcommand #1^^@-\directlua {commands.#1} \page_mix_routine_construct ...\else false\fi

Re: [NTG-context] new mp trickery / next challenge for alan and mari

2013-09-10 Thread Alan BRASLAU
(metapost.variables)} \ctxcommand{mprunvar(number)} \ctxcommand{mprunvar(string)} \stoptext the inspect shows: table={ [boolean]=false, [number]=123, [path]={ { 10.02177, 10.02177, 12.67969, 7.36386, 7.36386, 12.67969 }, { 0, 14.17323, 3.75914, 14.17323, -3.75914, 14.17323

[NTG-context] new mp trickery / next challenge for alan and mari

2013-09-10 Thread Hans Hagen
)) ; passvariable(quad,(1,2,3,4)) ; passvariable(boolean,false) ; passvariable(path,fullcircle scaled 1cm) ; draw fullcircle scaled 20pt ; \stopMPcode \ctxlua{inspect(metapost.variables)} \ctxcommand{mprunvar(number)} \ctxcommand{mprunvar(string)} \stoptext the inspect shows: table={ [boolean

[NTG-context] bug in current beta

2013-08-15 Thread Schmitz Thomas A.
\directlua ]:1: in main chunk. system tex error on line 137 in file /Users/tas/context/tex/texmf-context/tex/context/base/cont-yes.mkiv: LuaTeX error ... \ctxcommand #1^^@-\directlua {commands.#1} l.137 } \ctxcommand #1^^@-\directlua

[NTG-context] Broken nightly? (2013.08.03)

2013-08-04 Thread Kip Warner
/base/back-pdf.lua:44: attempt to call global 'f_rotation' (a nil value) stack traceback: /usr/share/texmf/tex/context/base/back-pdf.lua:44: in function 'pdfstartrotation' [string \directlua ]:1: in main chunk. \ctxcommand #1^^@-\directlua {commands.#1

[NTG-context] 2013.07.12 broken nightly?

2013-07-14 Thread Kip Warner
'injectreference' [string \directlua ]:1: in main chunk. \ctxcommand #1^^@-\directlua {commands.#1} Respectfully, PS Please copy me if you remember, as I am not currently a subscriber. -- Kip Warner -- Software Engineer OpenPGP encrypted/signed mail preferred http

Re: [NTG-context] Issue with 2013.04.30 00:31

2013-05-07 Thread Hans Hagen
: ... references unknown reference '[Leitmotifs][Resources For Everyone]' pagesflushing realpage 9, userpage 9, subpage 2 ! LuaTeX error [string \directlua ]:1: invalid escape sequence near '\#'. \ctxcommand #1

[NTG-context] Problems with arabic font Amiri

2013-05-07 Thread H. Özoguz
.tex: LuaTeX error ... +++ 1 \definefont[amiri][file:amiri-regular.ttf*arabic at 17pt] 2 \define[1]\Arab{\amiri#1} 3 4 \starttext 5 \Arab{بِسْمِ اللَّـهِ الرَّ‌حْمَـٰنِ الرَّ‌حِيمِ} 6 \stoptext 7 8 9 10 11 12 13 14 15 \ctxcommand #1-\directlua

[NTG-context] Issue with 2013.04.30 00:31

2013-05-06 Thread Kip Warner
]' pagesflushing realpage 9, userpage 9, subpage 2 ! LuaTeX error [string \directlua ]:1: invalid escape sequence near '\#'. \ctxcommand #1^^@-\directlua {commands.#1} \bibgotoURL #1#2\-\useURL [#1][#2][][#1

Re: [NTG-context] Issue with 2013.04.30 00:31

2013-05-06 Thread Kip Warner
\directlua ]:1: invalid escape sequence near '\#'. \ctxcommand #1^^@-\directlua {commands.#1} \bibgotoURL #1#2\-\useURL [#1][#2][][#1] \from [#1] argument ...ded

[NTG-context] Using Product-component

2013-04-16 Thread Aditya Mahajan
\environment env 2 3 \startproduct prd 4 5 \component cmp 6 7 \stopproduct 8 \ctxcommand #1^^@-\directlua {commands.#1} l.5 } \ctxcommand #1^^@-\directlua {commands.#1} l.5 \component cmp ! == Fatal error occurred, no output PDF file produced! mtx-context | fatal error

Re: [NTG-context] Using Product-component

2013-04-16 Thread d.henman
\startproduct prd 4 5 \component cmp 6 7 \stopproduct 8 \ctxcommand #1^^@-\directlua {commands.#1} l.5 } \ctxcommand #1^^@-\directlua {commands.#1} l.5 \component cmp ! == Fatal error occurred, no output PDF file produced! mtx-context | fatal error: return code

Re: [NTG-context] date problem

2013-03-20 Thread Meer H. van der
commands with optional argument aren’t expandable and \date *has* two optional argument. To get now the date in the output you can either use the expandable \rawdate[] command (the brackets are necessary) or you use \ctxcommand{currentdate(specification,language)} (language can also

Re: [NTG-context] date problem

2013-03-20 Thread Wolfgang Schuster
because when I run this example \starttext \rawdate[] \stoptext I get “march unknown, 2013” as output. When I use now (instead of \currentlanguage you can also use a language tag, e.g. nl) \starttext \ctxcommand{currentdate(month, ,day, , year,\currentlanguage)} \stoptext I get

Re: [NTG-context] date problem

2013-03-20 Thread Meer H. van der
I see. But this is not working too. Following your suggestion I now get: \edef\thisdate{\ctxcommand{currentdate(month, ,day, , year,\currentlanguage)}}\writestatus{***}{\meaning\thisdate} *** macro:-\labeltext {march} 20 2013 The problem is essentially the same. I am most unhappy

Re: [NTG-context] date problem

2013-03-20 Thread Wolfgang Schuster
Am 20.03.2013 um 15:29 schrieb Meer H. van der h.vanderm...@uva.nl: I see. But this is not working too. Following your suggestion I now get: \edef\thisdate{\ctxcommand{currentdate(month, ,day, , year,\currentlanguage)}}\writestatus{***}{\meaning\thisdate} *** macro:-\labeltext

[NTG-context] date handling maltreated?

2013-03-20 Thread H. van der Meer
:#1-\ctxcommand {monthname(#1)}- \labeltext {unknown}RROR \year- 2013 \time- 982 I strongly ask that ConTeXt abstains from changing the definition of \month and reverts to the exact result as given by plain TeX, i.e. a number in the range [1-12]. Because

[NTG-context] date handling maltreated?

2013-03-20 Thread H. van der Meer
\month - \month WHY NOT monthname?} \writestatus{}{\meaning\year - \the\year} \writestatus{}{\meaning\time - \the\time} \stoptext Result: \protected macro:-\dodoubleempty \syst_converters_date - \date \day- 20 macro:#1-\ctxcommand {monthname(#1)}- \labeltext {unknown}HY NOT monthname? \year

Re: [NTG-context] date handling maltreated?

2013-03-20 Thread Wolfgang Schuster
- 20 macro:#1-\ctxcommand {monthname(#1)}- \labeltext {unknown}HY NOT monthname? \year- 2013 \time- 989 Plain TeX here gives: \message{\meaning\day - \the\day} \message{\meaning\month - \the\month} \message{\meaning\year - \the\year} \message{\meaning\time - \the\time} \end

Re: [NTG-context] Including section number in reference broken

2013-03-18 Thread Wolfgang Schuster
has changed and the settings from \setupreferencestructureprefix are ignored. When I change the definition from \def\currentreferencedefault {\ctxcommand{filterdefaultreference()}} to (this is the code from 2011 adapted to the current version) \def\currentreferencedefault

[NTG-context] Latest beta broken?

2013-02-05 Thread Otared Kavian
=\currentdate, 8 %D copyright={PRAGMA ADE \ \CONTEXT\ Development Team}] 9 %C 10 %C This module is part of the \CONTEXT\ macro||package and is 11 %C therefore copyrighted by \PRAGMA. See mreadme.pdf for \ctxcommand #1-\directlua {commands.#1

Re: [NTG-context] ntg-context Digest, Vol 103, Issue 49

2013-01-17 Thread H. Özoguz
minexample.tex: LuaTeX error ... 10 \setupannotation[bigquote] 11 [alternative=command, 12 command=\AnnotationCommand] 13 14 \starttext 15 16 He said: 17 \startbigquote 18 This is interesting! 19 \stopbigquote 20 21 \stoptext 22 \ctxcommand #1-\directlua {commands.#1} to be read

[NTG-context] ConTeXt on the Mac (TexShop). Problem of a newbie

2013-01-08 Thread Meigen, Thomas
\stoptext argument ... internal(\currentlistentryinternal )\!!es ,\luaconditional \h... \ctxcommand #1-\directlua {commands.#1 } \doifreferencefoundelse ...ional \gotonewwindow

[NTG-context] problem with Iwona (beta 2012-01-08)

2013-01-08 Thread Peter Rolf
\stoptext 9 \ctxcommand #1-\directlua {commands.#1} \font_helpers_low_level_define ..._designsize )} \edef \somefontspec {at \n... \font_helpers_trigger_define ..._identifier_class \csname

Re: [NTG-context] Numerical Calculations

2012-12-19 Thread Hans Hagen
On 12/19/2012 7:09 PM, Troy Henderson wrote: \calc{1/3.8} and have it return 0.263157894736842 (or rounded) \ctxcommand{format(@0.3f,1/3.8)} @ as well as % ... just lua format but @ is more tex friendly

Re: [NTG-context] Numerical Calculations

2012-12-19 Thread Troy Henderson
Do \luaexpr{1/3.8} and \ctxcommand{format(@0.3f,1/3.8)} return numbers or strings? That is, I would like to use these results in a \if or \ifnum command to exit a \doloop. Troy ___ If your question is of interest

Re: [NTG-context] Numerical Calculations

2012-12-19 Thread Roland Thiers
Le 20 déc. 12 à 05:43, Troy Henderson a écrit : Do \luaexpr{1/3.8} and \ctxcommand{format(@0.3f,1/3.8)} return numbers or strings? That is, I would like to use these results in a \if or \ifnum command to exit a \doloop. Troy Bonjour, \ctxlua{context(type(\luaexpr{1/3.8}))} gives

Re: [NTG-context] Numerical Calculations

2012-12-19 Thread Hans Hagen
On 12/19/2012 7:43 PM, Troy Henderson wrote: Do \luaexpr{1/3.8} and \ctxcommand{format(@0.3f,1/3.8)} return numbers or strings? That is, I would like to use these results in a \if or \ifnum command to exit a \doloop. they return tokens i.e. \ifnum\luaexpr{math.round(1/3.8)}1\relax should

Re: [NTG-context] Numerical Calculations

2012-12-19 Thread Hans Hagen
On 12/19/2012 8:19 PM, Roland Thiers wrote: Le 20 déc. 12 à 05:43, Troy Henderson a écrit : Do \luaexpr{1/3.8} and \ctxcommand{format(@0.3f,1/3.8)} return numbers or strings? That is, I would like to use these results in a \if or \ifnum command to exit a \doloop. Troy Bonjour, \ctxlua

Re: [NTG-context] Numerical Calculations

2012-12-19 Thread Philipp Gesang
···date: 2012-12-19, Wednesday···from: Troy Henderson··· Do \luaexpr{1/3.8} and \ctxcommand{format(@0.3f,1/3.8)} return numbers or strings? That is, I would like to use these results in a \if or \ifnum command to exit a \doloop. Fwiw there are Lua-side conditionals available as well: http

[NTG-context] Centered multiline chapter title

2012-12-18 Thread hanak
inserted text } to be read again \endgroup \\-\endgroup \par \doalignline {\hss }{\hss }\begingroup l.1 Second chapter title \\ which is very very very looong \ctxcommand ...\directlua

Re: [NTG-context] Centered multiline chapter title

2012-12-18 Thread Wolfgang Schuster
\\ which is very very very looong \ctxcommand ...\directlua \zerocount {commands.#1} \getheadtitle ...lecommand \relax \structuretitle \else \normalexpanded {\no... ... l.10 ...r title \\ which is very very very looong} If I

Re: [NTG-context] \cldcommand

2012-11-29 Thread Hans Hagen
{doif(true)}{t} % Gives nothing; why? B \stoptext Probably very basic question... What am I doing wrong? indeed as it's \ctxcommand the \cldcommand does a context.doif an that one takes three arguments so you've something to wikify: : \starttext A \ctxlua{commands.doif(true)}{one

Re: [NTG-context] \cldcommand

2012-11-29 Thread Procházka Lukáš Ing . - Pontex s . r . o .
On Thu, 29 Nov 2012 10:27:36 +0100, Hans Hagen pra...@wxs.nl wrote: On 11/29/2012 9:32 AM, Procházka Lukáš Ing. - Pontex s. r. o. wrote: indeed as it's \ctxcommand the \cldcommand does a context.doif an that one takes three arguments so you've something to wikify: : \starttext

Re: [NTG-context] ConTeXt: Page numbering in words for spanish

2012-11-22 Thread Sietse Brouwer
are you using? converters.verbose was put in on november 12. Are you using the latest beta, or the TeX Live 2012 stable version? As for the error you got: Try the new beta Hans just uploaded, Spanish conversions are working in that one. E.g. \ctxcommand{verbose(123, es)}. The bugs we discusses

Re: [NTG-context] ConTeXt: Page numbering in words for spanish

2012-11-21 Thread Sietse Brouwer
\crlf \ctxcommand{verbose(#1, spanish)}} \obeylines \vbes{} \vbes{2221101} \vbes{} \vbes{1218} \vbes{1234} \vbes{12345} \vbes{1234567890} \stopcode ___ If your question

Re: [NTG-context] ConTeXt: Page numbering in words for spanish

2012-11-21 Thread Acidrums4
field 'verbose' (a nil value) stack traceback: main ctx instance:1: in main chunk. system tex error on line 7 in file prueba2.tex: LuaTeX error ... 1 \starttext 2 \def\vbes#1% 3 {#1\crlf 4 \ctxcommand{verbose(#1, spanish)}} 5 6

Re: [NTG-context] Beginner question. Chapter heading in words

2012-11-12 Thread Sietse Brouwer
conversion. In core-con.mkiv, the `month` conversion calls `\monthlong`, which calls the Lua command.month. But that prints the number of the current month; \monthlong should call command.monthname, instead. % core-con.mkiv, line 204 -\def\monthlong #1{\ctxcommand{month(#1)}} +\def\monthlong #1

Re: [NTG-context] Highlight current chapter in list

2012-11-08 Thread Wolfgang Schuster
is to get a expandable version of the list entry because \currentlistentrytitle itself isn’t expandable and can’t be used in \doifelse. Instead of using \ctxcommand better ask Hans for a raw/expandable version of the tile/pagenumber commands. \setupheadertexts [\setups{headlist}] \startsetups

Re: [NTG-context] Highlight current chapter in list

2012-11-08 Thread Marco Patzer
} %\doifelse{\fetchmark[chapter][first]}{\ctxcommand{listtitle(\currentlist,\currentlistindex)}} {\color[red] {\currentlistentrytitle}} {\color[blue]{\currentlistentrytitle}} \stoplinealignment \par \stopsetups That's a neat and clean solution. Thanks Wolfgang. Marco

Re: [NTG-context] Highlight current chapter in list

2012-11-08 Thread Hans Hagen
][first]}{\currentlistentrytitle} %\doifelse{\fetchmark[chapter][first]}{\ctxcommand{listtitle(\currentlist,\currentlistindex)}} {\color[red] {\currentlistentrytitle}} {\color[blue]{\currentlistentrytitle}} \stoplinealignment \par \stopsetups That's a neat and clean solution

Re: [NTG-context] Highlight current chapter in list

2012-11-08 Thread Hans Hagen
[middle] \doifelse{\fetchmark[chapter][first]}{\currentlistentrytitle} %\doifelse{\fetchmark[chapter][first]}{\ctxcommand{listtitle(\currentlist,\currentlistindex)}} {\color[red] {\currentlistentrytitle}} {\color[blue]{\currentlistentrytitle}} \stoplinealignment \par

Re: [NTG-context] Creating a background texture with text/graphic

2012-10-29 Thread Marco Patzer
\externalfigure [dummy] \stopTEXpage \stopbuffer \ctxcommand{runbuffer(\jobname.tmp, image, true)} \starttext \startMPcode picture pic; pic = externalfigure \jobname-\jobname.tmp.pdf scaled 1cm; draw pic rotated 20; \stopMPcode \stoptext Marco

Re: [NTG-context] Creating a background texture with text/graphic

2012-10-29 Thread Wolfgang Schuster
here: \startbuffer [image] \useMPlibrary [dum] \startTEXpage \externalfigure [dummy] \stopTEXpage \stopbuffer \ctxcommand{runbuffer(\jobname.tmp, image, true)} \starttext \startMPcode picture pic; pic = externalfigure \jobname-\jobname.tmp.pdf scaled 1cm; draw pic rotated

Re: [NTG-context] using variable for subscript in math+lua

2012-10-25 Thread Philipp Gesang
{#first}\edef\x{#second}}% \fi \else \edef\x{#first}% \fi \ctxcommand{matrix_with_symbol(\!!bs\sym\!!es, \x, \y)}% \egroup% } \protect \starttext \startformula \printsymbolmatrix[3]%% symbol is “a”, matrix is square \stopformula \startformula \printsymbolmatrix[4][8

Re: [NTG-context] [test suite] two linenote related testfiles fail

2012-10-23 Thread Marco Pessotto
{\strc_define_commands_not... \define_notation ...\fi \the \everydefinenotation \let \currentnotation \sav... inserted text ...noteparent ][\c!type =\v!note ] \fi \ctxcommand

Re: [NTG-context] Strange bug with reversed itemize

2012-09-14 Thread Aditya Mahajan
}}% \edef\p_start{\counterparameter{#1}\c!start}% \ctxcommand{checkcountersetup(#1,\currentcounterlevel,\ifx\p_start\empty0\else\number\p_start\fi,\counterparameter{#1}\c!state)}% \fi} ConTeXt uses \p_start to store the current value of the start parameter. When you set now a value for start

Re: [NTG-context] Strange bug with reversed itemize

2012-09-13 Thread Wolfgang Schuster
{#1}\c!start}% \ctxcommand{checkcountersetup(#1,\currentcounterlevel,\ifx\p_start\empty0\else\number\p_start\fi,\counterparameter{#1}\c!state)}% \fi} ConTeXt uses \p_start to store the current value of the start parameter. When you set now a value for start in \setuppagenumber the value

Re: [NTG-context] Setting options for every n-th row in natural TABLEs

2012-09-02 Thread Aditya Mahajan
that odd and even are just dummy values. I can change them to anything, and can in fact even turn \v!oddeven to a switch statement that returns multiple values) \unprotect \def\redefineoddeven% HACK {\def\v!oddeven##1% Return odd if in set 1-3, 7-9, etc. and even otherwise {\ctxcommand

Re: [NTG-context] built-in units command (mkiv) fails

2012-08-26 Thread Wolfgang Schuster
(setupsuffixtext,suffixes)% %} \ctxcommand{definelabels(prefix, prefixes )} \ctxcommand{definelabels(unit,units)} \ctxcommand{definelabels(operator,operators)} \ctxcommand{definelabels(suffix, suffixes )} Wolfgang

[NTG-context] Ctx ... Lua

2012-08-22 Thread Procházka Lukáš
Hello, sometimes in this mail discussion I'm encountering a Ctx/Lua command which has been unknown for me or I would use other (known) commands to do the job. So - would it be possible to explain - what's the difference/advantage btw \directlua and \ctxlua - what \ctxcommand{} does - what

Re: [NTG-context] Ctx ... Lua

2012-08-22 Thread Wolfgang Schuster
/advantage btw \directlua and \ctxlua No difference, just another name, there are even more synonyms. - what \ctxcommand{} does \ctxcommand{...} == \ctxlua{commands} - what \cldcontext{} does? \cldcontext{...} == \ctxlua{context(...)} There is also \cldcommand{...} which is a short form

Re: [NTG-context] test for (negative) number

2012-08-21 Thread Wolfgang Schuster
sorts of things that are tricky in TeX: \ctxlua{ commands.doifelse( string.len( -45 ) 5 ) }{long}{short} Cheers, Sietse ... Has been wikified - http://wiki.contextgarden.net/Command/doif…; For functions in the commands namespace you can write e.g. \ctxcommand{doifelse(…)}{…}{…} instead

Re: [NTG-context] test for (negative) number

2012-08-21 Thread Peter Rolf
) }{long}{short} Cheers, Sietse ... Has been wikified - http://wiki.contextgarden.net/Command/doif…; For functions in the commands namespace you can write e.g. \ctxcommand{doifelse(…)}{…}{…} instead of \ctxlua{commands.doifelse(…)}{…}{…}. Wolfgang

Re: [NTG-context] test for (negative) number

2012-08-21 Thread Procházka Lukáš
... I also found another solution reposter before: \ctxlua{commands.testcase(condition)} { If true...} {If false} Note that both blocks (if-true and if-false) are mandatory. Considering Wolfgang's last answer, it would be better to write: \ctxcommand{testcase(condition

[NTG-context] hidden attachments broken

2012-08-17 Thread Michail Vidiassov
{scrn_attachment_method_\v!hidden}% {\ctxcommand{insertattachment{ tag= \currentattachment, registered = \currentattachmentregistered, method = \v!hidden }}} While such anonymizing mode may be required for some security-obsessed people, who do not want filenames leak into shipped out

Re: [NTG-context] Draft version of document

2012-08-07 Thread Hans Hagen
need a raw untagged and expandable fetch: \def\rawstructurelistuservariable#name% {\ctxcommand{listuserdata(\currentlist,\currentlistindex,#name)}} \protect % so, after some 5 lines patching we can do: \starttext \startplacefigure[reference=fig:mill,title={A Mill}][resource=mill

[NTG-context] Bug with setupinteraction and footnote

2012-08-05 Thread Otared Kavian
: in function 'notedeltapage' main ctx instance:1: in main chunk. and finishes with: \ctxcommand ...\directlua \zerocount {commands.#1} \strc_notes_set_style_color_special ...tenumber

[NTG-context] Strange bug with \ in footnotes

2012-08-05 Thread Aditya Mahajan
l.1 Prof.\ ABC \ctxcommand ...\directlua \zerocount {commands.#1} \handlenoteitself ...text \strc_notes_inject_text \endstrut \strc_constructi... \handlenoteinsert ... {\handlenoteitself {#1}{#2

Re: [NTG-context] Bug in \startitemize[randomize]

2012-08-05 Thread Hans Hagen
vic} \stopitem \startitem Baz Pvt Ltd {\sc abc} \stopitem \stopinstitm \stopTEXpage \stoptext an \if going wild du eto a lack of \relax'ing \unexpanded\def\getrandomcount #1#2#3% {#1=\ctxcommand{getrandomcounta(\number#2,\number#3)}\relax

[NTG-context] Luatex error in latest beta (standalone)

2012-08-03 Thread Alan Bowen
' main ctx instance:1: in main chunk. system tex error on line 24 in file c_2012-01_Johnson.tex: LuaTeX error … ctxcommand ...\directlua \zerocount {commands.#1} \strc_notes_set_style_color_special ...tenumber )} \relax

Re: [NTG-context] Luatex error in latest beta (standalone)

2012-08-03 Thread Keith J. Schultz
traceback: ...TeXt/tex/texmf-context/tex/context/base/strc-not.lua:351: in function 'notedeltapage' main ctx instance:1: in main chunk. system tex error on line 24 in file c_2012-01_Johnson.tex: LuaTeX error … ctxcommand ...\directlua \zerocount {commands.#1

Re: [NTG-context] Luatex error in latest beta (standalone)

2012-08-03 Thread Alan Bowen
(tag,n)) end function commands.notedeltapage (tag,n) context(getdeltapage (tag,n)) end In strc-not.mkiv, the lines are: \def\strc_notes_set_style_color_special {\iftrialtypesetting % keep \else\ifx\currentcolorparameter\empty \scratchcounter\ctxcommand{notedeltapage(\currentnote

Re: [NTG-context] Luatex error in latest beta (standalone)

2012-08-03 Thread Sietse Brouwer
{\iftrialtypesetting % keep \else\ifx\currentcolorparameter\empty \scratchcounter\ctxcommand{notedeltapage(\currentnote,\currentnotenumber)}\relax % todo calculate once \setlocationcolorspecified\scratchcounter \fi\fi} \unexpanded\def\strc_notes_inject_pointer % todo

Re: [NTG-context] Luatex error in latest beta (standalone)

2012-08-03 Thread Alan Bowen
{\iftrialtypesetting % keep \else\ifx\currentcolorparameter\empty \scratchcounter\ctxcommand{notedeltapage(\currentnote,\currentnotenumber)}\relax % todo calculate once \setlocationcolorspecified\scratchcounter \fi\fi} \unexpanded\def

  1   2   >