s.
>> See the attached output of this xmlsetup attached.
>> \startxmlsetups hvdm:system:macrocall
>> %
>> \doifelsedefined{\xmlatt{#1}{name}}
>> {
>> %
>> %macro without argument
>> %
>> \ifxmlattempty{#1}{arg}
>> \begincsname\xmlatt{#1}{nam
etup{#1}{*}{xml:*}
\stopxmlsetups
\xmlregistersetup{xml:hvdm}
\startxmlsetups xml:document
\xmlflush{#1}
\stopxmlsetups
\startxmlsetups xml:macro
\xmlatt{#1}{name}\\
\xmlatt{#1}{arg}\\
\xmldoifelseatt{#1}
{name}{yes}{no}\\
\xmldoifelseatt{#1}
{names}{yes}{no}\\
ut of this xmlsetup attached.
\startxmlsetups hvdm:system:macrocall
%
\doifelsedefined{\xmlatt{#1}{name}}
{
%
%macro without argument
%
\ifxmlattempty{#1}{arg}
\begincsname\xmlatt{#1}{name}\endcsname
%
%macro with argument
%
\else
\begincsname\xmlatt{#1}{name}\endcsname{\xmlatt{#1}{arg}}
\fi
}
{
\E
Hans van der Meer via ntg-context schrieb am 16.06.2024 um 22:29:
I remember there was an incantation to work with expanded doif's etc.
In this case I need \doifelsedefined{ARG} with ARG expanded.
I lost the exact spelling of the command and dldn't find it in the
garden.
What was
I remember there was an incantation to work with expanded doif's etc.
In this case I need \doifelsedefined{ARG} with ARG expanded.
I lost the exact spelling of the command and dldn't find it in the garden.
What was it?
yours sincerely
dr. Hans va
-- iterate oiver
for k,v in ipairs(results) do
io.write(v..'\n')
end
-- closes the open file
io.close(output_file)
end
-- Run
main(arg[1], arg[2])
Ok, a little lua lesson, if you don't mind.
xxx.tex
\enabletrackers[hyphenation.applied]
\starttex
ens a file in write mode
output_file = io.open("check_hyphens.log", "w")
-- sets the default output file as output_file
io.output(output_file)
-- iterate oiver
for k,v in ipairs(results) do
io.write(v..'\n')
end
-- closes the open f
Hi Mikael,
On Mon, May 01, 2023 at 05:48:40PM +0200, Mikael Sundqvist via ntg-context
wrote:
> [...]
> This works here (but maybe there should be a simpler way):
>
> \definemathfunction
> [argmax]
> [mathlimits=auto]
>
> \setupmathlabeltext
> [en]
>
Hi,
On Mon, May 1, 2023 at 5:27 PM Stefan Haller via ntg-context
wrote:
>
> Hi all,
>
> I wanted to define a custom math function (similar to log etc.) for
> argmax. However, I wanted to have a small space between "arg" and "max"
> and limits should work
Hi all,
I wanted to define a custom math function (similar to log etc.) for
argmax. However, I wanted to have a small space between "arg" and "max"
and limits should work properly. I am using a up-to-date LMTX installation.
Without the first constraint it&
ileseparator ..
> os.selfname)
> environment.ownpath = environment.ownbin:match("^.*" .. io.fileseparator)
> else
> environment.ownpath = kpse.new("luatex"):var_value("SELFAUTOLOC")
> environment.ownbin = environment.ownpath .. io.fileseparator .. (arg[-2] o
nbin:match("^.*" .. io.fileseparator)
else
environment.ownpath = kpse.new("luatex"):var_value("SELFAUTOLOC")
environment.ownbin = environment.ownpath .. io.fileseparator .. (arg[-2]
or arg[-1] or arg[0] or "luatex"):match("[^" .. io.file
tmp_ := $.#;
save $;
$.# := s * tmp_;
define_blacker_pixels ($);
else:
tmp_ := $;
save $;
$ := s * tmp_;
fi
endfor
fi
enddef;
def endshrink =
endgroup
enddef;
string shrinkables;
shrinkables := "";
vardef addto_shrinkables
e}
\define[1]\norm
{\math{\left\Vert#1\right\Vert}}
\define\esp{\math{\mathcal{E}}\autoinsertnextspace}
\define\espv{\math{\vec{\mathcal{E}}}\autoinsertnextspace}
\define\repere
{\m{\left(O\,;\vec{i}, \vec{j}\right)}\autoinsertnextspace}
\define\base
{
On 8/22/2022 4:59 PM, Fabrice Couvreur via ntg-context wrote:
Hello
How to reduce the size of all subscripts in math mode ?
Thanks
Fabrice
\usemodule[tikz]
\protected\def\vector#1{%
\starttikzpicture[baseline=(arg.base),>=stealth]
\node[inner xsep=0pt] (arg) {\m{#1}};
\d
Hello
How to reduce the size of all subscripts in math mode ?
Thanks
Fabrice
\usemodule[tikz]
\protected\def\vector#1{%
\starttikzpicture[baseline=(arg.base),>=stealth]
\node[inner xsep=0pt] (arg) {\m{#1}};
\draw[thick,->,shorten >=-1pt] (arg.north west) -- (arg.n
➊ DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT ONE
> 9 U+0FFFD � REPLACEMENT CHARACTER
> stop missing characters
> start missing characters: cambriai.ttf
> 266 U+0276C ❬ MEDIUM LEFT-POINTING ANGLE BRACKET ORNAMENT
> 266 U+0276D ❭ MEDIUM RIGHT-POINTING ANGLE BRACKET ORN
e]
\startlines
\getbuffer[example]
{\ss\getbuffer[example]}
\stoplines
\tex{abra}\arg{...}
\type{kadabra} \type{~~~}
\stoptext
"""
What’s wrong?
Hraban
___
If your question is of interest to others as wel
RIGHT-POINTING ANGLE BRACKET ORNAMENT
stop missing characters
\stopbuffer
\typebuffer[example]
\startlines
\getbuffer[example]
{\ss\getbuffer[example]}
\stoplines
\tex{abra}\arg{...}
\type{kadabra} \type{~~~}
\stoptext
""
vergeten Nederlands toe te voegen. Ik hoop dat Hans en
Taco het me niet kwalijk nemen.
Le 23/01/2022 à 14:26, Henning Hraban Ramm via ntg-context a écrit :
Salut Jean-Pierre,
ich werde nicht versuchen, dir ebenso polyglott zu antworten. (Mein
Latein ist arg eingestaubt, wegen Altgriechisch wäre ich
Salut Jean-Pierre,
ich werde nicht versuchen, dir ebenso polyglott zu antworten. (Mein
Latein ist arg eingestaubt, wegen Altgriechisch wäre ich damals beinahe
sitzen geblieben, mein Russisch, Italienisch und Französisch reicht zum
Einkaufen, von Schwedisch ist nicht mehr viel übrig, an
d for you in the past).
>> It does not contain it; it a copy in the same directory that has never
>> changed.
>
> hm, but i have no clue what this "mtx:..." does
It is line 97-105 in
/usr/local/texlive/2021/texmf-dist/tex/generic/con
t; it a copy in the same directory that has never changed.
hm, but i have no clue what this "mtx:..." does
Maybe 'arguments' lives in some namespace?
\directlua {for k, v in pairs(_G) do print(k,v) end}
This will show you what is in the global namespace, maybe 'arg
defined there (as it worked for you in the past).
It does not contain it; it a copy in the same directory that has never changed.
> Maybe 'arguments' lives in some namespace?
>
> \directlua {for k, v in pairs(_G) do print(k.v) end}
>
> This will show you what is in the glo
irectlua {for k, v in pairs(_G) do print(k.v) end}
This will show you what is in the global namespace, maybe 'arg'?
Hans
-
Hans Hagen | PRAGMA ADE
Ridderstraat 27 |
match its definition.
Obviously I am missing something here. What?
\def\Macro{\dosingleargument\doMacro}
\def\doMacro[#1]#2{#1X#2}
The code below shows that it should be possible.
\startsection[title=\Macro{arg} no braces needed]\stopsection
\startsection[title={\Macro[arg1]{arg2} enclosed in b
thing here. What?
\def\Macro{\dosingleargument\doMacro}
\def\doMacro[#1]#2{#1X#2}
The code below shows that it should be possible.
\startsection[title=\Macro{arg} no braces needed]\stopsection
\startsection[title={\Macro[arg1]{arg2} enclosed in braces}]\stopsection
\stoptext
dr. Hans van der
ssion ... \relax doesn't work
kind of old (hacky experiment) that one ... i probably need to adapt it
to lmtx anyway
\luaexpr and \mathexpr are probably better for this kind of stuff (no
need for the % t
local base = assert(arg[1], "Keine Datei angegeben")
local pdf = base .. ".pdf"
local tuc = base .. ".tuc"
-- import .tuc-file /extension lua
local utilitydata = dofile(tuc)
local breakpoints = {}
local last_page = utilitydata.structures.counters.collecte
Arg, it's getting uglier...
I've been playing around with the replacement patterns.
```
\replaceword[replace][auff][au{ff}]
\replaceword[replace][Aufl][Au{fl}]
\replaceword[replace][aufl][au{fl}]
\setreplacements[replace]
\starttext
auffasste
auffasse
Auflage
aufliegen
mtxrun --script plain test.tex
This is the error:
>> LUATEXFUNCTIONALITY
>> "mp.print(LUATEXFUNCTIONALITY)"
! Equation cannot be performed (numeric=string).
MWE is below, as always.
Cheers, Henri
---
\directlua{
local m
would really appreciate if you
could apply Luigi's fix, so we can continue do enjoy MetaFun, even
outside ConTeXt.
Cheers, Henri
>
> \startMPpage
> \stopMPpage
>
> with context and then include the pdf
>
> Hans
>
>> MWE is below, as always.
>>
>> C
r:
>
> >> LUATEXFUNCTIONALITY
> >> "mp.print(LUATEXFUNCTIONALITY)"
> ! Equation cannot be performed (numeric=string).
>
> MWE is below, as always.
>
> Cheers, Henri
>
> ---
>
> \directlua{
> local mpkpse = kpse.new(arg[0], "m
. better use
\startMPpage
\stopMPpage
with context and then include the pdf
Hans
MWE is below, as always.
Cheers, Henri
---
\directlua{
local mpkpse = kpse.new(arg[0], "mpost")
local function finder(name, mode, ftype)
if mode == "w" then
return name
e
be performed (numeric=string).
MWE is below, as always.
Cheers, Henri
---
\directlua{
local mpkpse = kpse.new(arg[0], "mpost")
local function finder(name, mode, ftype)
if mode == "w" then
return name
else
return mpkpse:find_file(name,ftype)
end
My 2 cents:
local xmlflush = lxml.flush
local function text_or_xml(...)
for i,v in ipairs(arg) do
if "table" == type(v) then
xmlflush(v)
else
context(v)
end
end
end
function xml.functions.heading(t)
text_or_xml( "\\section{" , t , "}"
On 8/13/2018 10:28, Rik Kabel wrote:
On 8/13/2018 03:01, Hans Hagen wrote:
On 8/13/2018 5:18 AM, Rik Kabel wrote:
\startparagraph
% \dontleavehmode\llap{\Mark}\inlinebuffer[TestBuffer]
% \ (first: \First, arg: \Arg)
\margintext{\Mark}
\setupparagraphintro[first][(first
{\color[middlegray]{\itb¿\ }}
\define\First{nothing yet}
\define\Arg{nothing yet}
\setuplanguage[en][spacing=packed]
\starttexdefinition unexpanded startBufTest
\bgroup
\dosingleempty\dostartBufTest
\stoptexdefinition
\starttexdefinition dostartBufTest [#SETUPS]
\doifsomethingelse{#{SETUPS
{nothing yet}
\define\Arg{nothing yet}
\setuplanguage[en][spacing=packed]
\starttexdefinition unexpanded startBufTest
\bgroup
\dosingleempty\dostartBufTest
\stoptexdefinition
\starttexdefinition dostartBufTest [#SETUPS]
\doifsomethingelse{#{SETUPS}}
{\define\Arg{yes
{nothing yet}
\define\Arg{nothing yet}
\setuplanguage[en][spacing=packed]
\starttexdefinition unexpanded startBufTest
\bgroup
\dosingleempty\dostartBufTest
\stoptexdefinition
\starttexdefinition dostartBufTest [#SETUPS]
\doifsomethingelse{#{SETUPS}}
{\define\Arg{yes
{nothing yet}
\define\Arg{nothing yet}
\setuplanguage[en][spacing=packed]
\starttexdefinition unexpanded startBufTest
\bgroup
\dosingleempty\dostartBufTest
\stoptexdefinition
\starttexdefinition dostartBufTest [#SETUPS]
\doifsomethingelse{#{SETUPS}}
{\define\Arg{yes
blank lines and macros, and
%% those should be retained. Or, is there already a function to
%% strip a buffer in the manner that string.strip does a string?
\setupwhitespace[none]
\setupindenting[none]
\define\Mark{\color[middlegray]{\itb¿\ }}
\define\First{nothing yet}
\define\Arg{nothing yet
something like "git revision b085c92a of Wed, 14 Feb 2018 12:49:35
+0100.” Suppose I want to make this more general. What would be the easiest way to
either say “the xml file that is being processed” (something like arg[1]) or “the
xml file whose name is in the Lua variable ‘foo?’”
maybe you
something like "git revision b085c92a of Wed, 14 Feb 2018 12:49:35
+0100.” Suppose I want to make this more general. What would be the easiest way to
either say “the xml file that is being processed” (something like arg[1]) or “the
xml file whose name is in the Lua variable ‘foo?’”
I'm
14 Feb 2018 12:49:35
+0100.” Suppose I want to make this more general. What would be the easiest way
to either say “the xml file that is being processed” (something like arg[1]) or
“the xml file whose name is in the Lua variable ‘foo
Am 2018-02-06 um 17:09 schrieb Procházka Lukáš Ing. :
> I'm usually implementing complicated solutions via Lua, with functions with
> obligatory arg(s) first followed by one optional argument of table type:
Thank you for your effort!
I actually already wrote parts of my invoicing
differing
needs that either every macro would need a bunch of options, or I need a lot of
similar macros. We’ll see...
my experience in these situations:
I'm usually implementing complicated solutions via Lua, with functions with
obligatory arg(s) first followed by one optional argume
a]
> >>>
> >>> \definefontfeature[tlig][tlig=yes]
> >>> \definefontfeature[slanted][slant=.2]
> >>> \definefontfeature[dlang][language=dflt]
&g
>>
>>> Thanks
>>> Mingranina
>>>
>>>
>>> fontsampler.tex
>>>
>>> =
>>> \input luaotfload.sty
>&g
; Mingranina
>>
>>
>> fontsampler.tex
>>
>> =
>> \input luaotfload.sty
>&g
t luaotfload.sty
> \overfullrule 0pt
> \font\mono = {file:lmmono8-regular.otf} at 6pt
> \parindent 0pt
>
> \def \samplestring {Sphinx of black quartz, judge my vow. 1234567890
> äÄöÖüÜ ß !"§\$\%\&()=?}
>
> \directlua{
> dofile("fontsampler.l
mono8-regular.otf} at 6pt
\parindent 0pt
\def \samplestring {Sphinx of black quartz, judge my vow. 1234567890
äÄöÖüÜ ß !"§\$\%\&()=?}
\directlua{
dofile("fontsampler.lua")
fontsampler(arg[2])
}
\bye
=
Hello Thomas,
here is my "dump()" I've been using for several years:
function dump(arg, opts) -- .seen, .pfx
if type(opts) == "string" then print(opts); opts = nil
elseif opts == true then print("-- (dump)"); opts = nil
end
local pfx = opts a
> Am 28.03.2015 um 19:18 schrieb Idris Samawi Hamid ادريس سماوي حامد
> :
>
> Dear syndicate,
>
> We have \definehighlight[tagged][style=] so that
>
> \tagged{arg}
>
> tags the argument. Analogously: Is there a general facility to tag
> startstops? I played a
Dear syndicate,
We have \definehighlight[tagged][style=] so that
\tagged{arg}
tags the argument. Analogously: Is there a general facility to tag
startstops? I played around with \dostarttagged etc but could not get it
to work (too low-level for me I guess). What would be nice is to be able
On 02/25/2015 10:45 PM, Hans Hagen wrote:
> On 2/25/2015 6:41 PM, Pablo Rodriguez wrote:
>> [...]
>> \def\Myfilename{\env{filename}}
>> doc = epdf.open(arg[\MyFilename])
>> total_pages_ = doc:getNumPages()
>> \def\Mypages{total_pages}
>>
On Wed, 25 Feb 2015, Pablo Rodriguez wrote:
Dear list,
I need to get the number of pages from an external PDF file that I also
define with an \env.
I think I could get something like this.:
\def\Myfilename{\env{filename}}
doc = epdf.open(arg[\MyFilename])
total_pages_
On 2/25/2015 6:41 PM, Pablo Rodriguez wrote:
Dear list,
I need to get the number of pages from an external PDF file that I also
define with an \env.
I think I could get something like this.:
\def\Myfilename{\env{filename}}
doc = epdf.open(arg[\MyFilename])
total_pages_
Dear list,
I need to get the number of pages from an external PDF file that I also
define with an \env.
I think I could get something like this.:
\def\Myfilename{\env{filename}}
doc = epdf.open(arg[\MyFilename])
total_pages_ = doc:getNumPages()
\def\Mypages{total_pages}
But
On 05/26/2014 06:55 PM, luigi scarso wrote:
> On Mon, May 26, 2014 at 6:00 PM, Pablo Rodriguez wrote:
>
> Dear list,
>
> I have the following sample:
>
> \definetype[TeXcode][option=TEX]
> \def\arg#1{\TeXcode{{#1}}}
> \star
On 05/26/2014 06:08 PM, Wolfgang Schuster wrote:
> Am 26.05.2014 um 18:00 schrieb Pablo Rodriguez:
>> \def\arg#1{\TeXcode{{#1}}}
>> [...]
>> I don’t know what is wrong defined in \arg that inserts an extra space
>> after \em?
>
> You can’t do this form a
On Mon, May 26, 2014 at 6:00 PM, Pablo Rodriguez wrote:
> Dear list,
>
> I have the following sample:
>
> \definetype[TeXcode][option=TEX]
> \def\arg#1{\TeXcode{{#1}}}
> \starttext
> \arg{\em\de Textsatzsystem}
>
> \TeXcode{{\em\de Textsatzsystem
Am 26.05.2014 um 18:00 schrieb Pablo Rodriguez :
> Dear list,
>
> I have the following sample:
>
>\definetype[TeXcode][option=TEX]
>\def\arg#1{\TeXcode{{#1}}}
> \starttext
>\arg{\em\de Textsatzsystem}
>
>\TeXcode{{\em\de Textsatzsystem}}
&g
Dear list,
I have the following sample:
\definetype[TeXcode][option=TEX]
\def\arg#1{\TeXcode{{#1}}}
\starttext
\arg{\em\de Textsatzsystem}
\TeXcode{{\em\de Textsatzsystem}}
\stoptext
I don’t know what is wrong defined in \arg that inserts an extra space
after \em?
Many
Dear list,
I have this sample:
\definetype[TeXcode][option=TEX]
\starttext
\TeXcode{\mainlanguage[la]},
but \tex{ConTeXt} and \arg{option=value}.
\stoptext
I need ot have \tex and \arg colored with [option=TeX] (and I would
avoid having \type colored).
How can I do that
Dear list,
using the latest beta (it also happens with ConTeXt from TL 2013), I
don’t get the space in \type{\em #1}.
Here you have a minimal sample that shows the difference with other
verbatim commands:
\starttext
\type{\em #1}
\arg{\em #1}
\starttyping\em #1\stoptyping
a bit bewildered today... but I do not understand the
above. It gets too tricky for me!
that's why it's commented code -)
\define
[optional-arg-1-default][optional-arg-2-default]...[number of {} args]
but .. not likely to become enabled anyway (was an experiment)
Or, maybe, I might
[Erf][Erflist]
\defineregister[Erf]
It doesn’t appear to be documented anywhere (even the source ...)
but in mkiv \defineregister is an ordinary command handler so no
fancy plurals anymore. Now the second arg expects an assignment:
\defineregister[Erf][style=slanted,pagestyle=bold]
Regards
Philipp
]
\defineregister[Erf]
It doesn’t appear to be documented anywhere (even the source ...)
but in mkiv \defineregister is an ordinary command handler so no
fancy plurals anymore. Now the second arg expects an assignment:
\defineregister[Erf][style=slanted,pagestyle=bold]
Regards
Philipp
e (even the source ...)
but in mkiv \defineregister is an ordinary command handler so no
fancy plurals anymore. Now the second arg expects an assignment:
\defineregister[Erf][style=slanted,pagestyle=bold]
Regards
Philipp
> \starttext
> \chapter{F53667}
> Hello world!
> \Erf{Bla} Foo
\par
\color[red]{--- arg (entry): #1}\par
\color[red]{--- mark: \MyMark}
}}
{\framed[frame=off, align=normal]{%
--- other entry \par
\color[blue]{--- arg (entry): #1}\par
\color[blue]{--- mark: \MyMark}
}}
\blank[medium]
}
% Show the margin
> Try lucifox (is a part of lucifox addon for firefox)
arg.. to late.. try lucidor as a part of lucifox... :-D
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist :
On Fri, 28 Sep 2012 10:43:48 +0200
Hans Hagen wrote:
> On 27-9-2012 22:49, Alan Braslau wrote:
> > Hello,
> >
> > Can someone indicate how to typeset
> > $L_{α+β}$
> > as verbatim text?
> > (\arg{} doesn't help here...)
> >
> > Furthermo
On 27-9-2012 22:49, Alan Braslau wrote:
Hello,
Can someone indicate how to typeset
$L_{α+β}$
as verbatim text?
(\arg{} doesn't help here...)
Furthermore, I suppose that typesetting Greek characters verbatim
depends also upon which \tt font is being used.
\setupbodyfont[dejavu]
\star
Can someone indicate how to typeset
$L_{α+β}$
as verbatim text?
(\arg{} doesn't help here...)
Untested:
\type{...} should work. (Definitely did work a couple of months ago).
Furthermore, I suppose that typesetting Greek characters verbatim
depends also upon which \tt font is being used.
Hello,
Can someone indicate how to typeset
$L_{α+β}$
as verbatim text?
(\arg{} doesn't help here...)
Furthermore, I suppose that typesetting Greek characters verbatim
depends also upon which \tt font is being used.
receding character.
only with low, high an lohi
up = how much the {hi} arg is raised
down = how much the {low} arg is lowered
indeed
Support for the [left] keyword seems to have been dropped, but is
still in the documentation comments.
still there, only for lohi .. maybe we should add an
ooks nice.
Small bug: It's called lomihi, but the arguments are placed middle/high/low.
For documentation/clarification, is the following correct?
distance = extra kerning, distance between lomihi and preceding character.
up = how much the {hi} arg is raised
down = how much the {low} arg is lo
won’t work before \starttext
newnode.lang = tex.language
--- second arg to node.hpack is width
local hbox= node.hpack(newnode, 2*newnode.width)
node.write(hbox)
\stopluacode
bar
\stoptext
···8<···
The first argument is
ample:
\def\one{\dosingleempty\doOne}
\def\doOne[#1]{%
in 1st: \doifsomethingelse{#1}{#1}{no arg}\par%
}
\def\two{\dosingleempty\doTwo}
\def\doTwo[#1]{%
in 2nd: \doifsomethingelse{#1}{#1}{no arg}\par%
}
\def\three#1{in 3rd: #1\par}
\starttext
\one\two
\blank
\one[\three{myArg}]
\blank
\one[\two[Arg
clue how to handle this …
Thanks for any hints!
Daniel
Please consider the following minimal example:
\def\one{\dosingleempty\doOne}
\def\doOne[#1]{%
in 1st: \doifsomethingelse{#1}{#1}{no arg}\par%
}
\def\two{\dosingleempty\doTwo}
\def\doTwo[#1]{%
in 2nd: \doifsomethingelse{#1}{#1}{no arg
hints!
Daniel
Please consider the following minimal example:
\def\one{\dosingleempty\doOne}
\def\doOne[#1]{%
in 1st: \doifsomethingelse{#1}{#1}{no arg}\par%
}
\def\two{\dosingleempty\doTwo}
\def\doTwo[#1]{%
in 2nd: \doifsomethingelse{#1}{#1}{no arg}\par%
}
\def\three#1{in 3r
Thanks by the answer, but I had already thought in this. I would like
something more definitive.
By the way, at http://wiki.contextgarden.net/Reference/en/setupcaptions I
can see a command argument. I was wondering if a custom command can do the
trick, but I don't know how I should use thi
es are references. Using the “local” keyword, you generate a
local variable that still points to the original table. Instead,
you need to (deep) copy the table explicitly.
·
\starttext
\startluacode
function myFunc(arg)
local
int !
Mathieu
\starttext
\startluacode
function myFunc(arg)
local var = arg
var[1] = var[1] + 3
return var
end
local a = {1,2}
context("a = \\{")
context(a[1])
context(",\\;")
context(a[2])
context("\\}\\par")
context("\\blank"
should be \placelistoftablecws
Then everything works as Wolfgang pointed out.
Ah, u caught that ;-) OTOH it was only in my list post, once I added the
plural arg here all works.
Hans is adding criterium=component to the next beta :-) so in a way it's
all moot, but it's been a very goo
pointed out.
Ah, u caught that ;-) OTOH it was only in my list post, once I added the
plural arg here all works.
Hans is adding criterium=component to the next beta :-) so in a way it's
all moot, but it's been a very good exercise nonetheless.
Best wishes
Idris
--
Professor Idris Sa
onstrued as personal opinion, but hopefully it isn't
> too controversial.
Nice summary, you should write a My Way about units once this things are fixed.
A few comments from me:
\type{1234}\tex{unit}\arg{m} should print equivalently to
\tex{unit}\arg{1234m}
and \tex{unit}\arg
at's nifty, but unexpected.
Thank you.
Michael
Example -
\usemodule[annotation]
\defineannotation[Arg][alternative=command,number=yes,command=\ArgCommand,text=Argument]
\define[2]\ArgCommand{
\startitemize[n]
\placeannotationco
onfiguration file
> 'c:/contextminimal/texm
> f/web2c/texmfcnf.lua'
> resolvers | resolving |
> resolvers | resolving | warning: no lua configuration files found
> resolvers | resolving | locating list of 'c:/contextminimal/texmf'
> (runti
|
resolvers | resolving | warning: no lua configuration files found
resolvers | resolving | locating list of 'c:/contextminimal/texmf'
(runtim
e)
resolvers | methods | resolver: method=locators, how=uri, scheme=file,
arg
ument=c:/contextminimal/texmf
resolvers | files | fi
:
\startluacode
values = {
I = "1",
II = "2",
}
function test(arg)
if string.find(arg,"\\macro") then
arg = string.gsub(arg,"\\macro","")
if values[arg] then
uot;,
II = "2",
}
function test(arg)
if string.find(arg,"\\macro") then
arg = string.gsub(arg,"\\macro","")
if values[arg] then
context(values[arg])
else
"The argument “6” is a positive number" and not result "The argument “6”
is a string."
see: I modify your example :
\startluacode
function test(arg) -- use thirddata namespace for real functions
if type(tonumber(arg)) == "number" then
if tonumb
> Is there any function that would do that?
>
> I need something as a function of context (...), which would, however, its
> output is not located into ConTeXt, but its result get to back to a Lua
> function or into variable.
> It is something like the expansion of an existing Con
located into ConTeXt, but its result get to back to a
Lua function or into variable.
It is something like the expansion of an existing ConTeXt macro to its
value.
Thanx Jaroslav
Here is my minimal example:
\startluacode
function test(arg)
if type(arg)=='number' then
context(ar
#2}{#1}% if 2 arguments then do #1 macro for first
#2 lines
}%
{\doifsomethingelse{#1}{% 1 arg.
\doloopfromto{-1}{-1}{#1}%
}{% if without arguments then do \lineaction macro for all lines
\doloopfromto{-1}{-1}{\lineaction}%
}%
}%
}%
}%
Dne 13.7.2011
fchar{"2229} =
\utfchar{"2229}\utfchar{"FE00} =
\vsone{\utfchar{"2229}}
}
- Defining commands at the lua end now also handles arg only cases and
has better tracing.
- Some other other things, like \startlayout[page] ... \stoplayout and
whatever I forgot.
Hans
Hi Hans,
my xm
erent roundtrip treatment
> now and hopefully Thomas S as well as Hans vd M files still work ok.
>
> - Unicode math variants (supported by xits) are supported:
>
> \mathematics {
> \utfchar{"2229} =
> \utfchar{"2229}\utfchar{"FE00} =
> \vsone{
"2229} =
\utfchar{"2229}\utfchar{"FE00} =
\vsone{\utfchar{"2229}}
}
- Defining commands at the lua end now also handles arg only cases and
has better tracing.
- Some other other things, like \startlayout[page] ... \stoplayout and
1 - 100 of 217 matches
Mail list logo