[NTG-context] Re: expanded doif's

2024-06-18 Thread Hans van der Meer via ntg-context
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

[NTG-context] Re: expanded doif's

2024-06-17 Thread Pablo Rodriguez via ntg-context
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}\\

[NTG-context] Re: expanded doif's

2024-06-17 Thread Wolfgang Schuster
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

[NTG-context] Re: expanded doif's

2024-06-16 Thread Wolfgang Schuster
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

[NTG-context] expanded doif's

2024-06-16 Thread Hans van der Meer via ntg-context
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

[NTG-context] Re: Tracker for hyphens at the end of lines

2023-08-09 Thread Hans Hagen via ntg-context
-- 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

[NTG-context] Re: Tracker for hyphens at the end of lines

2023-08-09 Thread denis.maier
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

Re: [NTG-context] define math function with \, inside

2023-05-01 Thread Stefan Haller via ntg-context
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] >

Re: [NTG-context] define math function with \, inside

2023-05-01 Thread Mikael Sundqvist via ntg-context
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

[NTG-context] define math function with \, inside

2023-05-01 Thread Stefan Haller via ntg-context
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&

Re: [NTG-context] LuaMetaTeX doesn't find files when symlinked

2023-04-28 Thread lynx--- via ntg-context
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

[NTG-context] LuaMetaTeX doesn't find files when symlinked

2023-04-27 Thread Max Chernoff via ntg-context
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

Re: [NTG-context] Feynman Diagrams

2023-04-12 Thread Aditya Mahajan via ntg-context
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

Re: [NTG-context] Page break with placement of a figure at the bottom of the page

