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]
\starttext
\input tufte
\stoptext
xxx.tmp --
utput_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 file
io.close(output_file)
end
-- Ru
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'
> 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] or
> a
t;^.*" .. 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.fileseparator .. &q
tmp_ := $;
save $;
$ := s * tmp_;
fi
endfor
fi
enddef;
def endshrink =
endgroup
enddef;
string shrinkables;
shrinkables := "";
vardef addto_shrinkables (text l) =
forsuffixes $ = l:
shrinkables := shrinkables & "," & str $;
endfor
m
{\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
{\m{\left(\vec{i}, \v
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 other
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
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/context/luatex/luatex-math.tex
I have
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'?
If I put this code in right before the \ifdefine
or 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 global namespace, maybe 'arg'?
If I put th
(k.v) end}
This will show you what is in the global namespace, maybe 'arg'?
Hans
-
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038
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 braces
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 Meer
sn'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 % then when the optional for
= 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.collected["re
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
auffliegen
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
lly 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.
>>
>> Cheers, Henri
&g
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
ter 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
else
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
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 mean
\st
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 not sure if i
8 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?’”
Thank
Am 2018-02-06 um 17:09 schrieb Procházka Lukáš Ing. <l...@pontex.cz>:
> 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
of my projects has so 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
mt]
> >>> \mainlanguage[fa]
> >>>
> >>> \definefontfeature[tlig][tlig=yes]
> >>> \definefontfeature[slanted][slant=.2]
> >>> \definefontfeature[dlang][language=dflt]
ature[flang][language=far]
>>>
>>> Thanks
>>> Mingranina
>>>
>>>
>>> fontsampler.tex
>>>
>>> =
>>>
>> Thanks
>> Mingranina
>>
>>
>> fontsampler.tex
>>
>> =
>> \input luaotfload.sty
>> \
==
> \input 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.lua&q
-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 an
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
Am 28.03.2015 um 19:18 schrieb Idris Samawi Hamid ادريس سماوي حامد
isha...@colostate.edu:
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
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}
[...]
Which is the right way to get the code above
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
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_
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_
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
Am 26.05.2014 um 18:00 schrieb Pablo Rodriguez oi...@gmx.es:
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
On Mon, May 26, 2014 at 6:00 PM, Pablo Rodriguez oi...@gmx.es 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}}
\stoptext
I don’t
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 definition for a verbatim command because TeX has
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}}}
\starttext
\arg{\em\de Textsatzsystem
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
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
perhaps 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 like
.
The example:
\defineregister[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
:
\defineregister[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
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
\starttext
\chapter{F53667}
Hello world!
\Erf{Bla} Fool
\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 areas
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 : ntg
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]
\starttext
On Fri, 28 Sep 2012 10:43:48 +0200
Hans Hagen pra...@wxs.nl 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...)
Furthermore, I suppose that typesetting Greek characters verbatim
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.
Alan
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.
CM
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 lowered
Support for the [left] keyword seems to have been dropped
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 align key some day
Perhaps instead support align
() -- won’t work before \starttext
newnode.lang = tex.language
--- second arg to node.hpack is width int
local hbox= node.hpack(newnode, 2*newnode.width)
node.write(hbox)
\stopluacode
bar
\stoptext
···8···
The first argument
!
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 3rd: #1
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}\par
:
\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[Argument
(target-regime, text-to-convert, third-arg)
so question - what is the third-argment used for?
Maybe as default character when the UTF code cannot be mapped to
target-regime?
(It didn't happen in my case, so I can just estimate what third-arg is for.)
Best regards,
Lukas
Hans
--
Ing. Lukáš
it.
I'll going to wikify it -
- I supppose:
regimes.toregime(target-regime, text-to-convert, third-arg)
so question - what is the third-argment used for?
Maybe as default character when the UTF code cannot be mapped to
target-regime?
yes
(It didn't happen in my case, so I can just estimate what
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 this arg
\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)
local b = myFunc(a)
context(a = \\{)
context(a[1])
context(,\\;)
context(a[2])
context
, 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 var = table.copy(arg)
var[1] = var[1
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 good exercise nonetheless.
Best wishes
Idris
--
Professor
?
………..^
… it 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
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{1234 m}. (I have a lot of text that uses a \tex{unit}
macro like
, but unexpected.
Thank you.
Michael
Example -
\usemodule[annotation]
\defineannotation[Arg][alternative=command,number=yes,command=\ArgCommand,text=Argument]
\define[2]\ArgCommand{
\startitemize[n]
\placeannotationcontent
\stopitemize
, 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(arg.. is number.\\par )
else
(...), 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 ConTeXt macro to its value.
\startluacode
function test(arg) -- use thirddata namespace for real functions
” 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 tonumber(arg) 0 then
context(The argument \\quotation{%s
,
}
function test(arg)
if string.find(arg,\\macro) then
arg = string.gsub(arg,\\macro,)
if values[arg] then
context(values[arg])
else
context(Invalid index.)
end
else
:
\startluacode
values = {
I = 1,
II = 2,
}
function test(arg)
if string.find(arg,\\macro) then
arg = string.gsub(arg,\\macro,)
if values[arg] then
context(values[arg])
else
context
) are supported:
\mathematics {
\utfchar{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
{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 xml files seem to run OK (I
}%
{\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 16:33, Wolfgang Schuster napsal(a):
Am 13.07.2011 um 16:09 schrieb Jaroslav
napsal(a):
On 12-7-2011 5:30, Jaroslav Hajtmar wrote:
But someone advised me that I use the better syntax:
context('\\def\\Mymacro\{arg of mymacro\}')
or context(\\def\\test#1{#1}) etc...
whatever you like best
context.setvalue{Mymacro,somevalue)
context([[\def\MyMacro#1{#1}]])
Exist other
} =
\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
Hello ConTeXist.
How best (optimally) in Lua code in ConTeXt define own ConTeXt macros?
I was used recently LuaTeX syntax (for example) :
tex.sprint(tex.ctxcatcodes,'\\def\\mymacro\{arg of mymacro\}')
But someone advised me that I use the better syntax:
context('\\def\\Mymacro\{arg of mymacro
On 12-7-2011 5:30, Jaroslav Hajtmar wrote:
But someone advised me that I use the better syntax:
context('\\def\\Mymacro\{arg of mymacro\}')
or context(\\def\\test#1{#1}) etc...
whatever you like best
context.setvalue{Mymacro,somevalue)
context([[\def\MyMacro#1{#1}]])
Exist other (best
Am 12.07.2011 um 17:30 schrieb Jaroslav Hajtmar:
Hello ConTeXist.
How best (optimally) in Lua code in ConTeXt define own ConTeXt macros?
I was used recently LuaTeX syntax (for example) :
tex.sprint(tex.ctxcatcodes,'\\def\\mymacro\{arg of mymacro\}')
But someone advised me that I use
: $treefile: could not append to arg file, goodbye. 2
exit 1
fi
)
fi
shift
done
--
luigi
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl
1 - 100 of 203 matches
Mail list logo