Re: [NTG-context] Protect the lettrine

2023-06-25 Thread Thangalin via ntg-context
Thanks Hans. I've updated the wiki. I'm wondering if there's a way to also control the indenting? Max's solution removed any indenting, allowing the text for the second paragraph to be flush. It looks a little strange to see text indented next to a drop-cap. The test case is the same, but with

Re: [NTG-context] Protect the lettrine

2023-06-14 Thread Thangalin via ntg-context
It's a tough problem for sure. I'm wondering if there's a general solution? That is, a way to tell ConTeXt to "protect the lettrine" regardless of the source document text? Nothing can be hard-coded because the setups (take a look at keenwrite themes

Re: [NTG-context] Protect the lettrine

2023-06-13 Thread Thangalin via ntg-context
and \stoptext isn't an option, as you've done with introducing and using a macro. Greets! On Tue, Jun 13, 2023 at 7:33 PM linguafalsa--- via ntg-context < ntg-context@ntg.nl> wrote: > On Tue, Jun 13, 2023 at 02:01:14PM -0700, Thangalin via ntg-context wrote: > > Thanks Otared, > &

Re: [NTG-context] Protect the lettrine

2023-06-13 Thread Thangalin via ntg-context
>> >> Meet me at the second line. >> >> \chapter{two} >> \input knuth >> >> Meet me at the second line. >> \stoptext >> >> >> Best regards: Otared >> >> On 13 Jun 2023, at 04:43, Thangalin via ntg-context >> wro

Re: [NTG-context] Protect the lettrine

2023-06-13 Thread Thangalin via ntg-context
] > > \setuphead[chapter][ > after={\placeinitial}, > page=no, > ] > > \starttext > \chapter{one} > Kermit Ruffins \hfill\break % <--- > > Meet me at the second line. > > \chapter{two} > \input knuth > > Meet me at the second line. > \stopt

[NTG-context] Protect the lettrine

2023-06-12 Thread Thangalin via ntg-context
I'm using KeenWrite Themes (specifically, Boschet) to typeset a chapter wherein the first letter is a lettrine. When the first paragraph is too short, the second paragraph overlaps the lettrine. % SOT \setupinitial[n=2] \setuphead[chapter][ after={\placeinitial}, page=no, ] \starttext

Re: [NTG-context] Super slow installation

2023-05-30 Thread Thangalin via ntg-context
>From twelve99.net: If you’re interested in our IP city prefixes, we have a lookup table on our website: https://www.arelion.com/our-network/bgp-routing/bgp-communities Scroll down to “Origin + Communities” and expand that section. You can see that sea-b1 (your hop 8) is not in Brussels, but is

Re: [NTG-context] Super slow installation

2023-05-30 Thread Thangalin via ntg-context
mkdir /tmp/context cd /tmp/context wget "lmtx.pragma-ade.com/install-lmtx/context-linux-64.zip" unzip context-linux-64.zip sh install.sh Installation went quite quickly (after downloading the zip files). Ran it cleanly twice. Looks like it's back to its previous speed, thank you.

Re: [NTG-context] Super slow installation

2023-05-30 Thread Thangalin via ntg-context
Here's a comparison of miljuschka.nl and lmtx.pragma-ade.com: $ ping miljuschka.nl PING miljuschka.nl (162.159.135.42) 56(84) bytes of data. 64 bytes from 162.159.135.42 (162.159.135.42): icmp_seq=1 ttl=59 time=16.5 ms 64 bytes from 162.159.135.42 (162.159.135.42): icmp_seq=2 ttl=59 time=15.6 ms

Re: [NTG-context] Super slow installation

2023-05-30 Thread Thangalin via ntg-context
://www.speedtest.net/result/14802746497 > > Download 935 Mbps; Upload 106 MBps. > > Looks fine on my side? > > > On Tue, May 30, 2023 at 9:16 AM Thomas A. Schmitz via ntg-context < > ntg-context@ntg.nl> wrote: > >> On 5/30/23 18:07, Thangalin via ntg-context w

Re: [NTG-context] Super slow installation

2023-05-30 Thread Thangalin via ntg-context
side? On Tue, May 30, 2023 at 9:16 AM Thomas A. Schmitz via ntg-context < ntg-context@ntg.nl> wrote: > On 5/30/23 18:07, Thangalin via ntg-context wrote: > > Still sluggish. Downloading texmf.zip took 22s for 50MB: > > > > $ wget http://lmtx.pragma-ade.com/instal