2022-11-12 Thread Fabrice Couvreur via ntg-context
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 {

Re: [NTG-context] Size of all subscripts

2022-08-22 Thread Hans Hagen via ntg-context
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

[NTG-context] Size of all subscripts

2022-08-22 Thread Fabrice Couvreur via ntg-context
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

Re: [NTG-context] font fallbacks

2022-08-01 Thread Denis Maier via ntg-context
➊ 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

Re: [NTG-context] font fallbacks

2022-08-01 Thread Henning Hraban Ramm via ntg-context
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

[NTG-context] font fallbacks

2022-07-30 Thread Henning Hraban Ramm via ntg-context
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 ""

Re: [NTG-context] Credit in DTK

2022-01-23 Thread Jean-Pierre Delange via ntg-context
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

Re: [NTG-context] Credit in DTK

2022-01-23 Thread Henning Hraban Ramm via ntg-context
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

Re: [NTG-context] Error: attempt to index a nil value

2021-10-13 Thread Hans Åberg via ntg-context
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

Re: [NTG-context] Error: attempt to index a nil value

2021-10-13 Thread Hans Hagen via ntg-context
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&#x

Re: [NTG-context] Error: attempt to index a nil value

2021-10-13 Thread Hans Åberg via ntg-context
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

Re: [NTG-context] Error: attempt to index a nil value

2021-10-13 Thread Hans Hagen via ntg-context
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 |

Re: [NTG-context] setup parameter problem

2021-06-07 Thread Hans Hagen
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

[NTG-context] setup parameter problem

2021-06-07 Thread Hans van der Meer
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

Re: [NTG-context] ctxlua percentage format escape

2021-05-29 Thread Hans Hagen
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

Re: [NTG-context] outputting components in their own PDFs

2021-03-01 Thread denis.maier
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

Re: [NTG-context] Disappearing characters with nolig-german-wordlist

2020-10-09 Thread Denis Maier
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

Re: [NTG-context] Can't use MetaFun with mplib anymore

2019-03-14 Thread Hans Hagen
  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

Re: [NTG-context] Can't use MetaFun with mplib anymore

2019-03-14 Thread Henri Menke
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

Re: [NTG-context] Can't use MetaFun with mplib anymore

2019-03-14 Thread luigi scarso
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

Re: [NTG-context] Can't use MetaFun with mplib anymore

2019-03-14 Thread Hans Hagen
. 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

[NTG-context] Can't use MetaFun with mplib anymore

2019-03-13 Thread Henri Menke
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

Re: [NTG-context] xml in lua advice ?

2018-09-19 Thread mf
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 , "}"

Re: [NTG-context] How can I remove a blank leading line from a buffer

2018-08-13 Thread Rik Kabel
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

Re: [NTG-context] How can I remove a blank leading line from a buffer

2018-08-13 Thread Rik Kabel
{\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

Re: [NTG-context] How can I remove a blank leading line from a buffer

2018-08-13 Thread Hans Hagen
{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

Re: [NTG-context] How can I remove a blank leading line from a buffer

2018-08-12 Thread Henri Menke
{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

Re: [NTG-context] How can I remove a blank leading line from a buffer

2018-08-12 Thread Aditya Mahajan
{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

[NTG-context] How can I remove a blank leading line from a buffer

2018-08-12 Thread Rik Kabel
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

Re: [NTG-context] typesetting information from git

2018-02-23 Thread Hans Hagen
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

Re: [NTG-context] typesetting information from git

2018-02-23 Thread Hans Hagen
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

[NTG-context] typesetting information from git

2018-02-23 Thread Schmitz Thomas A.
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

Re: [NTG-context] image file resolver in Lua?

2018-02-06 Thread Henning Hraban Ramm
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

Re: [NTG-context] image file resolver in Lua?

2018-02-06 Thread Procházka Lukáš Ing .
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

Re: [NTG-context] How to use "fontsampler example" with Persian font

2016-10-07 Thread Mohammad Hossein Bateni
a] > >>> > >>> \definefontfeature[tlig][tlig=yes] > >>> \definefontfeature[slanted][slant=.2] > >>> \definefontfeature[dlang][language=dflt] &g

Re: [NTG-context] How to use "fontsampler example" with Persian font

2016-10-07 Thread Mingranina Gingranina
>> >>> Thanks >>> Mingranina >>> >>> >>> fontsampler.tex >>> >>> = >>> \input luaotfload.sty >&g

Re: [NTG-context] How to use "fontsampler example" with Persian font

2016-10-07 Thread Mohammad Hossein Bateni
; Mingranina >> >> >> fontsampler.tex >> >> = >> \input luaotfload.sty >&g

Re: [NTG-context] How to use "fontsampler example" with Persian font

2016-10-07 Thread Mohammad Hossein Bateni
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

[NTG-context] How to use "fontsampler example" with Persian font

2016-10-07 Thread Mingranina Gingranina
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 =

Re: [NTG-context] lua tables - how do you cope?

2016-07-30 Thread Lukas Prochazka
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

Re: [NTG-context] tagging a startstop

2015-03-28 Thread Wolfgang Schuster
> 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

[NTG-context] tagging a startstop

2015-03-28 Thread 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 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

Re: [NTG-context] total pages in external PDF

2015-02-26 Thread Pablo Rodriguez
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} >>

Re: [NTG-context] total pages in external PDF

2015-02-25 Thread Aditya Mahajan
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_

Re: [NTG-context] total pages in external PDF

2015-02-25 Thread Hans Hagen
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_

[NTG-context] total pages in external PDF

2015-02-25 Thread Pablo Rodriguez
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

Re: [NTG-context] unwanted extra space in type definition

2014-05-26 Thread Pablo Rodriguez
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

Re: [NTG-context] unwanted extra space in type definition

2014-05-26 Thread Pablo Rodriguez
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

Re: [NTG-context] unwanted extra space in type definition

2014-05-26 Thread luigi scarso
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

Re: [NTG-context] unwanted extra space in type definition

2014-05-26 Thread Wolfgang Schuster
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

[NTG-context] unwanted extra space in type definition

2014-05-26 Thread 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}} \stoptext I don’t know what is wrong defined in \arg that inserts an extra space after \em? Many

[NTG-context] a question on coloring \tex and \var

2013-10-03 Thread Pablo Rodríguez
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

[NTG-context] bug in \type?

2013-07-27 Thread Pablo Rodríguez
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

Re: [NTG-context] the difference between \def and \define

2013-04-16 Thread Hans Hagen
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

Re: [NTG-context] Problem with local installation - MKIV- register

2013-04-02 Thread Hans Hagen
[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

Re: [NTG-context] Problem with local installation - MKIV- register

2013-04-02 Thread Wolfgang
] \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

Re: [NTG-context] Problem with local installation - MKIV- register

2013-04-01 Thread Philipp Gesang
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

Re: [NTG-context] How to use module simpleslides' SideToc

2013-01-09 Thread Sietse Brouwer
\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

Re: [NTG-context] Epub woes

2012-11-16 Thread Zenlima
> 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 :

Re: [NTG-context] verbatim text: \type, \tex and co.

2012-09-28 Thread Alan BRASLAU
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

Re: [NTG-context] verbatim text: \type, \tex and co.

2012-09-28 Thread Hans Hagen
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

Re: [NTG-context] verbatim text: \type, \tex and co.

2012-09-27 Thread Aditya Mahajan
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.

[NTG-context] verbatim text: \type, \tex and co.

2012-09-27 Thread Alan Braslau
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.

Re: [NTG-context] Figured bass symbols in a text.

2012-08-10 Thread Hans Hagen
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

Re: [NTG-context] Figured bass symbols in a text.

2012-08-10 Thread Sietse Brouwer
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

Re: [NTG-context] \box0 to Lua

2012-06-18 Thread Philipp Gesang
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

Re: [NTG-context] nesting commands with optional arguments

2012-03-28 Thread Daniel Schopper
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

Re: [NTG-context] nesting commands with optional arguments

2012-03-28 Thread Hans Hagen
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

[NTG-context] nesting commands with optional arguments

2012-03-28 Thread Daniel Schopper
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

Re: [NTG-context] How to make Figure captions justify if long?

2012-02-08 Thread Wagner Macedo
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

Re: [NTG-context] LuaTeX Function Arguments Variables Parameters List ConTeXt Lua \startluacode

2012-01-27 Thread Philipp Gesang
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

[NTG-context] LuaTeX Function Arguments Variables Parameters List ConTeXt Lua \startluacode

2012-01-27 Thread Mathieu Dupont
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"

Re: [NTG-context] float names and lists

2011-11-25 Thread Hans Hagen
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

Re: [NTG-context] float names and lists

2011-11-25 Thread Idris Samawi Hamid ادريس سماوي حامد
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

Re: [NTG-context] \unit and Hertz, lux, and degrees/minutes/seconds

2011-11-24 Thread Wolfgang Schuster
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

[NTG-context] References to annotations

2011-10-05 Thread Michael Green
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

Re: [NTG-context] Installing ConTeXt in Windows (XP)

2011-08-12 Thread Willi Egger
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

[NTG-context] Installing ConTeXt in Windows (XP)

2011-08-12 Thread Cecil Westerhof
| 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

Re: [NTG-context] Finding values ​​of the context macros inside Lua functions (=expansion inside Lua functions?)

2011-07-17 Thread Jaroslav Hajtmar
: \startluacode values = { I = "1", II = "2", } function test(arg) if string.find(arg,"\\macro") then arg = string.gsub(arg,"\\macro","") if values[arg] then

Re: [NTG-context] Finding values ​​of the context macros inside Lua functions (=expansion inside Lua functions?)

2011-07-17 Thread Wolfgang Schuster
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

Re: [NTG-context] Finding values ​​of the context macros inside Lua functions (=expansion inside Lua functions?)

2011-07-17 Thread Jaroslav Hajtmar
"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

Re: [NTG-context] Finding values ​​of the context macros inside Lua functions (=expansion inside Lua functions?)

2011-07-17 Thread Wolfgang Schuster
> 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

[NTG-context] Finding values ​​of the context macros inside Lua functions (=expansion inside Lua functions?)

2011-07-17 Thread Jaroslav Hajtmar
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

Re: [NTG-context] Optimal way to defining of macros in Luacode in ConTeXt

2011-07-14 Thread Jaroslav Hajtmar
#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

Re: [NTG-context] beta

2011-07-14 Thread Thomas A. Schmitz
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

Re: [NTG-context] [beta] grid & head

2011-07-14 Thread Philipp Gesang
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{

[NTG-context] beta

2011-07-13 Thread Hans Hagen
"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   2   3   >