[NTG-context] How to define a section title, after the section title appears?

2022-06-12 Thread Joel via ntg-context
l or \chaptertitleis can give the current chapter number. I tried defining chapter titles inside the macros, `\setvalue{title\recurselevel}{Cause and Effect}`, but \getvalue{title\recurselevel}` couldn't find the defined value. I tried just defining in each macro \define\thesectiontitleis{C

Re: [NTG-context] How do I define a smallcaps font?

2022-04-25 Thread Joel via ntg-context
16:21 schrieb Joel via ntg-context: > I have a font that already comes with a smallcaps variant. > > How do I define it? > > I've tried the following, which I think should work from the > documentation I've seen, but doesn't: > > > \starttypescript[serif]          

Re: [NTG-context] How do I define a smallcaps font?

2022-04-24 Thread Henning Hraban Ramm via ntg-context
Am 24.04.22 um 16:21 schrieb Joel via ntg-context: I have a font that already comes with a smallcaps variant. How do I define it? I've tried the following, which I think should work from the documentation I've seen, but doesn't: \starttypescript[serif]                            [garamond

[NTG-context] How do I define a smallcaps font?

2022-04-24 Thread Joel via ntg-context
I have a font that already comes with a smallcaps variant. How do I define it? I've tried the following, which I think should work from the documentation I've seen, but doesn't: \starttypescript[serif]                            [garamond]     \definefontsynonym[Serif]                     [file

Re: [NTG-context] What is the proper way to define many different list types in a document?

2022-01-24 Thread Aditya Mahajan via ntg-context
be > defining them, so the settings from one type don't spill over into the other > types? > --Joel > > %prompt > > \definesymbol[bighand][{{☞}}] > > \define[1]\prompt{% >     \setupitemize[symbol=bighand] >     \startitemize >         {\it #1} >     \stopitemize

[NTG-context] What is the proper way to define many different list types in a document?

2022-01-24 Thread Joel via ntg-context
%prompt \definesymbol[bighand][{{☞}}] \define[1]\prompt{%     \setupitemize[symbol=bighand]     \startitemize         {\it #1}     \stopitemize }% \prompt{What did you learn about today?} %vocabulary \startcolumns[n=3]\startitemize[n] \item word1 \item word2 \item word3 \stopitemize\stopcolumns

[NTG-context] How to define where \typesetbuffer store its pdf output ?

2021-06-13 Thread Garulfo
Hi all, is there a mean to define where \typesetbuffer store its pdf output ? (to avoid messing up the main directory). Garuflo ___ If your question is of interest to others as well, please add an entry

Re: [NTG-context] Define new symbol by stitching two symbols together

2021-05-24 Thread Nicola
On 2021-05-24, Aditya Mahajan wrote: > On Sun, 23 May 2021, Hans Hagen wrote: > >> On 5/22/2021 8:23 PM, Nicola wrote: >> > I would like to define new symbols by stitching together existing >> > glyphs. This is what I have come up so far: >> > &

Re: [NTG-context] Define new symbol by stitching two symbols together

2021-05-24 Thread Aditya Mahajan
On Sun, 23 May 2021, Hans Hagen wrote: > On 5/22/2021 8:23 PM, Nicola wrote: > > I would like to define new symbols by stitching together existing > > glyphs. This is what I have come up so far: > > > > \define[1]\Transition{-\!\![#1]\!\!\rightarrow} > &

Re: [NTG-context] Define new symbol by stitching two symbols together

2021-05-23 Thread Hans Hagen
On 5/22/2021 8:23 PM, Nicola wrote: I would like to define new symbols by stitching together existing glyphs. This is what I have come up so far: \define[1]\Transition{-\!\![#1]\!\!\rightarrow} \starttext \m{L\Transition{A}R} \stoptext This should render as -[ ]->, idea

[NTG-context] Define new symbol by stitching two symbols together

2021-05-22 Thread Nicola
I would like to define new symbols by stitching together existing glyphs. This is what I have come up so far: \define[1]\Transition{-\!\![#1]\!\!\rightarrow} \starttext \m{L\Transition{A}R} \stoptext This should render as -[ ]->, ideally with no space between the d

Re: [NTG-context] \define in conflict with \startxtable[]

2020-11-08 Thread Wolfgang Schuster
Sylvain Hubert schrieb am 08.11.2020 um 04:54: Dear List, Could anyone manage to typeset the following example? Here [] causes an error "Extra }, or forgotten \endgroup".     \starttext     \define\sample{     \startxtable[]     \startxtablehead     \startxrow     \star

[NTG-context] \define in conflict with \startxtable[]

2020-11-07 Thread Sylvain Hubert
Dear List, Could anyone manage to typeset the following example? Here [] causes an error "Extra }, or forgotten \endgroup". \starttext \define\sample{ \startxtable[] \startxtablehead \startxrow \startxcell 123\stopxcell \stopxrow \stopxtablehead \

Re: [NTG-context] How to define a {\bf}-compatible fake-bold switcher?

2020-11-07 Thread Hans Hagen
On 11/7/2020 6:45 PM, Pablo Rodriguez wrote: On 11/7/20 6:18 PM, Sylvain Hubert wrote: Thank you so much, Pablo. This is exactly what I needed. Could you also tell me where you have learnt these features? I had been searching for this for hours but \effect was still the best of what I've got.

Re: [NTG-context] How to define a {\bf}-compatible fake-bold switcher?

2020-11-07 Thread Pablo Rodriguez
On 11/7/20 6:18 PM, Sylvain Hubert wrote: > Thank you so much, Pablo. This is exactly what I needed. > > Could you also tell me where you have learnt these features? I had been > searching for this for hours but \effect was still the best of what I've > got. Indeed, googling 'context+tex+boldened'

Re: [NTG-context] How to define a {\bf}-compatible fake-bold switcher?

2020-11-07 Thread Sylvain Hubert
useful. Sylvain On Sat, 7 Nov 2020 at 16:41, Pablo Rodriguez wrote: > On 11/7/20 4:06 PM, Sylvain Hubert wrote: > > [...] > > Could anyone help me define a {\bf}-aware version of \fakebf which can > > render the "4 5 6" in the example above in lat

Re: [NTG-context] How to define a {\bf}-compatible fake-bold switcher?

2020-11-07 Thread Pablo Rodriguez
On 11/7/20 4:06 PM, Sylvain Hubert wrote: > [...] > Could anyone help me define a {\bf}-aware version of \fakebf which can > render the "4 5 6" in the example above in latinmodern's bold? Hi Sylvain, there is an already defined font feature that fakes boldened fonts: boldened

[NTG-context] How to define a {\bf}-compatible fake-bold switcher?

2020-11-07 Thread Sylvain Hubert
Dear List, I'm using a weirdfont that does not have a pre-defined bold variant but still want to emboldening short extracts of text occasionally, so I've defined \defineeffect[thicker][alternative=both,rulethickness=0.3pt] \define\fakebf{\effect[thicker]} but in situations like

Re: [NTG-context] How to define an array of pens

2020-06-22 Thread Alan Braslau
On 22/06/20 01:17, Otared Kavian wrote: for j = -1 step 1 until 1 : MyPens[j] := pencircle scaled 2pt ; % I would like to say here (2+j) pt endfor MyPens[j] := pencircle scaled (2+j)*pt ; pt is just a variable, and one can write 2pt implicitly implying the

Re: [NTG-context] How to define an array of pens

2020-06-22 Thread Otared Kavian
ote: > > > >> On 22 Jun 2020, at 09:17, Otared Kavian wrote: >> >> Hi Hans, >> >> After learning from you how to define an array of colors and paths, I would >> like to know how is it possible to define a variable pen size. >> In the fo

Re: [NTG-context] How to define an array of pens

2020-06-22 Thread Taco Hoekwater
> On 22 Jun 2020, at 09:17, Otared Kavian wrote: > > Hi Hans, > > After learning from you how to define an array of colors and paths, I would > like to know how is it possible to define a variable pen size. > In the following working example below, I would like to repla

[NTG-context] How to define an array of pens

2020-06-22 Thread Otared Kavian
Hi Hans, After learning from you how to define an array of colors and paths, I would like to know how is it possible to define a variable pen size. In the following working example below, I would like to replace MyPens[j] := pencircle scaled 2pt ; by something like MyPens[j

Re: [NTG-context] How to define an array of colors in Metafun

2020-06-20 Thread Hans Hagen
a lua code and passed to Metapost, I wonder if it is possible to define an array of colors named mycolor, so that I could say draw mygraph(j) withcolor mycolor(j) ; Here the variable j takes integer values (say between 1 and 10), and one would have defined mycolor(1) through mycolor(10

[NTG-context] How to define an array of colors in Metafun

2020-06-20 Thread Otared Kavian
if it is possible to define an array of colors named mycolor, so that I could say draw mygraph(j) withcolor mycolor(j) ; Here the variable j takes integer values (say between 1 and 10), and one would have defined mycolor(1) through mycolor(10). Thanks in advance for any help: Otared K

Re: [NTG-context] How to define a font with an effect as a font with \definefont

2020-05-23 Thread Gerben Wierda
> On 23 May 2020, at 20:06, Wolfgang Schuster > wrote: > > Pablo Rodriguez schrieb am 23.05.2020 um 20:02: >> On 5/23/20 11:52 AM, Gerben Wierda wrote: >>> [] >>> Actually, my setup is Optima with Helvetica used for Cyrillic: >>> >>> \definefallbackfamily >>> [archimate] >>> [ss] >>>

Re: [NTG-context] How to define a font with an effect as a font with \definefont

2020-05-23 Thread Pablo Rodriguez
On 5/23/20 9:50 PM, Gerben Wierda wrote: > [...] >>> \definefontfeature >>>   [effect-widen] >>>   [effect={width=.2,delta=0.3}] >>> >>> \definefallbackfamily >>>   [archimate] >>>   [ss] >>>   [Helvetica] >>>   [preset=range:cyrillic, >>>    tf=style:light,

Re: [NTG-context] How to define a font with an effect as a font with \definefont

2020-05-23 Thread Rik Kabel
On 5/23/2020 15:50, Gerben Wierda wrote: On 23 May 2020, at 20:06, Wolfgang Schuster > wrote: Pablo Rodriguez schrieb am 23.05.2020 um 20:02: On 5/23/20 11:52 AM, Gerben Wierda wrote: [] Actually, my setup is Optima with Helvetica used for

Re: [NTG-context] How to define a font with an effect as a font with \definefont

2020-05-23 Thread Pablo Rodriguez
On 5/23/20 8:06 PM, Wolfgang Schuster wrote: > Pablo Rodriguez schrieb am 23.05.2020 um 20:02: >> On 5/23/20 11:52 AM, Gerben Wierda wrote: >>> [] >>> Actually, my setup is Optima with Helvetica used for Cyrillic: >>> >>> \definefallbackfamily >>>   [archimate] >>>   [ss] >>>   [Helvetica] >>>

Re: [NTG-context] How to define a font with an effect as a font with \definefont

2020-05-23 Thread Wolfgang Schuster
Pablo Rodriguez schrieb am 23.05.2020 um 20:02: On 5/23/20 11:52 AM, Gerben Wierda wrote: [] Actually, my setup is Optima with Helvetica used for Cyrillic: \definefallbackfamily   [archimate]   [ss]   [Helvetica]   [preset=range:cyrillic,    tf=style:light,    it=style:lightoblique,    

Re: [NTG-context] How to define a font with an effect as a font with \definefont

2020-05-23 Thread Pablo Rodriguez
On 5/23/20 11:52 AM, Gerben Wierda wrote: > [] > Actually, my setup is Optima with Helvetica used for Cyrillic: > > \definefallbackfamily >   [archimate] >   [ss] >   [Helvetica] >   [preset=range:cyrillic, >    tf=style:light, >    it=style:lightoblique, >    bf=style:regular, >    

[NTG-context] How to define a font with an effect as a font with \definefont

2020-05-23 Thread Gerben Wierda
Wityh this working example: \starttext The quick brown fox jumped over the lazy dog \definefontfeature [effect-widen] [effect={width=.2,delta=0.3}] \definedfont[Sans*widen,effect-widen] The quick brown fox jumped over the lazy dog \stoptext I am puzzling to turn my working \definedfont into

Re: [NTG-context] How to define the font size of the page header?

2019-11-06 Thread Wolfgang Schuster
Pablo Rodriguez schrieb am 06.11.2019 um 08:46: On 11/6/19 3:15 AM, Kerry Sainsbury wrote: Hi Folks, Sorry for the constant interruptions, but I can't find an answer in any of the many PDFs or webpages I can find. How do I define the font size of the page header? Hi Kerry, use the following

Re: [NTG-context] How to define the font size of the page header?

2019-11-06 Thread Wolfgang Schuster
Kerry Sainsbury schrieb am 06.11.2019 um 03:15: Hi Folks, Sorry for the constant interruptions, but I can't find an answer in any of the many PDFs or webpages I can find. How do I define the font size of the page header? If I'm not using a custom font, I can call \switchbodyfont prior

Re: [NTG-context] How to define the font size of the page header?

2019-11-06 Thread Kerry Sainsbury
can't find an answer in any > > of the many PDFs or webpages I can find. > > > > How do I define the font size of the page header? > > Hi Kerry, > > use the following: > > \setupheadertexts[Pagenumber][pagenumber] > \setupheader[style=\bfd] > > I ho

Re: [NTG-context] How to define the font size of the page header?

2019-11-05 Thread Pablo Rodriguez
On 11/6/19 3:15 AM, Kerry Sainsbury wrote: > Hi Folks, > > Sorry for the constant interruptions, but I can't find an answer in any > of the many PDFs or webpages I can find. > > How do I define the font size of the page header? Hi Kerry, use the following: \setuphead

[NTG-context] How to define the font size of the page header?

2019-11-05 Thread Kerry Sainsbury
Hi Folks, Sorry for the constant interruptions, but I can't find an answer in any of the many PDFs or webpages I can find. How do I define the font size of the page header? If I'm not using a custom font, I can call \switchbodyfont prior to calling \setuplayouttext, which, if I'm honest, seems

[NTG-context] Is it possible to define a float environment that uses 2 captions? (and another question)

2019-07-09 Thread Andres Conrado Montoya
I'm working on a book that uses tables and figures, but the editors want to use to diffferent captions for each figure: one as usual, with the float description and number, and another one with a "Source" for said float. Something like: - |

Re: [NTG-context] How to define a new language?

2019-03-01 Thread Arthur Reutenauer
On Thu, Feb 28, 2019 at 01:23:51PM -0500, Paul Hoffman wrote: > It's an invented language, so no one else will ever need to use it. Maybe so -- though you can’t know that for sure -- but if you’re down the path of requesting a change in a ConTeXt script to add it locally, you might as well

Re: [NTG-context] How to define a new language?

2019-02-28 Thread Paul Hoffman
On Thu, Feb 28, 2019 at 06:19:24PM +0100, Wolfgang Schuster wrote: > Paul Hoffman schrieb am 27.02.19 um 23:05: > >I'm trying to define a new language for use in a bilingual document, but > >my hyphenation patterns are being ignored and I'm sure I must be doing > >something

Re: [NTG-context] How to define a new language?

2019-02-28 Thread Wolfgang Schuster
Paul Hoffman schrieb am 27.02.19 um 23:05: I'm trying to define a new language for use in a bilingual document, but my hyphenation patterns are being ignored and I'm sure I must be doing something wrong. For which Language do you need patterns? Did you try to contact Arthur or Mojca to add

Re: [NTG-context] How to define a new language?

2019-02-28 Thread Paul Hoffman
On Wed, Feb 27, 2019 at 05:05:05PM -0500, Paul Hoffman wrote: > I'm trying to define a new language for use in a bilingual document, but > my hyphenation patterns are being ignored and I'm sure I must be doing > something wrong. Never mind, I solved the problem. I'll describe what I

[NTG-context] How to define a new language?

2019-02-27 Thread Paul Hoffman
I'm trying to define a new language for use in a bilingual document, but my hyphenation patterns are being ignored and I'm sure I must be doing something wrong. I've devised a minimal example that should hyphenate between vowels but doesn't. Here's the hyphenation patterns file

Re: [NTG-context] Define color with calculations

2019-02-18 Thread Henri Menke
On 19/02/19 10:33 AM, Wolfgang Schuster wrote: > Mohammad Hossein Bateni schrieb am 18.02.19 um 04:37: >> Hi, >> >> When I use definecolor, (how) can I use computations in setting the >> value of a component?  Something like the following... >> >> \definecolor[mycolor][r=0.5*0.7] > > \starttext >

Re: [NTG-context] Define color with calculations

2019-02-18 Thread Wolfgang Schuster
Mohammad Hossein Bateni schrieb am 18.02.19 um 04:37: Hi, When I use definecolor, (how) can I use computations in setting the value of a component?  Something like the following... \definecolor[mycolor][r=0.5*0.7] \starttext \colored[r=\cldcontext{0.5*0.7}]{\cldcontext{0.5*0.7}}

Re: [NTG-context] Define color with calculations

2019-02-18 Thread Mohammad Hossein Bateni
Thanks, Henri! Works like a charm. On Sun, Feb 17, 2019 at 11:03 PM Henri Menke wrote: > Use Lua. > > > \def\eval#1{\ctxlua{% > local context = context > local _ENV = math > context(#1) > }} > > \definecolor[mycolor][r=\eval{0.5*0.7}] > > \starttext > > \color[mycolor]{Hello!} > >

Re: [NTG-context] Define color with calculations

2019-02-17 Thread Henri Menke
Use Lua. \def\eval#1{\ctxlua{% local context = context local _ENV = math context(#1) }} \definecolor[mycolor][r=\eval{0.5*0.7}] \starttext \color[mycolor]{Hello!} \stoptext On 18/02/19 4:37 PM, Mohammad Hossein Bateni wrote: > Hi, > > When I use definecolor, (how) can I use

[NTG-context] Define color with calculations

2019-02-17 Thread Mohammad Hossein Bateni
Hi, When I use definecolor, (how) can I use computations in setting the value of a component? Something like the following... \definecolor[mycolor][r=0.5*0.7] Thanks, ~MHB ___ If your question is of interest to

Re: [NTG-context] Define the dimensions of a layout

2018-08-09 Thread Lizardo M. Reyna Bowen
Hi, May be this setup works. \setuppapersize[A4] \setuplayout[   header=20mm,   footer=20mm,   height=fit,   topspace=0cm,   width=fit,   backspace=2cm,   rightmargin=0cm,   leftmargin=0cm,   leftmargindistance=0pt,   rightmargindistance=0pt] \showframe \starttext  \showsetups \stoptext

Re: [NTG-context] Define the dimensions of a layout

2018-08-08 Thread Wolfgang Schuster
\setuplayout [topspace=10mm, header=10mm, footer=10mm, height=middle, backspace=20mm, width=middle] \showframe \starttext \showsetups \stoptext Wolfgang Lizardo M. Reyna Bowen schrieb am 09.08.18 um 04:50: Hi, May be this setup works. \setuppapersize[A4] \setuplayout[

Re: [NTG-context] Define the dimensions of a layout

2018-08-08 Thread Lizardo M. Reyna Bowen
Hi, May be this setup works. \setuppapersize[A4] \setuplayout[   header=20mm,   footer=20mm,   height=fit,   topspace=0cm,   width=fit,   backspace=2cm,   rightmargin=0cm,   leftmargin=0cm,   leftmargindistance=0pt,   rightmargindistance=0pt] \showframe \starttext  \showsetups \stoptext --

[NTG-context] Define the dimensions of a layout

2018-08-08 Thread Fabrice Couvreur
Hello, I want the text area to be surrounded by a margin of 20 mm (top, right, left and bottom). I have already done this to have a left and right margin of 20 mm. \setuplayout [height=middle, backspace=20mm, width=middle] I think that I must now have : topdistance + header +

Re: [NTG-context] unable to define 'texgyrepagella-regula' error etc.

2018-07-26 Thread Hans Hagen
On 7/26/2018 4:53 PM, Jeong Dal wrote: Do you mean “wipe cache” as  delete “luatex-cache/context/5fe67…f32e/fonts” folder? yes Do you mean “mtxrun —script —reload —force fonts”? mtxrun —script fonts —reload —force Hans -

Re: [NTG-context] unable to define 'texgyrepagella-regula' error etc.

2018-07-26 Thread Jeong Dal
Dear Hans, > > > (1) wipe the cache > (2) mtxrun —script --reload -force > Do you mean “wipe cache” as delete “luatex-cache/context/5fe67…f32e/fonts” folder? I open the terminal and run “mtxrun —script — reload -force”, then I got mtxrun | ConTeXt TDS Runner Tool 1.32 mtxrun

Re: [NTG-context] unable to define 'texgyrepagella-regula' error etc.

2018-07-26 Thread Hans Hagen
ontext/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' close source    > level 3, order 5, name '/Users/graph/ConTeXt/tex/texmf-local/context/type-hcrlvt.mkiv' fonts           > defining > font with asked name 'texgyrepagella-regular' is not found using lookup 'file' fonts        

[NTG-context] unable to define 'texgyrepagella-regula' error etc.

2018-07-25 Thread Jeong Dal
/Users/graph/ConTeXt/tex/texmf-local/context/type-hcrlvt.mkiv'fonts           > defining > font with asked name 'texgyrepagella-regular' is not found using lookup 'file'fonts           > defining > unknown font 'texgyrepagella-regular', loading abortedfonts           > defining &

Re: [NTG-context] unable to define 'texgyrepagella-regula' error etc.

2018-07-25 Thread Otared Kavian
t; not found using lookup 'file' > fonts > defining > unknown font 'texgyreheros-regular', loading > aborted > fonts > defining > unable to define 'texgyreheros-regular' as > 'dummy--0' > floatblocks > '1' placed (here) > fonts

[NTG-context] unable to define 'texgyrepagella-regula' error etc.

2018-07-24 Thread Jeong Dal
'file' fonts > defining > unknown font 'texgyreheros-regular', loading aborted fonts > defining > unable to define 'texgyreheros-regular' as 'dummy--0' floatblocks > '1' placed (here) fonts > defining > font with asked name 'texgyrepagella-r

Re: [NTG-context] define xml entity

2018-04-03 Thread Hans Hagen
On 4/3/2018 9:00 AM, dr. Hans van der Meer wrote: How do I define an xml entity like ? Is there an \xml-operation for defining an entity? Such that I can say \xml{ABC}{an alphabet} for using so that it produces “an alphabet”, for example. You can find some in the test suite but it boils down

[NTG-context] define xml entity

2018-04-03 Thread dr. Hans van der Meer
How do I define an xml entity like ? Is there an \xml-operation for defining an entity? Such that I can say \xml{ABC}{an alphabet} for using so that it produces “an alphabet”, for example. dr. Hans van der Meer

Re: [NTG-context] How to define a new font style using \definefontstyle?

2017-01-31 Thread Antoine Cailliau
I'm not sure I understand. Myriad Pro has normal and semi-extended versions. Do you suggest to have different typefaces for normal and semi-extended version ? (Which makes no sense for roman then). I'd like to use both normal and semi-extended versions, both with their bold, italic, etc. styles.

Re: [NTG-context] How to define a new font style using \definefontstyle?

2017-01-30 Thread Hans Hagen
On 1/30/2017 9:12 AM, Antoine Cailliau wrote: No one? Is there a documentation somewhere or an example I could refer to? Thanks in advance, Antoine On 23 January 2017 at 12:48, Antoine Cailliau > wrote: Hi, I'm trying to

Re: [NTG-context] How to define a new font style using \definefontstyle?

2017-01-30 Thread Antoine Cailliau
No one? Is there a documentation somewhere or an example I could refer to? Thanks in advance, Antoine On 23 January 2017 at 12:48, Antoine Cailliau wrote: > Hi, > > I'm trying to declare a new font style. I declare it with \definefontstyle > [sx] [sx] but the

[NTG-context] How to define a new font style using \definefontstyle?

2017-01-23 Thread Antoine Cailliau
Hi, I'm trying to declare a new font style. I declare it with \definefontstyle [sx] [sx] but the compilation fails when I use \sx in my document. I found an older message from 2009 similar to my issue but with public solution. May be some private response from Hans Hagen is missing? (

Re: [NTG-context] How to define a TeX logic function with a boolean returned from a Lua function and \edef fixed value

2017-01-18 Thread Hans Hagen
On 1/18/2017 4:29 PM, DesdeChaves wrote: Dear sirs, Is there a way to compare, in TeX environment, a value returned from a lua function with a TeX variable? Please see this code: \def\aleatorioValue{ \startlua local nu = math.random(1,10); if nu<5 return 1 else return 0 end \stoplua }

[NTG-context] How to define a TeX logic function with a boolean returned from a Lua function and \edef fixed value

2017-01-18 Thread DesdeChaves
Dear sirs, Is there a way to compare, in TeX environment, a value returned from a lua function with a TeX variable? Please see this code: \def\aleatorioValue{ \startlua local nu = math.random(1,10); if nu<5 return 1 else return 0 end \stoplua } \edef\controlValue{1} \edef\inferior{Number too

Re: [NTG-context] How to define section with midaligned number and midaligned text?

2016-08-09 Thread Lukáš Procházka
number, like: |<- text width -->| " I. Section Bla bla ... " I tried this: \define[2]\Sec{\midaligned{#1.}\midaligned{#2}} \setuphead[section][command=\Sec,conversion=R] \starttext \section{Section} \stoptext but

Re: [NTG-context] How to define section with midaligned number and midaligned text?

2016-08-09 Thread Wolfgang Schuster
Lukáš Procházka <mailto:l...@pontex.cz> 9. August 2016 um 22:43 Hello, I need to produce a \section with midaligned number and midaligned text bellow the number, like: |<- text width -->| " I. Section Bla bla ... " I tried

[NTG-context] How to define section with midaligned number and midaligned text?

2016-08-09 Thread Lukáš Procházka
Hello, I need to produce a \section with midaligned number and midaligned text bellow the number, like: |<- text width -->| " I. Section Bla bla ... " I tried this: \define[2]\Sec{\midaligned{#1.}\midaligned{#2}} \s

Re: [NTG-context] Define font based on language

2016-05-08 Thread Wolfgang Schuster
Michal Ondrejáš 4. April 2016 um 15:17 Hello I need some help regarding font definitions. The situation is like this: \definefont [issuefont] [SansRegular at 14pt] {\issuefont \labeltext{issue} \crlf \documentvariable{issue}} I need to get chinese text

Re: [NTG-context] Define font based on language

2016-05-05 Thread luigi scarso
On Mon, Apr 4, 2016 at 3:17 PM, Michal Ondrejáš wrote: > Hello > > I need some help regarding font definitions. > > Sorry for delay, we were busy with the texlive deadline. -- luigi ___

[NTG-context] Define font based on language

2016-05-05 Thread Michal Ondrejáš
Hello I need some help regarding font definitions. The situation is like this: \definefont [issuefont] [SansRegular at 14pt] {\issuefont \labeltext{issue} \crlf \documentvariable{issue}} I need to get chinese text into the issue variable, but for that I need to change the font. I need

Re: [NTG-context] How can I define a dotted underbar in ConTeXt?

2016-02-15 Thread Hans Hagen
On 2/15/2016 10:29 PM, Aditya Mahajan wrote: On Mon, 15 Feb 2016, Hans Hagen wrote: On 2/10/2016 10:14 PM, Laurent d'Airsy wrote: I would like to create a dotted underbar in ConTeXt with the | \defineunderbar|mechanism. Is that possible? i uploaded a beta where you can test: test

Re: [NTG-context] How can I define a dotted underbar in ConTeXt?

2016-02-15 Thread Hans Hagen
On 2/15/2016 10:31 PM, Aditya Mahajan wrote: On Mon, 15 Feb 2016, Hans Hagen wrote: On 2/10/2016 10:14 PM, Laurent d'Airsy wrote: I would like to create a dotted underbar in ConTeXt with the | \defineunderbar|mechanism. Is that possible? i uploaded a beta where you can test: test

Re: [NTG-context] How can I define a dotted underbar in ConTeXt?

2016-02-15 Thread Aditya Mahajan
On Mon, 15 Feb 2016, Hans Hagen wrote: On 2/10/2016 10:14 PM, Laurent d'Airsy wrote: I would like to create a dotted underbar in ConTeXt with the | \defineunderbar|mechanism. Is that possible? i uploaded a beta where you can test: test {\red\underrandoms{test me}} and \underrandom{test} or

Re: [NTG-context] How can I define a dotted underbar in ConTeXt?

2016-02-15 Thread Aditya Mahajan
On Mon, 15 Feb 2016, Hans Hagen wrote: On 2/10/2016 10:14 PM, Laurent d'Airsy wrote: I would like to create a dotted underbar in ConTeXt with the | \defineunderbar|mechanism. Is that possible? i uploaded a beta where you can test: test {\red\underrandoms{test me}} and \underrandom{test} or

Re: [NTG-context] How can I define a dotted underbar in ConTeXt?

2016-02-15 Thread Hans Hagen
On 2/15/2016 9:31 PM, Otared Kavian wrote: Hi Hans, Thanks for this new nice feature! However it seems to me that \underdashes produces dots under ords, while \underdots produces dashes… Is it on purpose? no, will be fixed in next beta Also the name \underrandoms seems misleading too. i

Re: [NTG-context] How can I define a dotted underbar in ConTeXt?

2016-02-15 Thread Otared Kavian
Hi Hans, Thanks for this new nice feature! However it seems to me that \underdashes produces dots under ords, while \underdots produces dashes… Is it on purpose? Also the name \underrandoms seems misleading too. Best regards: OK > On 15 Feb 2016, at 10:39, Hans Hagen wrote:

Re: [NTG-context] How can I define a dotted underbar in ConTeXt?

2016-02-15 Thread Hans Hagen
On 2/10/2016 10:14 PM, Laurent d'Airsy wrote: I would like to create a dotted underbar in ConTeXt with the |\defineunderbar|mechanism. Is that possible? i uploaded a beta where you can test: test {\red\underrandoms{test me}} and \underrandom{test} or \underrandom{grep} \blank test

Re: [NTG-context] How can I define a dotted underbar in ConTeXt?

2016-02-13 Thread Hans Hagen
On 2/10/2016 10:14 PM, Laurent d'Airsy wrote: I would like to create a dotted underbar in ConTeXt with the |\defineunderbar|mechanism. Is that possible? not yet (but one can use inline text backgrounds to achieve this) i'm playing with some extensions to the underbar code but it might take a

[NTG-context] How can I define a dotted underbar in ConTeXt?

2016-02-11 Thread Laurent d'Airsy
I would like to create a dotted underbar in ConTeXt with the \defineunderbarmechanism. Is that possible? ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist :

Re: [NTG-context] Using lua to define a macro with one optional parameter in brackets

2015-07-13 Thread Hans Hagen
On 7/13/2015 3:04 PM, Jaroslav Hajtmar wrote: Thanks Hans. At this moment, it works fine. For me it is quite essential novelty and it is very much handy for me. It seems that works only in the standalone version because version in TeXlive 2014 version it tells an error message (but does not

Re: [NTG-context] Using lua to define a macro with one optional parameter in brackets

2015-07-13 Thread Jaroslav Hajtmar
Thanks Hans. At this moment, it works fine. For me it is quite essential novelty and it is very much handy for me. It seems that works only in the standalone version because version in TeXlive 2014 version it tells an error message (but does not matter on it). I want to even ask how you can

Re: [NTG-context] Using lua to define a macro with one optional parameter in brackets

2015-07-10 Thread Jaroslav Hajtmar
Thanks Hans. At this moment, it works fine. For me it is quite essential novelty and it is very much handy for me. It seems that works only in the standalone version because version in TeXlive 2014 version it tells an error message (but does not matter on it). I want to even ask how you can

Re: [NTG-context] Using lua to define a macro with one optional parameter in brackets

2015-07-09 Thread Jaroslav Hajtmar
\complexA[#1]{parameter #1} why don't you define these commands at the tex level Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038

Re: [NTG-context] Using lua to define a macro with one optional parameter in brackets

2015-07-09 Thread Hans Hagen
On 7/9/2015 5:05 PM, Jaroslav Hajtmar wrote: Thanx to Hans and Taco too, ad Taco) ala Perhaps interfaces.definecommand could be extended with a way to do global definitions? Indeed it seems to me. Changes in lua code does not affect the results in ConTeXt. ad Hans)

Re: [NTG-context] Using lua to define a macro with one optional parameter in brackets

2015-07-09 Thread Taco Hoekwater
Hi, On 09 Jul 2015, at 07:22, Jaroslav Hajtmar hajt...@gyza.cz wrote: The problem is that the macros created in Lua I sometimes do not work as well when I create TeX (during the cycle will automatically fall short values). I have a particularly bad experience in this regard with the

Re: [NTG-context] Using lua to define a macro with one optional parameter in brackets

2015-07-09 Thread Hans Hagen
} \def\complexA[#1]{parameter #1} why don't you define these commands at the tex level Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands

Re: [NTG-context] Using lua to define a macro with one optional parameter in brackets

2015-07-08 Thread Taco Hoekwater
On 08 Jul 2015, at 11:05, Jaroslav Hajtmar hajt...@gyza.cz wrote: Hello ConTeXist. Within the one very complex problem I need to solve the following case. I want using lua code to define a macro with one optional parameter in brackets. Simplest solution I know is this: \startluacode

Re: [NTG-context] Using lua to define a macro with one optional parameter in brackets

2015-07-08 Thread Taco Hoekwater
On 08 Jul 2015, at 13:58, Jaroslav Hajtmar hajt...@gyza.cz wrote: Thanx Taco for reply. the minimal example see bellow not crashed, but \A macro is not created. I don't Know in what could still be a problem. Example I am even more minimalize It works for me after changing \directlua {}

Re: [NTG-context] Using lua to define a macro with one optional parameter in brackets

2015-07-08 Thread Taco Hoekwater
On 08 Jul 2015, at 13:04, Jaroslav Hajtmar hajt...@gyza.cz wrote: Hi Taco. full deployment is unfortunately not working. Unfortunately I need to cycle create different macros whose names are variable. At this moment I can not deal with this: --- context.doxlsname() --- ?

Re: [NTG-context] Using lua to define a macro with one optional parameter in brackets

2015-07-08 Thread Jaroslav Hajtmar
Hi Taco. full deployment is unfortunately not working. Unfortunately I need to cycle create different macros whose names are variable. At this moment I can not deal with this: --- context.doxlsname() --- ? Thanx Jaroslav Hajtmar here is another minimal example: \starttext

Re: [NTG-context] Using lua to define a macro with one optional parameter in brackets

2015-07-08 Thread Jaroslav Hajtmar
Thanx Taco for reply. the minimal example see bellow not crashed, but \A macro is not created. I don't Know in what could still be a problem. Example I am even more minimalize Thanx Jaroslav \starttext \directlua{ xlsname='A' interfaces.definecommand ('do'..xlsname, { arguments = {

[NTG-context] Using lua to define a macro with one optional parameter in brackets

2015-07-08 Thread Jaroslav Hajtmar
Hello ConTeXist. Within the one very complex problem I need to solve the following case. I want using lua code to define a macro with one optional parameter in brackets. I tried it using commands context.setgvalue, or find something on the wiki (http://wiki.contextgarden.net/System_Macros

Re: [NTG-context] Using lua to define a macro with one optional parameter in brackets

2015-07-08 Thread Jaroslav Hajtmar
hajt...@gyza.cz wrote: Hello ConTeXist. Within the one very complex problem I need to solve the following case. I want using lua code to define a macro with one optional parameter in brackets. Simplest solution I know is this: \startluacode interfaces.definecommand ('dolastname

Re: [NTG-context] Using lua to define a macro with one optional parameter in brackets

2015-07-08 Thread Jaroslav Hajtmar
Thanks Taco very much. At this point, it really works in simple situations, but in the event that this solution will incorporate into the existing system, then I have big problems with expansion (values are not updated in macros). I need more solutions using something like context.setgvalue,

Re: [NTG-context] Using lua to define a macro with one optional parameter in brackets

2015-07-08 Thread Jaroslav Hajtmar
parameter is missing' context([[\definecomplexorsimple\]]..xlsname) %context([[\def\simple]]..xlsname..[[{]]..content..[[}]]) %context([[\def\complex]]..xlsname..'[#1]'..[[{Neco: #1}]]) } \def\simpleA {content when parameter is missing} \def\complexA[#1]{parameter #1} why don't you define

Re: [NTG-context] Using lua to define a macro with one optional parameter in brackets

2015-07-08 Thread Hans Hagen
\complex]]..xlsname..'[#1]'..[[{Neco: #1}]]) } \def\simpleA {content when parameter is missing} \def\complexA[#1]{parameter #1} why don't you define these commands at the tex level Hans - Hans

Re: [NTG-context] How to define a new environment / function?

2015-06-20 Thread Wolfgang Schuster
Dr. Thomas Möbius mailto:kont...@thomasmoebius.de 17. Juni 2015 15:23 Dear list, having used ConTeXt for years now, I am the first time in need to, well, programming something. And I realised, I am a little bit lost. I have a rather long list of variable descriptions that I would like to

[NTG-context] How to define a new environment / function?

2015-06-17 Thread Dr. Thomas Möbius
Dear list, having used ConTeXt for years now, I am the first time in need to, well, programming something. And I realised, I am a little bit lost. I have a rather long list of variable descriptions that I would like to typeset in a usable and readable way. It should look something like this:

[NTG-context] define macros only visible in a definestartstop-block that have arguments?

2015-03-20 Thread Norbert Melzer
Hi! I have trouble to define macros which are only visible inside a block defined using `\definestartstop`: ```tex \setuppapersize[A6] \definestartstop[Foo][before={Foo}] \definestartstop[Bar][before={\bgroup\define\Foo{Foo}},after={\egroup}] %\definestartstop[Baz][before={\bgroup\define[1]\Foo

  1   2   3   4   >