Re: [NTG-context] Filling a page with \thinrules

2019-12-07 Thread Hans Hagen
progress. For the record, below is a transcript of what I adapted from Wolfgang's solution, but maybe nowadays one could also right a more readable lua code to achieve the same. Best regards: Otared K. \define\thinrulesfillpage% { \hphantom{Answer} % this is necessary, I don't

Re: [NTG-context] Filling a page with \thinrules

2019-12-07 Thread Otared Kavian
readable lua code to achieve the same. Best regards: Otared K. \define\thinrulesfillpage% { \hphantom{Answer} % this is necessary, I don't know why... \blank \scratchcounter\dimexpr(\pagegoal-\pagetotal-2\lineheight)/(\dimexpr\lineheight+2.2ex\relax)\relax

Re: [NTG-context] Indenting number in TOC, particular numbering scheme, and other questions

2019-12-04 Thread Daniel Haid
\setupreferenceformat [chapter] [default] [prefixsegments=...] \setupreferenceformat [section] [default] [prefixsegments=...] That seems to define the segmets when refering to a chapter or section, but I need a dynamic way: I want to go back to the last common ancestor,for example to refer

[NTG-context] Indenting number in TOC, particular numbering scheme, and other questions

2019-12-02 Thread Daniel Haid
ction B.IV.5.d) is quoted from inside section B.IV.6.f) the command should only print 5.d) since the B.IV is implied. 5. How can I get rid of the additional vertical space before the second entry "B. Another first level" (chapter)? 6. I wanted to define aliases for the \subsub...subsec

Re: [NTG-context] ConTeXt as a service

2019-11-23 Thread mf
and limitations of the tools you use. CKEditor lets you define rules to specify what can enter your sources; it's great, but it's essentially a HTML editor, not a semantic editor. In CKE, the HTML is *the* document, not a representation of it inside a browser. Prosemirror is the best editor i know

Re: [NTG-context] eqalign

