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

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

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

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

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
> 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

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

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

Re: [NTG-context] Feynman Diagrams

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

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
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

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 other

[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

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

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

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

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

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

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

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

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

Re: [NTG-context] setup parameter problem

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

[NTG-context] setup parameter problem

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

Re: [NTG-context] ctxlua percentage format escape

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

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

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

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 auffliegen

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
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

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
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

[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
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

Re: [NTG-context] typesetting information from git

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

[NTG-context] typesetting information from git

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

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. <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

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

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

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

2016-10-07 Thread Mohammad Hossein Bateni
mt] > >>> \mainlanguage[fa] > >>> > >>> \definefontfeature[tlig][tlig=yes] > >>> \definefontfeature[slanted][slant=.2] > >>> \definefontfeature[dlang][language=dflt]

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

2016-10-07 Thread Mingranina Gingranina
ature[flang][language=far] >>> >>> Thanks >>> Mingranina >>> >>> >>> fontsampler.tex >>> >>> = >>>

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

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

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

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

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

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

[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] tagging a startstop

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

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} [...] Which is the right way to get the code above

[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

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_

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_

[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

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 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

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 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

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 definition for a verbatim command because TeX has

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}}} \starttext \arg{\em\de Textsatzsystem

[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

[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
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

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

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

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

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

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

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

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

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

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 : ntg

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] \starttext

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 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

[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. Alan

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. CM

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

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

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

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

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 int local hbox= node.hpack(newnode, 2*newnode.width) node.write(hbox) \stopluacode bar \stoptext ···8··· The first argument

[NTG-context] nesting commands with optional arguments

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

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

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

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

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

Re: [NTG-context] UTF conversion via Lua

2012-02-17 Thread Procházka Lukáš Ing . - Pontex s . r . o .
(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áš

Re: [NTG-context] UTF conversion via Lua

2012-02-17 Thread Hans Hagen
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

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 this arg

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

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

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

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

Re: [NTG-context] float names and lists

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

Re: [NTG-context] float names and lists

2011-11-25 Thread Hans Hagen
? ………..^ … 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

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

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

[NTG-context] References to annotations

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

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

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

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

2011-07-17 Thread Wolfgang Schuster
(...), 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

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

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

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

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

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 context(values[arg]) else context

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

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

Re: [NTG-context] beta

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

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

2011-07-14 Thread Jaroslav Hajtmar
}% {\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

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

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

[NTG-context] beta

2011-07-13 Thread Hans Hagen
} = \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

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

2011-07-12 Thread 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 the better syntax: context('\\def\\Mymacro\{arg of mymacro

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

2011-07-12 Thread Hans Hagen
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

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

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

Re: [NTG-context] Umathquad again - lots of mktexlsr errors

2011-06-27 Thread luigi scarso
: $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   2   3   >