[NTG-context] Is the Society of Biblical Literature (SBL) style files for ConTeXt incompatible with \setupinteraction[state=start]?

2023-01-15 Thread Joel via ntg-context
ngroup \letbtxparameter {punct}\empty \def \currentbtxcitealternative {inline}\def \currentbtxcategory {\btxfield {category}}\def \currentbtxloctext     {\btxparameter {loctex \normalexpanded     \Word {\fastsetup {btx:sbl:cite:inline}     }\doif {\btxparameter {righttext}}{\empty } {\btx

Re: [NTG-context] \jobname and \doifelse

2022-11-06 Thread Pablo Rodriguez via ntg-context
the source file. >> >> The TeX conditional used to work before. >> > Are you sure the check worked in the past? Many thanks for your reply, Wolfgang. I thought this used to work before. Now I realize I have to check the use of \doif{\jobname} and \doifelse{\jobname} in

Re: [NTG-context] error with sbl bibliography on latest LMTX

2022-07-09 Thread Joey McCollum via ntg-context
t}} \startfootnote \Word{\fastsetup{btx:sbl:cite:inline}}% capitalize the first word in the footnote (needed to render "Ibid." and "Idem" correctly) % Add a closing period if there is no righttext \doif{\btxparameter{righttext}}{\empty} { \btxperiod } \stopfo

[NTG-context] error with sbl bibliography on latest LMTX

2022-07-08 Thread Henning Hraban Ramm via ntg-context
\btxparameter {loctex \normalexpanded \Word {\fastsetup {btx:sbl:cite:inline} }\doif {\btxparameter {righttext}}{\empty } {\btxperiod } \strc_constructions_register_yes ...constructionparameter \c!referencetext }\iflocation \ifempty \currentconstructionbookmark \begingroup \simplifycommands \

Re: [NTG-context] XML Namespaces and XML Setups

2022-05-24 Thread Bruce Horrocks via ntg-context
t; > > > On Mon, 16 Nov 2020 at 13:37, Christoph Reller > > wrote: > > Dear List, > > > > Consider the following MWE: > > > > \startxmlsetups xml:demo:base > > \xmlsetsetup{#1}{tag}{xml:demo:tag} > > \stopxmlsetups > > \xmlregist

Re: [NTG-context] XML Namespaces and XML Setups

2022-05-24 Thread Duncan Hothersall via ntg-context
ncan > > > > On Mon, 16 Nov 2020 at 13:37, Christoph Reller < > christoph.rel...@gmail.com> wrote: > > Dear List, > > > > Consider the following MWE: > > > > \startxmlsetups xml:demo:base > > \xmlsetsetup{#1}{tag}{xml:demo:tag} > > \stopxmlset

Re: [NTG-context] XML Namespaces and XML Setups

2022-05-23 Thread Bruce Horrocks via ntg-context
wrote: > 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}{Na

Re: [NTG-context] XML Namespaces and XML Setups

2022-05-23 Thread Duncan Hothersall via ntg-context
, Christoph Reller wrote: > 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}}

Re: [NTG-context] Simple question

2022-05-10 Thread Henning Hraban Ramm via ntg-context
is set as a system mode (*en, *nl), and of course you can query modes with one of the many \doif macros. (https://wiki.contextgarden.net/Modes) Since it doesn’t make sense to try \externalfigure[path/\currentmode/cow] (you never know how many modes are active), you can set a macro or vari

Re: [NTG-context] XML processing instructions

2022-05-03 Thread Duncan Hothersall via ntg-context
t; >> >> Or, for your line break example : >> >> >> >> >> >> >> >> \startsetups xml:directive:injector:newline >> >> \crlf >> >> \stopsetups >> >> >> >> Also, I have learned that you can ju

Re: [NTG-context] XML processing instructions

2022-05-02 Thread Duncan Hothersall via ntg-context
startsetups xml:directive:injector:newline > > \crlf > > \stopsetups > > > > Also, I have learned that you can just use arbitrary context code in xml: > > > > \def\xmltexdirective#1#2{\doif{#1}{command}{#2}} > > > > \xmlinstalldirective{tex}{xmltexdirec

Re: [NTG-context] XML processing instructions

2022-05-02 Thread Denis Maier via ntg-context
learned that you can just use arbitrary context code in xml: \def\xmltexdirective#1#2{\doif{#1}{command}{#2}} \xmlinstalldirective{tex}{xmltexdirective} Best, Denis Von: Maier, Denis Christian (UB) Gesendet: Montag, 2. Mai 2022 09:45 An: 'mailing list for ConTeXt users

Re: [NTG-context] Why are endnotes not working with ConTeXt-SBL?

2021-12-26 Thread Joey McCollum via ntg-context
quot;Ibid." and "Idem" correctly) > % Add a closing period if there is no righttext > \doif{\btxparameter{righttext}}{\empty} { > \btxperiod > } > \stopfootnote > \endgroup > > \doifnotinstring{\btxparameter{punct}}{\btxparameter{aut

Re: [NTG-context] Why are endnotes not working with ConTeXt-SBL?

2021-12-25 Thread Joey McCollum via ntg-context
Add a closing period if there is no righttext \doif{\btxparameter{righttext}}{\empty} { \btxperiod } \stopfootnote \endgroup \doifnotinstring{\btxparameter{punct}}{\btxparameter{autopunctuation}}{\btxparameter{punct}} \stopsetups ``` This should allow your script to compile, but unfortunat

Re: [NTG-context] Test for displaying a header

2021-08-28 Thread Wolfgang Schuster via ntg-context
(but not on the following pages) you have to options.     1. Check the current page when to header is placed which can be done with \doif{\pagenumber}{1}{...}     2. Disable the header on the first page (\setupheader[state=high]) and place your own title as a regular element in the running text. A case where

Re: [NTG-context] columnsets messed up

2021-07-04 Thread Henning Hraban Ramm
https://sedna.fiee.net/f/24d54a952b0243a98775/?dl=1 > > What could case that? Even curioser: If there isn’t a \page after \stopcolumnset, the second-to-last section (subject) disappears and the last one is typeset completely. (Later:) Ok, found it: \def\stopArticle{% \par\signArticle

Re: [NTG-context] Rolling out a pandoc-context publication workflow in an organization

2021-07-02 Thread Hans Hagen
positories alongside (totaling to the amoutn we now have in the zips). We then have doif-it-yourself-zips, the garden installer, the lmtx self updater and install-from-github as alternatives. I have a sort of proof of concept for it. We looked into the binary bit and things have changed a bit ove

Re: [NTG-context] arbitrary context commands in xml file

2021-03-08 Thread denis.maier
one of the things that can already be done ... \def\xmltexdirective#1#2{\doif{#1}{command}{#2}} \xmlinstalldirective{tex}{xmltexdirective} (the #2 is something without spaces btu one can work around that) A

Re: [NTG-context] arbitrary context commands in xml file

2021-03-08 Thread Duncan Hothersall
boon to be able to drop in in an XML source. > one of the things that can already be done ... > > \def\xmltexdirective#1#2{\doif{#1}{command}{#2}} > > \xmlinstalldirective{tex}{xmltexdirective} > > > > > (the #2 is something without space

Re: [NTG-context] arbitrary context commands in xml file

2021-03-08 Thread Hans Hagen
which can cause big problems if one is working to a fixed schema. It would be a boon to be able to drop in in an XML source. one of the things that can already be done ... \def\xmltexdirective#1#2{\doif{#1}{command}{#2}} \xmlinstalldirect

Re: [NTG-context] verify if you are already postponing notes

2021-02-15 Thread Hans Hagen
} \dofipostponingnotes{\flushnotes} Is there a way to define those \doif... macros? mkiv: \ifconditional\postponingnotes \else \fi - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH

[NTG-context] verify if you are already postponing notes

2021-02-15 Thread mf
} Is there a way to define those \doif... macros? Massi ___ 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

[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] need help comparing strings

2020-10-13 Thread Aditya Mahajan
t; 1. I don’t know how to get \numbersfname equal to "123". I don’t know > what I’m doing wrong. > > 2. Is there no Lua version of \getvariable{...}{...}? > > 3. I’m trying this on a Linux box, but on Windows I would say that Lua > variable "d" is empty. >

[NTG-context] need help comparing strings

2020-10-13 Thread Pablo Rodriguez
ox, but on Windows I would say that Lua variable "d" is empty. I need to get the number from \env{fname} and I don’t know what I’m missing. \doif is the way to test whether it’s right. Could anyone explain me what I’m missing here? Many thanks, Pablo -- http://www.ousia.tk ___

Re: [NTG-context] problem since previous versions

2020-06-07 Thread Hans van der Meer
us versions, where code without a >> problem now raises an error. >> This is the afflicted code: >> % Assign values to \locationbox. >> \doif{top}{\placexlocation}% >> {\def\startlocationbox{\vtop\bgroup\vss}}% >> \doif{center}{\placexlocation}% >&g

Re: [NTG-context] problem since previous versions

2020-06-07 Thread Wolfgang Schuster
Hans van der Meer schrieb am 07.06.2020 um 12:07: A problem has arisen up since previous versions, where code without a problem now raises an error. This is the afflicted code: % Assign values to \locationbox. \doif{top}{\placexlocation}% {\def\startlocationbox{\vtop\bgroup\vss}}% \doif{center

[NTG-context] problem since previous versions

2020-06-07 Thread Hans van der Meer
A problem has arisen up since previous versions, where code without a problem now raises an error. This is the afflicted code: % Assign values to \locationbox. \doif{top}{\placexlocation}% {\def\startlocationbox{\vtop\bgroup\vss}}% \doif{center

[NTG-context] mtxrun exit code

2020-05-29 Thread Hans van der Meer
or failure, pass that on to mtxrun as exit statusd and test that in the script. For example: \starttext \xmlprocessbuffer{notes}{notes}{} \doif{\ExitStatus}{notok}{"let mtxrun return value 1 as error in UNIX"} \stoptext After that it would be possible in the shell script to dele

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

2020-04-20 Thread Wolfgang Schuster
\xmlregistersetup{xml:initialize} \startxmlsetups xml:doc \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:section \startsection[title={\xmlatt{#1}{id}}, beforesection={\doif{\xmlatt{#1}{id}}{\selectedtopic} {conditional}}] \xmlflush{#1} \doif

[NTG-context] conditional not working in \setuphead

2020-04-20 Thread Pablo Rodriguez
\xmlflush{#1} \stopxmlsetups \startxmlsetups xml:section \startsection[title={\xmlatt{#1}{id}}, beforesection={\doif{\xmlatt{#1}{id}}{\selectedtopic} {conditional}}] \xmlflush{#1} \doif{\xmlatt{#1}{id}}{\selectedtopic}{conditional} \stopsection

Re: [NTG-context] fancy chapter setup

2020-01-11 Thread Rik Kabel
nyms[dictionary] \setupsynonyms[dictionary][alternative=first] \doifsomething{\structureuservariable{setFirst}} {\setfirstline[\structureuservariable{setFirst}]} \doif{\structureuservariable{Lettrine}} {yes}{\setinitial}}, ] \setup

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

2019-12-12 Thread mf
stlinewidth-\PIT!distance\relax \PIT!margin \dimexpr\hsize-\PIT!margin\relax \doif{\PIT!test}{on}{\red} \else \page[no] \parshape 1 \PIT!margin \dimexpr\hsize-\PIT!margin\relax \doif{\PIT!test}{on}{\darkgreen} \fi #3\par \stopalignment} \protect \setupalign[stretch] \starttext \def\Text{

Re: [NTG-context] expansion problem: random location

2019-09-13 Thread Wolfgang Schuster
', 'left', 'right', } function RandomLocation() context(locations[math.random(1,#locations)]) end \stopluacode \newdimen\PicWidth \PicWidth=\textwidth \define[1]\Blindbild{ \getrandomnumber\imgH{1}{9} \PicWidth=\textwidth \doif{#1}{left}{\PicWidth=.4\textwidth} \doif{#1}{right}{\PicWidth

[NTG-context] expansion problem: random location

2019-09-13 Thread Henning Hraban Ramm
() context(locations[math.random(1,#locations)]) end \stopluacode \newdimen\PicWidth \PicWidth=\textwidth \define[1]\Blindbild{ \getrandomnumber\imgH{1}{9} \PicWidth=\textwidth \doif{#1}{left}{\PicWidth=.4\textwidth} \doif{#1}{right}{\PicWidth=.4\textwidth} \startplacefigure[location={#1},title={#1

[NTG-context] Using \currentreferencenumber triggers “has a hidden number” in log file

2019-07-18 Thread Marco Patzer
file. But that command takes care not to output the contents of that variable. But merely using it in an \doif\currentreferencenumber is sufficient to trigger the log message. Example: \enabletrackers [structures.referencing.empty] \def\foo[#1]{%% \doifreferencefoundelse{#1}{%% \doifelse

[NTG-context] registers: setting pageleft parameter by index term

2019-04-29 Thread mf
Hello list, please consider this MWE: \definenumber[p] \setnumber[p][1] \def\PageLeft{ p.~} \def\TextCommand#1{\getnumber[p] #1\doif{\rawcountervalue[p]}{2}{\def\PageLeft{ P.~}}\incrementnumber[p]} \setupindex[n=1,pageleft=\PageLeft,pageright=,textcommand=\TextCommand] \starttext Foo\index{foo

[NTG-context] util-sha.lua misbehaving?

2019-02-28 Thread Pablo Rodriguez
sha512("#1")}} \doif{\luaversion}{5.3}{\ctxlua{require("util-sha")}} \def\hashfive#1{% \ctxlua{context( utilities.sha2.hash512("#1"):sub(0,8))}} \def\hashfivefile#1{% \ctxlua{context( utilities.sha2.hash512(io.lo

Re: [NTG-context] linking to an external PDF file

2018-10-08 Thread Pablo Rodriguez
ink}} > > % File suffix should be one of the list. > \doifelse{\FileSuffixList{\xmlatt{#1}{link}} > {pdf,jpg,jpeg,html,png,tif,tiff}}{\empty} > {\def\suffix{.impossible}}% no suffix from the list here > {\def\suffix{\empty}}% one of the list is present > > % First try link

Re: [NTG-context] linking to an external PDF file

2018-10-08 Thread Hans van der Meer
{\def\suffix{\empty}}% one of the list is present % First try link as given, beware of unreachable site. \ifURItimeout % For previously timeout on this site. \else \edef\returncode{\URIReturnCode{\theurl}} \doif{\retur

Re: [NTG-context] conditional format in xtables

2018-04-11 Thread Pablo Rodriguez
On 04/10/2018 11:07 PM, Wolfgang Schuster wrote: > The normal \doif... commands don’t work because they aren’t expandable > but you can use the \expdoif... commands (look into setup-en.pdf for all > of them). Many thanks for your reply, Wolfgang. TeX conditionals are fine for me a

Re: [NTG-context] conditional format in xtables

2018-04-10 Thread Wolfgang Schuster
The normal \doif... commands don’t work because they aren’t expandable but you can use the \expdoif... commands (look into setup-en.pdf for all of them). Wolfgang Pablo Rodriguez <mailto:oi...@gmx.es> 10. April 2018 um 19:18 Dear list, thanks to Wolfgang, I learnt to set conditional

Re: [NTG-context] Compare contents of macros via \doif etc. alternatives

2017-07-23 Thread Hans Hagen
On 7/23/2017 8:46 AM, Henri Menke wrote: On 07/23/2017 05:55 PM, Jaroslav Hajtmar wrote: Thanx Hans for reply. also, it depends on what you want to achieve ... maybe comparing macros is not needed at all You have right, that anytime compares are not needed, but for my very needed

Re: [NTG-context] Compare contents of macros via \doif etc. alternatives

2017-07-23 Thread Henri Menke
re any way to evaluate of contents of two macros as I am showing in >>>> my minimal example? >>>> I know, that problem is in expansion, but I dont know to resolve it. >>>> My minimal example consist of piece lua code, because I am solving my >>>>

Re: [NTG-context] Compare contents of macros via \doif etc. alternatives

2017-07-22 Thread Jaroslav Hajtmar
ines a new macro using \protected\def. To compare as equal in a \doif context, both operands have to _expand_ to the same thing (here 123). Here \mymacro is not expandable and thus only \doifelse{\mymacro}{\mymacro} will ever compare true. Furthermore, scanning for optional arguments (i.e. [...

[NTG-context] Compare contents of macros via \doif etc. alternatives

2017-07-22 Thread Jaroslav Hajtmar
Hello ConTeXist. Is there any way to evaluate of contents of two macros as I am showing in my minimal example? I know, that problem is in expansion, but I dont know to resolve it. My minimal example consist of piece lua code, because I am solving my problem in mixed codes (TeX & Lua)

Re: [NTG-context] Compare contents of macros via \doif etc. alternatives

2017-07-22 Thread Hans Hagen
consist of piece lua code, because I am solving my problem in mixed codes (TeX & Lua) Something similar has been asked before and it is not possible. The interfaces.definecommand function defines a new macro using \protected\def. To compare as equal in a \doif context, both operands

Re: [NTG-context] Compare contents of macros via \doif etc. alternatives

2017-07-21 Thread Jaroslav Hajtmar
acro using \protected\def. To compare as equal in a \doif context, both operands have to _expand_ to the same thing (here 123). Here \mymacro is not expandable and thus only \doifelse{\mymacro}{\mymacro} will ever compare true. Furthermore, scanning for optional arguments (i.e.

Re: [NTG-context] Compare contents of macros via \doif etc. alternatives

2017-07-21 Thread Henri
piece lua code, because I am solving my problem > in mixed codes (TeX > & Lua) Something similar has been asked before and it is not possible.  The  interfaces.definecommand function defines a new macro using \protected\def.  To compare as equal in a \doif context, both operands have to _

[NTG-context] Compare contents of macros via \doif etc. alternatives

2017-07-21 Thread Jaroslav Hajtmar
Hello ConTeXist. Is there any way to evaluate of contents of two macros as I am showing in my minimal example? I know, that problem is in expansion, but I dont know to resolve it. My minimal example consist of piece lua code, because I am solving my problem in mixed codes (TeX & Lua) Thanx for

Re: [NTG-context] Nested modes and itemizations

2016-11-17 Thread Christoph Reller
number, treated as zero. > > However, If I use the inline version \doifmode instead of the > > environment version \startmode \stopmode, then the example compiles > > without problem. > > > > I am afraid but this may be a bug. > > No, just the way tex parses

Re: [NTG-context] Nested modes and itemizations

2016-11-17 Thread Hans Hagen
owever, If I use the inline version \doifmode instead of the environment version \startmode \stopmode, then the example compiles without problem. I am afraid but this may be a bug. No, just the way tex parses, \stopmode is a delimiter so the inner \stopmode ends the outer \startmode. Usi

Re: [NTG-context] use of preceding-sibling in xmlsetsetup

2015-10-20 Thread massifr
}{p[reverse-sibling::p[1]/attribute('class') == 'incipit']}{xml:p:noindent} \stopxmlsetups \xmlregistersetup{xml:somesetups} \startxmlsetups xml:text \indenting[{yes,first,12pt}] \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:p \doif{\xmlattribute{#1}{reverse-sibling::p[1]}{class

Re: [NTG-context] use of preceding-sibling in xmlsetsetup

2015-10-20 Thread Hans Hagen
::p[position()==1 and @class=='incipit']/following-sibling::p[1]}{xml:p:noindent} \xmlregistersetup{xml:somesetups} \startxmlsetups xml:text \indenting[{yes,first,12pt}] \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:p \doif{\xmlattribute{#1}{reverse-sibling::p[1]}{class}}{incipit

Re: [NTG-context] use of preceding-sibling in xmlsetsetup

2015-10-19 Thread Thomas A. Schmitz
On 10/17/2015 11:19 AM, mf wrote: "reverse-sibling" is ConTeXt specific and very useful: it's a "reversed preceding-sibling", so that you find the nearest sibling at index [1]. I've used it successfully in a \doif statement, but I failed in translating it in a \xmlsetsetu

Re: [NTG-context] ntg-context Digest, Vol 136, Issue 30

2015-10-19 Thread massifr
}{p[reverse-sibling::p[1]/attribute('class') == 'incipit']}{xml:p:noindent} \stopxmlsetups \xmlregistersetup{xml:somesetups} \startxmlsetups xml:text \indenting[{yes,first,12pt}] \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:p \doif{\xmlattribute{#1}{reverse-sibling::p[1]}{class

Re: [NTG-context] use of preceding-sibling in xmlsetsetup

2015-10-17 Thread mf
list archive, you find a pair of threads. I've found no other documentation. "reverse-sibling" is ConTeXt specific and very useful: it's a "reversed preceding-sibling", so that you find the nearest sibling at index [1]. I've used it successfully in a \doif statement, but I fa

Re: [NTG-context] use of preceding-sibling in xmlsetsetup

2015-10-15 Thread Thomas A. Schmitz
On 10/14/2015 01:34 PM, mass...@fastwebnet.it wrote: I've found a better solution: \startxmlsetups xml:p \doif{\xmlattribute{#1}{reverse-sibling::p[1]}{class}}{incipit}{\noindent}% \xmlflush{#1}\par \stopxmlsetups Still I did not manage to put that rule in a xmlsetsetup. Tried

Re: [NTG-context] use of preceding-sibling in xmlsetsetup

2015-10-14 Thread massifr
I've found a better solution: \startxmlsetups xml:p \doif{\xmlattribute{#1}{reverse-sibling::p[1]}{class}}{incipit}{\noindent}% \xmlflush{#1}\par \stopxmlsetups Still I did not manage to put that rule in a xmlsetsetup. Tried this: \xmlsetsetup{#1}{p[reverse-sibling::p[1]/attribute('class

Re: [NTG-context] \reference and \setupinteraction[focus=...] not working

2015-10-08 Thread Christoph Reller
-Type: text/plain; charset="utf-8"; Format="flowed" > > > Pablo Rodriguez <mailto:oi...@gmx.es> > > 17. September 2015 18:47 > > Dear list, > > > > I have the following sample: > > > > \startluacode > > function document.go

[NTG-context] comparing strings

2015-09-17 Thread Pablo Rodriguez
Dear list, I have the following sample: \startluacode function document.gouppercase(str) tex.print(str:upper()) end \stopluacode \unexpanded\def\MyUpper#1% {\ctxlua{document.gouppercase("#1")}} \starttext \doif{\MyUpper{adfalkjfaeñf}}{\MyUpper{aDFAlkjfaeñf}}{equal}{unequal

Re: [NTG-context] comparing strings

2015-09-17 Thread Pablo Rodriguez
On 09/17/2015 07:26 PM, Wolfgang Schuster wrote: >> Pablo Rodriguez 17. September 2015 18:47 >> [...] >> \unexpanded\def\MyUpper#1% >> {\ctxlua{document.gouppercase("#1")}} >> >> \starttext >> \doif{\MyUpper{adfalkjfaeñf}}{\MyUpper{aDFAlkjfae

Re: [NTG-context] comparing strings

2015-09-17 Thread Wolfgang Schuster
Pablo Rodriguez <mailto:oi...@gmx.es> 17. September 2015 18:47 Dear list, I have the following sample: \startluacode function document.gouppercase(str) tex.print(str:upper()) end \stopluacode \unexpanded\def\MyUpper#1% {\ctxlua{document.gouppercase("#1")}} \starttex

Re: [NTG-context] Documentation: full list of commands

2015-08-09 Thread Hans Hagen
: you can find a list of them in mult-low.lua (i sometimes add to them) - specific low level : like the one you mention, these are normally quite stable (read: you can use them as they will stay around), there are quite some \doif* ones (no list, one needs to look into the source code re

Re: [NTG-context] newotf definefontfeatures problem with script=hebr

2015-07-12 Thread Hans Hagen
\pack_framed_do_bottom ...amedparameter \c!bottom \raggedbottomcommand to be read again \localendstrut \pack_framed_do_bottom \egroup \stopfittingpage -\removeunwantedspaces \egroup \egroup \doif

[NTG-context] newotf definefontfeatures problem with script=hebr

2015-07-12 Thread Rik Kabel
\raggedbottomcommand to be read again \localendstrut \pack_framed_do_bottom \egroup \stopfittingpage -\removeunwantedspaces \egroup \egroup \doif {\fittingpage... l.13 \stopTEXpage The same problem occurs

Re: [NTG-context] embeddedxtable

2015-05-24 Thread Meer, H. van der
|restore|include |table|tr|td|tbody }{xmlcommon:*} \stopxmlsetups \xmlregistersetup{xmlcommon} % Place at top/middle(default)/bottom location. \def\startlocationbox#1{% \let\templocation\relax \doif{\xmlatt{#1}{location}}{top}{\def\templocation{\vtop}}% \doif{\xmlatt{#1}{location}}{middle}{\def

[NTG-context] Strange bug with overviewpage module.

2014-12-19 Thread Aditya Mahajan
}% \else \page_shipouts_normal{#1}% \fi} \appendtoks \doif {\headparameter{option:overviewpage}} \v!yes \enablesaveoverviewpage \to \everyheadsynchronization \installshipoutmethod{overviewpage}\overviewpage_save_page \unexpanded\def\overviewpage_setup_head#1% {\setuphead[#1

Re: [NTG-context] problem with \processaction

2014-12-17 Thread Pablo Rodriguez
On 12/17/2014 01:18 AM, Hans Hagen wrote: On 12/16/2014 10:24 PM, Pablo Rodriguez wrote: [...] Is there no other way to get the text value (so that it could be compared with \doif) from a command that assigns values using \processaction? \setvalue{SomeName:foo}{one} \setvalue{SomeName:bar

Re: [NTG-context] problem with \processaction

2014-12-16 Thread Pablo Rodriguez
command Many thanks for your reply, Hans. Is there no other way to get the text value (so that it could be compared with \doif) from a command that assigns values using \processaction? Many thanks for your help, Pablo -- http://www.ousia.tk

Re: [NTG-context] problem with \processaction

2014-12-16 Thread Hans Hagen
there? because \processaction is not a fully expandable command Many thanks for your reply, Hans. Is there no other way to get the text value (so that it could be compared with \doif) from a command that assigns values using \processaction? \setvalue{SomeName:foo}{one} \setvalue{SomeName:bar}{two

Re: [NTG-context] ConTeXt gobble my mind

2014-11-09 Thread Pierre-François Bonnefoi
{\checkSlide\doif{\getvariable{temp}{publish}}{yes}{\page\getbuffer[Slide]}}% \dostartbuffer[Slide][startSlide][stopSlide]} Let me know if it's my philosopher's stone... I've tried it and it works so far. No more ugly gobbling, my mind is free. Below are two other methods. Method 1

Re: [NTG-context] ConTeXt gobble my mind

2014-11-09 Thread Hans Hagen
\stopSlide{\checkSlide\doif{\getvariable{temp}{publish}}{yes}{\page\getbuffer[Slide]}}% \dostartbuffer[Slide][startSlide][stopSlide]} Let me know if it's my philosopher's stone... I've tried it and it works so far. No more ugly gobbling, my mind is free. Below are two other methods. Method 1

Re: [NTG-context] ConTeXt gobble my mind

2014-11-08 Thread Wolfgang Schuster
Am 08.11.2014 um 00:00 schrieb Pierre-François Bonnefoi bonne...@unilim.fr: Just before going to bed, I've found a solution with all your help and the help of Taco Hoekwater through the ntg mail archive : \def\startSlide% {\def\stopSlide{\checkSlide\doif{\getvariable{temp}{publish}}{yes

Re: [NTG-context] ConTeXt gobble my mind

2014-11-07 Thread Pierre-François Bonnefoi
Just before going to bed, I've found a solution with all your help and the help of Taco Hoekwater through the ntg mail archive : \def\startSlide% {\def\stopSlide{\checkSlide\doif{\getvariable{temp}{publish}}{yes}{\page\getbuffer[Slide]}}% \dostartbuffer[Slide][startSlide][stopSlide]} Let me

[NTG-context] problem with buffer

2014-09-15 Thread Kenny
\writestatus{DEBUG}{--dostartsolution...finished} } \def\stopsolution{ \stopSOLUTION \writestatus{DEBUG}{--dostopsolution...1} \doif{\examshowsolutions}{no}{\godown[\solutionheight]} \writestatus{DEBUG}{--dostopsolution...finished} } \starttext \def\examshowsolutions{no} % control whether

[NTG-context] codefolding with Kate or Kwrite

2013-04-28 Thread Jan Heinen
Hello, is someone else using the editors kate and kwrite? Code-highlighting is working. What I need ist code-folding for ConTeXt. Is this possible? I have huge makros with lots of \doif ... \else ... \fi and it is hard to surf through the code. What else would be nice: auto-indentation

[NTG-context] Fwd: Heading in setuplayout from a variable

2013-04-26 Thread Cecil Westerhof
} { ... } { ... } Thanks. That works. In my case I use a \doif. Is there also something like a switch statement? If not I could use a nested \doifelse. -- Cecil Westerhof -- Cecil Westerhof ___ If your question is of interest to others

[NTG-context] buffer identity?

2013-02-14 Thread Meer, H. van der
When one has \startbuffer … \stopbuffer or \startbuffer[abc] … \stopbuffer Is it possible to find in a redefined \stopbuffer the identity of the buffer in question? For example to do \def\stopbuffer{\doif{BUFFERIDENTITY}{abc} …} Hans van der Meer

Re: [NTG-context] buffer identity?

2013-02-14 Thread Wolfgang Schuster
Am 14.02.2013 um 18:26 schrieb Meer, H. van der h.vanderm...@uva.nl: When one has \startbuffer … \stopbuffer or \startbuffer[abc] … \stopbuffer Is it possible to find in a redefined \stopbuffer the identity of the buffer in question? For example to do \def\stopbuffer{\doif

[NTG-context] \cldcommand

2012-11-29 Thread Procházka Lukáš Ing . - Pontex s . r . o .
Hello, the following shortening \ctxlua{commands.doif to \cldcommand{doif doesn't work as I'd expect, although it should be equal: \starttext A \ctxlua{commands.doif(true)}{T} % Gives T - that's OK \cldcommand{doif(true)}{t} % Gives nothing; why? B \stoptext Probably very

Re: [NTG-context] \cldcommand

2012-11-29 Thread Hans Hagen
On 11/29/2012 9:32 AM, Procházka Lukáš Ing. - Pontex s. r. o. wrote: Hello, the following shortening \ctxlua{commands.doif to \cldcommand{doif doesn't work as I'd expect, although it should be equal: \starttext A \ctxlua{commands.doif(true)}{T} % Gives T - that's OK \cldcommand

Re: [NTG-context] \cldcommand

2012-11-29 Thread Procházka Lukáš Ing . - Pontex s . r . o .
A \ctxlua{commands.doif(true)}{one} B \cldcommand{doif(a,a,two)} C \ctxcommand{doif(true)}{three} D \stoptext Thanks for explanation - added to http://wiki.contextgarden.net/Command/ctxcommand Best regards, Lukas -- Ing. Lukáš Procházka [mailto:l...@pontex.cz] Pontex s. r. o

Re: [NTG-context] New module: pararef

2012-10-13 Thread Wolfgang Schuster
\edef\m_reference{#1}% \fi \usereferencecommandstyleandcolor\c!style\c!color \getreference[title][\m_reference]% \doif{\referencecommandparameter\c!label}\v!yes{\referencetext\v!page}% \referencecommandparameter\c!left \getreference [page][\m_reference

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

2012-08-21 Thread Procházka Lukáš
( -45 ) 5 ) }{long}{short} Cheers, Sietse ... Has been wikified - http://wiki.contextgarden.net/Command/doif...; Lukas ___ If your question is of interest to others as well, please add an entry to the Wiki

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

[NTG-context] bug in latest beta

2012-07-04 Thread JIN Xiao-Yong
\fi \relax \the \everyafte... to be read again \relax \dohandleheadpagebreakyes ...ter \c!before \relax \doif {\headparameter \c!a... \docheckheadbefore ...se \continuoussectionhead #1

Re: [NTG-context] Broken Nightly?

2012-06-26 Thread Hans Hagen
)}% \reference[\figurereference]{}% todo: dest area \stopsetups and \appendtoks \iflocation %\doif\figurefiletype{pdf}{\doifnot\@@efinteraction\v!none\grph_epdf_add_overlay}% \doif\figurefiletype{pdf}{\doifnot{\externalfiguresparameter\c!interaction}\v!none\grph_epdf_add_overlay

Re: [NTG-context] Broken Nightly?

2012-06-25 Thread Wolfgang Schuster
(\externalfiguresparameter\c!interaction)}% \reference[\figurereference]{}% todo: dest area \stopsetups and \appendtoks \iflocation %\doif\figurefiletype{pdf}{\doifnot\@@efinteraction\v!none\grph_epdf_add_overlay}% \doif\figurefiletype{pdf}{\doifnot{\externalfiguresparameter\c!interaction}\v

Re: [NTG-context] Broken Nightly?

2012-06-25 Thread Kip Warner
: dest area \stopsetups and \appendtoks \iflocation %\doif\figurefiletype{pdf}{\doifnot\@@efinteraction\v!none\grph_epdf_add_overlay}% \doif\figurefiletype{pdf}{\doifnot{\externalfiguresparameter\c!interaction}\v!none\grph_epdf_add_overlay}% \fi

[NTG-context] parameter setting

2012-06-16 Thread Meer, H. van der
(249:) check missing or ungrouped '=' after '\doifnot {}{} Putting the above \doif inside an \expanded{} does not alter the behaviour. How to accomplish leaving the parameter as is for an absent attribute? Hans van der Meer

Re: [NTG-context] parameter setting

2012-06-16 Thread Wolfgang Schuster
the solution, but it does not work: ..[\doifnot{\xmlatt{#1}{color}}{\empty}{foregroundcolor=\xmlatt{#1}{color}}] giving in the log: {foregroundcolor=orange}' in line 16 (249:) check missing or ungrouped '=' after '\doifnot {}{} Putting the above \doif inside an \expanded{} does not alter

[NTG-context] Wiki - results differ?

2012-05-04 Thread Procházka Lukáš Ing . - Pontex s . r . o .
Hello, Wiki and a file processed on a local computer give different results - - please compare http://wiki.contextgarden.net/Command/doif...; and the example attached: \starttext \ctxlua{test = true} Test is \ctxlua{commands.testcase(test)}{True}{False}. \ctxlua{test = false

Re: [NTG-context] Background on the 1st page only, page numbering from the 2nd page

2012-05-02 Thread Wolfgang Schuster
][background=Bkg] %\setuppagenumbering[state=2] \starttext \dorecurse{5}{\input knuth} \stoptext - The background is on all pages, so is the page numbering. Any ideas? \defineoverlay[Bkg][\doif{\pagenumber}{1}{\externalfigure[cow]}] \setupbackgrounds[paper][background=Bkg

Re: [NTG-context] Background on the 1st page only, page numbering from the 2nd page

2012-05-02 Thread Alan BRASLAU
? \defineoverlay[Bkg][\doif{\pagenumber}{1}{\externalfigure[cow]}] \setupbackgrounds[paper][background=Bkg] \starttext \noheaderandfooterlines \dorecurse{5}{\input knuth\par} \stoptext If you want to create a title page (which may not be your intention), why not simply \definemakeup[titlepage][align

Re: [NTG-context] Background on the 1st page only, page numbering from the 2nd page

2012-05-02 Thread Procházka Lukáš Ing . - Pontex s . r . o .
? \defineoverlay[Bkg][\doif{\pagenumber}{1}{\externalfigure[cow]}] \setupbackgrounds[paper][background=Bkg] \starttext \noheaderandfooterlines \dorecurse{5}{\input knuth\par} \stoptext If you want to create a title page (which may not be your intention), why not simply \definemakeup[titlepage][align=middle

Re: [NTG-context] Changing navigation symbol

2012-04-21 Thread Wolfgang Schuster
you’re using. mtx-context | current version: 2012.04.17 22:37 When I run this example I don’t get the symbol unless I enable the indicator: %\setupnote[footnote][indicator=yes] \starttext \dorecurse{4}{\input knuth\doif{\recurselevel}{4}{\footnote{\input zapf\par}}\par} \stoptext Wolfgang

Re: [NTG-context] Comma separating multiple footnotes

2012-04-13 Thread Wolfgang Schuster
,\currentnotenumber)}}% % the next one can cycle so we need to make sure it has no advance width \doif{\noteparameter\c!indicator}\v!yes\strc_notes_inject_pointer \dostoptagged \egroup \endgroup \dostoptagged % check \globallet\lastnotesymbol\relax} \unexpanded\def

[NTG-context] gnuplot not working

2012-04-11 Thread John Devereux
\doprocessGNUPLOTfile ...OTnumber \zerocount \let \normalstarttikzpicture =\... argument ...NUPLOTfile [sin][\@@GNUPLOTresult ]} \doif {\@@GNUPLOTterminal ... \firstofoneargument #1-#1

  1   2   3   >