[NTG-context] Re: How to Define a New Language
ai2472206...@yeah.net schrieb am 24.05.2024 um 16:39: 3. In general, it is enough to distinguish between Chinese Simplified Chinese and Chinese Traditional. Chinese has a large number of Chinese characters, therefore the fonts produced are generally divided into Chinese Simplified and Chinese Traditional. This causes Chinese Simplified Chinese fonts to fail to display Chinese Traditional. In addition to the differences in fonts, Chinese mainland, Taiwan(china), Hong Kong(china), etc. use different punctuation marks, expressions, etc. For example, Chinese mainland mainly uses "", while Taiwan may use 「」 more often. and the difference between the two Chinese expressions, such as when using labeltext. There are also differences regarding punctuation marks between official documents from the government and universities etc. but this is something which can be changed in the document style. While it's great to set up new languages at the system level, there is always the possibility that new languages will be added for one reason or another. As far as Chinese is concerned, it has a very large number of dialects. We can't be fully integrated into the system. Opening up suitable interfaces to add new languages can reduce the cost of system maintenance. The following should work with two main languages for simplified and traditional and local variant which fall back on both. The current chinese language can also be changed to the fallbacks. \installlanguage [zh-hans] [..,..=..,..] % Simplified Chinese \installlanguage [zh-hant] [..,..=..,..] % Traditional Chinese \installlanguage [zh-cn] [zh-hans] % China \installlanguage [zh-my] [zh-hans] % Malaysia \installlanguage [zh-sg] [zh-hans] % Singapore \installlanguage [zh-hk] [zh-hant] % Hong Kong \installlanguage [zh-mo] [zh-hant] % Macau \installlanguage [zh-tw] [zh-hant] % Taiwan As far as I know, the characters used (Chinese Simplified, Chinese Traditional), the punctuation marks used (Chinese mainland, Taiwan, Hong Kong), and the expressions used (Chinese mainland, Taiwan, Hong Kong) are basically different between the dialects of Chinese. There is no hyphenation difference in any dialect. I looked at the rules for linebreaking in chinese a while ago and even though there are a few guidelines there is no fixed list this. Many programs let you change the characters where a break is or isn't possible. As far as I am currently using, the context is not very well set for localization, and there are many words in lang-txt.lua that have not been translated into Chinese. I think that as an ordinary user, it is very dangerous to modify information at the system level. You're free to fill the missing entries. Although, as a temporary alternative, we can use 'newif' or 'startmode' to add a new condition to accommodate both Chinese Simplified and Chinese Traditional in the same document. However, it would be nice to have support at the system level. I don't know if I'm getting my point right. Because of the above, I used translation software to translate my thoughts. To support both forms it is easier to have separate languages and linebreaking/font settings for each of them. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: How to Define a New Language
3. In general, it is enough to distinguish between Chinese Simplified Chinese and Chinese Traditional. Chinese has a large number of Chinese characters, therefore the fonts produced are generally divided into Chinese Simplified and Chinese Traditional. This causes Chinese Simplified Chinese fonts to fail to display Chinese Traditional. In addition to the differences in fonts, Chinese mainland, Taiwan(china), Hong Kong(china), etc. use different punctuation marks, expressions, etc. For example, Chinese mainland mainly uses "", while Taiwan may use 「」 more often. and the difference between the two Chinese expressions, such as when using labeltext. While it's great to set up new languages at the system level, there is always the possibility that new languages will be added for one reason or another. As far as Chinese is concerned, it has a very large number of dialects. We can't be fully integrated into the system. Opening up suitable interfaces to add new languages can reduce the cost of system maintenance. As far as I know, the characters used (Chinese Simplified, Chinese Traditional), the punctuation marks used (Chinese mainland, Taiwan, Hong Kong), and the expressions used (Chinese mainland, Taiwan, Hong Kong) are basically different between the dialects of Chinese. There is no hyphenation difference in any dialect. As far as I am currently using, the context is not very well set for localization, and there are many words in lang-txt.lua that have not been translated into Chinese. I think that as an ordinary user, it is very dangerous to modify information at the system level. Although, as a temporary alternative, we can use 'newif' or 'startmode' to add a new condition to accommodate both Chinese Simplified and Chinese Traditional in the same document. However, it would be nice to have support at the system level. I don't know if I'm getting my point right. Because of the above, I used translation software to translate my thoughts. Muyik ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: [ export to svg ]
On 8/19/2023 1:12 PM, vm via ntg-context wrote: Is there a (simple) way to export the results of a \startMPpage ... \stopMPpage directly to a svg file? My current route is to import the pdf into inkscape, group path objects by stroke color, then save the result as svg and translate that into a hpgl format for the pen plotter. I guess/hope there is some hidden switch dumping the MPpage directly into a hpgl file ;-) mutool can do that - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] [ export to svg ]
Is there a (simple) way to export the results of a \startMPpage ... \stopMPpage directly to a svg file? My current route is to import the pdf into inkscape, group path objects by stroke color, then save the result as svg and translate that into a hpgl format for the pen plotter. I guess/hope there is some hidden switch dumping the MPpage directly into a hpgl file ;-) .Floris ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Some very simple cld - loading a module
Wolfgang: Many thanks for the fix and for the detailed explanation, which was very helpful! Best wishes Idris -- Professor Idris Samawi Hamid Department of Philosophy Colorado State University Fort Collins, CO 80523 On Aug 18, 2023, 10:56 AM -0600, Wolfgang Schuster , wrote: ** Caution: EXTERNAL Sender ** Hamid,Idris schrieb am 18.08.2023 um 17:30: Dear gang, The following, simple MWE gives an undefined control sequence error: === % \usemodule[translate] % \enableinputtranslation \startluacode -- context.usemodule({translate}) context.usemodule{translate} context.usemodule({ "first" }) or context.usemodule{ "first" } context.enableinputtranslation() context.darkgreen() \stopluacode \startTEXpage[offset=1em] \translateinput[Hermes][Idris] Hermes \disableinputtranslation Hermes \stopTEXpage === tex error > tex error on line 14 in file ./test-luacode.tex: Undefined control sequence \translateinput [Hermes][Idris] === The reason for the error is that the module is not being loaded. Toggling back to context syntax, of course, works. Reference: ConTeXt Lua Documents by Hans Hagen, page 22. The following analogous code works: \startluacode context.startchapter{first} \stopluacode It doesn't work or at least it does not what you expect, the examples in the manual pass strings ( "..." ) wherever text is expected while you pass a lua variable to the commands. Passing variables only work when the variable itself refers to a string, e.g. translate = "translate" Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Some very simple cld - loading a module
Hamid,Idris schrieb am 18.08.2023 um 17:30: Dear gang, The following, simple MWE gives an undefined control sequence error: === % \usemodule[translate] % \enableinputtranslation \startluacode -- context.usemodule({translate}) context.usemodule{translate} context.usemodule({ "first" }) or context.usemodule{ "first" } context.enableinputtranslation() context.darkgreen() \stopluacode \startTEXpage[offset=1em] \translateinput[Hermes][Idris] Hermes \disableinputtranslation Hermes \stopTEXpage === tex error > tex error on line 14 in file ./test-luacode.tex: Undefined control sequence \translateinput [Hermes][Idris] === The reason for the error is that the module is not being loaded. Toggling back to context syntax, of course, works. Reference: ConTeXt Lua Documents by Hans Hagen, page 22. The following analogous code works: \startluacode context.startchapter{first} \stopluacode It doesn't work or at least it does not what you expect, the examples in the manual pass strings ( "..." ) wherever text is expected while you pass a lua variable to the commands. Passing variables only work when the variable itself refers to a string, e.g. translate = "translate" Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Some very simple cld - loading a module
Dear gang, The following, simple MWE gives an undefined control sequence error: === % \usemodule[translate] % \enableinputtranslation \startluacode -- context.usemodule({translate}) context.usemodule{translate} context.enableinputtranslation() context.darkgreen() \stopluacode \startTEXpage[offset=1em] \translateinput[Hermes][Idris] Hermes \disableinputtranslation Hermes \stopTEXpage === tex error > tex error on line 14 in file ./test-luacode.tex: Undefined control sequence \translateinput [Hermes][Idris] === The reason for the error is that the module is not being loaded. Toggling back to context syntax, of course, works. Reference: ConTeXt Lua Documents by Hans Hagen, page 22. The following analogous code works: \startluacode context.startchapter{first} \stopluacode So how do we properly load the module from within a luacode environment? Thank you in advance. Best wishes Idris -- Professor Idris Samawi Hamid Department of Philosophy Colorado State University Fort Collins, CO 80523 ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Link from a PDF to a reference of an embedded PDF
On 7/24/23 18:04, Gerion Entrup wrote: > […] > I'm do not know the structure of PDFs exactly, therefore some of my > terms might be wrong. […] Hi Gerion, now I realize that my explanation was unnecesarily technical or not focused on your needs. My point was that if PDF as such doesn’t offer the capability, there is no way to include it in ConTeXt (with PDF documents as output files). > The situation is that I have a PDF-document (inner.pdf) that defines > several destinations and I want to embed that document with > \externalfigure into another PDF-document (outer.pdf). My question is: > Is it possible to create references within the source code of outer.pdf > that correctly set a link to a destination that is defined in inner.pdf? > Asked in another way: Is is possible that \externalfigure can extract > the (maybe named) destinations of inner.pdf and translate them in such a > way, that I can use \in within the outer document to link to them. I’m in a hurry, excuse my rash reply. As far as I know (although I never used them), you can use \in with references to other documents (I guess this is why you need the .tuc file of the other document [to resolve the reference]). In that case, you will have the reference number solved in your document. As far as I know, there is no link for that. Importing the document (with \externalfigure) has issues to preserve internal links. I hope it helps, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Link from a PDF to a reference of an embedded PDF
On Mon, 24 Jul 2023, Gerion Entrup wrote: > Hi Pablo, > > > not sure I’m getting your point right. > > Thank you for the detailed answer. > But I fear, I have not expressed myself precise enough. > The solution that you described does not directly fit to my setting. > I'll try to rephrase. Maybe it gets more clear then. I think, named > destinations could be a important part in the solution. > > I'm do not know the structure of PDFs exactly, therefore some of my > terms might be wrong. I'll name the two things from now on the following > way: > - a destination: This is a defined position within a PDF document; so > some position that a PDF viewer is able to jump to. In ConTeXt, you > can set such a position most of the time with the "reference" keyword. > In LaTeX, you use \label. > - a reference: This is a link that you can click on and cause the > PDF viewer to jump/scroll to the linked destination. In ConTeXt, you > can use \in to create a reference. In LaTeX, you use \ref. > > The situation is that I have a PDF-document (inner.pdf) that defines > several destinations and I want to embed that document with > \externalfigure into another PDF-document (outer.pdf). My question is: > Is it possible to create references within the source code of outer.pdf > that correctly set a link to a destination that is defined in inner.pdf? > Asked in another way: Is is possible that \externalfigure can extract > the (maybe named) destinations of inner.pdf and translate them in such a > way, that I can use \in within the outer document to link to them. According to https://wiki.contextgarden.net/Command/setupexternalfigure \externalfigure[][interaction=reference] should keep all the references (you can also try interaction=all). Not sure how the references get mapped internally, so that they may be linked. Aditya___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Link from a PDF to a reference of an embedded PDF
Hi Pablo, > not sure I’m getting your point right. Thank you for the detailed answer. But I fear, I have not expressed myself precise enough. The solution that you described does not directly fit to my setting. I'll try to rephrase. Maybe it gets more clear then. I think, named destinations could be a important part in the solution. I'm do not know the structure of PDFs exactly, therefore some of my terms might be wrong. I'll name the two things from now on the following way: - a destination: This is a defined position within a PDF document; so some position that a PDF viewer is able to jump to. In ConTeXt, you can set such a position most of the time with the "reference" keyword. In LaTeX, you use \label. - a reference: This is a link that you can click on and cause the PDF viewer to jump/scroll to the linked destination. In ConTeXt, you can use \in to create a reference. In LaTeX, you use \ref. The situation is that I have a PDF-document (inner.pdf) that defines several destinations and I want to embed that document with \externalfigure into another PDF-document (outer.pdf). My question is: Is it possible to create references within the source code of outer.pdf that correctly set a link to a destination that is defined in inner.pdf? Asked in another way: Is is possible that \externalfigure can extract the (maybe named) destinations of inner.pdf and translate them in such a way, that I can use \in within the outer document to link to them. Gerion signature.asc Description: This is a digitally signed message part. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Radial and linear gradients
Inkscape can export the gradients to PDF. I was hoping to eliminate Inkscape as an extra piece of software users have to download to make sure their SVG images are rendered correctly. By containerizing ConTeXt, MetaPost can be swapped for Inkscape, so users won't even know. It is, however, a minor duplication to have two programs that can convert SVG to PDF. (And Inkscape will bloat the container size.) For my images, at least, gradients are one of the last features needed to render them correctly using MetaPost. The other is font rendering in some cases will be incorrect (e.g., try using Roboto with weight 100). If we have to use Inkscape to ensure tat all SVG images are rendered correctly, then we'd only want to use MetaPost if we know that the images don't contain gradients, or would you recommend avoiding MetaPost altogether for SVG conversion? Thank you! On Wed, Dec 14, 2022 at 12:46 AM Hans Hagen via ntg-context wrote: > > On 12/14/2022 5:46 AM, Thangalin via ntg-context wrote: > > Hi there! > > > > Any thoughts on implementing SVG gradients in MetaPost? > > > > % SOF > > \startbuffer[csvg] > > http://www.w3.org/2000/svg; > > xmlns:xlink="http://www.w3.org/1999/xlink; viewBox="0 0 115.669 > > 115.669"> > cy="167.114" r="57.834" fx="124.515" fy="167.114" > > gradientTransform="translate(-17.77 -18.4)" > > gradientUnits="userSpaceOnUse"/> > offset="0"/> > stop-opacity="0"/> > transform="translate(-48.91 -90.879)"> > fill-opacity=".5" d="M48.769 90.936H164.64V206.96H48.769z"/> > cx="106.745" cy="148.713" r="57.834" fill="url(#b)" > > fill-rule="evenodd"/> > > \stopbuffer > > > > \starttext > >\placefigure{}{\includesvgbuffer[csvg][conversion=mp]} > > \stoptext > > % EOF > > > > See attached a comparison of the PDF generated using ConTeXt and the > > PNG file generated by exporting from Inkscape. > these gradients definitions get crazier by the day ... does inkscape > output a bitmap or vector pdf > > given what we do with context i'm not sure we should support everything > that pops up (mapping all onto mp and then pdf ...) > > Hans > > - >Hans Hagen | PRAGMA ADE >Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > - > > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > ___ inkscape-gradient.pdf Description: Adobe PDF document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] How can I make a Gentoo Linux package for ConTeXt LMTX?
> they are unlikely to spend much time making a package for a fairly unpopular > distro where the official installer already works. If someone adds something like installation.md to the root directory of ConTeXt source archive or git commit, anyone can read it and translate it into one's OS package. installation.md would be one generalized set of instructions that apply to windows, Mac, linux distributions, BSDs, and all other operating systems. --- Original Message --- On Tuesday, August 23rd, 2022 at 1:11 AM, Max Chernoff wrote: > Hi Amano, > > > Wuh. That's a bit complex. > > > Not really. From a user perspective, all that you need to run is > > make install > > From a developer perspective, this is essentially just the base ConTeXt > files, a modified texmfcnf.lua, and a fairly basic makefile. > > > For distribution packages that depend on context for generation of PDF > > documents, having context as a system package is essential. > > > I'd say that ConTeXt is available in nearly every package manager, via > TeX Live. Very very few package managers would have no TeX Live. TeX > Live only includes MkIV, the "stable" version, but most users won't > notice many differences from MkXL/LMTX, the "experimental" version. > > By policy, TeX Live only updates its binaries once per year. This would > be pretty much unworkable with LuaMetaTeX due to its frequent upgrades. > At some point when LuaMetaTeX is stable, the source will be released and > almost certainly be incorporated in TeX Live. > > > And, distribution maintainers can make things work if they understand > > TeX directory structure and texmfcnf.lua. > > > Packaging/installing ConTeXt is actually much easier than doing so for > other TeX systems. With other systems, you need to fiddle around with > fonts and packages, but with ConTeXt, you can pretty much just unpack a > few files. > > Here's a short paper that should give you an overview of how hard > packaging TeX can be: > > https://tug.org/TUGboat/tb34-3/tb108preining-distro.pdf > > > It comes down to care. If they care and they have installation guide, > > they will make it work. > > > I'm not sure who you're talking about here. If you're talking about end- > users, then yes, it's pretty simple to install ConTeXt. I personally > find ConTeXt much easier to install than TeX Live. > > If you're talking about packagers, then packaging ConTeXt is no more > complex than packaging TeX Live (which of course includes ConTeXt MkIV). > The installer documentation for ConTeXt LMTX certainly isn't as detailed > as it is for TeX Live, but LMTX is still beta software. > > If you're trying to say that the ConTeXt developers don't care, then you > may be "right" in a sense, but missing the point entirely. There is no > one who is paid to work on ConTeXt: all of the developers work on it > either as volunteers or to support their own business needs. The current > installer works for them and for many other users. This isn't to say > that they don't care about the users, but rather that they are unlikely > to spend much time making a package for a fairly unpopular distro where > the official installer already works. > > > On Sunday, August 21st, 2022 at 7:13 PM, Michal Vlasák > gmail.com> wrote: > > > Hi Michal, > > > > I prepared a proof of concept, that I am ready to take down immediately > > > at Hans' request, since I don't handle license information properly, and > > > texmf-context is stripped down (just so that the downloads are not too > > > big for proof of concept). > > > > > > https://github.com/vlasakm/context > > > That's quite impressive! > > > > There is documentation about how it can be used. I hope its obvious how > > > I got "texmf" (texmf-context.zip, unzip, delete some files I didn't want > > > to take up space), > > > One suggestion: instead of unpacking and committing "texmf-context.zip", > I'd recommend adding > > https://github.com/contextgarden/context-mirror/ > > as a git submodule. That way, it's easy to keep the files up-to-date, your > repo will use less space, and there's a clearer separation between your > package files and ConTeXt itself. > > > > A bit of a disclaimer: I don't really recommend pursuing this further. > > > Some time ago I was also that foolish to try to package TeX for Linux > > > distributions. Unfortunately I think that the result will never by > > > optimal - as demonstrated by the previous discussions, the usual > > > purposes of packages (to integrate software i
Re: [NTG-context] How can I make a Gentoo Linux package for ConTeXt LMTX?
Even if I put the installation in an archive and make a linux package that installs the archive, I still have to modify contextcnf.lua which isn't intended to handle differing system-wide installation paths of various POSIX-like operating systems. And, I don't really know * what the variables in contextcnf.lua mean and do. * whether there is a way to override certain variables in contextcnf.lua with another file. A separate override file is going to make it easy for linux distributions to override certain variables in contextcnf.lua. --- Original Message --- On Monday, August 15th, 2022 at 5:00 PM, Bruce Horrocks wrote: > > On 15 Aug 2022, at 13:19, amano.kenji amano.ke...@proton.me wrote: > > > > I was trying to translate instructions in install.sh and dependencies of > > install.sh into shell commands in a Gentoo Linux package. > > > > Gentoo Linux downloads all dependencies and builds a package in a network > > namespace where there is no internet access. > > > If you must use a Linux that makes life hard... ;-) > > I'm guessing you're trying to prepare ConTeXt for use in a private repository > on a LAN so that your users can install it without needing Internet access? > > ConTeXt only depends on glibc (iirc) - and it assumes it is present already. > So do an install on a machine that does have Internet access and everything > you need will then be self-contained in the directory you chose to install > into. Zip up that directory and use it for subsequent installs as many times > as you want just by unzipping it - no further Internet access required. > > You'll need to set up the PATH for where you unzipped the file - but the > install.sh file has the necessary information towards the end. > > Try it and see - it's not like typical modern bloatware that pulls down 100's > of Gbytes of dependencies willy-nilly. > > > Thus, install.sh cannot be directly used in a gentoo linux package. I have > > to translate instructions used in install.sh into shell commands. > > > > How can I do that? Can I somehow execute mtx-install.lua, mtxrun.lua, or > > mtxrun in a way that doesn't require internet access? > > > > --- Original Message --- > > On Monday, August 15th, 2022 at 12:12 PM, Bruce Horrocks n...@scorecrow.com > > wrote: > > > > > > On 15 Aug 2022, at 13:03, amano.kenji via ntg-context > > > > ntg-context@ntg.nl wrote: > > > > > > > > TexLive has texmfcnf.lua that doesn't really work with texlive-context > > > > installed by linux distributions. > > > > > > > > Arch Linux has its own patched version of texmfcnf.lua. > > > > > > > > It seems I'd be better off with a linux package for ConTeXt LMTX. > > > > > > > > How can I build and install ConTeXt LMTX on Gentoo Linux or any linux > > > > distribution? > > > > > > > > I wish it was as simple as ./configure, make, and make install. > > > > > > Install instructions for LMTX on Linux are here: > > > https://wiki.contextgarden.net/Installation > > > > > > It's pre-built so there are no make steps. > > > > > > Try it and ask again if you have problems. :-) > > > > > > — > > > Bruce Horrocks > > > Hampshire, UK > > > — > Bruce Horrocks > Hampshire, UK ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] How can I make a Gentoo Linux package for ConTeXt LMTX?
> On 15 Aug 2022, at 13:19, amano.kenji wrote: > > I was trying to translate instructions in install.sh and dependencies of > install.sh into shell commands in a Gentoo Linux package. > > Gentoo Linux downloads all dependencies and builds a package in a network > namespace where there is no internet access. If you must use a Linux that makes life hard... ;-) I'm guessing you're trying to prepare ConTeXt for use in a private repository on a LAN so that your users can install it without needing Internet access? ConTeXt only depends on glibc (iirc) - and it assumes it is present already. So do an install on a machine that does have Internet access and everything you need will then be self-contained in the directory you chose to install into. Zip up that directory and use it for subsequent installs as many times as you want just by unzipping it - no further Internet access required. You'll need to set up the PATH for where you unzipped the file - but the install.sh file has the necessary information towards the end. Try it and see - it's not like typical modern bloatware that pulls down 100's of Gbytes of dependencies willy-nilly. > > Thus, install.sh cannot be directly used in a gentoo linux package. I have to > translate instructions used in install.sh into shell commands. > > How can I do that? Can I somehow execute mtx-install.lua, mtxrun.lua, or > mtxrun in a way that doesn't require internet access? > > --- Original Message --- > On Monday, August 15th, 2022 at 12:12 PM, Bruce Horrocks > wrote: > > >>> On 15 Aug 2022, at 13:03, amano.kenji via ntg-context ntg-context@ntg.nl >>> wrote: >>> >>> TexLive has texmfcnf.lua that doesn't really work with texlive-context >>> installed by linux distributions. >>> >>> Arch Linux has its own patched version of texmfcnf.lua. >>> >>> It seems I'd be better off with a linux package for ConTeXt LMTX. >>> >>> How can I build and install ConTeXt LMTX on Gentoo Linux or any linux >>> distribution? >>> >>> I wish it was as simple as ./configure, make, and make install. >> >> >> Install instructions for LMTX on Linux are here: >> https://wiki.contextgarden.net/Installation >> >> >> It's pre-built so there are no make steps. >> >> Try it and ask again if you have problems. :-) >> >> — >> Bruce Horrocks >> Hampshire, UK — Bruce Horrocks Hampshire, UK ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] How can I make a Gentoo Linux package for ConTeXt LMTX?
I was trying to translate instructions in install.sh and dependencies of install.sh into shell commands in a Gentoo Linux package. Gentoo Linux downloads all dependencies and builds a package in a network namespace where there is no internet access. Thus, install.sh cannot be directly used in a gentoo linux package. I have to translate instructions used in install.sh into shell commands. How can I do that? Can I somehow execute mtx-install.lua, mtxrun.lua, or mtxrun in a way that doesn't require internet access? --- Original Message --- On Monday, August 15th, 2022 at 12:12 PM, Bruce Horrocks wrote: > > On 15 Aug 2022, at 13:03, amano.kenji via ntg-context ntg-context@ntg.nl > > wrote: > > > > TexLive has texmfcnf.lua that doesn't really work with texlive-context > > installed by linux distributions. > > > > Arch Linux has its own patched version of texmfcnf.lua. > > > > It seems I'd be better off with a linux package for ConTeXt LMTX. > > > > How can I build and install ConTeXt LMTX on Gentoo Linux or any linux > > distribution? > > > > I wish it was as simple as ./configure, make, and make install. > > > Install instructions for LMTX on Linux are here: > https://wiki.contextgarden.net/Installation > > > It's pre-built so there are no make steps. > > Try it and ask again if you have problems. :-) > > — > Bruce Horrocks > Hampshire, UK ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] OT: Angebotsanfrage für Erstellung von Logo und Namensschildern
Hi everyone, I’d like to file a tender for this but wouldn’t like to compete against anyone from our community – if you’re interested to do this, can we discuss it (off-list)? That would be nice. Hraban Am 11.08.22 um 17:09 schrieb Paul Menzel via ntg-context: [Excuse the German message. I am happy to translate it, if there is interest.] Sehr geehrte Damen und Herren, bitte senden Sie uns je ein Angebot für die folgenden Arbeiten zu. 1. Erstellung eines Logos für die IT4Science-Days – eine Konferenz der Helmholtz-Gemeinschaft und der Max-Planck-Gesellschaft 1. Nutzbar für Druck und Web 2. Bereitstellung im Vektorformat (SVG) 3. Bereitstellung bis 15. September 2022 4. 30 Minuten für Diskussion der Vorschläge 2. Grafisch-individuelle Namensschilder für IT4Science-Days 1. Skript auf TeX-Basis, das aus einer CSV-Datei im Format (Nachname, Vorname, Einrichtung) ein individuelles Namensschild erstellt. 2. Es ist optisch sichtbar, ob die Einrichtung der Person zur Helmholtz-Gemeinschaft oder Max-Planck-Gesellschaft gehört oder die Person ein Gast ist. 3. Bereitstellung bis 20. September 2022 Bitte fügen Sie dem Angebot Referenzen zu ähnlicher geleisteter Arbeit hinzu. Bitte lesen Sie die [Zusätzlichen Vertragsbedingungen der Max-Planck-Gesellschaft zur Förderung der Wissenschaften e. V.][1] und senden Sie uns dieses bis zum 20. August 2022 vorzugsweise als reine Textnachricht (mit Anhang) an dv-tref...@mpg.de mit dem Zeichen it4s-days-2022 zu. Sollten Sie kein Angebot abgeben können, teilen Sie uns das bitte auch mit. Max-Planck-Institut für molekulare Genetik z. H. Paul Menzel Ihnestraße 63–73 14195 Berlin Freundliche Grüße Paul Menzel [1]: https://www.mpg.de/5757353/zusaetzliche-vertragsbedingungen-der-mpg.pdf ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] OT: Angebotsanfrage für Erstellung von Logo und Namensschildern
[Excuse the German message. I am happy to translate it, if there is interest.] Sehr geehrte Damen und Herren, bitte senden Sie uns je ein Angebot für die folgenden Arbeiten zu. 1. Erstellung eines Logos für die IT4Science-Days – eine Konferenz der Helmholtz-Gemeinschaft und der Max-Planck-Gesellschaft 1. Nutzbar für Druck und Web 2. Bereitstellung im Vektorformat (SVG) 3. Bereitstellung bis 15. September 2022 4. 30 Minuten für Diskussion der Vorschläge 2. Grafisch-individuelle Namensschilder für IT4Science-Days 1. Skript auf TeX-Basis, das aus einer CSV-Datei im Format (Nachname, Vorname, Einrichtung) ein individuelles Namensschild erstellt. 2. Es ist optisch sichtbar, ob die Einrichtung der Person zur Helmholtz-Gemeinschaft oder Max-Planck-Gesellschaft gehört oder die Person ein Gast ist. 3. Bereitstellung bis 20. September 2022 Bitte fügen Sie dem Angebot Referenzen zu ähnlicher geleisteter Arbeit hinzu. Bitte lesen Sie die [Zusätzlichen Vertragsbedingungen der Max-Planck-Gesellschaft zur Förderung der Wissenschaften e. V.][1] und senden Sie uns dieses bis zum 20. August 2022 vorzugsweise als reine Textnachricht (mit Anhang) an dv-tref...@mpg.de mit dem Zeichen it4s-days-2022 zu. Sollten Sie kein Angebot abgeben können, teilen Sie uns das bitte auch mit. Max-Planck-Institut für molekulare Genetik z. H. Paul Menzel Ihnestraße 63–73 14195 Berlin Freundliche Grüße Paul Menzel [1]: https://www.mpg.de/5757353/zusaetzliche-vertragsbedingungen-der-mpg.pdf ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] String substitution using regular expressions and backreferences
Hi list, I'm looking to perform text replacements. \definereplacement[SubstPostmeridian][ match={[Pp].[Mm].]}, replace={\cap{pm}} ] The \replaceword command doesn't handle periods well. The translate module doesn't seem flexible enough to cover edge cases. Consider the following example document containing both sample inputs and sample outputs: \starttext {\bf Markdown Input} Our grandmother clock rang 11 p.m. and we fled. Our grandmother clock rang 11 p.m., so we fled. Our grandmother clock rang 11 p.m. We fled. \blank[big] {\bf \ConTeXt{} Output} Our grandmother clock rang 11 \cap{pm} and we fled. Our grandmother clock rang 11 \cap{pm}, so we fled. Our grandmother clock rang 11 \cap{pm}. We fled. \stoptext It would be most convenient to write: % Strip periods from p.m. \definereplacement[SubstPostmeridianLowercase][ match={[Pp].[Mm]. ([^:upper:])}, replace={\cap{pm} \1} ] % Preserve terminal period for p.m. (e.e. cummings notwithstanding) \definereplacement[SubstPostmeridianTerminal][ match={[Pp].[Mm]. ([:upper:])}, replace={\cap{pm}. \1} ] % Apply a macron for lowercase 'c' (McAnulty, McGenius, etc.) % Well, not quite a macron: https://tex.stackexchange.com/q/364024/2148 \definereplacement[SubstMac][ match={Mc([:upper:]\w)}, replace={M\macronbelow{c}\1} ] The \1 may be problematic. Other sigils include $1 and #1, which may also have issues. Thank you! ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] SVG text alignment issue
Here's the formal rule: https://www.w3.org/TR/SVG11/coords.html#TransformAttribute rotate( [ ]), which specifies a rotation by degrees about a given point. If optional parameters and are not supplied, the rotation is about the origin of the current user coordinate system. The operation corresponds to the matrix [cos(a) sin(a) -sin(a) cos(a) 0 0]. If optional parameters and are supplied, the rotation is about the point (cx, cy). The operation represents the equivalent of the following specification: translate(, ) rotate() translate(-, -). It looks like cx/cy, if not present, mean to rotate the text about its origin, which I would take to be width/2 and height/2. They define the rotation matrix as [cos(a) sin(a) -sin(a) cos(a) 0 0], where a is the angle: https://www.w3.org/TR/SVG11/coords.html#RotationDefined It appears as though LMTX is rotating around the baseline, rather than the central point of the text's bounding box. (I thought that (cap height + descender height) / 2 was the middle, but I suppose that wouldn't account for diacritics.) Thanks for looking into this! On Wed, Jun 29, 2022 at 2:24 PM Hans Hagen via ntg-context < ntg-context@ntg.nl> wrote: > On 6/29/2022 8:48 PM, Thangalin wrote: > > > To me, it looks like the text, after a rotational transform, is being > > written to the baseline rather than (cap height + descender height) / 2, > > which seems to be a MetaPost conversion issue? There's another, possibly > > related issue, which I'll provide in a separate thread. > Where is that rediculous (rather font version sensitive) rule defined? > In all test i did so far baseline works ok. > > Btw, it is sort of baffling what applications spit out when it comes to > svg (and exp text). The cod being meant for machines "eyes" only is not > really an excuse. > > Hans > > > - >Hans Hagen | PRAGMA ADE >Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > - > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Database of translations (was: Simple question)
On Tue, 10 May 2022 00:15:30 +0200 Gerben Wierda via ntg-context wrote: > What is the easiest way to have a ‘database’ of translations for > strings and maybe links? Here's an idea: \usemodule [translate] %% \mainlanguage [nl] \assigntranslation [en=alpha, nl=beta]\to\TRfoo \translateinput [foo] [\TRfoo] \assigntranslation [en=gamma, nl=delta]\to\TRbar \translateinput [bar] [\TRbar] \enableinputtranslation \starttext foo bar \stoptext It's not a good solution, but it's a start. There's also \translate [en=foo, nl=bar] But I don't know how to combine it with \translateinput. That would remove the need of the \TR… macros. Marco ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Simple question
Am 10.05.22 um 00:15 schrieb Gerben Wierda via ntg-context: What is the easiest way to have a ‘database’ of translations for strings and maybe links? I now have 4 languages and 2 versions so 8 documents, but I’d like to have all translatable strings together so I can maintain these in a single file. Ideally I can do a file where the key of the translation is one language (say English) and the translations are part of that. Something I can call like this \translatephrase[English phrase][nl] \translatelocation[../LMTX-Output/without-ids/en/file.pdf][nl][simple] and where I can maintain all the translations a bit like this: \translationentry[English phrase]{ \definetranslatephrase[nl]Nederlandse frase] \definetranslatephrase[fr][Phrase français] } } \translatelocation[../LMTX-Output/without-ids/en/file.pdf][simple][nl][../LMTX-Output/without-ids/nl/file-simple.pdf]] \translatelocation[../LMTX-Output/without-ids/en/file.pdf][none][nl][../LMTX-Output/without-ids/nl/file.pdf]] Where the \translatelocation command can be used inside an \externalfigure command and \translatephrase can be used as as text. In the end I’d like to compile with context language=fr mode=simple mainfile.tex Doable? Gerben Wierda (LinkedIn <https://www.linkedin.com/in/gerbenwierda>) R IT Strategy <https://ea.rna.nl/> (main site) Book: Chess and the Art of Enterprise Architecture <https://ea.rna.nl/the-book/> Book: Mastering ArchiMate <https://ea.rna.nl/the-book-edition-iii/> Hi Gerben, a lot is doable, it depends on by whom ;) But this looks like a quite easy case. Of course the answer is always “Lua tables”, but I guess the translations would be most easy to maintain in a CSV file (you can edit it in LibreOffice or Excel, while the latter often botches the encoding). It could look like: key;en;de;nl yes;yes;ja;ja LANG;English;Deutsch;Nederlands i.e. the first column is the keyword and the other columns contain the translated term (so you can also change the “original” version). (We’re using the same in a LaTeX3 project made by Marei.) Without researching I assume there are already Lua functions to read a CSV file into a Lua table, and the lookup is easy – since I’m not fluent in Lua, I won’t provide the function(s) for you. BTW there is already \translate (https://wiki.contextgarden.net/Command/translate) that changes text depending on the current language. And there is the translate module that changes terms within the whole text: https://source.contextgarden.net/tex/context/modules/mkiv/m-translate.mkiv Other options like .po files might be more versatile but also much more involved. This covers \translatephrase; for your figures I’d just just a language variable in the path, like \externalfigure[images/\LANG/cow.pdf] If this is always the current language, use \currentlanguage. You can also setup the language dependent directory in \setupexternalfigures. Regarding modes, the current language is set as a system mode (*en, *nl), and of course you can query modes with one of the many \doif macros. (https://wiki.contextgarden.net/Modes) Since it doesn’t make sense to try \externalfigure[path/\currentmode/cow] (you never know how many modes are active), you can set a macro or variable depending on a mode: \doifmode{simple}{\setvariable{gerben}{level}{simple}} and then \externalfigure[images/\getvariable{gerben}{level}/\currentlanguage/cow] Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] XML: calculations on attribute values before output
Thanks so much Taco, that opens the door to a lot for me. It's a tricky learning curve. Just in case anyone else is copying code in future for CALS, there's a tiny tweak to the rows calculation, it should be (t.at.morerows or 0) + 1. I see a route to solving lots of other problems here too. Thanks again. Duncan On Thu, 5 May 2022 at 08:21, Taco Hoekwater wrote: > > > > On 4 May 2022, at 22:10, Duncan Hothersall via ntg-context < > ntg-context@ntg.nl> wrote: > > > > Hi. > > > > I'm processing an XML table and need to set a row span. Because we use a > variant of the CALS table model, spans are defined by an attribute saying > how many *additional* rows should be spanned, as opposed to how many *in > total*. So to translate this into TABLE \bTD[nr=X] syntax I need to add 1. > > > > I'm guessing this is very easily doable (in lua?) but I've tried various > permutations and can't work it out. If anyone could give me a pointer that > would be great. > > > > (In reality I'm going to need to handle lots of other conversions of > attribute values into \bTD[...] commands, so if there's a generalised way > of doing that sort of thing, or even better if someone has already tackled > CALS tables in this way, that would also be great!) > > Not CALS, but I do a lot of HTML table processing. I find it all much > easier on the lua side, because there the > attributes are just in a table entry of the argument node t ( t.at ): > > set up a lua function in the setups: > > \startxmlsetups xml:demo:base > \xmlsetsetup{#1}{*}{xml:demo:*} > \xmlsetfunction {\xmldocument}{entry}{userdata.xmlfunctions.entry} > \stopxmlsetups > > and then add this lua code: > > \startluacode > userdata.xmlfunctions = {} > function userdata.xmlfunctions.entry (t) > local rows = (t.at.morerows or 1) + 1 > context.bTD({nr=rows}) > lxml.flush(t) > context.eTD() > end > \stopluacode > > All of the tex-side commands also exist in lua, in the lxml and/or xml > table, e.g.: > > direct output flushing: > lxml.flush(t) > lxml.all(t, ‘entry’) > > filter for processing: > for b in xml.collected(lxml.getid(t),'../row/entry') do … end > > > (those are the ones I use a lot, there are many more) > > Best wishes, > Taco -- Duncan Hothersall, Operations Director CAPDM Limited - Online Program Enablers 0131 677 2400 www.capdm.com Registered in Scotland: SC168970 VAT: 682 846 983 Registered address: 20 Forth Street Edinburgh EH1 3LH UK <https://maps.google.com/?q=22+Forth+Street,+Edinburgh,+EH1+3LH,+UK=gmail=g> Capture, author, publish, deliver and manage your learning materials. *Sign up to the CAPDM newsletter here <http://eepurl.com/bqzBQn>* ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] XML: calculations on attribute values before output
> On 4 May 2022, at 22:10, Duncan Hothersall via ntg-context > wrote: > > Hi. > > I'm processing an XML table and need to set a row span. Because we use a > variant of the CALS table model, spans are defined by an attribute saying how > many *additional* rows should be spanned, as opposed to how many *in total*. > So to translate this into TABLE \bTD[nr=X] syntax I need to add 1. > > I'm guessing this is very easily doable (in lua?) but I've tried various > permutations and can't work it out. If anyone could give me a pointer that > would be great. > > (In reality I'm going to need to handle lots of other conversions of > attribute values into \bTD[...] commands, so if there's a generalised way of > doing that sort of thing, or even better if someone has already tackled CALS > tables in this way, that would also be great!) Not CALS, but I do a lot of HTML table processing. I find it all much easier on the lua side, because there the attributes are just in a table entry of the argument node t ( t.at ): set up a lua function in the setups: \startxmlsetups xml:demo:base \xmlsetsetup{#1}{*}{xml:demo:*} \xmlsetfunction {\xmldocument}{entry}{userdata.xmlfunctions.entry} \stopxmlsetups and then add this lua code: \startluacode userdata.xmlfunctions = {} function userdata.xmlfunctions.entry (t) local rows = (t.at.morerows or 1) + 1 context.bTD({nr=rows}) lxml.flush(t) context.eTD() end \stopluacode All of the tex-side commands also exist in lua, in the lxml and/or xml table, e.g.: direct output flushing: lxml.flush(t) lxml.all(t, ‘entry’) filter for processing: for b in xml.collected(lxml.getid(t),'../row/entry') do … end (those are the ones I use a lot, there are many more) Best wishes, Taco ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] XML: calculations on attribute values before output
Hi. I'm processing an XML table and need to set a row span. Because we use a variant of the CALS table model, spans are defined by an attribute saying how many *additional* rows should be spanned, as opposed to how many *in total*. So to translate this into TABLE \bTD[nr=X] syntax I need to add 1. I'm guessing this is very easily doable (in lua?) but I've tried various permutations and can't work it out. If anyone could give me a pointer that would be great. (In reality I'm going to need to handle lots of other conversions of attribute values into \bTD[...] commands, so if there's a generalised way of doing that sort of thing, or even better if someone has already tackled CALS tables in this way, that would also be great!) MWE below, but obviously it just passes the morerows="1" value straight through into \bTD[nr=1] so it doesn't give me a row span at all. Thanks in advance. Duncan -- \startbuffer[demo] 1 2 3 \stopbuffer \startxmlsetups xml:demo:base \xmlsetsetup{#1}{*}{xml:demo:*} \stopxmlsetups \xmlregisterdocumentsetup{demo}{xml:demo:base} \startxmlsetups xml:demo:informaltable \bTABLE \xmlflush{#1} \eTABLE \stopxmlsetups \startxmlsetups xml:demo:tgroup \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:demo:tbody \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:demo:row \bTR \xmlflush{#1} \eTR \stopxmlsetups \startxmlsetups xml:demo:entry \bTD[nr=\xmlattdef{#1}{morerows}{1}] \xmlflush{#1} \eTD \stopxmlsetups \setupbodyfont[modern] \starttext \xmlprocessbuffer{demo}{demo}{} \stoptext -- ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] XML processing instructions
Just following up on my own question in case anybody else is interested, I realised that the logic of my preprocessor code wasn't the problem, it was just my ignorance of lua and character escaping. Both ? and * are special characters in string.gsub expressions, so they need to be escaped with the lua escape character which is % (which sends my editor haywire because it thinks I am putting in a TeX comment, but never mind!). So my now working code to translate historic processing instructions into directives without a separate pass is: \startluacode function lxml.preprocessor(data) data = string.gsub(data, '<%?capdm %*force_line_stop%?>', '') return data end \stopluacode \startsetups xml:directive:injector:newline \crlf \stopsetups Duncan On Mon, 2 May 2022 at 09:24, Duncan Hothersall wrote: > Many thanks Denis. Very useful tip on the injectors and generalised > command usage. That will definitely come in useful. > > My problem is that I already have a lot of XML data with the existing > processing instructions in it. I know I could use an external preprocess in > something like Python to change them into injectors before they are fed > into ConTeXt, but I was hoping there was a way to handle them directly as > part of the ConTeXt / lua process. > > Thanks again though. > > Duncan > > > > > On Mon, 2 May 2022, 08:48 , wrote: > >> That was too quick, sorry. >> >> >> >> Hi Duncan, >> >> >> >> I have used context’s own injectors for this : >> >> >> >> >> >> >> >> \startsetups xml:directive:injector:addlinetopage >> >> \adaptlayout[lines=+1] >> >> \stopsetups >> >> >> >> Or, for your line break example : >> >> >> >> >> >> >> >> \startsetups xml:directive:injector:newline >> >> \crlf >> >> \stopsetups >> >> >> >> Also, I have learned that you can just use arbitrary context code in xml: >> >> >> >> \def\xmltexdirective#1#2{\doif{#1}{command}{#2}} >> >> >> >> \xmlinstalldirective{tex}{xmltexdirective} >> >> >> >> >> >> >> >> >> >> >> >> Best, >> >> Denis >> >> >> >> *Von:* Maier, Denis Christian (UB) >> *Gesendet:* Montag, 2. Mai 2022 09:45 >> *An:* 'mailing list for ConTeXt users' >> *Cc:* Duncan Hothersall >> *Betreff:* AW: [NTG-context] XML processing instructions >> >> >> >> >> >> *Von:* ntg-context *Im Auftrag von *Duncan >> Hothersall via ntg-context >> *Gesendet:* Montag, 2. Mai 2022 09:20 >> *An:* mailing list for ConTeXt users >> *Cc:* Duncan Hothersall >> *Betreff:* [NTG-context] XML processing instructions >> >> >> >> I have a big set of existing XML books (held in a derivative of DocBook) >> which I'm looking to start processing directly with ConTeXt. (Up to now I >> have a system which converts the XML into ConTeXt code which is then >> processed, but this is inefficient and lots of the code is now unsupported.) >> >> >> >> I've had some success producing output, but my first real sticking point >> has come with processing instructions. The existing XML contains lots of >> processing instructions of the form >> >> , some of which can be conditional and introduce new >> data etc. But I'd be happy at this stage if I could just process the most >> basic one of them, which is used to introduce a line stop in a running >> paragraph of text. >> >> >> >> My best guess at how to do this was to use the lxml.preprocessor function >> to convert the processing instruction into an element, and then process the >> element as normal. But (a) my attempt didn't work, and (b) there may >> well be a better way. >> >> >> >> Minimal working example below, except that obviously the processing >> instruction bit doesn't work! >> >> >> >> Thanks for any help or insights. >> >> >> >> Duncan >> >> >> >> >> >> MWE: >> >> -- >> >> >> >> \startbuffer[demo] >> >> A paragraph witha processing >> instruction. >> >> \stopbuffer >> >> \startxmlsetups xml:demo:base >> \xmlsetsetup{#1}{*}{xml:demo:*} >> \stopxmlsetups >> \xmlregisterdocumentsetup{demo}{xml:demo:base} >> >> \startxmlsetups xml:demo:book >> \xmlflush{#1} >
[NTG-context] Regular online meet-up (tomorrow!)
You’re invited to join Tuesday, January 11th, 15:00 CET at https://lecture.senfcall.de/hen-rbr-rku-oke ConTeXt users of all levels are welcome! Hans offered to give a Q session again – please announce subjects you’d like to discuss ASAP, so that he can prepare. I guess we can talk more about the requirements of critical editions, and I’d like to know how to translate indirect \doSomething definitions into LMTX style. [Howto] * No special software installation required; most modern browsers should work (WebRTC required). * Open the above URL, accept the privacy statement, * enter your name, * click "join" (or "start" if you’re the first), * click "with microphone", allow your browser to access it, check the audio. * Your microphone is muted if you join. Activate microphone and/or camera with the buttons at the bottom. * Minimize the default presentation with the "screen" button, bottom right. * If you’d like to share your screen or upload a file, you can make yourself the presenter: Click on your user name, change the setting, then you’ll see the "screen sharing" button beside the camera button; also there’s now "manage presentations" behind the "plus" button. Beware there is only one presenter, so don’t kill someone else’s presentation. [Technical hints] * Sound is usually better if you use a headset (less noise for everyone). * Connection problems are mostly due to low bandwidth or high latency on your side, e.g. with mobile connections. * Screen sharing needs a lot of bandwidth. * If audio/video doesn’t work for you, try a different browser, and you can still use the text chat. * You can also join with a regular telephone (audio only, of course), call +49-6151-86275-22 (German landline); then you must enter a PIN that changes every time – if you need it, ask me for it via email. Mute/unmute your microphone with "0". [Netiquette] * Please use a name that we recognize from here. Some feel uncomfortable with anonymous lurkers. * Mute your microphone while you’re not talking. * It’s nice to show your face at least when you join. * If there are connection problems, stop camera sharing. * The room is set to “everyone’s a moderator“, I trust you... Next time will be February 8th. See you, Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Critical Editions?
The starting point of the discussion on reledmac and other related points, has begun on May 13, 2016. See here about the way to get a ConTeXt equivalent to a LaTeX encoding : https://www.mail-archive.com/ntg-context@ntg.nl/msg81793.html <https://www.mail-archive.com/ntg-context@ntg.nl/msg81793.html> (I gave the LaTeX code). For the question asked by Jürgen, as far as I know, you have to deal (and play) with setupnote, definenote AND setupline commands. Discussion is here : https://www.mail-archive.com/search?l=ntg-context@ntg.nl=subject:%22Re%5C%3A+%5C%5BNTG%5C-context%5C%5D+TwoColumns+in+two+different+languages%2C+with+alternate+text+on+even+and+odd+page.%22=newest=1 > Le 5 janv. 2022 à 18:28, Jean-Pierre Delange via ntg-context > a écrit : > > Hi Luigi & Pablo, > I’ve thinking that Google translate may be provide some help. I’ll try it ! > >> Le 5 janv. 2022 à 17:13, luigi scarso via ntg-context > <mailto:ntg-context@ntg.nl>> a écrit : >> >> >> >> On Wed, Jan 5, 2022 at 12:54 PM Pablo Rodriguez via ntg-context >> mailto:ntg-context@ntg.nl>> wrote: >> On 1/5/22 9:43 AM, luigi scarso via ntg-context wrote: >> > [...] >> > quite old (2014), but perhaps still interesting: >> > embedding of a tei-xml into a tagged pdf >> > https://www.guitex.org/home/images/ArsTeXnica/AT018/teitagged.pdf >> > <https://www.guitex.org/home/images/ArsTeXnica/AT018/teitagged.pdf> >> >> Luigi, >> >> if you allow me a comment (or even a suggestion), an English version of >> that article updated to LMTX wouuld be of huge help to the rest of us. >> >> yeah, but unfortunately I have no time now. >> It's for luatex with poppler -- now we have pplib -- >> and not lmtx, so not so useful I guess. >> But you can try with >> $>pdftotext -layout teitagged.pdf >> and translate teitagged.txt with google. >> >> -- >> luigi >> ___ >> If your question is of interest to others as well, please add an entry to >> the Wiki! >> >> maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / >> http://www.ntg.nl/mailman/listinfo/ntg-context >> <http://www.ntg.nl/mailman/listinfo/ntg-context> >> webpage : http://www.pragma-ade.nl <http://www.pragma-ade.nl/> / >> http://context.aanhet.net <http://context.aanhet.net/> >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> <https://bitbucket.org/phg/context-mirror/commits/> >> wiki : http://contextgarden.net <http://contextgarden.net/> >> ___ > > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Critical Editions?
Hi Luigi & Pablo, I’ve thinking that Google translate may be provide some help. I’ll try it ! > Le 5 janv. 2022 à 17:13, luigi scarso via ntg-context a > écrit : > > > > On Wed, Jan 5, 2022 at 12:54 PM Pablo Rodriguez via ntg-context > mailto:ntg-context@ntg.nl>> wrote: > On 1/5/22 9:43 AM, luigi scarso via ntg-context wrote: > > [...] > > quite old (2014), but perhaps still interesting: > > embedding of a tei-xml into a tagged pdf > > https://www.guitex.org/home/images/ArsTeXnica/AT018/teitagged.pdf > > <https://www.guitex.org/home/images/ArsTeXnica/AT018/teitagged.pdf> > > Luigi, > > if you allow me a comment (or even a suggestion), an English version of > that article updated to LMTX wouuld be of huge help to the rest of us. > > yeah, but unfortunately I have no time now. > It's for luatex with poppler -- now we have pplib -- > and not lmtx, so not so useful I guess. > But you can try with > $>pdftotext -layout teitagged.pdf > and translate teitagged.txt with google. > > -- > luigi > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Critical Editions?
On Wed, Jan 5, 2022 at 12:54 PM Pablo Rodriguez via ntg-context < ntg-context@ntg.nl> wrote: > On 1/5/22 9:43 AM, luigi scarso via ntg-context wrote: > > [...] > > quite old (2014), but perhaps still interesting: > > embedding of a tei-xml into a tagged pdf > > https://www.guitex.org/home/images/ArsTeXnica/AT018/teitagged.pdf > > Luigi, > > if you allow me a comment (or even a suggestion), an English version of > that article updated to LMTX wouuld be of huge help to the rest of us. > yeah, but unfortunately I have no time now. It's for luatex with poppler -- now we have pplib -- and not lmtx, so not so useful I guess. But you can try with $>pdftotext -layout teitagged.pdf and translate teitagged.txt with google. -- luigi ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Setting table of contents depth by number rather than by list
Anyway, I agree that a solution via hierarchy levels would be nice. Denis Maier via ntg-context hat am 24.12.2021 22:43 geschrieben: Jason Ross <jasonross1...@gmail.com> hat am 24.12.2021 22:37 geschrieben: On 12/24/21 1:29 PM, Denis Maier wrote: I probably wasn't clear. You will support toc:2. This: #+Context_Section_Levels: '(chapter section subsection) will translate into a definesectionlevels command and inform your exporter about the used sectionlevels. Once the used commands are known it should be possible to map toc:2 to a combinedlist definition. I can't require the user to use more document keywords to get the same functionality they already have with the other exporters by default. You don't do that. If you provide default a default sectionlevel scheme, you'll know what toc:2 means. If a user uses a different scheme provided via #+Context_Section_Levels you can use that to adjust the meaning of toc:2. But if a user uses the default setting toc:2 should be fine. Does that make sense? Denis I am really specifically looking for a way _in ConTeXt_ to create a table of contents with depth `n` regardless of the sectioning used. Jason ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Setting table of contents depth by number rather than by list
Jason Ross <jasonross1...@gmail.com> hat am 24.12.2021 22:37 geschrieben: On 12/24/21 1:29 PM, Denis Maier wrote: I probably wasn't clear. You will support toc:2. This: #+Context_Section_Levels: '(chapter section subsection) will translate into a definesectionlevels command and inform your exporter about the used sectionlevels. Once the used commands are known it should be possible to map toc:2 to a combinedlist definition. I can't require the user to use more document keywords to get the same functionality they already have with the other exporters by default. You don't do that. If you provide default a default sectionlevel scheme, you'll know what toc:2 means. If a user uses a different scheme provided via #+Context_Section_Levels you can use that to adjust the meaning of toc:2. But if a user uses the default setting toc:2 should be fine. Does that make sense? Denis I am really specifically looking for a way _in ConTeXt_ to create a table of contents with depth `n` regardless of the sectioning used. Jason ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Setting table of contents depth by number rather than by list
On 12/24/21 1:29 PM, Denis Maier wrote: I probably wasn't clear. You will support toc:2. This: #+Context_Section_Levels: '(chapter section subsection) will translate into a definesectionlevels command and inform your exporter about the used sectionlevels. Once the used commands are known it should be possible to map toc:2 to a combinedlist definition. I can't require the user to use more document keywords to get the same functionality they already have with the other exporters by default. I am really specifically looking for a way _in ConTeXt_ to create a table of contents with depth `n` regardless of the sectioning used. Jason ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Setting table of contents depth by number rather than by list
Jason Ross via ntg-context <ntg-context@ntg.nl> hat am 24.12.2021 22:22 geschrieben: On 12/24/21 1:20 PM, Denis Maier via ntg-context wrote: >> >> I see. >> >> Next try: add a new option >> >> "#+Context_Section_Levels: >> >> Thus will take an alist. Now you'll know about the user defined >> structure levels and the toc option can be translated to the >> corresponding setting. (Here again, you can if course define >> reasonable defaults.) Actually, you don't need an alist. A simple quotes list should be enough: #+Context_Section_Levels: '(chapter section subsection) > Denis That isn't going to work. The interface needs to be the same as for the other exporters for TOC control. I need to support "toc:2". I probably wasn't clear. You will support toc:2. This: #+Context_Section_Levels: '(chapter section subsection) will translate into a definesectionlevels command and inform your exporter about the used sectionlevels. Once the used commands are known it should be possible to map toc:2 to a combinedlist definition. Jason ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Can modes be used for content control?
On 11/17/2021 6:56 PM, Aditya Mahajan via ntg-context wrote: On Tue, 16 Nov 2021, Idris Samawi Hamid ادريس سماوي حامد wrote: Hi Aditya, Many thanks; see below: On Tue, 16 Nov 2021 17:23:59 -0700, Aditya Mahajan via ntg-context wrote: On Tue, 16 Nov 2021, Idris Samawi Hamid ادريس سماوي حامد via ntg-context wrote: Dear gang, For creating/authoring content in ConTeXt: Can modes or the like be used for content control? For example, someone wants to write at least two versions of a book managed from a single file. So, e.g., we may have a) abridged content b) unabridged content - includes a) c) abridged content + translation d) unabridged content + translation [:] One can author and organize this in XML - pre-ConteXt - but perhaps one prefers to write in ConTeXt (take advantage of shortcuts etc.). So maybe \defineparagraphs[unabridged] \defineparagraphs[abridged] \defineparagraphs[translation] Then one authors the complete work in a single project, but you can produce a variety of versions, depending on the mode chosen: \definemode[unabridged] etc. Can one do this in context? Yes! This is what I do (for solutions in homework assignments): \definebuffer[solution][local=yes,nested=yes] \startmode[solution] \defineenumeration[solution][fancy setup...] \stopmode Then, in the main tex file: \startsolution ... \stopsolution By default, gives the version without solution. Compile with --mode=solution to get the version with solution. The same thing should work in your case by defining two modes: unabridged and translation. And then use --mode=unabridged,translate etc to get multiple modes. Here's a working sample: === % \definebuffer[unabridged] % \definebuffer[abridged] \setupwhitespace[big] \starttext \startmode[unabridged] \input knuth \startblockquote \input ward \stopblockquote % \startmode[abridged] % \input knuth % \stopmode \stopmode \startmode[abridged] \input knuth \stopmode % \startmode[abridged] % \input zapf % \stopmode \stoptext === Unfortunately - as pointed out on the wiki - modes cannot be nested. But you don't have to directly use the modes. The following will work: \definestartstop[abridged] % By default, don't show the unabridged text \definebuffer[unabridged][local=yes, nested=yes] \startmode[unabridged] % In the unabridged mode, show the abridged text \definestartstop[unabridged] \stopmode \starttext \startabridged \input knuth \startunabridged \startblockquote \input ward \stopblockquote \stopunabridged \input zapf \stopabridged Blocks are a better mechanism, but I still prefer modes here because I find the \beginblock ... \endblock syntax to be a bit awkward in a context document. it also depends on usage ... you can have blocks and delay them or reuse them or call them up later etc .. so you can code answers with questions and then call them up in an appendix - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Can modes be used for content control?
On Tue, 16 Nov 2021, Idris Samawi Hamid ادريس سماوي حامد wrote: > Hi Aditya, > > Many thanks; see below: > > On Tue, 16 Nov 2021 17:23:59 -0700, Aditya Mahajan via ntg-context > wrote: > > > On Tue, 16 Nov 2021, Idris Samawi Hamid ادريس سماوي حامد via ntg-context > > wrote: > > > > > Dear gang, > > > > > > For creating/authoring content in ConTeXt: Can modes or the like be used > > > for content control? For example, someone wants to write at least two > > > versions of a book managed from a single file. So, e.g., we may have > > > > > > a) abridged content > > > b) unabridged content - includes a) > > > c) abridged content + translation > > > d) unabridged content + translation > > > [:] > > > > > > One can author and organize this in XML - pre-ConteXt - but perhaps one > > > prefers to write in ConTeXt (take advantage of shortcuts etc.). So maybe > > > > > > \defineparagraphs[unabridged] > > > \defineparagraphs[abridged] > > > \defineparagraphs[translation] > > > > > > Then one authors the complete work in a single project, but you can > > > produce a variety of versions, depending on the mode chosen: > > > > > > \definemode[unabridged] > > > etc. > > > > > > Can one do this in context? > > > > Yes! > > > > This is what I do (for solutions in homework assignments): > > > > \definebuffer[solution][local=yes,nested=yes] > > > > \startmode[solution] > > \defineenumeration[solution][fancy setup...] > > \stopmode > > > > Then, in the main tex file: > > > > > > \startsolution > > ... > > \stopsolution > > > > > > By default, gives the version without solution. Compile with --mode=solution > > to get the version with solution. The same thing should work in your case by > > defining two modes: unabridged and translation. And then use > > --mode=unabridged,translate etc to get multiple modes. > > Here's a working sample: > > === > % \definebuffer[unabridged] > % \definebuffer[abridged] > > \setupwhitespace[big] > > \starttext > \startmode[unabridged] > \input knuth > > \startblockquote > \input ward > \stopblockquote > > % \startmode[abridged] > % \input knuth > % \stopmode > \stopmode > > \startmode[abridged] > \input knuth > \stopmode > > % \startmode[abridged] > % \input zapf > % \stopmode > \stoptext > === > > Unfortunately - as pointed out on the wiki - modes cannot be nested. But you don't have to directly use the modes. The following will work: \definestartstop[abridged] % By default, don't show the unabridged text \definebuffer[unabridged][local=yes, nested=yes] \startmode[unabridged] % In the unabridged mode, show the abridged text \definestartstop[unabridged] \stopmode \starttext \startabridged \input knuth \startunabridged \startblockquote \input ward \stopblockquote \stopunabridged \input zapf \stopabridged Blocks are a better mechanism, but I still prefer modes here because I find the \beginblock ... \endblock syntax to be a bit awkward in a context document. Aditya___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Can modes be used for content control?
Hi Aditya, Many thanks; see below: On Tue, 16 Nov 2021 17:23:59 -0700, Aditya Mahajan via ntg-context wrote: On Tue, 16 Nov 2021, Idris Samawi Hamid ادريس سماوي حامد via ntg-context wrote: Dear gang, For creating/authoring content in ConTeXt: Can modes or the like be used for content control? For example, someone wants to write at least two versions of a book managed from a single file. So, e.g., we may have a) abridged content b) unabridged content - includes a) c) abridged content + translation d) unabridged content + translation [:] One can author and organize this in XML - pre-ConteXt - but perhaps one prefers to write in ConTeXt (take advantage of shortcuts etc.). So maybe \defineparagraphs[unabridged] \defineparagraphs[abridged] \defineparagraphs[translation] Then one authors the complete work in a single project, but you can produce a variety of versions, depending on the mode chosen: \definemode[unabridged] etc. Can one do this in context? Yes! This is what I do (for solutions in homework assignments): \definebuffer[solution][local=yes,nested=yes] \startmode[solution] \defineenumeration[solution][fancy setup...] \stopmode Then, in the main tex file: \startsolution ... \stopsolution By default, gives the version without solution. Compile with --mode=solution to get the version with solution. The same thing should work in your case by defining two modes: unabridged and translation. And then use --mode=unabridged,translate etc to get multiple modes. Here's a working sample: === % \definebuffer[unabridged] % \definebuffer[abridged] \setupwhitespace[big] \starttext \startmode[unabridged] \input knuth \startblockquote \input ward \stopblockquote % \startmode[abridged] % \input knuth % \stopmode \stopmode \startmode[abridged] \input knuth \stopmode % \startmode[abridged] % \input zapf % \stopmode \stoptext === Unfortunately - as pointed out on the wiki - modes cannot be nested. Furthermore, each mode is unique and there is apparently no inheritance/continuance. So using this method appears to be quite unwieldy for book-length projects. What is needed is something like this \startmode[abridged] \input knuth \startmode[unabridged] \startblockquote \input ward \stopblockquote \stopmode \input zapf \stopmode That is not supported, so need to find another method - assuming there even is one. Otherwise will have to consider XML authoring and process the selected tags in ConTeXt.. Best wishes Idris -- Idris Samawi Hamid, Professor Department of Philosophy Colorado State University Fort Collins, CO 80512 ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Can modes be used for content control?
On Tue, 16 Nov 2021, Idris Samawi Hamid ادريس سماوي حامد via ntg-context wrote: > Dear gang, > > For creating/authoring content in ConTeXt: Can modes or the like be used > for content control? For example, someone wants to write at least two > versions of a book managed from a single file. So, e.g., we may have > > a) abridged content > b) unabridged content - includes a) > c) abridged content + translation > d) unabridged content + translation > [:] > > One can author and organize this in XML - pre-ConteXt - but perhaps one > prefers to write in ConTeXt (take advantage of shortcuts etc.). So maybe > > \defineparagraphs[unabridged] > \defineparagraphs[abridged] > \defineparagraphs[translation] > > Then one authors the complete work in a single project, but you can > produce a variety of versions, depending on the mode chosen: > > \definemode[unabridged] > etc. > > Can one do this in context? Yes! This is what I do (for solutions in homework assignments): \definebuffer[solution][local=yes,nested=yes] \startmode[solution] \defineenumeration[solution][fancy setup...] \stopmode Then, in the main tex file: \startsolution ... \stopsolution By default, gives the version without solution. Compile with --mode=solution to get the version with solution. The same thing should work in your case by defining two modes: unabridged and translation. And then use --mode=unabridged,translate etc to get multiple modes. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] SVG not rendering correctly with LMTX and conversion=mp
Il 18/10/21 18:30, Hans Hagen via ntg-context ha scritto: On 10/18/2021 6:06 PM, mf via ntg-context wrote: Il 18/10/21 17:15, Jason Ross via ntg-context ha scritto: The following MWE fails to render the text in the attached SVG properly: \starttext \externalfigure[test.svg][conversion=mp] \stoptext The axis labels, tick labels, and title are all incorrect. This file was generated with Matplotlib. If you open test.svg with Inkscape, ungroup and then save, you get a SVG that is typeset right with LMTX. Looking at the differences between the two SVGs, I can see that Inkscape changes all the transform="translate(...)scale(...)" attributes into transform="matrix(...)". Now focus on the "y = sin(x)" text. In the attachment I modified the transform attributes of that text, from "translate(...)scale(...)" to "matrix(...)", taking the values from the version obtained from Inkscape. Use that SVG with your MWE and you'll see "y = sin(x)" appearing in the right place in the PDF. I would say the "translate(...)scale(...)" specification is not supported in LMTX (yet). it is supported; i'll send you a snippet to test (as it was not really a minimal example) Coming soon... (see attachment) The problem was the order in which transformations are applied when multiple transformations are specified in the transform attribute, like in "translate(...)scale(...)...". testsvg.tex and test.svg are the MWE and the SVG file provided by Jason Ross in the first post of this thread. Massi testsvg.pdf Description: Adobe PDF document \starttext \externalfigure[test.svg][conversion=mp] \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] SVG not rendering correctly with LMTX and conversion=mp
On 10/18/2021 6:06 PM, mf via ntg-context wrote: Il 18/10/21 17:15, Jason Ross via ntg-context ha scritto: The following MWE fails to render the text in the attached SVG properly: \starttext \externalfigure[test.svg][conversion=mp] \stoptext The axis labels, tick labels, and title are all incorrect. This file was generated with Matplotlib. If you open test.svg with Inkscape, ungroup and then save, you get a SVG that is typeset right with LMTX. Looking at the differences between the two SVGs, I can see that Inkscape changes all the transform="translate(...)scale(...)" attributes into transform="matrix(...)". Now focus on the "y = sin(x)" text. In the attachment I modified the transform attributes of that text, from "translate(...)scale(...)" to "matrix(...)", taking the values from the version obtained from Inkscape. Use that SVG with your MWE and you'll see "y = sin(x)" appearing in the right place in the PDF. I would say the "translate(...)scale(...)" specification is not supported in LMTX (yet). does the spec say anywhere what teh order is? this looks better but how about 10 scales and 15 rotations and 3 transforms in any order? Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] SVG not rendering correctly with LMTX and conversion=mp
Here it's wrong. See attachment. Massimiliano Il 18/10/21 18:30, Hans Hagen via ntg-context ha scritto: On 10/18/2021 6:06 PM, mf via ntg-context wrote: Il 18/10/21 17:15, Jason Ross via ntg-context ha scritto: The following MWE fails to render the text in the attached SVG properly: \starttext \externalfigure[test.svg][conversion=mp] \stoptext The axis labels, tick labels, and title are all incorrect. This file was generated with Matplotlib. If you open test.svg with Inkscape, ungroup and then save, you get a SVG that is typeset right with LMTX. Looking at the differences between the two SVGs, I can see that Inkscape changes all the transform="translate(...)scale(...)" attributes into transform="matrix(...)". Now focus on the "y = sin(x)" text. In the attachment I modified the transform attributes of that text, from "translate(...)scale(...)" to "matrix(...)", taking the values from the version obtained from Inkscape. Use that SVG with your MWE and you'll see "y = sin(x)" appearing in the right place in the PDF. I would say the "translate(...)scale(...)" specification is not supported in LMTX (yet). it is supported; i'll send you a snippet to test (as it was not really a minimal example) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ ytest.pdf Description: Adobe PDF document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] SVG not rendering correctly with LMTX and conversion=mp
On 10/18/2021 6:06 PM, mf via ntg-context wrote: Il 18/10/21 17:15, Jason Ross via ntg-context ha scritto: The following MWE fails to render the text in the attached SVG properly: \starttext \externalfigure[test.svg][conversion=mp] \stoptext The axis labels, tick labels, and title are all incorrect. This file was generated with Matplotlib. If you open test.svg with Inkscape, ungroup and then save, you get a SVG that is typeset right with LMTX. Looking at the differences between the two SVGs, I can see that Inkscape changes all the transform="translate(...)scale(...)" attributes into transform="matrix(...)". Now focus on the "y = sin(x)" text. In the attachment I modified the transform attributes of that text, from "translate(...)scale(...)" to "matrix(...)", taking the values from the version obtained from Inkscape. Use that SVG with your MWE and you'll see "y = sin(x)" appearing in the right place in the PDF. I would say the "translate(...)scale(...)" specification is not supported in LMTX (yet). it is supported; i'll send you a snippet to test (as it was not really a minimal example) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] SVG not rendering correctly with LMTX and conversion=mp
Il 18/10/21 17:15, Jason Ross via ntg-context ha scritto: The following MWE fails to render the text in the attached SVG properly: \starttext \externalfigure[test.svg][conversion=mp] \stoptext The axis labels, tick labels, and title are all incorrect. This file was generated with Matplotlib. If you open test.svg with Inkscape, ungroup and then save, you get a SVG that is typeset right with LMTX. Looking at the differences between the two SVGs, I can see that Inkscape changes all the transform="translate(...)scale(...)" attributes into transform="matrix(...)". Now focus on the "y = sin(x)" text. In the attachment I modified the transform attributes of that text, from "translate(...)scale(...)" to "matrix(...)", taking the values from the version obtained from Inkscape. Use that SVG with your MWE and you'll see "y = sin(x)" appearing in the right place in the PDF. I would say the "translate(...)scale(...)" specification is not supported in LMTX (yet). Massi ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] running tikz
On Thu, 2021-09-30 at 14:52 -0400, Aditya Mahajan via ntg-context wrote: > On Thu, 30 Sep 2021, Henri Menke via ntg-context wrote: > > > On Thu, 2021-09-30 at 11:57 +0200, Alain Delmotte via ntg-context > > wrote: > > > Hi! > > > > > > I would like to use tikz to benefit of the package "pgf-soroban" > > > I > > > did write for LaTeX (after adapting it and before, later, to > > > translate it to metapost). > > > > > > I did try the sample program from the tikz manual, but I get an > > > error > > > saying that "t-pgf.tex" is not found; but it is in the tree of > > > ConTeXt-lmtx. > > > > > > How to make all the files in the distribution known to the > > > compiler? > > > > > > Note that there is currently no proper support for LMTX in > > PGF/TikZ. > > > > https://github.com/pgf-tikz/pgf/issues/990 > > Interesting... it seems that only a few features don't work. I > regularly use pgfplots, and haven't noticed any compatibility issues > in my examples. > > What will be needed to add a LMTX "driver" for TikZ? Porting pgfsys- > luatex.def to pgfsys-luametatex.def? Or is something else also > needed? Yes, there would have to be a pgfsys-luametatex.def and some detection code to switch the driver appropriately but that latter part is easy. I'm not too sure what is needed for the former though for LMTX. When I last looked at it about a year ago it was completely unusable with the LuaTeX driver because position tracking primitives were removed (\pdflastxpos, \pdflastypos) and box keywords had changed (\hbox dir TRT). Some catcode trickery in pgfplots also had stopped working (https://github.com/pgf-tikz/pgfplots/pull/353). As Hans mentioned in another message, the PDF resource management has changed (if I understand it correctly), so things like shadings and patterns would have to be adjusted. Cheers, Henri > Aditya > ___ > > If your question is of interest to others as well, please add an entry > to the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] running tikz
On 9/30/2021 8:52 PM, Aditya Mahajan via ntg-context wrote: On Thu, 30 Sep 2021, Henri Menke via ntg-context wrote: On Thu, 2021-09-30 at 11:57 +0200, Alain Delmotte via ntg-context wrote: Hi! I would like to use tikz to benefit of the package "pgf-soroban" I did write for LaTeX (after adapting it and before, later, to translate it to metapost). I did try the sample program from the tikz manual, but I get an error saying that "t-pgf.tex" is not found; but it is in the tree of ConTeXt-lmtx. How to make all the files in the distribution known to the compiler? Note that there is currently no proper support for LMTX in PGF/TikZ. https://github.com/pgf-tikz/pgf/issues/990 Nowdays exagerating remarks like "lots of ..." just like "many buge ..." and "completely broken ..." and some more make me put something at the bottom of my list cq. dismiss. Interesting... it seems that only a few features don't work. I regularly use pgfplots, and haven't noticed any compatibility issues in my examples. What will be needed to add a LMTX "driver" for TikZ? Porting pgfsys-luatex.def to pgfsys-luametatex.def? Or is something else also needed? I don't know. If you send me the examplex that don't work I can check it. I suppose that it there is a well defined interface layer we can provide the connection and maintain that in the context distribution. And we can also just decide that some features are not supported (for instance because they interfere with context resource management). Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] running tikz
On Thu, 30 Sep 2021, Henri Menke via ntg-context wrote: > On Thu, 2021-09-30 at 11:57 +0200, Alain Delmotte via ntg-context > wrote: > > Hi! > > > > I would like to use tikz to benefit of the package "pgf-soroban" I > > did write for LaTeX (after adapting it and before, later, to > > translate it to metapost). > > > > I did try the sample program from the tikz manual, but I get an error > > saying that "t-pgf.tex" is not found; but it is in the tree of > > ConTeXt-lmtx. > > > > How to make all the files in the distribution known to the compiler? > > > Note that there is currently no proper support for LMTX in PGF/TikZ. > > https://github.com/pgf-tikz/pgf/issues/990 Interesting... it seems that only a few features don't work. I regularly use pgfplots, and haven't noticed any compatibility issues in my examples. What will be needed to add a LMTX "driver" for TikZ? Porting pgfsys-luatex.def to pgfsys-luametatex.def? Or is something else also needed? Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] running tikz
On Thu, 30 Sep 2021, Alain Delmotte via ntg-context wrote: > > Hi! > > I would like to use tikz to benefit of the package "pgf-soroban" I did write > for > LaTeX (after adapting it and before, later, to translate it to metapost). > > I did try the sample program from the tikz manual, but I get an error saying > that "t-pgf.tex" is not found; but it is in the tree of ConTeXt-lmtx. How did you install TikZ? The error message seems to suggest that tikz module is not installed. You can check by looking at the output of mtxrun t-pgf.tex On my system, that gives: /opt/luametatex/texmf-modules/tex/context/pgf/basiclayer/t-pgf.tex (which I had installed the texmf-modules tree by copying from the context standalone tree. > How to make all the files in the distribution known to the compiler? By putting them in the right location in the tree (somewhere inside $TEXMF/tex/context ...). Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] running tikz
On 9/30/2021 11:57 AM, Alain Delmotte via ntg-context wrote: Hi! I would like to use tikz to benefit of the package "pgf-soroban" I did write for LaTeX (after adapting it and before, later, to translate it to metapost). I did try the sample program from the tikz manual, but I get an error saying that "t-pgf.tex" is not found; but it is in the tree of ConTeXt-lmtx. How to make all the files in the distribution known to the compiler? mtxrun --generate and you ned to use use m-tikz.mk* from the distribution Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] running tikz
Hi! Le 30/09/2021 à 12:01, Henri Menke via ntg-context a écrit : On Thu, 2021-09-30 at 11:57 +0200, Alain Delmotte via ntg-context wrote: Hi! I would like to use tikz to benefit of the package "pgf-soroban" I did write for LaTeX (after adapting it and before, later, to translate it to metapost). I did try the sample program from the tikz manual, but I get an error saying that "t-pgf.tex" is not found; but it is in the tree of ConTeXt-lmtx. How to make all the files in the distribution known to the compiler? Note that there is currently no proper support for LMTX in PGF/TikZ. https://github.com/pgf-tikz/pgf/issues/990 Cheers, Henri OK, in fact it works in ConTeXt standalone, so I'll use that for the moment. Thanks, Alain ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] running tikz
On Thu, 2021-09-30 at 11:57 +0200, Alain Delmotte via ntg-context wrote: > Hi! > > I would like to use tikz to benefit of the package "pgf-soroban" I > did write for LaTeX (after adapting it and before, later, to > translate it to metapost). > > I did try the sample program from the tikz manual, but I get an error > saying that "t-pgf.tex" is not found; but it is in the tree of > ConTeXt-lmtx. > > How to make all the files in the distribution known to the compiler? Note that there is currently no proper support for LMTX in PGF/TikZ. https://github.com/pgf-tikz/pgf/issues/990 Cheers, Henri > > Thanks, > > Alain > > %% ConTeXt file > > \usemodule[tikz] > \starttext > We are working on > \starttikzpicture > \draw (-1.5,0) -- (1.5,0); > \draw (0,-1.5) -- (0,1.5); > \stoptikzpicture. > \stoptext > _ > __ > If your question is of interest to others as well, please add an > entry to the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > _ > __ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] running tikz
Hi! I would like to use tikz to benefit of the package "pgf-soroban" I did write for LaTeX (after adapting it and before, later, to translate it to metapost). I did try the sample program from the tikz manual, but I get an error saying that "t-pgf.tex" is not found; but it is in the tree of ConTeXt-lmtx. How to make all the files in the distribution known to the compiler? Thanks, Alain %% ConTeXt file \usemodule[tikz] \starttext We are working on \starttikzpicture \draw (-1.5,0) -- (1.5,0); \draw (0,-1.5) -- (0,1.5); \stoptikzpicture. \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] LuaMetaTEX as LaTeX to XHTML/ePub transpiler?
On Fri, 10 Sept 2021 at 21:26, Henning Hraban Ramm wrote: > > No. > > LuaMetaTeX is ConTeXt-only. > You would need a LaTeX -> ConTeXt conversion, and there is none. > Well I am thinking about switching to ConTeX/LuaMetaTEX anyway, because at the moment I draw vector art in the last non-subscription version of Adobe Illustrator, now approaching ten years old. I'll be trying out Metapost as a replacement. My markup isn't that complicated, so at worst I could translate by hand. But it occurs to me that if I get this markup to markup text translation going, I'd be able to write a LaTeX -> ConTeXt converter as a set of LaTeX named Lua functions. -- cheers, Hugh Fisher ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] MetaPost Examples
> Am 01.09.2021 um 14:45 schrieb Hans Hagen via ntg-context > : > > On 9/1/2021 2:19 PM, Henning Hraban Ramm via ntg-context wrote: >> Hi, I’m trying to “translate” the documentation of “fiziko”* from LaTeX to >> ConTeXt and would like to avoid the doubling of MP code like: >> \startMP >> path p; >> p := (0,0){dir(30)}..(5cm, 0)..{dir(30)}(10cm, 0); >> draw brush (p)(2minStrokeWidth*sin(offsetPathLength*pi)); >> \stopMP >> \startMPcode >> path p; >> p := (0,0){dir(30)}..(5cm, 0)..{dir(30)}(10cm, 0); >> draw brush (p)(2minStrokeWidth*sin(offsetPathLength*pi)); >> \stopMPcode >> I’m quite sure there’s a possibility with buffers, but how? >> \startbuffer >> path p; >> p := (0,0){dir(30)}..(5cm, 0)..{dir(30)}(10cm, 0); >> draw brush (p)(2minStrokeWidth*sin(offsetPathLength*pi)); >> \stopbuffer >> \typebuffer >> ... and then how do I get the MP graphic? > \processMPbuffer “of course” Thank you! Used here: https://github.com/fiee/fiziko/blob/master/fiziko.mkiv Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] MetaPost Examples
On 9/1/2021 2:19 PM, Henning Hraban Ramm via ntg-context wrote: Hi, I’m trying to “translate” the documentation of “fiziko”* from LaTeX to ConTeXt and would like to avoid the doubling of MP code like: \startMP path p; p := (0,0){dir(30)}..(5cm, 0)..{dir(30)}(10cm, 0); draw brush (p)(2minStrokeWidth*sin(offsetPathLength*pi)); \stopMP \startMPcode path p; p := (0,0){dir(30)}..(5cm, 0)..{dir(30)}(10cm, 0); draw brush (p)(2minStrokeWidth*sin(offsetPathLength*pi)); \stopMPcode I’m quite sure there’s a possibility with buffers, but how? \startbuffer path p; p := (0,0){dir(30)}..(5cm, 0)..{dir(30)}(10cm, 0); draw brush (p)(2minStrokeWidth*sin(offsetPathLength*pi)); \stopbuffer \typebuffer ... and then how do I get the MP graphic? \processMPbuffer - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] MetaPost Examples
Hi, I’m trying to “translate” the documentation of “fiziko”* from LaTeX to ConTeXt and would like to avoid the doubling of MP code like: \startMP path p; p := (0,0){dir(30)}..(5cm, 0)..{dir(30)}(10cm, 0); draw brush (p)(2minStrokeWidth*sin(offsetPathLength*pi)); \stopMP \startMPcode path p; p := (0,0){dir(30)}..(5cm, 0)..{dir(30)}(10cm, 0); draw brush (p)(2minStrokeWidth*sin(offsetPathLength*pi)); \stopMPcode I’m quite sure there’s a possibility with buffers, but how? \startbuffer path p; p := (0,0){dir(30)}..(5cm, 0)..{dir(30)}(10cm, 0); draw brush (p)(2minStrokeWidth*sin(offsetPathLength*pi)); \stopbuffer \typebuffer ... and then how do I get the MP graphic? Hraban *) https://github.com/jemmybutton/fiziko ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Multimedia, PDF and ConTeXt
/c7e2ae944fbd711df4ad7bd58000f83a/nightseq1.mp4] \useexternalrendering[myvideo3][video/mp4][video.mp4] \definerenderingwindow[myrenderingwindow][width=\textwidth, height=\textwidth] \noindent \placerenderingwindow[myrenderingwindow][myvideo] \goto{START}[StartRendering{myvideo}] \goto{STOP} [StopRendering{myvideo}] \goto{PAUSE}[PauseRendering{myvideo}] \vfil\break\noindent \placerenderingwindow[myrenderingwindow][myvideo2] \vfil\break\noindent \placerenderingwindow[myrenderingwindow][myvideo3] \stoptext All three file source types are demonstrated. Any "video.mp4" in the directory you compile in will do. (Works as expected in Okular on Linux.) good. but not in mupdf viewers, right? This was a dump of knowledge that I gained from writing my thesis. Sadly its in Czech, but part of it is PDF code snippets and tables summarizing viewer support, that I can translate and provide if there is interest. But a large part of what I deem practical today is implemented and documented here: http://mirrors.ctan.org/macros/luatex/optex/pdfextra/pdfextra-doc.pdf. The source is probably hard to read, because of the "_" and "." prefixes in the control sequences, but those can be ignored. I posted some "real" documents in [3] and [5]. thanks for paying attention If more documents / snippets / explanations are needed I hope I can provide them. Sadly, while working on this, I didn't have access to the PDF 2.0 standard. My information mostly comes from the PDF 1.7 standard and publicly known information about PDF 2.0 - the Rich Media mechanism got included in PDF 2.0, but I am not sure in what extent did the Flash part get included. I also don't know if there really is anything new, but nothing suggests it. Regardless, viewer support isn't complete for something standardized over 20 years ago, I don't expect revolution in the PDF viewers, considering the price of the standard(s). indeed. but wrt viewers, what puzzles me is that much of this rendering stuff is around in browsers so i guess it also has to do with lack of interest [1]: https://bugs.kde.org/show_bug.cgi?id=436709 [2]: https://invent.kde.org/graphics/okular/-/merge_requests/426 [3]: https://gitlab.freedesktop.org/poppler/poppler/-/merge_requests/855 [4]: https://tex.stackexchange.com/questions/516029/media9-is-becoming-obsolete-dec-2020-any-alternatives-for-embedding-video-audio/516102 [5]: https://gitlab.com/agrahn/media9/-/issues/9 [6]: https://wiki.contextgarden.net/Command/externalfigure [7]: https://www.mail-archive.com/ntg-context@ntg.nl/msg88639.html What actuially was also supported is https://www.w3.org/TR/SMIL/ but somehow that became unreliable / went away .. when it first showed up it worked perfect and i always though that it would stay Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Multimedia, PDF and ConTeXt
\noindent \placerenderingwindow[myrenderingwindow][myvideo] \goto{START}[StartRendering{myvideo}] \goto{STOP} [StopRendering{myvideo}] \goto{PAUSE}[PauseRendering{myvideo}] \vfil\break\noindent \placerenderingwindow[myrenderingwindow][myvideo2] \vfil\break\noindent \placerenderingwindow[myrenderingwindow][myvideo3] \stoptext All three file source types are demonstrated. Any "video.mp4" in the directory you compile in will do. (Works as expected in Okular on Linux.) This was a dump of knowledge that I gained from writing my thesis. Sadly its in Czech, but part of it is PDF code snippets and tables summarizing viewer support, that I can translate and provide if there is interest. But a large part of what I deem practical today is implemented and documented here: http://mirrors.ctan.org/macros/luatex/optex/pdfextra/pdfextra-doc.pdf. The source is probably hard to read, because of the "_" and "." prefixes in the control sequences, but those can be ignored. I posted some "real" documents in [3] and [5]. If more documents / snippets / explanations are needed I hope I can provide them. Sadly, while working on this, I didn't have access to the PDF 2.0 standard. My information mostly comes from the PDF 1.7 standard and publicly known information about PDF 2.0 - the Rich Media mechanism got included in PDF 2.0, but I am not sure in what extent did the Flash part get included. I also don't know if there really is anything new, but nothing suggests it. Regardless, viewer support isn't complete for something standardized over 20 years ago, I don't expect revolution in the PDF viewers, considering the price of the standard(s). [1]: https://bugs.kde.org/show_bug.cgi?id=436709 [2]: https://invent.kde.org/graphics/okular/-/merge_requests/426 [3]: https://gitlab.freedesktop.org/poppler/poppler/-/merge_requests/855 [4]: https://tex.stackexchange.com/questions/516029/media9-is-becoming-obsolete-dec-2020-any-alternatives-for-embedding-video-audio/516102 [5]: https://gitlab.com/agrahn/media9/-/issues/9 [6]: https://wiki.contextgarden.net/Command/externalfigure [7]: https://www.mail-archive.com/ntg-context@ntg.nl/msg88639.html Best regards, Michal Vlasák --- a/tex/texmf-context/tex/context/base/mkxl/lpdf-wid.lmt +++ b/tex/texmf-context/tex/context/base/mkxl/lpdf-wid.lmt @@ -689,22 +689,26 @@ -- B = start, -- } -- } - -- local parameters = pdfdictionary { - -- Type = pdfconstant(MediaPermissions), - -- TF = pdfstring("TEMPALWAYS") }, -- TEMPNEVER TEMPEXTRACT TEMPACCESS TEMPALWAYS - -- } +local parameters = pdfdictionary { +Type = pdfconstant("MediaPermissions"), +TF = pdfstring("TEMPALWAYS"), -- TEMPNEVER TEMPEXTRACT TEMPACCESS TEMPALWAYS +-- TEMPALWAYS - allows temporary files (needed for Acrobat / Windows Movie Player) +} local descriptor = pdfdictionary { Type = pdfconstant("Filespec"), F= filename, } if isurl then descriptor.FS = pdfconstant("URL") +descriptor = pdfreference(pdfflushobject(descriptor)) elseif option[v_embed] then -descriptor.EF = codeinjections.embedfile { +descriptor = codeinjections.embedfile { file = filename, mimetype = mimetype, -- yes or no compress = false, } +else +descriptor = pdfreference(pdfflushobject(descriptor)) end local clip = pdfdictionary { Type = pdfconstant("MediaClip"), @@ -712,8 +716,8 @@ N= label, CT = mimetype, Alt = pdfarray { "", "file not found" }, -- language id + message -D= pdfreference(pdfflushobject(descriptor)), - -- P= pdfreference(pdfflushobject(parameters)), +D= descriptor, +P= pdfreference(pdfflushobject(parameters)), } local rendition = pdfdictionary { Type = pdfconstant("Rendition"), --- a/tex/texmf-context/tex/context/base/mkxl/scrn-wid.mklx +++ b/tex/texmf-context/tex/context/base/mkxl/scrn-wid.mklx @@ -649,6 +649,7 @@ \letrenderingwindowparameter\c!closepageaction\empty \setrenderingwindowparameter\c!width {\d_scrn_rendering_width }% \setrenderingwindowparameter\c!height {\d_scrn_rendering_height}% +\setrenderingwindowparameter\c!align {\v!flushleft}% don't center annotation whatsit \to \everypresetrenderingwindow \permanent\tolerant\protected\def\placerenderingwindow[#window]#spacer[#rendering]% do all in lua ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Last call for papers: CG journal 2020
Hi again! Today I got an article by Willi. That makes two articles for our upcoming journal. I also stole Harald’s German meeting report from DANTE’s DTK magazine. Looks like you’ll get a very slim journal this time. Or are there any last minute takers? Jan, Tomáš, Tamara & Adriana, Arthur, Hans? New articles (not related to the 2020 meeting) are also welcome! Would be nice. Hraban > Am 11.06.2021 um 18:47 schrieb Henning Hraban Ramm : > > Hi, do you remember our ConTeXt meeting 2020 in Sibřina? (programme attached) > > There were some interesting talks and presentations that should get preserved > in our current journal (to be distributed at the meeting in Bassenge this > fall). > > Also, additional articles are always welcome – there were a lot of > interesting new features and solutions since then. > > So far, I/we got only one(!) article, by Taco on MetaPost. > > > Please don’t let me/us down and hand in your articles until end of July (but > ASAP)! > > @Harald: Please send the latest version of your German report, too! I’ll > translate it into ConTeXt. > > > Thank you – I’m looking forward to another interesting issue of CG journal! > > Yours, Hraban > > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Call for papers: CG journal 2020
And since Taco reminded you to register for ConTeXt meeting 2021, I’m reminding you to hand in your articles for the journal, otherwise we don’t have anything to hand out in Bassenge... Hraban > Am 11.06.2021 um 18:47 schrieb Henning Hraban Ramm : > > Hi, do you remember our ConTeXt meeting 2020 in Sibřina? > > There were some interesting talks and presentations that should get preserved > in our current journal (to be distributed at the meeting in Bassenge this > fall). > > Also, additional articles are always welcome – there were a lot of > interesting new features and solutions since then. > > So far, I/we got only one(!) article, by Taco on MetaPost. > > > Please don’t let me/us down and hand in your articles until end of July (but > ASAP)! > > @Harald: Please send the latest version of your German report, too! I’ll > translate it into ConTeXt. > > > Thank you – I’m looking forward to another interesting issue of CG journal! > > Yours, Hraban > > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Call for papers: CG journal 2020
Hi, do you remember our ConTeXt meeting 2020 in Sibřina? (programme attached) There were some interesting talks and presentations that should get preserved in our current journal (to be distributed at the meeting in Bassenge this fall). Also, additional articles are always welcome – there were a lot of interesting new features and solutions since then. So far, I/we got only one(!) article, by Taco on MetaPost. Please don’t let me/us down and hand in your articles until end of July (but ASAP)! @Harald: Please send the latest version of your German report, too! I’ll translate it into ConTeXt. Thank you – I’m looking forward to another interesting issue of CG journal! Yours, Hraban pr2020.pdf Description: Adobe PDF document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] issue field in bibliography
Hi, I have questions related with a journal named "Documentation photographque". Each issue is devoted to another theme. How should I declare this theme in bibliography fields when quoting articles? It is quite important to get it, because the main article is always named « Le point sur… » (I don't know exactly how to translate it in English. Something like "an overview of…") so quoting it makes only sense if the issue is named, at best after the title or the number. I thought issue may do it. Am I right? Or would be comment a better place? Best regards, Damien Thiriet ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] issue field in bibliography
On 3/29/21 10:45 AM, Damien Thiriet wrote: I have questions related with a journal named "Documentation photographque". Each issue is devoted to another theme. How should I declare this theme in bibliography fields when quoting articles? It is quite important to get it, because the main article is always named « Le point sur… » (I don't know exactly how to translate it in English. Something like "an overview of…") so quoting it makes only sense if the issue is named, at best after the title or the number. I thought issue may do it. Am I right? Or would be comment a better place? Are you asking about the ConTeXt implementation you want to implement or about the actual bibliographic representation you want on the page? If the former, we need more information: what style are you using for the list, what citation style? Show us some code, make a MWE. In both cases, we need an example of what your bibliographic entry should look like. Right now, we can only guess. Thomas ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Twenty One versus Twenty-one
On 2/11/2021 10:07 AM, jbf wrote: Okay, that's clear, and what is also clear is that I cannot achieve this with my current version of Mk IV (nearly a year old now). The entire work is complete but for this small item, so I might need to do some 'fiddling' outside ConTeXt to achieve a result that the publisher wants in his hands tomorrow... Unless I can delay him. I will try! in core-con.lua search for (the first one is for english) return #t > 0 and concat(t," ") or tostring(n) (in function translate) and change " " into "-" then run context --make and you should be ok for now Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] A not so short introduction to ConTeXt Mark IV
One nice tool that I use for translation is https://po4a.org/index.php.en I used it to translate (and maintain) complete Vim documentation. It could be adapted to work with Context (there is already a Latex module) Regards, Ivan сре, 6. јан 2021. 12:56 је написао/ла: > Send ntg-context mailing list submissions to > ntg-context@ntg.nl > > To subscribe or unsubscribe via the World Wide Web, visit > https://mailman.ntg.nl/mailman/listinfo/ntg-context > or, via email, send a message with subject or body 'help' to > ntg-context-requ...@ntg.nl > > You can reach the person managing the list at > ntg-context-ow...@ntg.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of ntg-context digest..." > Today's Topics: > >1. Re: A not so short introduction to ConTeXt Mark IV > (Bruce Horrocks) >2. Re: A not so short introduction to ConTeXt Mark IV > (Joaquín Ataz López) >3. Re: A not so short introduction to ConTeXt Mark IV > (Augusto Stoffel) >4. Re: Randomize order of blocks (Otared Kavian) >5. Re: Randomize order of blocks (Otared Kavian) > > > > -- Forwarded message -- > From: Bruce Horrocks > To: "ntg-context@ntg.nl" > Cc: > Bcc: > Date: Wed, 6 Jan 2021 00:36:23 + > Subject: Re: [NTG-context] A not so short introduction to ConTeXt Mark IV > > > > On 5 Jan 2021, at 20:31, Garulfo wrote: > > > > Hi all, > > > > I saw that Mojca created a directory > > https://github.com/contextgarden/not-so-short-introduction-to-context > > > > Joaquín, if you agree, and if > > - you provide me with the spanish + english source codes > > - Mojca provide you and me with github write access (garulfogb account) > > > > i could : > > 1/ push the current code > > 2/ start to write a github wiki page (+ link on contextgarden) to > describe : > > - for you : how to update from your own computer (the official source) > > - for any user : how to use git to get the source + link to this list > for discussion. > > > > Does anybody has a guide about "how to set up a documentation > translation project with git ?". > > One requirement will probably to define how propositions are officially > validated. Does it requires Joaquín to learn how to use git ? Can we just > work by sending files (or patches) to Joaquín who will update with a single > git command ? > > I think we need to be really clear about what we want to achieve here. > > 1) Is it just making the source plus the PDF available for download? If so > then there are plenty of simpler ways to do that than using Git. > > 2) If it is to gather feedback on things like typos then we don't need > Git. For example I spotted a missing ']' in the English translation so all > I need is a way to submit a 'bug report' not access to the source. > > 3) So what is left? To provide a way for translators to be notified of > changes to the original? To provide a collaboration mechanism for > significant changes to the document? > > I don't see that Git adds much in the way of value unless Joaquín and the > translators are already very familiar with it -- because the learning curve > is very steep and recovering from mistakes (made to the repository itself > rather than to the document content) can sometimes be extremely difficult. > > -- > Bruce Horrocks > Hampshire, UK > > > > > > -- Forwarded message -- > From: "Joaquín Ataz López" > To: ntg-context@ntg.nl > Cc: > Bcc: > Date: Wed, 6 Jan 2021 06:26:34 +0100 > Subject: Re: [NTG-context] A not so short introduction to ConTeXt Mark IV > I don't really know anything about git, so I can't give my opinion about > what is or isn't convenient to do. Certainly to report bugs in my text I > don't think it takes anything more than an e-mail to send them to me. > Having a repository can be useful to keep a version that is always up to > date; but that, on the other hand, would force me to be continually > modifying the text, which in principle is not my intention. I do not > exclude that there will be other versions in the future, but for the > moment this is not part of my plans. And if there were other versions, > it would be more to add some chapter; mainly I think that the most > important material that is missing is the one related to XML, Lua and > Metapost, that is: the three additional languages in which a ConTeXt > document can be written. But I am far from being able to write anything > about any of those three aspects. Some member of the list has offered to > help me with it, but
Re: [NTG-context] A not so short introduction to ConTeXt Mark IV
I don't really know anything about git, so I can't give my opinion about what is or isn't convenient to do. Certainly to report bugs in my text I don't think it takes anything more than an e-mail to send them to me. Having a repository can be useful to keep a version that is always up to date; but that, on the other hand, would force me to be continually modifying the text, which in principle is not my intention. I do not exclude that there will be other versions in the future, but for the moment this is not part of my plans. And if there were other versions, it would be more to add some chapter; mainly I think that the most important material that is missing is the one related to XML, Lua and Metapost, that is: the three additional languages in which a ConTeXt document can be written. But I am far from being able to write anything about any of those three aspects. Some member of the list has offered to help me with it, but not immediately (we all have a lot of work). The original idea, I think, was to provide a platform that would allow different collaborators to translate the text into different languages. Whether or not git is the best solution for that purpose, I really don't know. What I would appreciate is that guide on "how to set up a documentation translation project with git? that Garulfo proposes. El 5/1/21 a las 21:31, Garulfo escribió: Hi all, I saw that Mojca created a directory https://github.com/contextgarden/not-so-short-introduction-to-context Joaquín, if you agree, and if - you provide me with the spanish + english source codes - Mojca provide you and me with github write access (garulfogb account) i could : 1/ push the current code 2/ start to write a github wiki page (+ link on contextgarden) to describe : - for you : how to update from your own computer (the official source) - for any user : how to use git to get the source + link to this list for discussion. Does anybody has a guide about "how to set up a documentation translation project with git ?". One requirement will probably to define how propositions are officially validated. Does it requires Joaquín to learn how to use git ? Can we just work by sending files (or patches) to Joaquín who will update with a single git command ? Le 03/01/2021 à 19:08, Hans Hagen a écrit : On 1/3/2021 5:42 PM, Mojca Miklavec wrote: On Sun, 3 Jan 2021 at 15:37, Garulfo wrote: In oct 2020, a message proposed to create a GitHub/GitLab repository (or even organization) for this so that anybody can help translating it into other languages: https://mailman.ntg.nl/pipermail/ntg-context/2020/099789.html If you want to see it under https://github.com/contextgarden/ just propose the repository name and list the usernames for those who should initially have access. also because that would fit well into the plans for a bunch of context related repositories Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ -- Joaquín Ataz López Derecho Civil Universidad de Murcia ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] A not so short introduction to ConTeXt Mark IV
On Sun, 3 Jan 2021, Joaquín Ataz López wrote: > Hello to all: > > Two months ago I informed to the list that I had written an introduction > in Spanish to ConTeXt Mark IV. This interested several people, and in > order to increase their potential audience, a member of this list > (native English speaker) has proceeded to translate my text into English. > > It is precisely the members of this list who need no introduction at > all, but it can sometimes be useful to help someone get started with the > fascinating typesetting system that is ConTeXt. > > As for the English translation, I have made some small changes to the > Spanish version, so anyone who understands Spanish and prefers to read > it in its original language can download the new version: > > Both versions are available at the following links > > - Spanish: https://webs.um.es/jal/docs/introCTX_esp.pdf > > - Engilish: https://webs.um.es/jal/docs/introCTX_eng.pdf > > Soon I will send both texts, with their source files, to the > documentation section of the CTAN repository. This is an excellent and detailed introduction. I had briefly skimmed through the Spanish version when you had posted it earlier, but since I do not understand Spanish I could not follow it. Now have quickly read some parts of the English version, I find that the document is very well written and at the right level of detail and tone for a new user. Thank you for writing this. Aditya___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] A not so short introduction to ConTeXt Mark IV
Thanks, Joaquín. This is really amazing. Denis > -Ursprüngliche Nachricht- > Von: ntg-context Im Auftrag von Joaquín > Ataz López > Gesendet: Sonntag, 3. Januar 2021 10:45 > An: mailing list for ConTeXt users > Betreff: [NTG-context] A not so short introduction to ConTeXt Mark IV > > Hello to all: > > Two months ago I informed to the list that I had written an introduction in > Spanish to ConTeXt Mark IV. This interested several people, and in order to > increase their potential audience, a member of this list (native English > speaker) has proceeded to translate my text into English. > > It is precisely the members of this list who need no introduction at all, but > it > can sometimes be useful to help someone get started with the fascinating > typesetting system that is ConTeXt. > > As for the English translation, I have made some small changes to the Spanish > version, so anyone who understands Spanish and prefers to read it in its > original language can download the new version: > > Both versions are available at the following links > > - Spanish: https://webs.um.es/jal/docs/introCTX_esp.pdf > > - Engilish: https://webs.um.es/jal/docs/introCTX_eng.pdf > > Soon I will send both texts, with their source files, to the documentation > section of the CTAN repository. > > > -- > Joaquín Ataz López > Derecho Civil > Universidad de Murcia > > __ > _ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg- > context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > __ > _ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] A not so short introduction to ConTeXt Mark IV
Well, there's a document called "LaTeX in proper context", but that's from a different era and nowhere near exhaustive... Von: ntg-context im Auftrag von BPJ Gesendet: Sonntag, 3. Januar 2021 22:02:22 An: mailing list for ConTeXt users Betreff: Re: [NTG-context] A not so short introduction to ConTeXt Mark IV I understand that and it is all well and good. I am wondering if there already is *another* text which presupposes basic knowledge of TeX and general knowledge of LaTeX, perhaps in a by-topic style. -- Better --help|less than helpless Den sön 3 jan. 2021 20:04Joaquín Ataz López mailto:j...@um.es>> skrev: I do not know if I have been able to do this, but although there are some references to LaTeX, I have tried to write a totally independent text, which does not require knowledge of LaTeX or TeX to be understood. El 3/1/21 a las 19:42, BPJ escribió: This is a great resource which I am at the moment enjoying to read but I can't help wondering if there is a text aimed at those who already know LaTeX and know the basics of TeX describing ConTeXt in terms of differences (and similarities) between the two, and in particular the gotchas. -- Better --help|less than helpless Den sön 3 jan. 2021 10:48Joaquín Ataz López mailto:j...@um.es>> skrev: Hello to all: Two months ago I informed to the list that I had written an introduction in Spanish to ConTeXt Mark IV. This interested several people, and in order to increase their potential audience, a member of this list (native English speaker) has proceeded to translate my text into English. It is precisely the members of this list who need no introduction at all, but it can sometimes be useful to help someone get started with the fascinating typesetting system that is ConTeXt. As for the English translation, I have made some small changes to the Spanish version, so anyone who understands Spanish and prefers to read it in its original language can download the new version: Both versions are available at the following links - Spanish: https://webs.um.es/jal/docs/introCTX_esp.pdf - Engilish: https://webs.um.es/jal/docs/introCTX_eng.pdf Soon I will send both texts, with their source files, to the documentation section of the CTAN repository. -- Joaquín Ataz López Derecho Civil Universidad de Murcia ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl<mailto:ntg-context@ntg.nl> / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl<mailto:ntg-context@ntg.nl> / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ -- Joaquín Ataz López Derecho Civil Universidad de Murcia ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl<mailto:ntg-context@ntg.nl> / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] A not so short introduction to ConTeXt Mark IV
I understand that and it is all well and good. I am wondering if there already is *another* text which presupposes basic knowledge of TeX and general knowledge of LaTeX, perhaps in a by-topic style. -- Better --help|less than helpless Den sön 3 jan. 2021 20:04Joaquín Ataz López skrev: > I do not know if I have been able to do this, but although there are some > references to LaTeX, I have tried to write a totally independent text, > which does not require knowledge of LaTeX or TeX to be understood. > El 3/1/21 a las 19:42, BPJ escribió: > > This is a great resource which I am at the moment enjoying to read but I > can't help wondering if there is a text aimed at those who already know > LaTeX and know the basics of TeX describing ConTeXt in terms of differences > (and similarities) between the two, and in particular the gotchas. > > -- > Better --help|less than helpless > > Den sön 3 jan. 2021 10:48Joaquín Ataz López skrev: > >> Hello to all: >> >> Two months ago I informed to the list that I had written an introduction >> in Spanish to ConTeXt Mark IV. This interested several people, and in >> order to increase their potential audience, a member of this list >> (native English speaker) has proceeded to translate my text into English. >> >> It is precisely the members of this list who need no introduction at >> all, but it can sometimes be useful to help someone get started with the >> fascinating typesetting system that is ConTeXt. >> >> As for the English translation, I have made some small changes to the >> Spanish version, so anyone who understands Spanish and prefers to read >> it in its original language can download the new version: >> >> Both versions are available at the following links >> >> - Spanish: https://webs.um.es/jal/docs/introCTX_esp.pdf >> >> - Engilish: https://webs.um.es/jal/docs/introCTX_eng.pdf >> >> Soon I will send both texts, with their source files, to the >> documentation section of the CTAN repository. >> >> >> -- >> Joaquín Ataz López >> Derecho Civil >> Universidad de Murcia >> >> >> ___ >> If your question is of interest to others as well, please add an entry to >> the Wiki! >> >> maillist : ntg-context@ntg.nl / >> http://www.ntg.nl/mailman/listinfo/ntg-context >> webpage : http://www.pragma-ade.nl / http://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> wiki : http://contextgarden.net >> >> ___ >> > > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ > > -- > Joaquín Ataz López > Derecho Civil > Universidad de Murcia > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] A not so short introduction to ConTeXt Mark IV
I do not know if I have been able to do this, but although there are some references to LaTeX, I have tried to write a totally independent text, which does not require knowledge of LaTeX or TeX to be understood. El 3/1/21 a las 19:42, BPJ escribió: This is a great resource which I am at the moment enjoying to read but I can't help wondering if there is a text aimed at those who already know LaTeX and know the basics of TeX describing ConTeXt in terms of differences (and similarities) between the two, and in particular the gotchas. -- Better --help|less than helpless Den sön 3 jan. 2021 10:48Joaquín Ataz López <mailto:j...@um.es>> skrev: Hello to all: Two months ago I informed to the list that I had written an introduction in Spanish to ConTeXt Mark IV. This interested several people, and in order to increase their potential audience, a member of this list (native English speaker) has proceeded to translate my text into English. It is precisely the members of this list who need no introduction at all, but it can sometimes be useful to help someone get started with the fascinating typesetting system that is ConTeXt. As for the English translation, I have made some small changes to the Spanish version, so anyone who understands Spanish and prefers to read it in its original language can download the new version: Both versions are available at the following links - Spanish: https://webs.um.es/jal/docs/introCTX_esp.pdf - Engilish: https://webs.um.es/jal/docs/introCTX_eng.pdf Soon I will send both texts, with their source files, to the documentation section of the CTAN repository. -- Joaquín Ataz López Derecho Civil Universidad de Murcia ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ -- Joaquín Ataz López Derecho Civil Universidad de Murcia ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] A not so short introduction to ConTeXt Mark IV
This is a great resource which I am at the moment enjoying to read but I can't help wondering if there is a text aimed at those who already know LaTeX and know the basics of TeX describing ConTeXt in terms of differences (and similarities) between the two, and in particular the gotchas. -- Better --help|less than helpless Den sön 3 jan. 2021 10:48Joaquín Ataz López skrev: > Hello to all: > > Two months ago I informed to the list that I had written an introduction > in Spanish to ConTeXt Mark IV. This interested several people, and in > order to increase their potential audience, a member of this list > (native English speaker) has proceeded to translate my text into English. > > It is precisely the members of this list who need no introduction at > all, but it can sometimes be useful to help someone get started with the > fascinating typesetting system that is ConTeXt. > > As for the English translation, I have made some small changes to the > Spanish version, so anyone who understands Spanish and prefers to read > it in its original language can download the new version: > > Both versions are available at the following links > > - Spanish: https://webs.um.es/jal/docs/introCTX_esp.pdf > > - Engilish: https://webs.um.es/jal/docs/introCTX_eng.pdf > > Soon I will send both texts, with their source files, to the > documentation section of the CTAN repository. > > > -- > Joaquín Ataz López > Derecho Civil > Universidad de Murcia > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] A not so short introduction to ConTeXt Mark IV
Thanks Joaquín! I tried the spanish version but it was too hard. Best wishes to all for 2021! Alain Le 3/01/2021 à 10:45, Joaquín Ataz López a écrit : Hello to all: Two months ago I informed to the list that I had written an introduction in Spanish to ConTeXt Mark IV. This interested several people, and in order to increase their potential audience, a member of this list (native English speaker) has proceeded to translate my text into English. It is precisely the members of this list who need no introduction at all, but it can sometimes be useful to help someone get started with the fascinating typesetting system that is ConTeXt. As for the English translation, I have made some small changes to the Spanish version, so anyone who understands Spanish and prefers to read it in its original language can download the new version: Both versions are available at the following links - Spanish: https://webs.um.es/jal/docs/introCTX_esp.pdf - Engilish: https://webs.um.es/jal/docs/introCTX_eng.pdf Soon I will send both texts, with their source files, to the documentation section of the CTAN repository. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] A not so short introduction to ConTeXt Mark IV
Hello to all: Two months ago I informed to the list that I had written an introduction in Spanish to ConTeXt Mark IV. This interested several people, and in order to increase their potential audience, a member of this list (native English speaker) has proceeded to translate my text into English. It is precisely the members of this list who need no introduction at all, but it can sometimes be useful to help someone get started with the fascinating typesetting system that is ConTeXt. As for the English translation, I have made some small changes to the Spanish version, so anyone who understands Spanish and prefers to read it in its original language can download the new version: Both versions are available at the following links - Spanish: https://webs.um.es/jal/docs/introCTX_esp.pdf - Engilish: https://webs.um.es/jal/docs/introCTX_eng.pdf Soon I will send both texts, with their source files, to the documentation section of the CTAN repository. -- Joaquín Ataz López Derecho Civil Universidad de Murcia ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] drop shadows with metapost/ metafun
On Fri, 1 Jan 2021, Aditya Mahajan wrote: > On Tue, 29 Dec 2020, Garulfo wrote: > > > Which process would you advice to add « drop shadows » to any kind of > > metafun / metapost figures like: > > > Actually, all this seems long and tedious, and contrasts with the already > > existing links between MetaPost / MetaFun and cairo + libpng. > > There was a drops module by Peter Rolf, which provides exactly these features: > > https://mailman.ntg.nl/pipermail/ntg-context/2016/084242.html > > It is not part of modules.contextgarden.net and the url in the previous post > is no longer valid. > > I am CC:ing Peter and perhaps he can point to the updated location for the > module. Also, if you don't want the shadows to be too nice, you can also translate the fake shadows used by tikz to metapost: https://adityam.github.io/context-blog/post/drop-shadow-with-lifted-corners/ Aditya___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Indic fonts with MkIV and
Robert Zydenbos schrieb am 19.12.2020 um 02:47: Dear all, Recently I read about the use of Harfbuzz-enhanced LuaTeX with LaTeX for writing Arabic. Following that example, I wrote a minimal test text that worked excellently for Kannada script as well: - \documentclass{article} \usepackage{fontspec} \setmainfont{Kedage}[RawFeature={mode=harf;script=knda;}] \begin{document} ಇದು ಹೇಗಿದೆ? ನಾನು ಹೀಗೆ ತುಂಬ ಬರೆಯಬೇಕೆಂದು ಯೋಚಿಸುತ್ತಿದ್ದೇನೆ. \end{document} - I want to do this in ConTeXt too! Can anyone tell me how to translate “\setmainfont{Kedage}[RawFeature={mode=harf;script=knda;}]” into ConTeXt? This could be the key to using MkIV with Indic scripts. %\definefontfamily [kannada] [rm] [Kedage] [features=kannada-one] \definefontfamily [kannada] [ss] [Tunga] [features=kannada-one] \definetypeface [kannada] [mm] [math] [modern] \setupbodyfont [kannada] \starttext ಇದು ಹೇಗಿದೆ? ನಾನು ಹೀಗೆ ತುಂಬ ಬರೆಯಬೇಕೆಂದು ಯೋಚಿಸುತ್ತಿದ್ದೇನೆ. \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Indic fonts with MkIV and
You need to use the LuaHBTeX backend which isn't actually supported by ConTeXt (and Hans doesn't like it either, I think). There's a plugin mode, however. If not in the mailing list, more info about Harfbuzz in ConTeXt is available in some articles. Regards, Jairo El vie., 18 de dic. de 2020 9:24 p. m., Robert Zydenbos < cont...@zydenbos.net> escribió: > Dear all, > > Recently I read about the use of Harfbuzz-enhanced LuaTeX with LaTeX for > writing Arabic. Following that example, I wrote a minimal test text that > worked excellently for Kannada script as well: > > - > \documentclass{article} > \usepackage{fontspec} > > \setmainfont{Kedage}[RawFeature={mode=harf;script=knda;}] > > \begin{document} > ಇದು ಹೇಗಿದೆ? ನಾನು ಹೀಗೆ ತುಂಬ ಬರೆಯಬೇಕೆಂದು ಯೋಚಿಸುತ್ತಿದ್ದೇನೆ. > \end{document} > - > > I want to do this in ConTeXt too! Can anyone tell me how to translate > “\setmainfont{Kedage}[RawFeature={mode=harf;script=knda;}]” into ConTeXt? > This could be the key to using MkIV with Indic scripts. > > Robert > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Indic fonts with MkIV and
Dear all, Recently I read about the use of Harfbuzz-enhanced LuaTeX with LaTeX for writing Arabic. Following that example, I wrote a minimal test text that worked excellently for Kannada script as well: - \documentclass{article} \usepackage{fontspec} \setmainfont{Kedage}[RawFeature={mode=harf;script=knda;}] \begin{document} ಇದು ಹೇಗಿದೆ? ನಾನು ಹೀಗೆ ತುಂಬ ಬರೆಯಬೇಕೆಂದು ಯೋಚಿಸುತ್ತಿದ್ದೇನೆ. \end{document} - I want to do this in ConTeXt too! Can anyone tell me how to translate “\setmainfont{Kedage}[RawFeature={mode=harf;script=knda;}]” into ConTeXt? This could be the key to using MkIV with Indic scripts. Robert ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Units of xpart and ypart of a pair in MetaFun
/First « //uniformdeviate(1) - 0.5// » could be modified to « //uniformdeviate(0.5)//»./ / / /To add noise, you can use the randomized function of Metafun. For exemple, you can write:/ / / /draw pp randomized 1cm ;/ / / That's true Fabrice but in this use case I wanted a random number between -0.5 and +0.5, and I wasn't sure I would get that with randomized. Thanks again Keith McKay/ / On 26/11/2020 17:20, Fabrice L wrote: Keith, Le 26 nov. 2020 à 12:12, Keith McKay <mailto:mckaymeis...@gmail.com>> a écrit : Thanks Fabrice and Hans. I now see I can simplify some lines of the code: pp := ((xpart a[i])/cf*cm, (ypart a[i])/cf*cm); now becomes pp:= a[i]; and pp := pp --- ((xpart a[i+1]/cf)*cm, (ypart a[i+1])/cf*cm); now becomes pp := pp --- a[i +1] ; However I still have the problem in the calculation of xcoord and ycoord which are used in the creation of path pp: for squig = 1 step 1 until 15: xcoord := uniformdeviate(1) - 0.5 + (xpart a[i]/cf); ycoord := uniformdeviate(1) - 0.5+ (ypart a[i]/cf); pp := pp .. {curl 100}(xcoord*cm, ycoord*cm); endfor; I'm adding a small random amount to the x and ypart of the pair a[i] to produce a path that is like a squiggle (gribouiller in French, according to Google). I have to use cf to convert to the x and yparts to centimeters since they seem to loose the centimeter units on separation. I can't see anyway round this, or am I missing something? Thanks Keith McKay First « uniformdeviate(1) - 0.5 » could be modified to « uniformdeviate(0.5)». To add noise, you can use the randomized function of Metafun. For exemple, you can write: draw pp randomized 1cm ; Fabrice. On 26/11/2020 15:19, Fabrice L wrote: Hi keith, Le 26 nov. 2020 à 10:09, Keith McKay <mailto:mckaymeis...@gmail.com>> a écrit : Hi, I have been using xpart and ypart to extract these values from pairs of points in a path but I wasn't getting the correct result. I was expecting: pair (2cm, 11cm) to give xpart 2 and ypart 11 However I was getting: pair (2cm, 11cm) -> xpart 56.6929 and ypart 311.8096 After much head scratching and reading the MetaPost and MetaFun manuals, I realised that the units of xpart or ypart are in Postcript points or Big Points (bp), and 1 bp is 1/72 of an inch, and thus to get the values of xpart or ypart in cm I would have to use a correction factor. I had made the assumption that since the x and ypart in the pair was in cm that the result would be in cm, but I see now that this is not the case. Will I have to continue doing this or is there some magic within MetaFun which takes account of the units in a pair and outputs the result of x and ypart in the same units? The MWE belows shows what I have been doing. Thanks Keith McKay %%% MWE %%% \setuppapersize [A5, landscape][A4, portrait] \usecolors[crayola] \starttext \startMPpage StartPage; width := PaperWidth ; height := PaperHeight ; unit := cm ; numeric squig; pair a[]; a0 = (2cm,11cm); a1 = (4cm,10cm); a2 = (6cm,9cm); a3 = (8cm,8cm); show xpart a[0], ypart a[0]; %Example of result from x and ypart before applying correction factor (cf) % cf := 72/2.54; %Converts points/in to points/cm% path pp; for i = 0 step 1 until 3: pp := ((xpart a[i])/cf*cm, (ypart a[i])/cf*cm); for squig = 1 step 1 until 15: xcoord := uniformdeviate(1) - 0.5 + (xpart a[i]/cf); ycoord := uniformdeviate(1) - 0.5+ (ypart a[i]/cf); pp := pp .. {curl 100}(xcoord*cm, ycoord*cm); endfor; pp := pp --- cycle; if i < 3 : pp := pp --- ((xpart a[i+1]/cf)*cm, (ypart a[i+1])/cf*cm); fi; f :=((1.4 - 0.6) * uniformdeviate(1)) + 0.8; % Factor to lighten/darken colour % draw pp withpen pencircle xscaled 0.5mm yscaled .1mm rotated 45 withcolor (f[white,\MPcolor{BurntSienna}]); endfor; StopPage; \stopMPpage \stoptext %% MetaPost (MetaFun) is taking care of everything regarding units. As you ave discovered, everything is translated to a unique internal dimension. So you can write: a := (1cm,2in) ; with no problem. The « cm » and « in » parts of the expression will become numbers to translate this number on the right unit. Fabrice. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist :ntg-context@ntg.nl <mailto:ntg-context@ntg.nl>/http://www.ntg.nl/mailman/listinfo/ntg-context <http://www.ntg.nl/mailman/listinfo/ntg-context> webpage :http://www.pragma-ade.nl <http://www.pragma-ade.nl/>/http://context.aanhet.net <http://context.aanhet.net/> archive :https://bitbucket.org/phg/context-mirror/commits/ <https://bitbucket.org/phg/context-mirror/commits/> wiki :http://contextgarden.net <http://contextgarden.net/> ___ ___ If your qu
Re: [NTG-context] Units of xpart and ypart of a pair in MetaFun
Thanks again Hans and Fabrice, for the time you have both taken with my question and thanks for the code snippet Hans. Just one last confirmation from the snippet. Hans uses the correction factor cf on the x and yparts of a[i]. I taking this as meaning that this has to be done because the x and yparts of a[i] are returned as postscript points units and not as centimeters as in the pair. I maybe didn't make this clear in my original query. Thanks for your patience. Keith McKay On 26/11/2020 17:25, Hans Hagen wrote: On 11/26/2020 6:12 PM, Keith McKay wrote: Thanks Fabrice and Hans. I now see I can simplify some lines of the code: pp := ((xpart a[i])/cf*cm, (ypart a[i])/cf*cm); now becomes pp:= a[i]; and pp := pp --- ((xpart a[i+1]/cf)*cm, (ypart a[i+1])/cf*cm); now becomes pp := pp --- a[i +1] ; However I still have the problem in the calculation of xcoord and ycoord which are used in the creation of path pp: for squig = 1 step 1 until 15: xcoord := uniformdeviate(1) - 0.5 + (xpart a[i]/cf); ycoord := uniformdeviate(1) - 0.5+ (ypart a[i]/cf); pp := pp .. {curl 100}(xcoord*cm, ycoord*cm); endfor; I'm adding a small random amount to the x and ypart of the pair a[i] to produce a path that is like a squiggle (gribouiller in French, according to Google). I have to use cf to convert to the x and yparts to centimeters since they seem to loose the centimeter units on separation. I can't see anyway round this, or am I missing something? for squig = 1 step 1 until 15: xcoord := (xpart a[i]/cf); ycoord := (ypart a[i]/cf); xcoord := xcoord randomized (xcoord/50); ycoord := ycoord randomized (ycoord/50); pp := pp .. { curl 100 } (xcoord*cm, ycoord*cm); endfor; Thanks Keith McKay On 26/11/2020 15:19, Fabrice L wrote: Hi keith, Le 26 nov. 2020 à 10:09, Keith McKay <mailto:mckaymeis...@gmail.com>> a écrit : Hi, I have been using xpart and ypart to extract these values from pairs of points in a path but I wasn't getting the correct result. I was expecting: pair (2cm, 11cm) to give xpart 2 and ypart 11 However I was getting: pair (2cm, 11cm) -> xpart 56.6929 and ypart 311.8096 After much head scratching and reading the MetaPost and MetaFun manuals, I realised that the units of xpart or ypart are in Postcript points or Big Points (bp), and 1 bp is 1/72 of an inch, and thus to get the values of xpart or ypart in cm I would have to use a correction factor. I had made the assumption that since the x and ypart in the pair was in cm that the result would be in cm, but I see now that this is not the case. Will I have to continue doing this or is there some magic within MetaFun which takes account of the units in a pair and outputs the result of x and ypart in the same units? The MWE belows shows what I have been doing. Thanks Keith McKay %%% MWE %%% \setuppapersize [A5, landscape][A4, portrait] \usecolors[crayola] \starttext \startMPpage StartPage; width := PaperWidth ; height := PaperHeight ; unit := cm ; numeric squig; pair a[]; a0 = (2cm,11cm); a1 = (4cm,10cm); a2 = (6cm,9cm); a3 = (8cm,8cm); show xpart a[0], ypart a[0]; %Example of result from x and ypart before applying correction factor (cf) % cf := 72/2.54; %Converts points/in to points/cm% path pp; for i = 0 step 1 until 3: pp := ((xpart a[i])/cf*cm, (ypart a[i])/cf*cm); for squig = 1 step 1 until 15: xcoord := uniformdeviate(1) - 0.5 + (xpart a[i]/cf); ycoord := uniformdeviate(1) - 0.5+ (ypart a[i]/cf); pp := pp .. {curl 100}(xcoord*cm, ycoord*cm); endfor; pp := pp --- cycle; if i < 3 : pp := pp --- ((xpart a[i+1]/cf)*cm, (ypart a[i+1])/cf*cm); fi; f :=((1.4 - 0.6) * uniformdeviate(1)) + 0.8; % Factor to lighten/darken colour % draw pp withpen pencircle xscaled 0.5mm yscaled .1mm rotated 45 withcolor (f[white,\MPcolor{BurntSienna}]); endfor; StopPage; \stopMPpage \stoptext %% MetaPost (MetaFun) is taking care of everything regarding units. As you ave discovered, everything is translated to a unique internal dimension. So you can write: a := (1cm,2in) ; with no problem. The « cm » and « in » parts of the expression will become numbers to translate this number on the right unit. Fabrice. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist :ntg-context@ntg.nl <mailto:ntg-context@ntg.nl>/http://www.ntg.nl/mailman/listinfo/ntg-context <http://www.ntg.nl/mailman/listinfo/ntg-context> webpage :http://www.pragma-ade.nl <http://www.pragma-ade.nl/>/http://context.aanhet.net <http://context.aanhet.net/> archive :https://bitbucket.org/phg/context-mirror/commits/ <https://bitbucket.org/phg/context-mirror/commits/> wiki :http:
Re: [NTG-context] Units of xpart and ypart of a pair in MetaFun
Keith, > Le 26 nov. 2020 à 12:12, Keith McKay a écrit : > Thanks Fabrice and Hans. > > I now see I can simplify some lines of the code: > > pp := ((xpart a[i])/cf*cm, (ypart a[i])/cf*cm); now becomes pp:= a[i]; > > and > > pp := pp --- ((xpart a[i+1]/cf)*cm, (ypart a[i+1])/cf*cm); now becomes pp := > pp --- a[i +1] ; > > However I still have the problem in the calculation of xcoord and ycoord > which are used in the creation of path pp: > > for squig = 1 step 1 until 15: > > xcoord := uniformdeviate(1) - 0.5 + (xpart a[i]/cf); > > ycoord := uniformdeviate(1) - 0.5+ (ypart a[i]/cf); > > pp := pp .. {curl 100}(xcoord*cm, ycoord*cm); > > endfor; > > I'm adding a small random amount to the x and ypart of the pair a[i] to > produce a path that is like a squiggle (gribouiller in French, according to > Google). I have to use cf to convert to the x and yparts to centimeters since > they seem to loose the centimeter units on separation. I can't see anyway > round this, or am I missing something? > > Thanks > Keith McKay First « uniformdeviate(1) - 0.5 » could be modified to « uniformdeviate(0.5)». To add noise, you can use the randomized function of Metafun. For exemple, you can write: draw pp randomized 1cm ; Fabrice. > > On 26/11/2020 15:19, Fabrice L wrote: >> Hi keith, >> >>> Le 26 nov. 2020 à 10:09, Keith McKay >> <mailto:mckaymeis...@gmail.com>> a écrit : >>> >>> Hi, >>> >>> I have been using xpart and ypart to extract these values from pairs of >>> points in a path but I wasn't getting the correct result. I was expecting: >>> >>> pair (2cm, 11cm) to give xpart 2 and ypart 11 >>> >>> However I was getting: >>> >>> pair (2cm, 11cm) -> xpart 56.6929 and ypart 311.8096 >>> >>> After much head scratching and reading the MetaPost and MetaFun manuals, I >>> realised that the units of xpart or ypart are in Postcript points or Big >>> Points (bp), and 1 bp is 1/72 of an inch, and thus to get the values of >>> xpart or ypart in cm I would have to use a correction factor. I had made >>> the assumption that since the x and ypart in the pair was in cm that the >>> result would be in cm, but I see now that this is not the case. Will I have >>> to continue doing this or is there some magic within MetaFun which takes >>> account of the units in a pair and outputs the result of x and ypart in the >>> same units? >>> >>> The MWE belows shows what I have been doing. >>> >>> Thanks >>> >>> Keith McKay >>> >>> %%% MWE %%% >>> \setuppapersize [A5, landscape][A4, portrait] >>> \usecolors[crayola] >>> \starttext >>> \startMPpage >>> StartPage; >>> width := PaperWidth ; height := PaperHeight ; unit := cm ; >>> numeric squig; >>> pair a[]; a0 = (2cm,11cm); a1 = (4cm,10cm); a2 = (6cm,9cm); a3 = >>> (8cm,8cm); >>> show xpart a[0], ypart a[0]; %Example of result from x and ypart before >>> applying correction factor (cf) % >>> cf := 72/2.54; %Converts points/in to points/cm% >>> path pp; >>> for i = 0 step 1 until 3: >>> pp := ((xpart a[i])/cf*cm, (ypart a[i])/cf*cm); >>> for squig = 1 step 1 until 15: >>> xcoord := uniformdeviate(1) - 0.5 + (xpart a[i]/cf); >>> ycoord := uniformdeviate(1) - 0.5+ (ypart a[i]/cf); >>> pp := pp .. {curl 100}(xcoord*cm, ycoord*cm); >>> endfor; >>> pp := pp --- cycle; >>> if i < 3 : >>> pp := pp --- ((xpart a[i+1]/cf)*cm, (ypart a[i+1])/cf*cm); >>> fi; >>> f :=((1.4 - 0.6) * uniformdeviate(1)) + 0.8; % Factor to lighten/darken >>> colour % >>> draw pp withpen pencircle xscaled 0.5mm yscaled .1mm rotated 45 >>> withcolor (f[white,\MPcolor{BurntSienna}]); >>> endfor; >>> StopPage; >>> \stopMPpage >>> \stoptext >>> %% >>> >> >> MetaPost (MetaFun) is taking care of everything regarding units. As you ave >> discovered, everything is translated to a unique internal dimension. So you >> can write: >> >> a := (1cm,2in) ; >> >> with no problem. The « cm » and « in » parts of the exp
Re: [NTG-context] Units of xpart and ypart of a pair in MetaFun
On 11/26/2020 6:12 PM, Keith McKay wrote: Thanks Fabrice and Hans. I now see I can simplify some lines of the code: pp := ((xpart a[i])/cf*cm, (ypart a[i])/cf*cm); now becomes pp:= a[i]; and pp := pp --- ((xpart a[i+1]/cf)*cm, (ypart a[i+1])/cf*cm); now becomes pp := pp --- a[i +1] ; However I still have the problem in the calculation of xcoord and ycoord which are used in the creation of path pp: for squig = 1 step 1 until 15: xcoord := uniformdeviate(1) - 0.5 + (xpart a[i]/cf); ycoord := uniformdeviate(1) - 0.5+ (ypart a[i]/cf); pp := pp .. {curl 100}(xcoord*cm, ycoord*cm); endfor; I'm adding a small random amount to the x and ypart of the pair a[i] to produce a path that is like a squiggle (gribouiller in French, according to Google). I have to use cf to convert to the x and yparts to centimeters since they seem to loose the centimeter units on separation. I can't see anyway round this, or am I missing something? for squig = 1 step 1 until 15: xcoord := (xpart a[i]/cf); ycoord := (ypart a[i]/cf); xcoord := xcoord randomized (xcoord/50); ycoord := ycoord randomized (ycoord/50); pp := pp .. { curl 100 } (xcoord*cm, ycoord*cm); endfor; Thanks Keith McKay On 26/11/2020 15:19, Fabrice L wrote: Hi keith, Le 26 nov. 2020 à 10:09, Keith McKay <mailto:mckaymeis...@gmail.com>> a écrit : Hi, I have been using xpart and ypart to extract these values from pairs of points in a path but I wasn't getting the correct result. I was expecting: pair (2cm, 11cm) to give xpart 2 and ypart 11 However I was getting: pair (2cm, 11cm) -> xpart 56.6929 and ypart 311.8096 After much head scratching and reading the MetaPost and MetaFun manuals, I realised that the units of xpart or ypart are in Postcript points or Big Points (bp), and 1 bp is 1/72 of an inch, and thus to get the values of xpart or ypart in cm I would have to use a correction factor. I had made the assumption that since the x and ypart in the pair was in cm that the result would be in cm, but I see now that this is not the case. Will I have to continue doing this or is there some magic within MetaFun which takes account of the units in a pair and outputs the result of x and ypart in the same units? The MWE belows shows what I have been doing. Thanks Keith McKay %%% MWE %%% \setuppapersize [A5, landscape][A4, portrait] \usecolors[crayola] \starttext \startMPpage StartPage; width := PaperWidth ; height := PaperHeight ; unit := cm ; numeric squig; pair a[]; a0 = (2cm,11cm); a1 = (4cm,10cm); a2 = (6cm,9cm); a3 = (8cm,8cm); show xpart a[0], ypart a[0]; %Example of result from x and ypart before applying correction factor (cf) % cf := 72/2.54; %Converts points/in to points/cm% path pp; for i = 0 step 1 until 3: pp := ((xpart a[i])/cf*cm, (ypart a[i])/cf*cm); for squig = 1 step 1 until 15: xcoord := uniformdeviate(1) - 0.5 + (xpart a[i]/cf); ycoord := uniformdeviate(1) - 0.5+ (ypart a[i]/cf); pp := pp .. {curl 100}(xcoord*cm, ycoord*cm); endfor; pp := pp --- cycle; if i < 3 : pp := pp --- ((xpart a[i+1]/cf)*cm, (ypart a[i+1])/cf*cm); fi; f :=((1.4 - 0.6) * uniformdeviate(1)) + 0.8; % Factor to lighten/darken colour % draw pp withpen pencircle xscaled 0.5mm yscaled .1mm rotated 45 withcolor (f[white,\MPcolor{BurntSienna}]); endfor; StopPage; \stopMPpage \stoptext %% MetaPost (MetaFun) is taking care of everything regarding units. As you ave discovered, everything is translated to a unique internal dimension. So you can write: a := (1cm,2in) ; with no problem. The « cm » and « in » parts of the expression will become numbers to translate this number on the right unit. Fabrice. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist :ntg-context@ntg.nl <mailto:ntg-context@ntg.nl>/http://www.ntg.nl/mailman/listinfo/ntg-context <http://www.ntg.nl/mailman/listinfo/ntg-context> webpage :http://www.pragma-ade.nl <http://www.pragma-ade.nl/>/http://context.aanhet.net <http://context.aanhet.net/> archive :https://bitbucket.org/phg/context-mirror/commits/ <https://bitbucket.org/phg/context-mirror/commits/> wiki :http://contextgarden.net <http://contextgarden.net/> ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-
Re: [NTG-context] Units of xpart and ypart of a pair in MetaFun
Thanks Fabrice and Hans. I now see I can simplify some lines of the code: pp := ((xpart a[i])/cf*cm, (ypart a[i])/cf*cm); now becomes pp:= a[i]; and pp := pp --- ((xpart a[i+1]/cf)*cm, (ypart a[i+1])/cf*cm); now becomes pp := pp --- a[i +1] ; However I still have the problem in the calculation of xcoord and ycoord which are used in the creation of path pp: for squig = 1 step 1 until 15: xcoord := uniformdeviate(1) - 0.5 + (xpart a[i]/cf); ycoord := uniformdeviate(1) - 0.5+ (ypart a[i]/cf); pp := pp .. {curl 100}(xcoord*cm, ycoord*cm); endfor; I'm adding a small random amount to the x and ypart of the pair a[i] to produce a path that is like a squiggle (gribouiller in French, according to Google). I have to use cf to convert to the x and yparts to centimeters since they seem to loose the centimeter units on separation. I can't see anyway round this, or am I missing something? Thanks Keith McKay On 26/11/2020 15:19, Fabrice L wrote: Hi keith, Le 26 nov. 2020 à 10:09, Keith McKay <mailto:mckaymeis...@gmail.com>> a écrit : Hi, I have been using xpart and ypart to extract these values from pairs of points in a path but I wasn't getting the correct result. I was expecting: pair (2cm, 11cm) to give xpart 2 and ypart 11 However I was getting: pair (2cm, 11cm) -> xpart 56.6929 and ypart 311.8096 After much head scratching and reading the MetaPost and MetaFun manuals, I realised that the units of xpart or ypart are in Postcript points or Big Points (bp), and 1 bp is 1/72 of an inch, and thus to get the values of xpart or ypart in cm I would have to use a correction factor. I had made the assumption that since the x and ypart in the pair was in cm that the result would be in cm, but I see now that this is not the case. Will I have to continue doing this or is there some magic within MetaFun which takes account of the units in a pair and outputs the result of x and ypart in the same units? The MWE belows shows what I have been doing. Thanks Keith McKay %%% MWE %%% \setuppapersize [A5, landscape][A4, portrait] \usecolors[crayola] \starttext \startMPpage StartPage; width := PaperWidth ; height := PaperHeight ; unit := cm ; numeric squig; pair a[]; a0 = (2cm,11cm); a1 = (4cm,10cm); a2 = (6cm,9cm); a3 = (8cm,8cm); show xpart a[0], ypart a[0]; %Example of result from x and ypart before applying correction factor (cf) % cf := 72/2.54; %Converts points/in to points/cm% path pp; for i = 0 step 1 until 3: pp := ((xpart a[i])/cf*cm, (ypart a[i])/cf*cm); for squig = 1 step 1 until 15: xcoord := uniformdeviate(1) - 0.5 + (xpart a[i]/cf); ycoord := uniformdeviate(1) - 0.5+ (ypart a[i]/cf); pp := pp .. {curl 100}(xcoord*cm, ycoord*cm); endfor; pp := pp --- cycle; if i < 3 : pp := pp --- ((xpart a[i+1]/cf)*cm, (ypart a[i+1])/cf*cm); fi; f :=((1.4 - 0.6) * uniformdeviate(1)) + 0.8; % Factor to lighten/darken colour % draw pp withpen pencircle xscaled 0.5mm yscaled .1mm rotated 45 withcolor (f[white,\MPcolor{BurntSienna}]); endfor; StopPage; \stopMPpage \stoptext %% MetaPost (MetaFun) is taking care of everything regarding units. As you ave discovered, everything is translated to a unique internal dimension. So you can write: a := (1cm,2in) ; with no problem. The « cm » and « in » parts of the expression will become numbers to translate this number on the right unit. Fabrice. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist :ntg-context@ntg.nl <mailto:ntg-context@ntg.nl>/http://www.ntg.nl/mailman/listinfo/ntg-context <http://www.ntg.nl/mailman/listinfo/ntg-context> webpage :http://www.pragma-ade.nl <http://www.pragma-ade.nl/>/http://context.aanhet.net <http://context.aanhet.net/> archive :https://bitbucket.org/phg/context-mirror/commits/ <https://bitbucket.org/phg/context-mirror/commits/> wiki :http://contextgarden.net <http://contextgarden.net/> ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Units of xpart and ypart of a pair in MetaFun
Hi keith, > Le 26 nov. 2020 à 10:09, Keith McKay a écrit : > > Hi, > > I have been using xpart and ypart to extract these values from pairs of > points in a path but I wasn't getting the correct result. I was expecting: > > pair (2cm, 11cm) to give xpart 2 and ypart 11 > > However I was getting: > > pair (2cm, 11cm) -> xpart 56.6929 and ypart 311.8096 > > After much head scratching and reading the MetaPost and MetaFun manuals, I > realised that the units of xpart or ypart are in Postcript points or Big > Points (bp), and 1 bp is 1/72 of an inch, and thus to get the values of xpart > or ypart in cm I would have to use a correction factor. I had made the > assumption that since the x and ypart in the pair was in cm that the result > would be in cm, but I see now that this is not the case. Will I have to > continue doing this or is there some magic within MetaFun which takes account > of the units in a pair and outputs the result of x and ypart in the same > units? > > The MWE belows shows what I have been doing. > > Thanks > > Keith McKay > > %%% MWE %%% > \setuppapersize [A5, landscape][A4, portrait] > \usecolors[crayola] > \starttext > \startMPpage > StartPage; > width := PaperWidth ; height := PaperHeight ; unit := cm ; > numeric squig; > pair a[]; a0 = (2cm,11cm); a1 = (4cm,10cm); a2 = (6cm,9cm); a3 = (8cm,8cm); > show xpart a[0], ypart a[0]; %Example of result from x and ypart before > applying correction factor (cf) % > cf := 72/2.54; %Converts points/in to points/cm% > path pp; > for i = 0 step 1 until 3: > pp := ((xpart a[i])/cf*cm, (ypart a[i])/cf*cm); > for squig = 1 step 1 until 15: > xcoord := uniformdeviate(1) - 0.5 + (xpart a[i]/cf); > ycoord := uniformdeviate(1) - 0.5+ (ypart a[i]/cf); > pp := pp .. {curl 100}(xcoord*cm, ycoord*cm); > endfor; > pp := pp --- cycle; > if i < 3 : > pp := pp --- ((xpart a[i+1]/cf)*cm, (ypart a[i+1])/cf*cm); > fi; > f :=((1.4 - 0.6) * uniformdeviate(1)) + 0.8; % Factor to lighten/darken > colour % > draw pp withpen pencircle xscaled 0.5mm yscaled .1mm rotated 45 > withcolor (f[white,\MPcolor{BurntSienna}]); > endfor; > StopPage; > \stopMPpage > \stoptext > %% > MetaPost (MetaFun) is taking care of everything regarding units. As you ave discovered, everything is translated to a unique internal dimension. So you can write: a := (1cm,2in) ; with no problem. The « cm » and « in » parts of the expression will become numbers to translate this number on the right unit. Fabrice. > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / > http://www.ntg.nl/mailman/listinfo/ntg-context > <http://www.ntg.nl/mailman/listinfo/ntg-context> > webpage : http://www.pragma-ade.nl <http://www.pragma-ade.nl/> / > http://context.aanhet.net <http://context.aanhet.net/> > archive : https://bitbucket.org/phg/context-mirror/commits/ > <https://bitbucket.org/phg/context-mirror/commits/> > wiki : http://contextgarden.net <http://contextgarden.net/> > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] The correct way to add emphasis to text using italics
On Wed, 21 Oct 2020, Andres Conrado Montoya wrote: > I've seen in several articles on the Wiki, some differences about how this > is done, and I'm confused about the differences: > > *Font_Switching* says: "There is a font switch \em to emphasize text. This > is somewhat special: it does automatic italic correction and changes the > alternative depending on the current alternative. For example, if the > current font alternative is normal (i.e. upright), \em switches to slanted; > and if the current font alternative is slanted, \em switches to normal." > And using \definebodyfontenvironment[default][em=italic] to use italic > instead of slanted; for OpenType fonts, recommends using > \definefontfeature[default][default][itlc=yes] to also activate the italic > correction. However, this seems not to work in x(ht)ml export. Did you also see **Before you start...** section on that page: https://wiki.contextgarden.net/Font_Switching#Before_you_start_... > If you go to *Export*, it says: "Also note that switches like \em don’t > translate into output structure, you need to > \definehighlight[emph][style={\em}] and use as \emph{emphasized}." This is > what I'm currently using. Other parts of the Wiki show a similar solution, > but using style=italic, or style={\it}; I've seen others, but now I can't > find them. > > Could you please guide me as to where is this documented in the manuals? Is > there any particular reason to choose any of these approaches above the > others? As far as PDF output is consider, both the font switch \em and the macro \emph defined using \definehighlight[emph][style=\em] are equivalent. You can test that: \definehighlight[emph][style=\em] \starttext Normal text. \emph{This is \emph{emphasized} test} Normal text. {\em This is {\em emphasized} test} \stoptext > What is the recommended option if you want to have the \em > properties for emphasized text, but works for BOTH pdf and x(h)tml export? The raw font switch \em is not exported to HTML while \definehighlight[emph] is. Aditya___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] The correct way to add emphasis to text using italics
I've seen in several articles on the Wiki, some differences about how this is done, and I'm confused about the differences: *Font_Switching* says: "There is a font switch \em to emphasize text. This is somewhat special: it does automatic italic correction and changes the alternative depending on the current alternative. For example, if the current font alternative is normal (i.e. upright), \em switches to slanted; and if the current font alternative is slanted, \em switches to normal." And using \definebodyfontenvironment[default][em=italic] to use italic instead of slanted; for OpenType fonts, recommends using \definefontfeature[default][default][itlc=yes] to also activate the italic correction. However, this seems not to work in x(ht)ml export. If you go to *Export*, it says: "Also note that switches like \em don’t translate into output structure, you need to \definehighlight[emph][style={\em}] and use as \emph{emphasized}." This is what I'm currently using. Other parts of the Wiki show a similar solution, but using style=italic, or style={\it}; I've seen others, but now I can't find them. Could you please guide me as to where is this documented in the manuals? Is there any particular reason to choose any of these approaches above the others? What is the recommended option if you want to have the \em properties for emphasized text, but works for BOTH pdf and x(h)tml export? Thank you for your time. -- Andrés Conrado Montoya Andi Kú andresconr...@gmail.com http://sesentaycuatro.com http://messier87.com http://chiquitico.org Los fines no justifican los medios, porque la medida verdadera de nuestro carácter está dada por los medios que estamos dispuestos a utilizar, no por los fines que proclamamos. “You develop an instant global consciousness, a people orientation, an intense dissatisfaction with the state of the world, and a compulsion to do something about it. From out there on the moon, international politics look so petty. You want to grab a politician by the scruff of the neck and drag him a quarter of a million miles out and say, ‘Look at that, you son of a bitch.’” — Apollo 14 astronaut Edgar Mitchell ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Join Foundation to Support ConTeXt for the next 50 Years
On 17/10/20, 10:46, Suminda Sirinath Salpitikorala Dharmasena wrote: > Hello, > > In order to keep ConTeXt maintained for the very long term future, I am > wondering if there a possibility to join a foundation like the Apache > Software Foundation, Linux Foundation, etc. https://group.contextgarden.net/ > Also perhaps more to a more liberal license so there can be commercial use > of ConTeXt with some of it trickling to as code contributions, wider usage > which may further translate to support and consultancy work for those > familiar with ConTeXt. If commercial system uses ConTeXt as part of their > system there is a chance that is it is in their best interest to maintain > it also long as these systems are in operation. The main application of ConTeXt is producing PDFs and since these outputs are not “derived works” (using the wording of the GPL), the license terms of ConTeXt do not apply to them. I don't think anyone is actually modifying the ConTeXt core and even then, as long as you don't distribute binaries but only PDFs you don't have to publish the source. > Also perhaps it might be best than just depend on TeX maybe fork TeX and > improve it in a ConTeXt dependent way. This way ConTeXt more feature-rich > and easier to maintain than carrying the technical burden of TeX. There are > system like SILE typesetter (https://sile-typesetter.org/) which are > developed from the ground up and also The Tectonic Typesetting System ( > https://tectonic-typesetting.github.io/en-US/). What are you even talking about? ConTeXt has been using a forked TeX engine for at least a decade. LuaTeX is solely developed by and for the ConTeXt people. BTW, SILE is something completely different (and can't do math yet) and Tectonic is just a thin wrapper around XeTeX. Cheers, Henri > This is just some ideas which I thought might be worthwhile considering. > > Suminda > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Join Foundation to Support ConTeXt for the next 50 Years
Hello, In order to keep ConTeXt maintained for the very long term future, I am wondering if there a possibility to join a foundation like the Apache Software Foundation, Linux Foundation, etc. Also perhaps more to a more liberal license so there can be commercial use of ConTeXt with some of it trickling to as code contributions, wider usage which may further translate to support and consultancy work for those familiar with ConTeXt. If commercial system uses ConTeXt as part of their system there is a chance that is it is in their best interest to maintain it also long as these systems are in operation. Also perhaps it might be best than just depend on TeX maybe fork TeX and improve it in a ConTeXt dependent way. This way ConTeXt more feature-rich and easier to maintain than carrying the technical burden of TeX. There are system like SILE typesetter (https://sile-typesetter.org/) which are developed from the ground up and also The Tectonic Typesetting System ( https://tectonic-typesetting.github.io/en-US/). This is just some ideas which I thought might be worthwhile considering. Suminda ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] A Spanish introduction to ConTeXt Mark IV
Den ons 14 okt. 2020 06:14Joaquín Ataz López skrev: > Good morning to everyone. > > Although I guess it will not be of interest to most of the list members, > I wanted to communicate that I have written an introduction to ConTeXt > Mark IV in Spanish, which can be downloaded at > https://webs.um.es/jal/docs/introCTX.pdf. Its title is "An Introduction > (not too short) to ConTeXt Mark IV". > Although I make my way through Spanish text with the help of half-forgotten "high school" Latin and Italian from 35 years ago plus Wiktionary this is the book I have been needing! Thank you very much! This could really become the "lshort" of ConTeXt. The "lshort" was originally written in German but has been translated into multiple languages through community effort: < https://ctan.org/tex-archive/info/lshort>. I'm thinking that in this age of distributed version control it would be feasible to have multiple people working on each version. Since I periodically work as a documentation translator I'm immediately seized by a desire to translate it into English, and why not also Swedish, my native language? I would need to improve my Spanish considerably though, and probably also to invent the 28-hour day! So I'm thinking why not create a GitHub/GitLab repository (or even organization) for this so that anybody can help translating it into other languages? Those who know Spanish well could do the initial translation and then those who know English (or any other language into which some part(s) have been translated) can do the proof reading (which is where I really can show my muscle since proofing/editing is what I mostly do for a living! :-) Then when there exist more versions anyone can make secondary translations between pairs of languages which they know. Cheers, /Benct ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Mathematical symbol of non-inclusion
Hi Hans, Thank you for the clarification Fabrice Le dim. 30 août 2020 à 17:56, Hans Åberg a écrit : > > > On 30 Aug 2020, at 11:40, Fabrice Couvreur > wrote: > > > > @Hans My ignorance is total : how to write symbols from the keyboard ? > > I use text substitutions on MacOS: a sequence of characters can be > automatically translated into another. So for example, ".subset" might > translate into "⊂" as you type along. To find the ⊂ the first time, there > is a Unicode symbol table. Other platforms and editors have similar > features. There are other ways, but I have found this easiest and fastest > both to create and use. > > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Mathematical symbol of non-inclusion
> On 30 Aug 2020, at 11:40, Fabrice Couvreur > wrote: > > @Hans My ignorance is total : how to write symbols from the keyboard ? I use text substitutions on MacOS: a sequence of characters can be automatically translated into another. So for example, ".subset" might translate into "⊂" as you type along. To find the ⊂ the first time, there is a Unicode symbol table. Other platforms and editors have similar features. There are other ways, but I have found this easiest and fastest both to create and use. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] french translation of ConTeXt interface - progress (v3)
Hi Garulfo, I uploaded a version that has some of the tranmslations merged in. I'll now check some more, but I also saw some issues. A criterium is that translations of variables and constants only are for those that internally are used as v! and c! while for instance the s! are untranslated (they often are so very 'system' that translation does more harm than good. So, we don't translate some font related keys simply because in many cases the styles etc are not guaranteed coded neutral (most are)). It doesn't harm to have non-used entries in the table but best play clean. Special cases are for instance metapost things, so we don't translate an instance name 'lessfun'. Again, it does no harm to have the entries but there is no such 'moinsfun' defined because this is a system key. A general rule can be: - things we do in styles that are very unlikely to be done by users of an interface don't need a translation. - very basic system things neither (\startluacode for instance; we can of course provide a translated variant but current we don't yet) - commands like \AfterPar ... debatable, as we might actually have better alternatives for that ; the same for NormalizeFontHeight (not that many such camelcase names btw, often old macros that come from modules we made first) - Logos like MetaFont: no need for translation - beware of defining primitives (notr sure why kern was in the translated table) Anyway, I assume wolfgang will check changes too. We just stepwise add what was missing (indeed there were commands not in the list yet; some are generated commands, so maybe I also need to make sure the english variant keeps available just in case it's used deep down for some reason, often that is already the case so not that much danger). More later, I assume you put the latest files on the gardne (your zip), Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Translation of ConTeXt interface
Garulfo schrieb am 30.06.2020 um 23:09: The cause for the missing translations is this line in x-setups-basics.mkiv replace('cd:instances/cd:constant', 'value', variables) which works only when the instances are listed in the command entry like this ... which is never the case because I load the entries with cd:resolve like here: ... Thanks a lot Wolfgang for the explanations. A remaining question, due to the fact that I am not sure to understand all the implications: Is there some hope to find a solution to also translate the "cd:resolve" entries for the setup-xx.pdf files ? or does it mean that such a request is not compatible with the basic structure of the data / of the translation process ? Thanks again, for your help and for your time. You can try to replace the line replace('cd:instances/cd:constant', 'value', variables) with replace('cd:constant', 'value', variables) in x-setups-basics.mkiv and check if this replaces the texts. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Translation of ConTeXt interface
The cause for the missing translations is this line in x-setups-basics.mkiv replace('cd:instances/cd:constant', 'value', variables) which works only when the instances are listed in the command entry like this ... which is never the case because I load the entries with cd:resolve like here: ... Thanks a lot Wolfgang for the explanations. A remaining question, due to the fact that I am not sure to understand all the implications: Is there some hope to find a solution to also translate the "cd:resolve" entries for the setup-xx.pdf files ? or does it mean that such a request is not compatible with the basic structure of the data / of the translation process ? Thanks again, for your help and for your time. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Translation of ConTeXt interface
Hi Alan, i will not forget your remark, I don't remember why I get to such a translation. Maybe after working on translation and consistency between these ~2000 keywords... For "corps" and "fonte", it will be easy to change (there is not a lot of tags) If you agree, when I will have something "working", I will submit it to you, in order to get your feedback (just a 10 to 15 minutes overview can enable to catch the major issues) Le 27/06/2020 à 18:18, Alan Braslau a écrit : fonte ? (police) principale ? (corps) ... Alan On 26/06/20 16:04, Garulfo wrote: Math. I get the following error : fonts > preloading latin modern fonts (second stage) fonts > defining > font with asked name 'fichier' is not found using lookup 'file' fonts > defining > unknown font 'fichier', loading aborted I suppose that due to the translation of "file" to "fichier". It's OK when I switch back to - setupstrings cd:file ==> file You can translate these string because they are only used in the command list to provide the texts which are shown in uppercase letter, e.g. NUMBER. - variables file ==> file Constants (\c!...) and variables (\v!...) can be changed, only parameters which use the form \s!... have to be english in all cases (saves memory and improves performance). How can I translate the variable "file" into fichier, without messing with fonts (and maybe other file related functions) There shouldn't be a problem with fonts because they use \s!file or \s!name which aren't translated (unless you made the mistake and have \c!file in your typescripts). It's possible there is a bug somewhere but you have to provide a minimal example. My understanding: I translated \setupbodyfont into \configurerfonteprincipale. But I didn't specify any font in the input file. As soon as I specified \configurerfonteprincipale[pagella,10pt] in the input file, font messages "'fichier' is not found" disappear. Is there an additionnal thing to do in order to enable the loading of a default math font, without any font specification, but still with translations of "file" into "fichier" ? ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Converting from LaTeX for PDF accessibility tagging?
Thank you very much - I think the problem was with a LaTeX "align" environment which pandoc translated into a setting which ConTeXt didn't recognize. These equations were monsters, so I'll try with simpler equations to give you an idea. But in fact what you say makes perfect sense, and I'll go back and read through the mathematics document again, and more closely this time! (For matrices and arrays I still prefer the neat LaTeX implementation, but maybe that's simply my general unfamiliarity with ConTeXt.) Thanks again! Alasdair On Mon, Jun 29, 2020 at 2:27 AM Aditya Mahajan wrote: > On Sun, 28 Jun 2020, Alasdair McAndrew wrote: > > > I tried ConTeXt a few years ago, then gave up on it because of its > > wordiness and verbosity. The 2006 article on creating AMSTeX output in > > ConTeXt at https://www.ntg.nl/maps/34/06.pdf shows exactly what I mean: > the > > LaTeX commands are small and neat; the ConTeXt commands are not. > > As explained in the last paragraph, there are pre-built shortcuts for the > main alignments and you can define your own to match amsmath style, if you > wish. > > If you are worried about typing, look into tab completion for your editor > of choice. For example, in vim, I can do `for` which expands to > `\startformula ... \stopformula` and `fora` expands to `\startformula > \startalign ... \stopalign \stopformula`. > > > However, I need now to use ConTeXt for accessibility tagging, so I'm > > prepared to give it another try. And this means converting some LaTeX > > documents into ConTeXt. Is there a better way than using pandoc? I ran > a > > LaTeX document through pandoc, but the result is certainly not fully > > "ConTeXt compliant", and generates errors instead of compiling. > > AFAIK, pandoc is not aware of context math. When I convert latex to > context, I find it simpler to do it some hand written regex which translate > commands according to my writing style. > > > I can get easily lost on the ConTeXt site: the documentation is there in > > plenty, but seems hard to search. The main problem for me is mathematics > > and alignment: not just for equations, but for matrices and arrays. What > > I'd love - if it exists - is a document showing how to rewrite LaTeX into > > ConTeXt. Something like the above document, which is now 14 years old. > > The user-interface is still the same. > > > Anyway, as I say, my main issues are converting LaTeX into ConTeXt. and > > dealing with mathematics. Any pointers would be gratefully received! > > Can you post an example of LaTeX math that you are having difficulty in > converting? It is hard to answer this in the abstract. > > Aditya > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > ___ > -- https://numbersandshapes.net ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Converting from LaTeX for PDF accessibility tagging?
On Sun, 28 Jun 2020, Alasdair McAndrew wrote: I tried ConTeXt a few years ago, then gave up on it because of its wordiness and verbosity. The 2006 article on creating AMSTeX output in ConTeXt at https://www.ntg.nl/maps/34/06.pdf shows exactly what I mean: the LaTeX commands are small and neat; the ConTeXt commands are not. As explained in the last paragraph, there are pre-built shortcuts for the main alignments and you can define your own to match amsmath style, if you wish. If you are worried about typing, look into tab completion for your editor of choice. For example, in vim, I can do `for` which expands to `\startformula ... \stopformula` and `fora` expands to `\startformula \startalign ... \stopalign \stopformula`. However, I need now to use ConTeXt for accessibility tagging, so I'm prepared to give it another try. And this means converting some LaTeX documents into ConTeXt. Is there a better way than using pandoc? I ran a LaTeX document through pandoc, but the result is certainly not fully "ConTeXt compliant", and generates errors instead of compiling. AFAIK, pandoc is not aware of context math. When I convert latex to context, I find it simpler to do it some hand written regex which translate commands according to my writing style. I can get easily lost on the ConTeXt site: the documentation is there in plenty, but seems hard to search. The main problem for me is mathematics and alignment: not just for equations, but for matrices and arrays. What I'd love - if it exists - is a document showing how to rewrite LaTeX into ConTeXt. Something like the above document, which is now 14 years old. The user-interface is still the same. Anyway, as I say, my main issues are converting LaTeX into ConTeXt. and dealing with mathematics. Any pointers would be gratefully received! Can you post an example of LaTeX math that you are having difficulty in converting? It is hard to answer this in the abstract. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Translation of ConTeXt interface
Hi Wolfgang, Did you manage to have a look at the previous message Fri Jun 26 23:38:48 CEST 202023 https://mailman.ntg.nl/pipermail/ntg-context/2020/098596.html It contains two MWE : 1/ mult-def.lua.test1_figure.diff 2/ mult-def.lua.test2_itemize.diff + test2_itemize.tex (not about the font issue, but the two others) Le 27/06/2020 à 12:02, Wolfgang Schuster a écrit : Garulfo schrieb am 27.06.2020 um 00:04: How can I translate the variable "file" into fichier, without messing with fonts (and maybe other file related functions) There shouldn't be a problem with fonts because they use \s!file or \s!name which aren't translated (unless you made the mistake and have \c!file in your typescripts). It's possible there is a bug somewhere but you have to provide a minimal example. My understanding: I translated \setupbodyfont into \configurerfonteprincipale. But I didn't specify any font in the input file. As soon as I specified vpagella,10pt] in the input file, font messages "'fichier' is not found" disappear. Is there an additionnal thing to do in order to enable the loading of a default math font, without any font specification, but still with translations of "file" into "fichier" ? I'm unable to reproduce the error. I added the "configurerfonteprincipale" to mult-def.lua and can use it in your itemize test document without problems. It helps to have a example which produces the error and your complete mult-def.lua file. Also helpful is to add \tracingall (or just \tracingmacros=2) before \configurerfonteprincipale to get more informations what's happening with the command. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Translation of ConTeXt interface
fonte ? (police) principale ? (corps) ... Alan On 26/06/20 16:04, Garulfo wrote: Math. I get the following error : fonts > preloading latin modern fonts (second stage) fonts > defining > font with asked name 'fichier' is not found using lookup 'file' fonts > defining > unknown font 'fichier', loading aborted I suppose that due to the translation of "file" to "fichier". It's OK when I switch back to - setupstrings cd:file ==> file You can translate these string because they are only used in the command list to provide the texts which are shown in uppercase letter, e.g. NUMBER. - variables file ==> file Constants (\c!...) and variables (\v!...) can be changed, only parameters which use the form \s!... have to be english in all cases (saves memory and improves performance). How can I translate the variable "file" into fichier, without messing with fonts (and maybe other file related functions) There shouldn't be a problem with fonts because they use \s!file or \s!name which aren't translated (unless you made the mistake and have \c!file in your typescripts). It's possible there is a bug somewhere but you have to provide a minimal example. My understanding: I translated \setupbodyfont into \configurerfonteprincipale. But I didn't specify any font in the input file. As soon as I specified \configurerfonteprincipale[pagella,10pt] in the input file, font messages "'fichier' is not found" disappear. Is there an additionnal thing to do in order to enable the loading of a default math font, without any font specification, but still with translations of "file" into "fichier" ? ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Translation of ConTeXt interface
Garulfo schrieb am 27.06.2020 um 00:04: How can I translate the variable "file" into fichier, without messing with fonts (and maybe other file related functions) There shouldn't be a problem with fonts because they use \s!file or \s!name which aren't translated (unless you made the mistake and have \c!file in your typescripts). It's possible there is a bug somewhere but you have to provide a minimal example. My understanding: I translated \setupbodyfont into \configurerfonteprincipale. But I didn't specify any font in the input file. As soon as I specified vpagella,10pt] in the input file, font messages "'fichier' is not found" disappear. Is there an additionnal thing to do in order to enable the loading of a default math font, without any font specification, but still with translations of "file" into "fichier" ? I'm unable to reproduce the error. I added the "configurerfonteprincipale" to mult-def.lua and can use it in your itemize test document without problems. It helps to have a example which produces the error and your complete mult-def.lua file. Also helpful is to add \tracingall (or just \tracingmacros=2) before \configurerfonteprincipale to get more informations what's happening with the command. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Translation of ConTeXt interface
Math. I get the following error : fonts > preloading latin modern fonts (second stage) fonts > defining > font with asked name 'fichier' is not found using lookup 'file' fonts > defining > unknown font 'fichier', loading aborted I suppose that due to the translation of "file" to "fichier". It's OK when I switch back to - setupstrings cd:file ==> file You can translate these string because they are only used in the command list to provide the texts which are shown in uppercase letter, e.g. NUMBER. - variables file ==> file Constants (\c!...) and variables (\v!...) can be changed, only parameters which use the form \s!... have to be english in all cases (saves memory and improves performance). How can I translate the variable "file" into fichier, without messing with fonts (and maybe other file related functions) There shouldn't be a problem with fonts because they use \s!file or \s!name which aren't translated (unless you made the mistake and have \c!file in your typescripts). It's possible there is a bug somewhere but you have to provide a minimal example. My understanding: I translated \setupbodyfont into \configurerfonteprincipale. But I didn't specify any font in the input file. As soon as I specified \configurerfonteprincipale[pagella,10pt] in the input file, font messages "'fichier' is not found" disappear. Is there an additionnal thing to do in order to enable the loading of a default math font, without any font specification, but still with translations of "file" into "fichier" ? ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Translation of ConTeXt interface
Garulfo schrieb am 26.06.2020 um 12:27: Thanks a lot Wolfang for your answer. I have 5 additional questions... sorry. --- >> \placeFLOAT becomes \placerFLOAT >> \startplaceFLOAT becomes \debutplacerFLOAT >> \placerchemical becomes \placerchemical >> \startplacerchemical becomes \debutplacerchemical >\placefigure is a combination of the element "place" (\e!place) and the > variable "figure" (\v!figure) >\startplacefigure is a combination of the elements "start" (\e!start) >and "place" (\e!place) and the variable "figure" (\v!figure.) So, I'm still doing something wrong, because changing the translation of "figure" in "mult-def.lua" (in the part "variables"), only affect : 1- command "\startfigure \stopfigure" 2- "figure" in "\setuppageinjection" > alternative = figure buffer... You have to provide your modified mult-def.lua file, otherwise there is no way to check what's wrong. I get another difficulty with \startitemize and \stopitemize the translation of the variable "itemize" has no impact on the setup-fr.pdf file produced with : context --interface=fr --global --result=setup-fr x-setups-overview.mkiv But, I just found that if I actually use the translated commands in a test.tex file, it just works. % interface=fr \debuttexte \debutlister \elem first \elem second \finlister \fintexte What should I do in order to have a setup-fr.pdf file that shows the translations actually available ? Same as above, provide your translations. With the translation of the command textwidth, I can use "largeur=0.5\largeurtexte" (cool !) But this command is not listed in setup-fr.pdf. Is there a way to add these basic commands to setup-fr.pdf ? \textwidth is the name of a dimen register and no register names are listed. Math. I get the following error : fonts > preloading latin modern fonts (second stage) fonts > defining > font with asked name 'fichier' is not found using lookup 'file' fonts > defining > unknown font 'fichier', loading aborted I suppose that due to the translation of "file" to "fichier". It's OK when I switch back to - setupstrings cd:file ==> file You can translate these string because they are only used in the command list to provide the texts which are shown in uppercase letter, e.g. NUMBER. - variables file ==> file Constants (\c!...) and variables (\v!...) can be changed, only parameters which use the form \s!... have to be english in all cases (saves memory and improves performance). How can I translate the variable "file" into fichier, without messing with fonts (and maybe other file related functions) There shouldn't be a problem with fonts because they use \s!file or \s!name which aren't translated (unless you made the mistake and have \c!file in your typescripts). It's possible there is a bug somewhere but you have to provide a minimal example. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___