[NTG-context] \setuppapersize and \startMPpage

Hans Hagen pragma at wxs.nl
Thu May 11 10:51:07 CEST 2006


Johan Sandblom wrote:
> 2006/5/11, Aditya Mahajan <adityam at umich.edu>:
>   
>> On Wed, 10 May 2006, Johan Sandblom wrote:
>>
>>     
>>> Thank you, this almost works, but the title graphic (of thesis size)
>>> is not centered on the A4 paper, but in the lower right corner. How
>>> can I make it go to the right place?
>>>
>>> \definepapersize[thesis][width=169mm, height=239mm]
>>> \setuppapersize[thesis][A4]
>>> \starttext
>>> \startMPgraphic
>>> % Some metafun
>>> \stopMPgraphic
>>> \loadcurrentMPgraphic{possibly something should go here?}
>>> \placeMPgraphic
>>> % Some text
>>> \stoptext
>>>       
>> Untested, but how about
>>
>> \loadcurrentMPgraphic %{width=\textwidth}
>> %Try with and without textwidth
>> \placefigure
>>   [here]
>>   {none}
>>   {\placeMPgraphic}
>>
>>     
>
> Yes, I tried that; with no arguments to \loadcurrentMPgraphic the
> thesis page is placed on the bottom of the A4 and not quite in the
> middle (?). with width=\textwidth or \makeupwidth the result is the
> same.
>
>   
>> Aditya
>>
>> PS: In future, also copy to the list, others may have better idea on
>> how to do this.
>>
>>     
>
> Yes, I had intended to, and thought I did, but apparently I am more
> trigger happy than I allow for ...
>
> Thank you for your help, Johan
>
>
>   
>>
>>
>>
>>     
>>> Regards, Johan
>>>
>>> 2006/5/9, Aditya Mahajan <adityam at umich.edu>:
>>>       
>>>> On Tue, 9 May 2006, Johan Sandblom wrote:
>>>>
>>>>         
>>>>> Dear expertise,
>>>>>
>>>>> I have the following:
>>>>>
>>>>> \definepapersize[thesis][width=169mm, height=239mm]
>>>>> \setuppapersize[thesis][A4]
>>>>> \setuplayout
>>>>> [location=middle, marking=on]
>>>>> \setuppagenumbering
>>>>> [alternative=doublesided, location=marginedge, state=stop]
>>>>>
>>>>> \starttext
>>>>>
>>>>> % Title page
>>>>> \startMPpage
>>>>> % Some metafun
>>>>> \stopMPpage
>>>>>
>>>>> % Some text
>>>>> \stoptext
>>>>>
>>>>> The resulting pdf has a smaller first page (thesis size) while the
>>>>> rest are A4 with the thesis pages place centrally. I would like to see
>>>>> the title page placed on an A4 sheet as well. What am I doing wrong?
>>>>>           
>>>> MPpage creates a page with dimensions equal to the bounding box of the
>>>> graphic. If you want to center a MP figure on your title page, use
>>>> \startMPgraphic
>>>>
>>>> Aditya
>>>>
>>>> --
>>>> Aditya Mahajan, EECS Systems, University of Michigan
>>>> http://www.eecs.umich.edu/~adityam || Ph: 7342624008
>>>>
>>>>         
\definepapersize[thesis][width=169mm, height=239mm]
\setuppapersize[thesis][A4]
\definelayer[page][width=\paperwidth,height=\paperheight]

\starttext
    \startTEXpage
        \setlayer
          [page]
          [preset=lefttop,x=3cm,y=4cm]
          {\startMPcode
              fill fullcircle scaled 10cm;
           \stopMPcode}
        \tightlayer[page]
    \stopTEXpage
\stoptext


-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------



More information about the ntg-context mailing list