Re: [NTG-context] Super slow installation

2023-05-30 Thread Thangalin via ntg-context
Still sluggish. Downloading texmf.zip took 22s for 50MB: $ wget http://lmtx.pragma-ade.com/install-lmtx//texmf.zip --2023-05-30 09:02:50-- http://lmtx.pragma-ade.com/install-lmtx//texmf.zip Resolving lmtx.pragma-ade.com (lmtx.pragma-ade.com)... 213.125.29.165 Connecting to lmtx.pragma-ade.com

[NTG-context] Super slow installation

2023-05-29 Thread Thangalin via ntg-context
Hi, Installation of a fresh copy of LMTX has gone from a few minutes to about 30 minutes. Here's what I ran: 1. Open terminal 2. Change to root 3. cd /opt 4. mkdir context-2023-05-29 5. cd context-2023-05-29 6. wget "http://lmtx.pragma-ade.com/install-lmtx//texmf.zip; 7. unzip texmf.zip 8. chmod

Re: [NTG-context] SVG ViewBox figure battle

2023-05-20 Thread Thangalin via ntg-context
Hi again, I changed tex/texmf-context/tex/context/base/mkiv/grph-con.lua to replace "" with "--export-area-page" in the inkscapecrop function: local function inkscapecrop(specification) return (specification and specification.crop == v_yes) and "--export-area-drawing" or

[NTG-context] SVG ViewBox figure battle

2023-05-19 Thread Thangalin via ntg-context
Hi there! The following document contains SVG. Save the SVG as "problem.svg" and run the document through LMTX version 2023.05.08 17:39: % SOF \startbuffer[csvg] \stopbuffer \starttext % honours viewbox \placefigure[none]{}{\includesvgbuffer[csvg]} \page % dishonours viewbox

[NTG-context] KeenType 1.0.0 (NTS fork)

2023-01-22 Thread Thangalin via ntg-context
Hi folks, I forked the New Typesetting System (NTS) as KeenType. KeenType is a 100% pure Java library/app that can generate SVG diagrams from plain TeX documents. Here's a list of the changes (and sample output): https://github.com/DaveJarvis/KeenType/releases/tag/1.0.0 Here's how typesetting

[NTG-context] Download remote SVG images

