Re: [NTG-context] about makempy (metapost outlines)

2018-02-19 Thread Jeong Dal
Dear Otared,

I am sorry that the sample code is not fully loaded. 
Although Hans said that we don’t need  ‘makempy’, I copied the whole code again 
for the sake of test.
\setuphead[section][style={\effect[outer]}] is working well.

For korean, use \setupbodyfont[unfonts] as Hans said.

Thank you. 

Best regards,

Dalyoung

> 
> Tha sample code below runs correctly, except that the Korean words are not 
> displayed, since there is no body fonts set up for that language.
> Could you please send a more complete sample in order for us to see what you 
> are reporting?
> 
> Best regards: OK

\setupbodyfont[unfonts]

% the following is copied from makempy manual.

\startuseMPgraphic{text}
  graphictext \MPstring{string} scaled 4
withdrawcolor \MPcolor{blue} withfillcolor \MPcolor{gray}
withpen pencircle scaled 2pt ;
\stopuseMPgraphic
\startuseMPgraphic{number}
  graphictext \MPstring{string} scaled 10
withdrawcolor \MPcolor{red} withfillcolor \MPcolor{gray}
withpen pencircle scaled 2pt ;
\stopuseMPgraphic
\def\TextCommand#1%
  {\setMPtext{string}{#1}%
   \framed
 [frame=off,offset=overlay,height=3cm,width=\hsize]
 {\useMPgraphic{text}}}
\def\NumberCommand#1%
  {\expanded{\setMPtext{string}{\currentheadnumber}}%
   \hsmash
 {\framed
[frame=off,offset=overlay,height=3cm,width=\hsize]
{\useMPgraphic{number
\setuphead
  [section]
  [distance=0pt,
   textcommand=\TextCommand,
   numbercommand=\NumberCommand]
%\setuphead[section][style={\effect[outer]}]

\starttext
\section{First One}
This worked fine before. %이 전에는 잘 되었습니다.

\startformula
\int f(x) dx 
\stopformula

\section{Second Two}
Who made the Euler font. x, y, z

$x^2 + y^2 =  z^2$
\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] about makempy (metapost outlines)

2018-02-19 Thread Hans Hagen

On 2/19/2018 3:21 AM, Jeong Dal wrote:

tex error       > tex error on line 4 in file 
/Users/graph/Documents/TeXfiles/test-mpgraph.tex: ! Undefined control 
sequence


 \setstrut \begstrut \getheadtitle
                                   \endstrut
\MPLIBgraphictext ...\startTEXpage [scale=1]#1
                                                   \stopTEXpage
l.4 ...\setstrut \begstrut \getheadtitle \endstrut }



1     \starttext
2     \def\MPLIBgraphictext#1{\startTEXpage[scale=1]#1\stopTEXpage}
3
4 >>  \MPLIBgraphictext{\setstrut \begstrut \getheadtitle \endstrut }
5     \stoptext


You're not handling a section head or so so \getheadtitle is meaningless 
out of that context.


How about

\setuphead[section][style={\effect[outer]}]

which is normally ok for outlines and has been around for ages.

(btw, the mp outlin emechanism has changed and doesn't use makempy any 
longer .. it's better now, see metafun manual etc)


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] about makempy (metapost outlines)

2018-02-19 Thread Hans Hagen

On 2/19/2018 8:09 AM, Otared Kavian wrote:

Tha sample code below runs correctly, except that the Korean words are 
not displayed, since there is no body fonts set up for that language.
Could you please send a more complete sample in order for us to see what 
you are reporting?

\setupbodyfont[unfonts]

-
  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] about makempy (metapost outlines)

2018-02-18 Thread Otared Kavian
Hi Dalyoung,

Tha sample code below runs correctly, except that the Korean words are not 
displayed, since there is no body fonts set up for that language.
Could you please send a more complete sample in order for us to see what you 
are reporting?

Best regards: OK

> On 19 Feb 2018, at 03:21, Jeong Dal  wrote:
> 
> 
> Hi, 
> 
> During the search Euler font, I found a manual “creating metapost outlines”.
> It is what I looking for at the last year.
> 
> I tried an example for section head, but it issued an undefined control 
> sequence message.
> 
> Please tell me what is wrong and how to change.
> I copied the  sample code and a part of log file at the end.
> 
> Thank you for reading.
> 
> Best regards,
> 
> Dalyoung
> 
> 
> %%%
> \starttext
> \section{First One}
> This worked fine before. 이 전에는 잘 되었습니다.
> 
> \startformula
> \int f(x) dx 
> \stopformula
> 
> \section{Second Two}
> Who made the Euler font. x, y, z
> 
> $x^2 + y^2 =  z^2$
> \stoptext
> %
> 
> tex error   > tex error on line 4 in file 
> /Users/graph/Documents/TeXfiles/test-mpgraph.tex: ! Undefined control sequence
> 
>  \setstrut \begstrut \getheadtitle 
>   \endstrut 
> \MPLIBgraphictext ...\startTEXpage [scale=1]#1
>   \stopTEXpage 
> l.4 ...\setstrut \begstrut \getheadtitle \endstrut }
>   
> 
> 1 \starttext
> 2 \def\MPLIBgraphictext#1{\startTEXpage[scale=1]#1\stopTEXpage}
> 3 
> 4 >>  \MPLIBgraphictext{\setstrut \begstrut \getheadtitle \endstrut }
> 5 \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
___