Re: [NTG-context] ntg-context Digest, Vol 186, Issue 61
Dear Hans, I read the “luametafun.pdf” and run the codes one by one. It is a really nice to have those figures easily. During the reading, I found that there is a difference between the figure in the manual and the output of my run. I run the following code at page 24-25 in “luametafun.pdf”. \startMPcode{doublefun} draw lmt_contour [ xmin = 0, xmax = 4*pi, xstep = .05, ymin = -6, ymax = 6, ystep = .05, levels =7, height = 5cm, preamble = "local sin, cos = math.sin, math.cos", function = "cos(x) + cos(y)" background = "bitmap", foreground = "edge", linewidth = 1/2, cache = true, ]; \stopMPcode In the output, the background of text is gray while the background of text in the manual is white. Here are versions of LuaMetaTeX and ConTeXt which I use. %%%%%%% This is LuaMetaTeX, Version 2.03.4 open source > level 1, order 1, name 'cont-yes.mkiv' system > system > ConTeXt ver: 2019.12.16 18:54 MKIV beta fmt: 2019.12.17 int: english/english system > %%%%%%%%% Is there anything that I miss? Would you please to check it? Thank you. Best regards, Dalyoung
On 12/26/2019 1:44 PM, Jeong Dal wrote:
Dear Hans,
I read the “luametafun.pdf” and run the codes one by one. It is a really nice to have those figures easily.
During the reading, I found that there is a difference between the figure in the manual and the output of my run. I run the following code at page 24-25 in “luametafun.pdf”.
\startMPcode{doublefun} draw lmt_contour [ xmin = 0, xmax = 4*pi, xstep = .05, ymin = -6, ymax = 6, ystep = .05, levels =7, height = 5cm, preamble = "local sin, cos = math.sin, math.cos", function = "cos(x) + cos(y)" background = "bitmap", foreground = "edge", linewidth = 1/2, cache = true, ]; \stopMPcode
In the output, the background of text is gray while the background of text in the manual is white. Here are versions of LuaMetaTeX and ConTeXt which I use.
%%%%%%% This is LuaMetaTeX, Version 2.03.4 open source > level 1, order 1, name 'cont-yes.mkiv' system > system > ConTeXt ver: 2019.12.16 18:54 MKIV beta fmt: 2019.12.17 int: english/english system > %%%%%%%%%
Is there anything that I miss? Would you please to check it? fixed in next beta
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
Dear Hans, Thank you for the fix. Background color is OK now. A new problem in the caption: Since width of the figure is narrower than the width of the line "x = [0,12.555]; y = [-6,6];”, “y =“ is written over 12.555. Is there any option to suppress the caption x, y since there are numbers of x and y in the figure already? Thank you. Best regards, Dalyoung
On 12/28/2019 9:27 PM, Jeong Dal wrote:
Dear Hans,
Thank you for the fix. Background color is OK now.
A new problem in the caption: Since width of the figure is narrower than the width of the line "x = [0,12.555]; y = [-6,6];”, “y =“ is written over 12.555.
Is there any option to suppress the caption x, y since there are numbers of x and y in the figure already? new MWE needed
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 -----------------------------------------------------------------
Dear Hans, I run the following code which is in page 24,25 luametafun.pdf. 1. adding \starttext and \stoptext, it works fine. No overlapping. Also, functionstyle = “math” is working nicely. 2. removing \starttext and \stoptext, then functionstyle =“math” invoked an error. 3. removing \starttext, \stoptext, and functionstyle=“math”, it worked. However the caption “x=[…]; y=[….]” is overlapped. %\starttext \startMPcode{doublefun} draw lmt_contour [ xmin = 0, xmax = 4*pi, xstep = .05, ymin = -6, ymax = 6, ystep = .05, levels = 7, height = 5cm, preamble = "local sin, cos = math.sin, math.cos", function = "cos(x)+sin(y)", %functionstyle = "math", background = "bitmap", foreground = "edge", linewidth = 1/2, cache = true, ]; \stopMPcode %\stoptext Thank you so much. Best regards, Dalyoung
Jeong Dal schrieb am 29.12.2019 um 14:33:
Dear Hans,
I run the following code which is in page 24,25 luametafun.pdf.
1. adding \starttext and \stoptext, it works fine. No overlapping. Also, functionstyle = “math” is working nicely.
2. removing \starttext and \stoptext, then functionstyle =“math” invoked an error.
3. removing \starttext, \stoptext, and functionstyle=“math”, it worked. However the caption “x=[…]; y=[….]” is overlapped.
ConTeXt doesn't preload fonts and only when no font was set untill \starttext latin modern is used as fallback font at this point. When you omit \starttext no font is loaded and when you use math mode (which is the case when you use funtionstyle=math) the error message appears. Another fallback in this case it to load a monospaced font in horizontal or vertical boxes which is what you set in your example when you remove \starttext. Wolfgang
Dear Wolfgang, Now, I understand why the error messages “\texfont0 is undefined”, “ you used the started character from an undefined font family.” are appeared. Thank you for your clear explanation. Best regards, Dalyoung
3. removing \starttext, \stoptext, and functionstyle=“math”, it worked. However the caption “x=[…]; y=[….]” is overlapped.
ConTeXt doesn't preload fonts and only when no font was set untill \starttext latin modern is used as fallback font at this point.
When you omit \starttext no font is loaded and when you use math mode (which is the case when you use funtionstyle=math) the error message appears. Another fallback in this case it to load a monospaced font in horizontal or vertical boxes which is what you set in your example when you remove \starttext.
On 12/28/2019 9:27 PM, Jeong Dal wrote:
Dear Hans,
Thank you for the fix. Background color is OK now.
A new problem in the caption: Since width of the figure is narrower than the width of the line "x = [0,12.555]; y = [-6,6];”, “y =“ is written over 12.555.
Is there any option to suppress the caption x, y since there are numbers of x and y in the figure already? btw, you can check mp-lmtx.mpxl for the code ... it's not that hard to follow and see what the options do (mostly user interfacing)
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 -----------------------------------------------------------------
participants (3)
-
Hans Hagen
-
Jeong Dal
-
Wolfgang Schuster