2023-01-02 Thread Thangalin via ntg-context
Hi list! % SOT \starttext \externalfigure[https://upload.wikimedia.org/wikipedia/commons/f/fd/Ghostscript_Tiger.svg] \externalfigure[https://upload.wikimedia.org/wikipedia/commons/thumb/f/fd/Ghostscript_Tiger.svg/1024px-Ghostscript_Tiger.svg.png] \stoptext % EOT Is there a way to have

Re: [NTG-context] Radial and linear gradients

2022-12-14 Thread Thangalin via ntg-context
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/sv

[NTG-context] Containerized ConTeXt

2022-12-13 Thread Thangalin via ntg-context
Hi again, I've added the start of a podman container for invoking ConTeXt that may be of interest: https://github.com/DaveJarvis/keenwrite/tree/main/container The Containerfile sets up ConTeXt to work with my themes: https://github.com/DaveJarvis/keenwrite-themes The manage.sh shell script is

[NTG-context] Radial and linear gradients

2022-12-13 Thread Thangalin via ntg-context
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"> \stopbuffer \starttext \placefigure{}{\includesvgbuffer[csvg][conversion=mp]} \stoptext % EOF See

Re: [NTG-context] pragma-ade.nl - 404

2022-11-09 Thread Thangalin via ntg-context
Re: https://wiki.contextgarden.net/Installation I've changed all the download links to use the site http://lmtx.pragma-ade.com instead of .nl. I haven't tested all the links. Cheers! ___ If your question is of

[NTG-context] pragma-ade.nl - 404

2022-11-04 Thread Thangalin via ntg-context
Hi, https://pragma-ade.nl/ We're seeing a bad cert and a 404. Possible to redirect the .nl to the .com to avoid breaking scripts and download URLs? Note that the following page references the .nl TLD for downloads: https://wiki.contextgarden.net/Installation Cheers!

[NTG-context] Lopsided circles

2022-10-18 Thread Thangalin via ntg-context
Using 2022.09.11 20:44, there appears to be a problem with rendering some circular forms, such as: % SOT \startbuffer[circle] \stopbuffer \starttext \placefigure{}{\includesvgbuffer[circle][conversion=mp]} \stoptext % EOT In Inkscape, this renders as a full circle without any deformation.

[NTG-context] Perceptrons

2022-10-16 Thread Thangalin via ntg-context
Okay, they aren't _real_ perceptrons, but fancy parameterized trees connected on a hex grid, coded with MetaFun and Lua. Big version: https://pdfhost.io/v/piuN04dSq_perceptron If anyone is interested in the full source code, let me know. I couldn't get "angle" to work properly. Hans, your

Re: [NTG-context] atan2 function

2022-10-14 Thread Thangalin via ntg-context
That's certainly tighter, thank you, Alan. Would making the conditional part of the API be useful to others? Cheers! On Fri, Oct 14, 2022 at 3:42 PM Alan Braslau wrote: > > On Fri, 14 Oct 2022 11:59:49 -0700 > Thangalin wrote: > > > I don't think an atantwo is needed. I *thought* I had read

Re: [NTG-context] atan2 function

2022-10-14 Thread Thangalin via ntg-context
I don't think an atantwo is needed. I *thought* I had read somewhere that atan( y, x ) was equivalent to calling atan2 in Lua. Ensuring there's no breakage when x == y would be nice, though. It was a little surprising to see angle return degrees rather than radians, but it does simplify my code:

Re: [NTG-context] atan2 function

2022-10-13 Thread Thangalin via ntg-context
Thank you, Max. The angle function doesn't appear to provide the same calculation as my atantwo in all cases. https://pdfhost.io/v/Oqj7XmibJ_scaled The shorter line segment should be directed towards the vertex closest to the longer line segment. I tried using both: theta := angle( dx, dy

[NTG-context] atan2 function

2022-10-12 Thread Thangalin via ntg-context
Hi there, How is atan2 called? I rolled my own as follows: % SOT \startuseMPgraphic{HexGridBaseGraphic} vardef atantwo( expr ax, ay, bx, by ) = save theta; numeric dx; numeric dy; numeric theta; dx := bx - ax; dy := by - ay; theta := 0; if (dx > 0):

[NTG-context] Apostrophe entity using \xmltexentity is ignored

2022-10-08 Thread Thangalin via ntg-context
Has the handling for the apostrophe character entity changed recently? In the following example, the \xmltexentity for apostrophe is ignored, resulting in a straight apostrophe instead of a curled one: % SOT \xmltexentity{apos}{’} \xmltexentity{lsquo}{‘} \xmltexentity{rsquo}{’}

[NTG-context] SVG path conversion misalignment

2022-09-11 Thread Thangalin via ntg-context
Hi there, % SOT \startbuffer[dna] \stopbuffer \starttext \placefigure{}{\includesvgbuffer[dna][conversion=mp]} \stoptext % EOT In the PDF that's generated, the curve of the gray semi-circle is malformed with respect to the blackground. It's like there's a small chip. The expected result is

Re: [NTG-context] String substitution using regular expressions and backreferences

2022-08-25 Thread Thangalin via ntg-context
I've attempted to apply Wolfgang's subtle suggestion of using Lua to parse the input document using a regular expression via lpeg.replacer. The replacement itself works fine; however, in doing so the XML document structure is converted to text, which means that it is no longer possible to "flush"

Re: [NTG-context] C with macron

2022-08-24 Thread Thangalin via ntg-context
Here's an attempt with dynamic kerning based on the font, which eliminates some of the tweaking needed. It's not perfect and, depending on the font, a little work is needed. For pagella, scholas, termes, and a few other default fonts, the results are decent. %\setupbodyfont[pagella]

Re: [NTG-context] C with macron

2022-08-24 Thread Thangalin via ntg-context
Another nice solution, Pablo, thank you. The macron is shifted a little too far to the left and needs a raisebox to align the top of the C with the M. https://tex.stackexchange.com/a/364027/2148 Hans' solution is pretty close. Here's what the LaTeX folks made:

Re: [NTG-context] Curling straight quotation marks

2022-08-24 Thread Thangalin via ntg-context
> > > Just use \quotation and \quote, then you have the right settings for > many languages and can also be sure that quotes get closed and are > consistent over the whole document. > Thanks Hraban. That won't work with my workflow. I edit in Markdown (plain text), transform to XML, then pass

Re: [NTG-context] C with macron

2022-08-24 Thread Thangalin via ntg-context
Are the c and _ supposed to be separated like that? https://i.ibb.co/0DsPK1P/mc.png What would I have to change to put the c above the _? On Wed, Aug 24, 2022 at 12:49 AM Thangalin wrote: > Nice! > > I had gotten as far as: > > \starttext >

Re: [NTG-context] C with macron

2022-08-24 Thread Thangalin via ntg-context
Nice! I had gotten as far as: \starttext M{\dontleavehmode{\raisebox{.55ex}\hbox{c}}}\hskip-1ex {\dontleavehmode{\raisebox{.25ex}\hbox{\hl[.45]}}Anulty \stoptext It looks pretty close to the LaTeX version. Fixing the name in situ is much better. Thank you!

[NTG-context] C with macron

2022-08-23 Thread Thangalin via ntg-context
Hi again, Re: https://tex.stackexchange.com/q/364024/2148 How do you typeset a C with a macron below? \starttext M\withmacron{c}Anulty \stoptext Thank you. ___ If your question is of interest to others as well,

[NTG-context] Curling straight quotation marks

2022-08-23 Thread Thangalin via ntg-context
Hey folks, I re-wrote the algorithm KeenWrite uses for curling straight quotes. The new algorithm is fairly robust with respect to North American and British English. Could use help finding edge cases: https://whitemagicsoftware.com/keenquotes/ I use it for preprocessing documents prior to

Re: [NTG-context] String substitution using regular expressions and backreferences

2022-08-01 Thread Thangalin via ntg-context
Good point, Wolfgang. The Markdown is translated to XHTML then typeset as XML using the setups listed here: https://github.com/DaveJarvis/keenwrite-themes/tree/main/xhtml Having an XML string replacement solution would be great. I suppose that would help prevent substitutions within pre and code

[NTG-context] String substitution using regular expressions and backreferences

2022-08-01 Thread Thangalin via ntg-context
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

Re: [NTG-context] Set up external figure for particular image type

2022-08-01 Thread Thangalin via ntg-context
Got it working. Complete solution: \setupexternalfigures[ location={local,global,default}, width=\textwidth ]\defineexternalfigure[svg][width=1cm]\defineexternalfigure[jpg][width=2cm]\defineexternalfigure[png][width=4cm] % Won't be applied because there's no process action.% Default

Re: [NTG-context] Set up external figure for particular image type

2022-07-18 Thread Thangalin via ntg-context
Thank you, Wolfgang. That looks promising. SVG files are converted using MetaPost. I thought the following would work: svg=>{\externalfigure[#1][svg][conversion=mp]} Is there anything else that needs to happen to ensure SVG files are piped through MetaPost? Thanks again! >

Re: [NTG-context] Set up external figure for particular image type

2022-07-18 Thread Thangalin via ntg-context
Of course, you could also use pandoc to go directly to ConTeXt; that is > currently my preferred way of producing PDF from Markdown. > Thanks Albert! I'm going to stick with my desktop text editor, KeenWrite , rather than use shell scripts

Re: [NTG-context] Set up external figure for particular image type

2022-07-18 Thread Thangalin via ntg-context
ation on top of the extension feels redundant. Thanks for the suggestion! On Tue, Jul 12, 2022 at 12:18 PM Rik Kabel via ntg-context < ntg-context@ntg.nl> wrote: > > On 2022-07-12 14:11, Thangalin via ntg-context wrote: > > Thank you for the suggestion Hraban. > > T

Re: [NTG-context] Set up external figure for particular image type

2022-07-12 Thread Thangalin via ntg-context
Thank you for the suggestion Hraban. The source comes from Markdown, which is converted to XML, then typeset using ConTeXt. There's no Markdown-specific mechanism to relate images to a particular external figure definition, unfortunately. All images use the same syntax and are treated the same

[NTG-context] Set up external figure for particular image type

2022-07-08 Thread Thangalin via ntg-context
A document has a mix of SVG and PNG images. Changing the parameters for `\setupexternalfigure` affects both SVG and PNG images. Consider the following code: \setupexternalfigures[ order={svg,pdf,png,jpg}, location={local,default,global}, directory={images},

Re: [NTG-context] SVG text alignment issue

2022-06-29 Thread Thangalin via ntg-context
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

[NTG-context] SVG text clipping issue

2022-06-29 Thread Thangalin via ntg-context
Text that's tight against its viewbox gets clipped: https://i.ibb.co/BGQVzzx/text-clipped.png Here's the code: % SOF \startbuffer[svg] http://www.w3.org/2000/svg; xmlns:svg="http://www.w3.org/2000/svg;> 16p13.3 \stopbuffer \starttext

Re: [NTG-context] SVG text alignment issue

2022-06-29 Thread Thangalin via ntg-context
Thanks for checking this. Unfortunately, introducing \hbox didn't work; the text is still off-center with respect to the vertical line: https://i.ibb.co/hYGfdgZ/text-align.png For comparison, the SVG file loaded into Inkscape appears similar to: https://i.ibb.co/KF3PBkw/inkscape-alignment.png

Re: [NTG-context] SVG text alignment issue

2022-06-28 Thread Thangalin via ntg-context
Thanks Aditya, I tried your suggestion, but the result is the same. Here's the XML setup for all images in the document: \startxmlsetups xml:img \starttexcode \placefloat[here,force]{}{% \hbox{\externalfigure[\xmlatt{#1}{src}][conversion=mp]} } \stoptexcode \stopxmlsetups

[NTG-context] SVG text alignment issue

2022-06-28 Thread Thangalin via ntg-context
In the following example, the line and text should be aligned to the middle when LMTX converts the SVG figure using MP. (Note that you may have to install Roboto, but the font isn't the issue.) % SOF \startbuffer[svg] http://www.w3.org/2000/svg; xmlns:svg="http://www.w3.org/2000/svg;>

Re: [NTG-context] Contractions in ligature suppression word list

2022-06-06 Thread Thangalin via ntg-context
Here's a short example (version 2022.05.11 11:36): \setuplanguage[en][goodies={lang-en.llg}] \starttext % Expected: no ligature; actual: as expected wolfish % Expected: no ligatures; actual: ligature wolfing wolfin' wolfin’ \stoptext

Re: [NTG-context] Contractions in ligature suppression word list

2022-06-06 Thread Thangalin via ntg-context
Thanks for the response, Bruce. 1) The file you attached doesn't include the word "wolfing", nor "wolfin". > I assume they need to be The suffixes section accounts for this. Wolfing and wolfish both suppress the ligature correctly. I removed the comma separators, good catch. No difference,

[NTG-context] Contractions in ligature suppression word list

2022-06-05 Thread Thangalin via ntg-context
Attached are tweaked endings for words like "wolf" to include contracted endings, but they are being ignored. This makes for a minor inconsistency: wolfing -- no ligature wolfish -- no ligature wolfin -- no ligature (incorrect spelling, though) wolfin' -- ligature Any ideas? I tried

Re: [NTG-context] Typesetting modern Greek (UTF8) with ConTeXt

2022-06-05 Thread Thangalin via ntg-context
Not sure, but have you tried: \definefallbackfamily [mainface] [serif] [Gentium Plus] [range=greekandcoptic] The wiki has a page on fallback fonts: https://wiki.contextgarden.net/Command/definefontfallback Searching for "greek" has numerous hits, including greekextended. Have you verified that

Re: [NTG-context] Improving pandoc's ConTeXt output

2022-06-05 Thread Thangalin via ntg-context
Hi folks, I would like to blog about it, but we are still tweaking the process. > I put together a multipart series about the process of going from Markdown to Pandoc to ConTeXt: https://dave.autonoma.ca/blog/2019/05/22/typesetting-markdown-part-1/ To speed up the "write > typeset > review"

Re: [NTG-context] ignore not closed tags in XML input

2022-05-18 Thread Thangalin via ntg-context
Hey Pablo, > One of the not irrelevant tasks for me is finding examples of XML code. To clarify, XHTML documents *are* XML documents. XHTML happens to use a standardized set of XML element and attribute names. All XHTML examples are also XML examples. > But my worries came from having to

Re: [NTG-context] ignore not closed tags in XML input

2022-05-17 Thread Thangalin via ntg-context
> I wanted to write an introduction on how to typeset XML sources with > ConTeXt (at least, in Spanish). > See: https://dave.autonoma.ca/blog/2020/04/11/project-gutenberg-projects/ It's English, but describes a fair amount of what you're probably looking to accomplish, and there are all sorts of

Re: [NTG-context] SVG style ignored after double semicolon

2022-05-09 Thread Thangalin via ntg-context
That's another good idea Heinrich. I certainly could invoke another application to sanitize the SVG, but that brings with it a number of additional problems: Does the user have it installed properly? Is it cross-platform? Additionally, the typesetting code (in Java) would have to be updated to

Re: [NTG-context] SVG style ignored after double semicolon

2022-05-09 Thread Thangalin via ntg-context
> gsed ’s/;;/;/g' in.svg > out.svg If a user has an SVG text element where ";;" goes into the document, then that'd make for an awfully awkward user experience and obscure bug to fix. For example: plot(rnorm(5), xlab=";;") Meaning, the document must be loaded, parsed, and all style/class

Re: [NTG-context] SVG style ignored after double semicolon

2022-05-09 Thread Thangalin via ntg-context
; \starttext > \externalfigure[/Users/hp/filename.svg][conversion=mp] > \stoptext > > ——— > > > > > On 9. May 2022, at 08:10, Thangalin via ntg-context > wrote: > > Here's a screenshot comparing ConTeXt's PDF output (left) with KeenWrite's > preview f

Re: [NTG-context] SVG style ignored after double semicolon

2022-05-09 Thread Thangalin via ntg-context
Here's a screenshot comparing ConTeXt's PDF output (left) with KeenWrite's preview for the same SVG document: https://i.ibb.co/68nqwrg/render-r-plot.png I've filed a bug against Renjin's SVG exporter. Any guidance on how to fix this is greatly appreciated.

Re: [NTG-context] SVG style ignored after double semicolon

2022-05-08 Thread Thangalin via ntg-context
Hi again, In tex/texmf-context/tex/context/base/mkxl/mlib-svg.lmt the following regex appears a few times (line 1502, 1556, and 1570): gmatch(VAR,"%s*([^:]+):%s*([^;]+);?") It may be helpful to first normalize the string by appending a semicolon to the end, allowing for: for w in (VAR ..

[NTG-context] SVG style ignored after double semicolon

2022-05-08 Thread Thangalin via ntg-context
Hey hey, The following produces a filled square, rather than an empty one: \startbuffer[svg] \stopbuffer \starttext \placefigure{}{\includesvgbuffer[svg][conversion=mp]} \stoptext Remove the extra semicolon to get the expected result: It appears that a style immediately following

Re: [NTG-context] two requests for ConTeXt

2022-04-09 Thread Thangalin via ntg-context
> > The second feature would be the addition of an "emoji" range for font > > fallbacks. > > +2 +π ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist :

Re: [NTG-context] Switching fonts changes framedtext justification

2022-04-08 Thread Thangalin via ntg-context
ngalin via ntg-context: > > Works flawlessly, thank you! > > > > Here's a demo with left and right speech bubbles: > > Thank you for the speech bubbles! This is something I need for the > messenger chats in my novel. Will be a good learning experience to adapt > y

Re: [NTG-context] Switching fonts changes framedtext justification

2022-04-07 Thread Thangalin via ntg-context
Works flawlessly, thank you! Here's a demo with left and right speech bubbles: \definefont [TextFontEmoji] [OpenSansEmoji] \startuseMPgraphic{TextBubble}{side} z1 = (0, 0) ; z2 = (OverlayWidth, 0) ; z3 = (OverlayWidth, OverlayHeight) ; z4 = (0, OverlayHeight) ; offset := 1 ; tail

Re: [NTG-context] Switching fonts changes framedtext justification

2022-04-07 Thread Thangalin via ntg-context
Appreciated, Pablo. The output remains unjustified: https://i.ibb.co/dM9LFWZ/future-human.png $ find /usr/share/fonts/ -name "*Emoj*" /usr/share/fonts/emoji/OpenSansEmoji.otf $ context --version mtx-context | current version: 2022.04.01 09:37 $ cat ~/bin/fontcache #!/usr/bin/env bash

Re: [NTG-context] Switching fonts changes framedtext justification

2022-04-04 Thread Thangalin via ntg-context
> The font is too old, but the TTF version works just fine on both Linux > and Windows. No dice with LMTX 2022.04.01 09:37 and the TTF file. Using the TTF, the emojis don't appear, but the text is justified. Using the OTF, the emojis appear, but the text is unjustified. What version of ConTeXt

Re: [NTG-context] Switching fonts changes framedtext justification

2022-04-04 Thread Thangalin via ntg-context
Hi again, > > The .otf file is from: > > https://github.com/MorbZ/OpenSansEmoji > > That’s 9 years old. The linked resources were updated later and are > still outdated. There must be a better Emoji font out there? You would think so. I haven't found any that are free for personal/commercial,

Re: [NTG-context] Switching fonts changes framedtext justification

2022-04-03 Thread Thangalin via ntg-context
Confirmed there is a font issue with LMTX. $ context --version mtx-context | current version: 2022.04.01 09:37 The issue was also present with version 2021.11.30. > Are you sure it's not a tolerance issue? Pablo's example also doesn't justify, so \framedtext is a red herring. The .otf

[NTG-context] Switching fonts changes framedtext justification

2022-04-02 Thread Thangalin via ntg-context
Hi all, The following code produces framed text areas, each having different justification: \definefont [TextFontEmoji] [OpenSansEmoji] \definefontfamily [TextFont] [rm] [LibreBaskerville] \setupbodyfont [TextFont] \starttext \startframedtext \TextFontEmoji \input ward

Re: [NTG-context] Typesetting unicode characters

2022-03-31 Thread Thangalin via ntg-context
On the rare chance that someone else stumbles across this problem ... By default, Java's Xalan transformer for creating XML documents does not correctly encode emojis. Instead of for the thumbs up emoji, Xalan encodes it as . As Arthur pointed out, this is not a valid entity encoding. One

[NTG-context] Typesetting unicode characters

2022-03-30 Thread Thangalin via ntg-context
Hi list, An XML document includes the  emoji, as shown in the following snippet: Thumbs up emoji: The document is typeset using ConTeXt, but the thumbs up emoji isn't in the PDF. Neither Noto Emoji nor Open Sans Emoji fonts will render. Does anyone have a minimal

Re: [NTG-context] Dynamic document variables from metadata

2022-01-02 Thread Thangalin via ntg-context
Thank you, Hans. Updates are in place: https://github.com/DaveJarvis/keenwrite/releases https://github.com/DaveJarvis/keenwrite-themes/releases On Sun, Jan 2, 2022 at 3:11 AM Hans Hagen wrote: > On 1/2/2022 2:54 AM, Thangalin via ntg-context wrote: > > Happy New Year! > > &g

[NTG-context] Dynamic document variables from metadata

2022-01-01 Thread Thangalin via ntg-context
Happy New Year! How would you implement a mechanism that takes arbitrary XHTML tags and produces document variables? Consider: After running XML setups, the following would write "Nature": \documentvariable{journal} The tricky part is doing this without pre-defining them. Here's a

[NTG-context] Blank lines discarded when \typing

2021-12-03 Thread Thangalin via ntg-context
Note the presence of double-spaced blank lines in the following document and in the attached source file: \setuptyping[numbering=line] \starttext \startbuffer[javacode] try { final var num = stack.pop(); if( num != null ) { stack.push( blah ); } return true; } \stopbuffer

[NTG-context] Syntax highlighting using LMTX

2021-12-02 Thread Thangalin via ntg-context
Hi all, There are a few technical hurdles with using the t-vim module in LMTX. First, users need to install the module using externally defined shell scripts. Second, it's awkward to communicate to users how to install it, especially for Windows users. Third, it likely requires installing vim, as

Re: [NTG-context] xml processing errors after latest upgrade

2021-12-01 Thread Thangalin via ntg-context
Confirmed that the following worked: 1. Run: rm -rf /tmp/luatex-cache/ (your cache directory location will differ) 2. Edit ./tex/texmf-context/tex/context/base/mkiv/scrn-ref.lua 3. Replace line 15 to assign the empty function as Hans indicated 4. Save the file 5. Run:

Re: [NTG-context] \placeinitial to account for quotation mark

2021-09-25 Thread Thangalin via ntg-context
Henri Menke provided a partial solution: \defineinitial[two][method={first,auto}] \setuphead[chapter][ after={\placeinitial[two]}, page=no, ] \starttext \chapter{Harriet Tubman} "Every great dream begins with a dreamer. Always remember, you have within you the strength, the patience, and the

[NTG-context] \placeinitial to account for quotation mark

2021-09-06 Thread Thangalin via ntg-context
Hi list, The following example shows a lettrine that stylizes a quotation mark: \setuphead[chapter][ after={\placeinitial}, page=no, ] \starttext\chapter{Harriet Tubman} "Every great dream begins with a dreamer. Always remember, you have within you the strength, the patience, and the passion