Re: [NTG-context] m-graph label

2022-07-30 Thread John Kitzmiller via ntg-context
On Tue, Jul 26, 2022 at 2:10 PM Alan  wrote:

> On Thu, 21 Jul 2022 17:56:45 -0400
> John Kitzmiller  wrote:
>
> > (Apologies for double-dipping, but usage direction for the
> > least-squares fit extension in m-graph would be a gift.)
>
> The least-squares fit (to a polynomial) is a deterministic calculation,
> not an arbitrary non-linear search. As such, it is very robust.
>
> Certain (useful) functions, a Gaussian peak for example, can be
> suitably transformed to a polynomial function, so these are handled as
> well, robustly.
>
> Examples are given as comments in mp-grap.mpiv that you can follow.
> Also attached is an adapted version of the original John Hobby
> documentation, with extensions described.
>
> Note that the m-graph module is simply a re-write of the John Hobby
> graph macros, taking advantage of floating-point MetaPost (thus
> simplified).
>
> 
>
> I have been working on a completely new luagraph module that does much
> in lua. It has, notably, arbitrary coordinate systems.
>
> This has been a moving target as I put more and more into lua
> and less and less in Metapost. I have also been playing chase with the
> development of luametatex (and have fallen behind).
>
> Alan
>

Thanks for the modified documentation of the graph macros. It has been a
great help. Is it in the lmtx distribution somewhere?

I read about the upcoming luagraph in mag-1104-mkiv.pdf (This Way
11/11/2019) and have also played a bit with LuaMetaFun and Aditya's blog
post. Looking forward to that development, thank you!

John
___
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] m-graph label

2022-07-30 Thread John Kitzmiller via ntg-context
On Tue, Jul 26, 2022 at 1:51 PM Alan  wrote:

> On Thu, 21 Jul 2022 17:56:45 -0400
> John Kitzmiller  wrote:
>
> > > On Wed, Jul 20, 2022 at 9:48 AM Alan 
> > > wrote: % Autoform   is the format string used
> > > by autogrid % Autoform_X, Autoform_Y if defined, are used
> > > instead
> > >
> > > string Autoform ; Autoform = "%g";
> > >
> > > % string Autoform_X ; Autoform_X := "@.0e" ;
> > > % string Autoform_Y ; Autoform_Y := "@.0e" ;
> >
> >
> > Thanks Alan. I see those lines in the module listing, but could you
> > provide some guidance on usage? Can the (re)formatting be done from
> > my input file, or do I need to modify mp-grap.mpiv, or some other way?
> >
> > (Apologies for double-dipping, but usage direction for the
> > least-squares fit extension in m-graph would be a gift.)
>
> You can set these strings in your source file, no need to have a
> private copy of mp-grap.mpiv
>
> Autoform := "@.0e" ;
>
> or, if you want different formats for the X and Y axes:
>
> string Autoform_X ; Autoform_X := "@.0e" ; % or whatever you want ...
> string Autoform_Y ; Autoform_Y := "@.0e" ;
>
> A few notes:
>
> Autoform_X and Autoform_Y are used if known, otherwise it falls back
> on the string Autoform.
>
> The format string uses "@" rather then "%", as % is normally scanned as
> a comment.
>

Thank you again, but the "0.0" remains unchanged. The only way I've been
able to succeed is with a for loop to label explicitly. See mwe below for
things I've attempted. The last two for lines seems to be what it takes
(with the other Auto lines commented out of course.)

% 0 0
% 1 1
% 2 3
% 3 5

\enabletrackers[metapost.showlog]
\usemodule[m-graph]

\startMPpage[instance=graph, offset=5mm]
  draw begingraph(160, 100);
gdraw "mwe-2.tex" plot circles(0);

Autoform := "@0.g" ;
autogrid(otick.bot,otick.lft);

% for x=auto.x: otick.bot(format("@g",x),x); endfor;
% for y=auto.y: otick.lft(format("@g",y),y); endfor;

% for x = 0 upto 3: otick.bot(x,x); endfor;
% for y = 0 upto 5: otick.lft(y,y); endfor;
  endgraph;
\stopMPpage
___
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] align=nothyphenated in \defineparagraphs

2022-07-30 Thread Henning Hraban Ramm via ntg-context

Am 30.07.22 um 16:36 schrieb Marcin Ciura via ntg-context:

Dear list,
I would like to typeset two columns with different widths and no hyphenation.
The columns in the output PDF overlap:
https://live.contextgarden.net/cgi-bin/result.cgi?id=JnPVEM
How to make the columns non-overlapping? My attempt is below.


align={nothyphenated,flushleft}

Hraban

