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
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
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
\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 \
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
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
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
, 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}}
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
t;
>>
>> Or, for your line break example :
>>
>>
>>
>>
>>
>>
>>
>> \startsetups xml:directive:injector:newline
>>
>> \crlf
>>
>> \stopsetups
>>
>>
>>
>> Also, I have learned that you can ju
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
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
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
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
(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
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
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
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
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
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
}
\dofipostponingnotes{\flushnotes}
Is there a way to define those \doif... macros?
mkiv:
\ifconditional\postponingnotes
\else
\fi
-
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH
}
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
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
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.
>
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
___
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
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
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
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
\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
\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
nyms[dictionary]
\setupsynonyms[dictionary][alternative=first]
\doifsomething{\structureuservariable{setFirst}}
{\setfirstline[\structureuservariable{setFirst}]}
\doif{\structureuservariable{Lettrine}}
{yes}{\setinitial}},
]
\setup
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{
',
'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
()
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
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
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
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
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
{\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
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
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
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 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
>>>>
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. [...
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)
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
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.
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 _
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
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
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
}{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
::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
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
}{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
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
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
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
-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
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
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
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
: 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
\pack_framed_do_bottom ...amedparameter \c!bottom
\raggedbottomcommand
to be read again \localendstrut \pack_framed_do_bottom
\egroup
\stopfittingpage -\removeunwantedspaces \egroup
\egroup \doif
\raggedbottomcommand
to be read again \localendstrut \pack_framed_do_bottom
\egroup
\stopfittingpage -\removeunwantedspaces \egroup
\egroup \doif
{\fittingpage...
l.13 \stopTEXpage
The same problem occurs
|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
}%
\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
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
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
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
{\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
\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
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
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
\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
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
} {
...
} {
...
}
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
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
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
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
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
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
\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
( -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
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
) }{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
\fi \relax \the
\everyafte...
to be read again
\relax
\dohandleheadpagebreakyes ...ter \c!before \relax
\doif {\headparameter
\c!a...
\docheckheadbefore ...se \continuoussectionhead #1
)}%
\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
(\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
: 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
(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
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
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
][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
?
\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
?
\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
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
,\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
\doprocessGNUPLOTfile ...OTnumber \zerocount \let
\normalstarttikzpicture =\...
argument ...NUPLOTfile [sin][\@@GNUPLOTresult ]}
\doif {\@@GNUPLOTterminal ...
\firstofoneargument #1-#1
1 - 100 of 225 matches
Mail list logo