2019-11-22 Thread Otared Kavian
Hi, Indeed \startalign has been there from the beginning (as far as I can remember) and it is stable. In fact, as expalined by Aditya, you can define your own align environment, for special purposes. for instance I have: \definemathmatrix[alignedcases] [align={right,left,left

[NTG-context] [updating LMTX]

2019-11-20 Thread Floris van Manen
/bin I have no clue as how to interpret the log. Should i define $TEXMF ? .F ... mtxrun | forcing cache reload resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/home/vm/texmf/web2c' from specification 'home:texmf/web2c' resolvers | resolving | looking

Re: [NTG-context] PDF layer links

2019-11-12 Thread Philipp A.
hat you want: >> >> \setupinteraction >> [state=start, >> style=, >> color=, >> contrastcolor=, >> focus=standard] >> \enabledirectives[references.border=red] >> %~ \enabledirectives[references.bo

[NTG-context] \beginBLOCKS and \endBLOCKS do not work in \dorecurse

2019-11-11 Thread Romain Diss
define them \dorecurse{2}{ \beginquestion[first] To be, or not to be? \endquestion \section{Let's see what blocks we've got.} \useblocks[question] \section{We've seen what blocks we've got. Let's take another look at that first question.} \useblocks[question][first

[NTG-context] Formatting in toc

2019-11-11 Thread Calum MacLeod
This morning, I realised what I needed to do, and it works. Before \starttext put: \define[2]\hymn{\bf Hymn #1 \hspace[big] \it #2}\par} After \starttext put stuff like \hymn{34}{We three kings} or \hymn{10}{In the bleak midwinter} etc. This does near enough what I am after: creates

Re: [NTG-context] PDF layer links

2019-11-08 Thread Philipp A.
ocus=standard] > \enabledirectives[references.border=red] > %~ \enabledirectives[references.border]% defaults to grey > \define[1]\MyURL{{\tt\goto{\hyphenatedurl{#1}}[url(#1)]}} > \starttext > \startTEXpage[offset=1em] > \MyURL{https://wiki.contextgarden.net} > \stopTEXpag

Re: [NTG-context] ASCII mode within \footnote

2019-11-08 Thread context
, if you have many such files is to define a macro: \define[1]\APPDATA{\mono{\letterpercent APPDATA\letterpercent\letterbackslash#1}} And then use: \footnote{\APPDATA{file.txt}} or ... \footnote{\type[compact=absolute]{%APPDATA%\file.txt

Re: [NTG-context] ASCII mode within \footnote

2019-11-08 Thread Hans Hagen
with the \typeinlinebuffer command. \starttext \startbuffer %APPDATA%\file.txt \stopbuffer \footnote{\typeinlinebuffer} \stoptext Another option, if you have many such files is to define a macro: \define[1]\APPDATA{\mono{\letterpercent APPDATA\letterpercent\letterbackslash#1}} And then use: \footnote

Re: [NTG-context] ASCII mode within \footnote

2019-11-07 Thread Aditya Mahajan
%APPDATA%\file.txt \stopbuffer \footnote{\typeinlinebuffer} \stoptext Another option, if you have many such files is to define a macro: \define[1]\APPDATA{\mono{\letterpercent APPDATA\letterpercent\letterbackslash#1}} And then use: \footnote{\APPDATA{file.txt}} Aditya

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] PDF layer links

2019-11-06 Thread Pablo Rodriguez
color=, contrastcolor=, focus=standard] \enabledirectives[references.border=red] %~ \enabledirectives[references.border]% defaults to grey \define[1]\MyURL{{\tt\goto{\hyphenatedurl{#1}}[url(#1)]}} \starttext \startTEXpage[offset=1em] \MyURL{https://wiki.conte

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

Re: [NTG-context] Formatting in the toc

2019-11-04 Thread Henning Hraban Ramm
I’d suggest to use something like (untested) \startsubject[title={The Lord’s my Shepherd}][biblepart={Hymn 387}] and \setuphead[subject][command=\MyBibleSection] \define[2]\MyBibleSection{{\bf #1}\hfill{\it\structureuservariable{biblepart}}} You’d need to setup your ToC useing

Re: [NTG-context] place single entry of a register, or filtering the terms of a register

2019-10-25 Thread Hans Hagen
On 10/25/2019 3:09 PM, mf wrote: Hello list, is there a way to place only one single entry of a register, or a selection of entries? I looked into strc-reg.mkiv and strc-reg.lua and i would answer "no, it's not possible". I could hack strc-reg.lua and define a command to do that,

[NTG-context] place single entry of a register, or filtering the terms of a register

2019-10-25 Thread mf
Hello list, is there a way to place only one single entry of a register, or a selection of entries? I looked into strc-reg.mkiv and strc-reg.lua and i would answer "no, it's not possible". I could hack strc-reg.lua and define a command to do that, but maybe a better solution

Re: [NTG-context] Unexpected symbol with Enumeration

2019-10-16 Thread Otared Kavian
%%% > > Then when I use for instance the command $\cal{C}$ the script font from Asana > Math is used, instead of from Lucida OT. > > Best regards: OK > >> On 15 Oct 2019, at 21:57, Fabrice Couvreur > <mailto:fabrice1.couvr...@gmail.com>> wrote: >

Re: [NTG-context] Unexpected symbol with Enumeration

2019-10-16 Thread Fabrice Couvreur
ce the command $\cal{C}$ the script font from > Asana Math is used, instead of from Lucida OT. > > Best regards: OK > > On 15 Oct 2019, at 21:57, Fabrice Couvreur > wrote: > > Hello, > Thanks to you two. > "Another solution is to define your own mixture of math fonts a

Re: [NTG-context] Unexpected symbol with Enumeration

2019-10-15 Thread Otared Kavian
%% Then when I use for instance the command $\cal{C}$ the script font from Asana Math is used, instead of from Lucida OT. Best regards: OK > On 15 Oct 2019, at 21:57, Fabrice Couvreur > wrote: > > Hello, > Thanks to you two. > "Another solutio

Re: [NTG-context] Unexpected symbol with Enumeration

2019-10-15 Thread Fabrice Couvreur
Hello, Thanks to you two. "Another solution is to define your own mixture of math fonts and text fonts." I thought you should not mix several fonts in one text. I know you're a teacher, what are you doing to write your documents ? Fabrice Le mar. 15 oct. 2019 à 19:11, Otared Kavia

Re: [NTG-context] Unexpected symbol with Enumeration

2019-10-15 Thread Otared Kavian
Hi Fabrice, Wolfgang gave the right answer, but I wanted to point out that it is better not to use \setupbodyfont in the middle of your document, as you did in the excerpt below: in this case it is better to use \switchtobodyfont[xits] or even better define the character you want before

Re: [NTG-context] PDF viewer poll

2019-10-15 Thread Hans Hagen
scripting, you create a lot of vulnerabilities that you can easily avoid leaving out this feature that "nobody" needs. It would have made sense to define a small and safe JS (or whatever scripting language) _subset_ from the start, but the early versions of Acrobat were completely

Re: [NTG-context] PDF viewer poll

2019-10-14 Thread Henning Hraban Ramm
fix the problems I reported. > === javascript === > Only acrobat offers that. Not completely true. But there aren’t a lot of apps that support JS in PDF - for a reason: if you allow scripting, you create a lot of vulnerabilities that you can easily avoid leaving out this feature that "

Re: [NTG-context] new (lmtx) beta

2019-10-11 Thread Jeong Dal
there any reason to use two different names “function” and “code” to >> define functions? > we can still decide as it's beta ... > > function | functions > > or > > code | codelist > > (it's basically lua code ...) > > i have no preference and as you're t

Re: [NTG-context] List of Symbols/Abbreviations/Glosses with more then two entries

2019-10-11 Thread Thomas Welter
pha} should not include the unit. And of course I want the unit entry to be in a separate column when calling \placelistofsynonyms[sym] In LaTeX I accomplished this with glossaries and glossary-mcols. Is there some neat trick to get this behaviour "the ConTeXt way" (maybe with some Lua + *

Re: [NTG-context] new (lmtx) beta

2019-10-11 Thread Hans Hagen
quot;, 2. To define a mathematical function, it uses “function = “ in Contour, while it uses “code = “ in Surfaces and in Functions. Is there any reason to use two different names “function” and “code” to define functions? we can still decide as it's beta ... function | functions or code

Re: [NTG-context] new (lmtx) beta

2019-10-11 Thread Jeong Dal
eral/manuals/luametafun.pdf> a function name of the graphics are appeared as same as in the argument ‘function = “x^2 + y^2”’. Though it calculates function using “x^2 + y^2”, it is better to write the name of it as the output of $x^2 + y^2$. Is it possible to write it as in mathematical form

Re: [NTG-context] passing variables/data between context and lua

2019-10-08 Thread Aditya Mahajan
calculations based on the value of passed key. Let's take a variation of the original question, and define a macro where we can say \setvariables[exam][points=5] \setvariables[exam][points=10] and we can a macro \totalpoints to show the number of points. (There are probably better ways to do this than

Re: [NTG-context] notes in the margin

2019-10-04 Thread Henning Hraban Ramm
, frame=off, offset=overlay, strut=yes, ]{#1}% }% } \define\PlaceFootnote{% \inmargin[ voffset=\dimexpr-\FNVOffset\lineheight\relax, width=\ColWidth, ]{% \vtop{\switchtobodyfont[6pt]\placelocalnotes[footnote][before=,after=]}}% } \def\FNo#1{{#1~}} %\crlf\gobblespacetokens

Re: [NTG-context] Access current element in xmlsetsetup via xml.expressions

2019-10-02 Thread achim
runner = (runner and runner()) or function() > errorrunner_e(expression,converted) end > return { kind = "expression", expression = expression, converted > = converted, evaluator = runner } end > > Anyway i could not find a way to define an expression with a function &

Re: [NTG-context] Access current element in xmlsetsetup via xml.expressions

2019-10-02 Thread Hans Hagen
   local runner = load(format(template_e,converted))     runner = (runner and runner()) or function() errorrunner_e(expression,converted) end     return { kind = "expression", expression = expression, converted = converted, evaluator = runner } end Anyway i could

Re: [NTG-context] Access current element in xmlsetsetup via xml.expressions

2019-10-02 Thread mf
d)) runner = (runner and runner()) or function() errorrunner_e(expression,converted) end return { kind = "expression", expression = expression, converted = converted, evaluator = runner } end Anyway i could not find a way to define an expression with a function like this: xml.ex

Re: [NTG-context] About \textrule [ ]

2019-10-01 Thread Fabrice Couvreur
ried, > inbetween=, > > Best wishes, > Taco > > > Thank you. > > Fabrice > > > > \setuptextrules[width=0.5cm] > > > > \define[1]\ProprieteHeadcommand > > {\textrule[top]{#1}} > > > > \defineenumeration > > [propriete]

Re: [NTG-context] About \textrule [ ]

2019-10-01 Thread Taco Hoekwater
> On 1 Oct 2019, at 11:09, Fabrice Couvreur wrote: > > Hello, > The top line is in the text, how to fix this problem ? % alternative=serried, inbetween=, Best wishes, Taco > Thank you. > Fabrice > > \setuptextrules[width=0.5cm] > > \define[1]\Propriete

Re: [NTG-context] About \textrule [ ]

2019-10-01 Thread Otared Kavian
Hi Fabrice, Is this what you are looking for? Best regards: OK \setuptextrules[width=.5cm] \define[1]\ProprieteHeadcommand {\textrule[top]{Propriété}} \defineenumeration[propriete] [headstyle={bold}, style=italic, number=no, headcommand

Re: [NTG-context] Mkiv, fonts in text and math mode, with \definebodyfont

2019-10-01 Thread Hans Hagen
On 9/30/2019 7:32 PM, Stefano Sanguinetti wrote: Hello, I am trying to understand something more about fonts in text and math mode, in Mkiv Context. I would like to be able to change things at the "define body fonts" level. I tried the following, in order to have rsfs fonts : \set

[NTG-context] About \textrule [ ]

2019-10-01 Thread Fabrice Couvreur
Hello, The top line is in the text, how to fix this problem ? Thank you. Fabrice \setuptextrules[width=0.5cm] \define[1]\ProprieteHeadcommand {\textrule[top]{#1}} \defineenumeration [propriete] [text=Propriété, title=yes, headstyle={bold}, alternative=serried, style=italic

[NTG-context] Mkiv, fonts in text and math mode, with \definebodyfont

2019-09-30 Thread Stefano Sanguinetti
Hello, I am trying to understand something more about fonts in text and math mode, in Mkiv Context. I would like to be able to change things at the "define body fonts" level. I tried the following, in order to have rsfs fonts : \setupbodyfont[12pt] \definebodyfont[12pt][rm][tf

Re: [NTG-context] Multi-letter words/identifiers in math

2019-09-30 Thread Hans Hagen
) to better merge with the formula. The way I am currently doing is to introduce some “math text fonts” that is different from the main text font but close to the math font. And with custom font switchers like |\mwrm| and |\mwit| to help me define things like | \def\wordrm#1{\mbox{\mwrm #1}} \def

Re: [NTG-context] defs, variables and dimensions (was: passing variables/data between context and lua)

2019-09-29 Thread Martin Althoff
Hi Hraban, I can't answer your question counter or \define. However in my specific situation I would not use the number as a counter but just as a value. Actually my situation is an exam in which the total points are 44. From these I want to calculate percentages. And, as I find it easier

[NTG-context] Multi-letter words/identifiers in math

2019-09-29 Thread Shuxian Wang
am currently doing is to introduce some “math text fonts” that is different from the main text font but close to the math font. And with custom font switchers like `\mwrm` and `\mwit` to help me define things like ``` \def\wordrm#1{\mbox{\mwrm #1}} \def\wordit#1{\mbox{\mwit #1}} ``` Am I missing

Re: [NTG-context] defs, variables and dimensions

2019-09-28 Thread Wolfgang Schuster
Henning Hraban Ramm schrieb am 28.09.2019 um 08:53: Am 2019-09-27 um 14:58 schrieb Wolfgang Schuster : \define\question{44} \defineexpandable\question{44} Would it make sense to use a counter or some other TeX construct? Is it better to use \setvariable(s) for simple values than any \def

Re: [NTG-context] defs, variables and dimensions (was: passing variables/data between context and lua)

2019-09-28 Thread Henning Hraban Ramm
> Am 2019-09-27 um 14:58 schrieb Wolfgang Schuster > : > >> \define\question{44} > \defineexpandable\question{44} Would it make sense to use a counter or some other TeX construct? Is it better to use \setvariable(s) for simple values than any \def? Should I use a \newdime

Re: [NTG-context] passing variables/data between context and lua

2019-09-27 Thread Wolfgang Schuster
help would be much appreciated. Thanks, Martin \define\question{44} \defineexpandable\question{44} \starttext \startluacode local points = \question * 92 -- do some calculations with points and return to to context answer=42 \stopluacode % lots of Text in between The answer is \answer \stoptext

Re: [NTG-context] passing variables/data between context and lua

2019-09-27 Thread mf
\starttext \define\question{44} \startluacode -- see "ConTeXt Lua Documents" manual, §7.4 Looking inside local question = tokens.getters.macro("question") -- it's up to you to verify that \question contains a number -- better using the userdata table for your data userda

[NTG-context] passing variables/data between context and lua

2019-09-26 Thread Martin Althoff
\define\question{44} \starttext \startluacode local points = \question * 92 -- do some calculations with points and return to to context answer=42 \stopluacode % lots of Text in between The answer is \answer \stoptext

Re: [NTG-context] poem as a sidefloat

2019-09-25 Thread Henning Hraban Ramm
> Am 2019-09-25 um 20:45 schrieb Wolfgang Schuster > : > > Henning Hraban Ramm schrieb am 25.09.2019 um 19:35: >> Hi, I’d like to have a small poem beside my text. >> My approach doesn’t work, with or without \framed: >> >> Since I need this only once, I tho

Re: [NTG-context] poem as a sidefloat

2019-09-25 Thread Wolfgang Schuster
Henning Hraban Ramm schrieb am 25.09.2019 um 19:35: Hi, I’d like to have a small poem beside my text. My approach doesn’t work, with or without \framed: Since I need this only once, I thought I don’t need to define or setup my own float. \setupfloat inherits from \setupframed

[NTG-context] poem as a sidefloat

2019-09-25 Thread Henning Hraban Ramm
Hi, I’d like to have a small poem beside my text. My approach doesn’t work, with or without \framed: Since I need this only once, I thought I don’t need to define or setup my own float. \setupfloat inherits from \setupframed, but the parameters width, style and background(color) don’t work

Re: [NTG-context] OpenBSD install broken

2019-09-21 Thread Mojca Miklavec
; > This will silently fail, because > bin/mtx-update.lua > bin/mtxrun > do not recognize openbsd. > > 2) Edit bin/mtxrun: > > We need to define a "good" version of resolvers.platform(t,k) > At line 4049, there is a default definition. Replace it with: >

[NTG-context] OpenBSD install broken

2019-09-20 Thread Robert Krug
n/mtxrun do not recognize openbsd. 2) Edit bin/mtxrun: We need to define a "good" version of resolvers.platform(t,k) At line 4049, there is a default definition. Replace it with:  function resolvers.platform(t,k)   local platform="openbsd6.5-amd64"   os.setenv("MTX_

Re: [NTG-context] MetaPost with Multiple Variable Sections

2019-09-18 Thread Aditya Mahajan
On Wed, 18 Sep 2019, Jeroen wrote: \startMPcode pair a; a := 2cm; You define a to be a pair and then assign it to a number. Metapost is telling you that you cannot do that: (xpart a,ypart a) 56.6929 ! Equation cannot be performed (pair=numeric). ; <*> pair a; a := 2cm; draw full

Re: [NTG-context] mathring circle above a letter

2019-09-14 Thread Otared Kavian
t; 2019年9月14日(土) 18:37 Otared Kavian <mailto:ota...@gmail.com>>: > > Can someone tell me please whether it is possible to modify the \mathring > command so that th ecircle is a little bit larger, or the one I define below > as > __

Re: [NTG-context] mathring circle above a letter

2019-09-14 Thread Atsuhito Kohda
please whether it is possible to modify the \mathring > command so that th ecircle is a little bit larger, or the one I define > below as > > ___ > If your question is of interest to others as well

[NTG-context] mathring circle above a letter

2019-09-14 Thread Otared Kavian
it with the command \overline (or \overbar) and the result is not nice. Can someone tell me please whether it is possible to modify the \mathring command so that th ecircle is a little bit larger, or the one I define below as \interior in order to have a correct result (more clearly said: I would

Re: [NTG-context] expansion problem: random location

2019-09-13 Thread Wolfgang Schuster
', 'left', 'right', } function RandomLocation() context(locations[math.random(1,#locations)]) end \stopluacode \newdimen\PicWidth \PicWidth=\textwidth \define[1]\Blindbild{ \getrandomnumber\imgH{1}{9} \PicWidth=\textwidth \doif{#1}{left}{\PicWidth=.4\textwidth} \doif{#1}{right}{\PicWidth

[NTG-context] expansion problem: random location

2019-09-13 Thread Henning Hraban Ramm
() context(locations[math.random(1,#locations)]) end \stopluacode \newdimen\PicWidth \PicWidth=\textwidth \define[1]\Blindbild{ \getrandomnumber\imgH{1}{9} \PicWidth=\textwidth \doif{#1}{left}{\PicWidth=.4\textwidth} \doif{#1}{right}{\PicWidth=.4\textwidth} \startplacefigure[location={#1},title={#1

Re: [NTG-context] metafun 2

2019-09-08 Thread Otared Kavian
ind of features users >> would like to see. >> >> http://www.pragma-ade.com/general/magazines/mag-1104-mkiv.pdf > > Finally got around to playing around with the new interface. Here is an > example of how to define new key-value driven macros in metapost:

Re: [NTG-context] metafun 2

2019-09-08 Thread Aditya Mahajan
around to playing around with the new interface. Here is an example of how to define new key-value driven macros in metapost: https://adityam.github.io/context-blog/post/new-metafun-interface/ Aditya ___ If your

Re: [NTG-context] Overfull hbox issues: different font,

2019-09-04 Thread Wolfgang Schuster
, header=0cm, width=16cm, footer=0cm, bottom=1cm, ] \definefontfamily[arialFamily] [sans] [Arial] \definefontfamily[calibriFamily] [sans] [Calibri] % \setupbodyfont[myfontfamily, 12pt] \define\printExample{Es kann allerdings ein Problem auftreten: Es ist nicht

[NTG-context] Overfull hbox issues: different font,

2019-09-03 Thread Julian G
, footer=0cm, bottom=1cm, ] \definefontfamily[arialFamily] [sans] [Arial] \definefontfamily[calibriFamily] [sans] [Calibri] % \setupbodyfont[myfontfamily, 12pt] \define\printExample{Es kann allerdings ein Problem auftreten: Es ist nicht immer eindeutig, ob die gemessen

Re: [NTG-context] Use Visual studio code

2019-08-21 Thread Hans Hagen
.) Also, if you want to build the document with a keybinding, you could define a build task in your tasks.json: https://gist.github.com/JulianGmp/a2b38212878c23d71de3d977214f2bf7 The problem is not to have key bindings (I can do that) but to have different ones per filetype (i want to run lua files

Re: [NTG-context] Use Visual studio code

2019-08-21 Thread Julian Gompper
macros in the future, though I would probably implement these things in a seperate extension. Best regards, Julian Also, if you want to build the document with a keybinding, you could define a build task in your tasks.json: https://gist.github.com/JulianGmp/a2b38212878c23d71de3d977214f2bf7

Re: [NTG-context] Use Visual studio code

2019-08-19 Thread Hans Hagen
On 8/19/2019 10:08 PM, Eric Détrez wrote: Is it possible to use VScode as IDE for ConTeXt ? It depends on how you define ide ... one problem is that it's not really possible to easy define keybindings for running, help etc per filetype yet (as in scite etc) and messing with this server model

Re: [NTG-context] Bug in lmtx with \Bbb is back…

2019-08-19 Thread Hans Hagen
define $f(z) := z^k +\beta$. \stoptext %%% end bug-Bbb.tex ok, fixed in next ... - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038

[NTG-context] Bug in lmtx with \Bbb is back…

2019-08-19 Thread Otared Kavian
Hi Hans, The issue with \Bbb is back again with the beta version 2019.08.18 22:27: lmtx uses math italic roman instead. Again here is an example: %%% begin bug-Bbb.tex \starttext Let $\beta \in {\Bbb R}$ and $k \in {\Bbb Z}$. For $z\in{\Bbb C}^*$ we define $f(z) := z^k +\beta$. \stoptext

Re: [NTG-context] Bug in lmtx in display mathmode

2019-08-19 Thread Hans Hagen
define its {\it limit inferior}, denoted $\liminfbar$ by setting: \startformula a_{n} := \inf\{u_{k} \; ; \; k \geq n \}, \qquad\text{and then}\quad \liminfbar_{n\to\infty} u_{n} := \sup_{n \geq 1} a_{n}. \stopformula \stoptext %%% end bug-math-lmtx.tex also in yesterdays beta? Hans

[NTG-context] Bug in lmtx in display mathmode

2019-08-18 Thread Otared Kavian
line. Note that \liminfbar is accepted when it is inline math. Best regards: OK %%% begin bug-math-lmtx.tex \definemathcommand[liminfbar][limop] {\underline{\mfunctionlabeltext{lim}}} \starttext If $(u_{n})_{n}$ is a sequence of real numbers, we define its {\it limit inferior}, denoted

Re: [NTG-context] The odd semantics of \begincsname

2019-08-17 Thread Hans Hagen
but it not an option for instance (as mentioned) there can be more than one expansion going on after these define commands, like expanding a macro that itself expands to \csname so one has several \expandafters before the gdef then); there is actually no looking back in scanning tokens unless a token has

Re: [NTG-context] The odd semantics of \begincsname

2019-08-17 Thread Henri Menke
sname could behave differently when it's > after a \def, \gdef, (and then quite some more definition related > commands), it could behave differently but it not an option > > for instance (as mentioned) there can be more than one expansion going > on after these define commands, li

Re: [NTG-context] The odd semantics of \begincsname

2019-08-17 Thread Hans Hagen
going on after these define commands, like expanding a macro that itself expands to \csname so one has several \expandafters before the gdef then); there is actually no looking back in scanning tokens unless a token has been scanned already and looking forward would involve expansion so

Re: [NTG-context] metafun 2

2019-08-14 Thread Hans Hagen
On 8/14/2019 12:18 PM, Henri Menke wrote: Dear Hans, I just wanted to ask, will LMTX and MetaFun remain valid implementations of TeX and MetaPost or do we have to expect incompatibilities? It depends on how you define 'valid' ... we're downward compatible ... but LMTX will use features

Re: [NTG-context] XML/HTML output of Math

2019-08-08 Thread Atsuhito Kohda
k this somehow triggered by the nested mode switch (\text{\math{}}) in the \vsym. > If I change that definition to the more simple: > \define[1]\vsym{{\textstyle\bi #1}} > it works ok. Whether that helps you ... It helps me to some extent but with the original definition, we can use

Re: [NTG-context] XML/HTML output of Math

2019-08-08 Thread Taco Hoekwater
y a bug. And it seems to do this for all large operators. > > 2. \math{\Vmatrix{\vI, \vj, \vk; a_{1}, a_{2}, a_{3}; b_{1}, b_{2}, b_{3}}} > \vI, \vj, \vk are disappeared in xml/html output. What happend? I think this somehow triggered by the nested mode switch (\text{\math{}}) in th

[NTG-context] XML/HTML output of Math

2019-08-07 Thread Atsuhito Kohda
on of \vI, then we get every elements (but of course we get unnecessary "a" also). - bSample \setupbackend[export=yes] \definemathmatrix[vmatrix][matrix:bars] [simplecommand=Vmatrix] \define[1]\vsym{\text{\math{\bi #1}}} \define\vI{\vsym{i}} % \define\vi{\vsy

Re: [NTG-context] translating LyX/LaTex book into ConTeXt (was Re: [Context] Xindy)

2019-07-21 Thread Denis Maier
cters are then made virtual ones but in the text they are > proper unicodes. > > \definefontfeature[default][compose=yes] > > \starttext > char ṁ (U+01E41) > \stoptext > > > Now, I wonder how can one "define one's own sort order" since I'd like > > that words con

Re: [NTG-context] translating LyX/LaTex book into ConTeXt (was Re: [Context] Xindy)

2019-07-21 Thread Hans Hagen
mkiv we have way more control and these missign characters are then made virtual ones but in the text they are proper unicodes. \definefontfeature[default][compose=yes] \starttext char ṁ (U+01E41) \stoptext Now, I wonder how can one "define one's own sort order" since I'd like tha

[NTG-context] translating LyX/LaTex book into ConTeXt (was Re: [Context] Xindy)

2019-07-21 Thread Gour
book using ConTeXt. > you can define your own sort order (in mkiv this is somewhat easier > because there we're in unicode space) The two parts along with the to-be-written 3rd part would make it over 1k pages (currently part I & II are over 900p), there is mix of Croatian and Engli

Re: [NTG-context] Quotation marks

2019-07-19 Thread Hans Hagen
dependent so therefore we use \quotation. As Alan says, you can always define a macro for latex: \def\quotation#1{``#1''} doing that for context is not a good idea. (Also because future versions might issue an error when such core macros are redefined.) Hans

[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] interfaces.definecommand fails with brackets inside string arguments

2019-07-09 Thread Hans Hagen
On 7/9/2019 10:37 AM, Taco Hoekwater wrote: On 8 Jul 2019, at 17:18, mf wrote: Hello list, i've played a bit with interfaces.definecommand, that lets you define TeX macros from lua (see the "ConTeXt Lua Documents", 7.3 User interfacing). I found that the comman

Re: [NTG-context] interfaces.definecommand fails with brackets inside string arguments

2019-07-09 Thread Taco Hoekwater
> On 8 Jul 2019, at 17:18, mf wrote: > > Hello list, > i've played a bit with interfaces.definecommand, that lets you define TeX > macros from lua (see the "ConTeXt Lua Documents", 7.3 User interfacing). > > I found that the commands defined by interfaces.defi

Re: [NTG-context] interfaces.definecommand fails with brackets inside string arguments

2019-07-09 Thread Hans Hagen
On 7/8/2019 5:18 PM, mf wrote: Hello list, i've played a bit with interfaces.definecommand, that lets you define TeX macros from lua (see the "ConTeXt Lua Documents", 7.3 User interfacing). I found that the commands defined by interfaces.definecommand fail when you pass string

[NTG-context] interfaces.definecommand fails with brackets inside string arguments

2019-07-08 Thread mf
Hello list, i've played a bit with interfaces.definecommand, that lets you define TeX macros from lua (see the "ConTeXt Lua Documents", 7.3 User interfacing). I found that the commands defined by interfaces.definecommand fail when you pass string arguments that contain brackets.

Re: [NTG-context] feature request

2019-07-05 Thread Atsuhito Kohda
gesting are encode the _visual_ meaning: pmatrix is a matrix with > parenthesis, bmatrix is a matrix with brackets, vmatrix is a matrix with > vertical bars, and so on. One could also use _semantic_ commands: in my > documents, I define a command called MATRIX for typesetting matrices, and > DET fo

Re: [NTG-context] feature request

2019-07-05 Thread Atsuhito Kohda
Hi Henri, Thanks for your kind explanation. Generally I understand your point and the ConTeXt philosophy. > bmatrix, vmatrix, etc. are not defined by default, but > as you saw from my last message it is trivial to define these, > especially because templates (matrix:parentheses, etc.) &

Re: [NTG-context] feature request

2019-07-04 Thread Aditya Mahajan
is a matrix with brackets, vmatrix is a matrix with vertical bars, and so on. One could also use _semantic_ commands: in my documents, I define a command called MATRIX for typesetting matrices, and DET for determinant of a matrix. So, I simply type \MATRIX{1, 2; 5, 6} and \DET{1, 2; 5, 6}, etc. Now

Re: [NTG-context] feature request

2019-07-03 Thread Henri Menke
. are not defined by default, but as you saw from my last message it is trivial to define these, especially because templates (matrix:parentheses, etc.) for them already exist in the core. It would sometimes be nice if you could just copy and paste LaTeX code into a ConTeXt document and it just works

[NTG-context] Typesetting Markdown – Part 4: Theme Style

2019-06-23 Thread Thangalin
Hi all! This part of the series describes a way to define colours, fonts, and layout such that content is separated from presentation. https://dave.autonoma.ca/blog/2019/06/23/typesetting-markdown-part-4/ Questions, corrections, and improvements are welcome

[NTG-context] List of Symbols/Abbreviations/Glosses with more then two entries

2019-06-12 Thread Thomas Welter
he unit entry to be in a separate column when calling \placelistofsynonyms[sym] In LaTeX I accomplished this with glossaries and glossary-mcols. Is there some neat trick to get this behaviour "the ConTeXt way" (maybe with some Lua + *.aux)? The next step would be to define the ta

Re: [NTG-context] mkii to mkiv - what an ancient user needs to know

2019-06-12 Thread Hans Hagen
font-related left in some of the commands. I will work on a minimal example over the next few days and - if I don't solve it myself in the process - I'll post it. sometimes if you define you rown macros, like \def\foo{...} you should use \unexpanded\def\foo{...} Hans

Re: [NTG-context] background color, was: CMYK Color profile

2019-06-02 Thread Benjamin Koppe
nepageshift > [flyer] > [horizontal] > [\dimexpr\measure{bleed}-\measured{shortfold}\relax, > \measure{bleed}, > \measure{bleed}, > \dimexpr2\measured{shortfold}+\measured{bleed}\relax, > \measure{bleed}, > \dimexpr\measure{bleed}-\measured{s

Re: [NTG-context] background color, was: CMYK Color profile

2019-05-31 Thread Benjamin Koppe
] %% The vertical pageshift is simple. \definepageshift [flyer] [vertical] [\measure{bleed}] \setuppageshift [paper] [flyer] %% We define some measures to construct the page layout. \definemeasure [small] [3mm] \definemeasure [big] [\measure{small}*2] %% Each page has

<    7   8   9   10   11   12   13   14   15   16   >