___
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] align=nothyphenated in \defineparagraphs

2022-07-30 Thread Marcin Ciura via ntg-context
Dear list,
I would like to typeset two columns with different widths and no hyphenation.
The columns in the output PDF overlap:
https://live.contextgarden.net/cgi-bin/result.cgi?id=JnPVEM
How to make the columns non-overlapping? My attempt is below.
I do not see a solution at
https://wiki.contextgarden.net/Command/setupparagraphs
Best regards,
Marcin Ciura

\mainlanguage[pl]
\defineparagraphs[proposition][n=2,align=nothyphenated]
\setupparagraphs[proposition][1][width=0.56\textwidth]
\setupparagraphs[proposition][2][width=0.41\textwidth]

\starttext
\startproposition

Jeśli w trójkącie $ABC$
pole kwadratu skonstruowanego na jednym boku
jest równe sumie pól kwadratów skonstruowanych
na dwóch innych bokach:
$BC^2 = AC^2 + AB^2$,
to kąt $BAC$
między tymi dwoma bokami jest prosty.

\proposition

Jeśli odcinek stykający się z innym odcinkiem
tworzy z~nim dwa równe kąty przyległe,
to oba kąty przyległe nazywamy {\bf kątami prostymi},
a~o~obu odcinkach mówimy, że są {\bf prostopadłe}.

\stopproposition
\stoptext
___
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] font fallbacks

2022-07-30 Thread Henning Hraban Ramm via ntg-context

Hi,
I thought I could use more than one fallback font, but as soon as I list 
fallbacks, they stop working.


In my example, I’d like to take all missing glyphs from Segoe UI 
Symbols, and what’s still missing (emojis) from EmojiOneColor, 
preferably without specifying the exact range.


Additionally, I want to replace the tilde ~ of LM Modern:

"""
\definefontfallback[seguiFB]
  [file:seguisym.ttf]
  [0x0-0xF]
  [check=yes,force=no]

\definefontfallback[emoneFB]
  [name:EmojiOneColor]
  [0x0-0xF]
  [check=yes,force=no]

% replace tilde in LM
\definefontfallback[tildeFB]
  [file:seguisym.ttf]
  [0x0007E-0x0007E]
  [force=yes]


\starttypescript [start]
  \definetypeface [start] [rm] [serif] [cambria] 
[default][fallbacks={seguiFB,emoneFB}]
  \definetypeface [start] [ss] [sans]  [modern] 
[default][fallbacks={seguiFB,emoneFB}]
  \definetypeface [start] [tt] [mono]  [modern] 
[default][fallbacks={seguiFB,tildeFB,emoneFB}]
  \definetypeface [start] [mm] [math]  [modern] 
[default][fallbacks={seguiFB,emoneFB}]

\stoptypescript


\setupbodyfont[start,rm,12pt]

\starttext

\Omega\ (Omega) and \aleph\ (Aleph)

\startbuffer[example]
start missing characters: lmmono10-regular.otf
   7  U+00327  ̧  COMBINING CEDILLA
   7  U+00335  ̵  COMBINING SHORT STROKE OVERLAY
  14  U+003B7  η  GREEK SMALL LETTER ETA
   7  U+021A9  ↩  LEFTWARDS ARROW WITH HOOK
 350  U+02500  ─  BOX DRAWINGS LIGHT HORIZONTAL
  98  U+02502  │  BOX DRAWINGS LIGHT VERTICAL
  42  U+02514  └  BOX DRAWINGS LIGHT UP AND RIGHT
 133  U+0251C  ├  BOX DRAWINGS LIGHT VERTICAL AND RIGHT
 154  U+02772  ❲  LIGHT LEFT TORTOISE SHELL BRACKET ORNAMENT
 154  U+02773  ❳  LIGHT RIGHT TORTOISE SHELL BRACKET ORNAMENT
  14  U+0278A  ➊  DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT ONE
stop missing characters
start missing characters: cambria.ttc
   9  U+0278A  ➊  DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT ONE
   9  U+0FFFD  �  REPLACEMENT CHARACTER
stop missing characters
start missing characters: cambriai.ttf
 266  U+0276C  ❬  MEDIUM LEFT-POINTING ANGLE BRACKET ORNAMENT
 266  U+0276D  ❭  MEDIUM RIGHT-POINTING ANGLE BRACKET ORNAMENT
stop missing characters
\stopbuffer

\typebuffer[example]

\startlines
\getbuffer[example]

{\ss\getbuffer[example]}
\stoplines

\tex{abra}\arg{...}
\type{kadabra} \type{~~~}

\stoptext
"""

What’s wrong?

Hraban
___
If your question is of interest to 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
___