ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Changing page orientation - Landscape/Portrait
@ 2006-04-09 11:30 Miguel Queiros
  2006-04-09 12:43 ` Peter Rolf
  0 siblings, 1 reply; 10+ messages in thread
From: Miguel Queiros @ 2006-04-09 11:30 UTC (permalink / raw)


Hello,

This might be a simple question but I didn't read
anything about it on the wiki or on the mailing list
archives.

I would like to change the orientation of a page in
a document, from landscape to portrait... Is there
any command that will change the orientation of
a single page ?

Thank you,
Miguel Queirós



_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Changing page orientation - Landscape/Portrait
  2006-04-09 11:30 Changing page orientation - Landscape/Portrait Miguel Queiros
@ 2006-04-09 12:43 ` Peter Rolf
  2006-04-10 12:21   ` Miguel Queiros
  0 siblings, 1 reply; 10+ messages in thread
From: Peter Rolf @ 2006-04-09 12:43 UTC (permalink / raw)


Miguel Queiros wrote:
> Hello,
> 
> This might be a simple question but I didn't read
> anything about it on the wiki or on the mailing list
> archives.
> 
> I would like to change the orientation of a page in
> a document, from landscape to portrait... Is there
> any command that will change the orientation of
> a single page ?
> 

\starttext

PAGE ONE
\page

% start of local layout
\start\startlocal
\setuppapersize [A4, landscape] [A4, landscape]
\stoplocal

PAGE TWO
\page
\stop
% end of local layout

PAGE THREE

\stoptext


You can add this to the wiki, if you like ;)

Greets, Peter


> Thank you,
> Miguel Queirós
> 
> 
> 
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Changing page orientation - Landscape/Portrait
  2006-04-09 12:43 ` Peter Rolf
@ 2006-04-10 12:21   ` Miguel Queiros
  2006-04-10 12:53     ` Peter Rolf
  0 siblings, 1 reply; 10+ messages in thread
From: Miguel Queiros @ 2006-04-10 12:21 UTC (permalink / raw)



> \start\startlocal
> \setuppapersize [A4, landscape] [A4, landscape]
> \stoplocal
> 
> PAGE TWO
> \page
> \stop
> % end of local layout

I'v tested your solution and it worked, but I had problems trying to get
a table inside a buffer using \startbuffer etc... I removed \start and
\startlocal , \stoplocal and \stop and it worked fine.

Whats the purpose of these comands ?

I thought about using \setuppapersize to change page orientation but
I thought that it might exist a command that will change just a single
page...

> You can add this to the wiki, if you like ;)

I willl... as soon as I have the time! 

Thank you,
Miguel Queirós



_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Changing page orientation - Landscape/Portrait
  2006-04-10 12:21   ` Miguel Queiros
@ 2006-04-10 12:53     ` Peter Rolf
  2006-04-10 22:05       ` Miguel Queiros
  0 siblings, 1 reply; 10+ messages in thread
From: Peter Rolf @ 2006-04-10 12:53 UTC (permalink / raw)


Hi Miguel,

Miguel Queiros wrote:
>> \start\startlocal
>> \setuppapersize [A4, landscape] [A4, landscape]
>> \stoplocal
>>
>> PAGE TWO
>> \page
>> \stop
>> % end of local layout
> 
> I'v tested your solution and it worked, but I had problems trying to get
> a table inside a buffer using \startbuffer etc... I removed \start and
> \startlocal , \stoplocal and \stop and it worked fine.
> 
> Whats the purpose of these comands ?
> 
\start ... \stop mark the boundaries of the local (layout) setup, which
is defined between \startlocal ... \stoplocal. This way you don't need
to redefine your old layout after a local (one page) style change.
ConTeXt returns to the prior layout automatically.

So deleting them is no good idea (results in extra work for you) :)

If you can make a minimal example of your buffer problems...

Greets, Peter

> I thought about using \setuppapersize to change page orientation but
> I thought that it might exist a command that will change just a single
> page...
> 
>> You can add this to the wiki, if you like ;)
> 
> I willl... as soon as I have the time! 
> 
> Thank you,
> Miguel Queirós
> 
> 
> 
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Changing page orientation - Landscape/Portrait
  2006-04-10 12:53     ` Peter Rolf
@ 2006-04-10 22:05       ` Miguel Queiros
  2006-04-11 10:18         ` Peter Rolf
  0 siblings, 1 reply; 10+ messages in thread
From: Miguel Queiros @ 2006-04-10 22:05 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 630 bytes --]

Hello Peter,

> \start ... \stop mark the boundaries of the local (layout) setup, which
> is defined between \startlocal ... \stoplocal. This way you don't need
> to redefine your old layout after a local (one page) style change.
> ConTeXt returns to the prior layout automatically.
> 
> So deleting them is no good idea (results in extra work for you) :)

Yes, I noticed that... :)

> If you can make a minimal example of your buffer problems...

Ok, I'v attached the example. It seems that If I use 
\start \startlocal and \stop and \stoplocal I get some errors...

Thanks for your help!
Miguel Queirós




[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: minimal-page-buffer.tex --]
[-- Type: text/x-tex; name=minimal-page-buffer.tex; charset=utf-8, Size: 579 bytes --]


\starttext

Página 1.

\startbuffer[teste]
\starttable[|c|c|c|]
\HL[2]
\NC test \NC test \NC test \NC \FR
\NC test \NC test \NC test \NC \MR
\NC test \NC test \NC test \NC \LR
\stoptable
\stopbuffer

\page
Página 2.

% It works if you place a comment \start \startlocal and \stoplocal and \stop
% It wont work without the "%"

% \start
% \startlocal
\placetable{Just an example}{\externalfigure[teste.tmp]}

\setuppapersize[A4,landscape][A4,landscape]
% \stoplocal
% \stop

\page
\setuppapersize[A4][A4]
Página 3.

\page
Página 4.

\stoptext

[-- Attachment #3: Type: text/plain, Size: 139 bytes --]

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Changing page orientation - Landscape/Portrait
  2006-04-10 22:05       ` Miguel Queiros
@ 2006-04-11 10:18         ` Peter Rolf
  2006-04-11 12:57           ` Hans Hagen
  2006-04-13  0:55           ` Miguel Queiros
  0 siblings, 2 replies; 10+ messages in thread
From: Peter Rolf @ 2006-04-11 10:18 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 1913 bytes --]

Miguel Queiros wrote:
> Hello Peter,
> 
>> \start ... \stop mark the boundaries of the local (layout) setup, which
>> is defined between \startlocal ... \stoplocal. This way you don't need
>> to redefine your old layout after a local (one page) style change.
>> ConTeXt returns to the prior layout automatically.
>>
>> So deleting them is no good idea (results in extra work for you) :)
> 
> Yes, I noticed that... :)
> 
>> If you can make a minimal example of your buffer problems...
> 
> Ok, I'v attached the example. It seems that If I use 
> \start \startlocal and \stop and \stoplocal I get some errors...
>
Hi Miguel. I have attached a working example (sorry for the crippled
output; seems, my emacs is not configured right for utf).

Greets, Peter

> Thanks for your help!
> Miguel Queirós
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> 
> \starttext
> 
> P�gina 1.
> 
> \startbuffer[teste]
> \starttable[|c|c|c|]
> \HL[2]
> \NC test \NC test \NC test \NC \FR
> \NC test \NC test \NC test \NC \MR
> \NC test \NC test \NC test \NC \LR
> \stoptable
> \stopbuffer
> 
> \page
> P�gina 2.
> 
> % It works if you place a comment \start \startlocal and \stoplocal and \stop
> % It wont work without the "%"
> 
> % \start
> % \startlocal
> \placetable{Just an example}{\externalfigure[teste.tmp]}

This is what I call 'creative usage' of a feature :)
Better use \getbuffer for this.

> 
> \setuppapersize[A4,landscape][A4,landscape]
> % \stoplocal
> % \stop
> 
> \page
> \setuppapersize[A4][A4]
> P�gina 3.
> 
> \page
> P�gina 4.
> 
> \stoptext
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context


[-- Attachment #2: test.tex --]
[-- Type: text/plain, Size: 702 bytes --]

% interface=en output=pdftex
% Time-stamp: <Dienstag, 11 April 2006 12:14:18; test.tex>
%
\starttext

P�gina 1.

\startbuffer[teste]
\starttable[|c|c|c|]
\HL[2]
\NC test \NC test \NC test \NC \FR
\NC test \NC test \NC test \NC \MR
\NC test \NC test \NC test \NC \LR
\stoptable
\stopbuffer

\page
P�gina 2.

\start
\startlocal % only setup, no content!
  \setuppapersize[A4,landscape][A4,landscape]
\stoplocal

% here comes the content
\placetable{Just an expample}{\getbuffer[teste]}

\page % !! place it after stop and look what happens
\stop

P�gina 3.

\page
P�gina 4.

\stoptext


%%% Local Variables:
%%% mode: context
%%% TeX-master: ""
%%% End:

[-- Attachment #3: Type: text/plain, Size: 139 bytes --]

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Changing page orientation - Landscape/Portrait
  2006-04-11 10:18         ` Peter Rolf
@ 2006-04-11 12:57           ` Hans Hagen
  2006-04-13  0:55           ` Miguel Queiros
  1 sibling, 0 replies; 10+ messages in thread
From: Hans Hagen @ 2006-04-11 12:57 UTC (permalink / raw)


Peter Rolf wrote:
> Miguel Queiros wrote:
>   
>> Hello Peter,
>>
>>     
>>> \start ... \stop mark the boundaries of the local (layout) setup, which
>>> is defined between \startlocal ... \stoplocal. This way you don't need
>>> to redefine your old layout after a local (one page) style change.
>>> ConTeXt returns to the prior layout automatically.
>>>
>>> So deleting them is no good idea (results in extra work for you) :)
>>>       
>> Yes, I noticed that... :)
>>
>>     
>>> If you can make a minimal example of your buffer problems...
>>>       
>> Ok, I'v attached the example. It seems that If I use 
>> \start \startlocal and \stop and \stoplocal I get some errors...
>>
>>     
> Hi Miguel. I have attached a working example (sorry for the crippled
> output; seems, my emacs is not configured right for utf).
>
> Greets, Peter
>
>   
>> Thanks for your help!
>> Miguel Queirós
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>>
>> \starttext
>>
>> P�gina 1.
>>
>> \startbuffer[teste]
>> \starttable[|c|c|c|]
>> \HL[2]
>> \NC test \NC test \NC test \NC \FR
>> \NC test \NC test \NC test \NC \MR
>> \NC test \NC test \NC test \NC \LR
>> \stoptable
>> \stopbuffer
>>
>> \page
>> P�gina 2.
>>
>> % It works if you place a comment \start \startlocal and \stoplocal and \stop
>> % It wont work without the "%"
>>
>> % \start
>> % \startlocal
>> \placetable{Just an example}{\externalfigure[teste.tmp]}
>>     
>
> This is what I call 'creative usage' of a feature :)
> Better use \getbuffer for this.
>
>   
>> \setuppapersize[A4,landscape][A4,landscape]
>> % \stoplocal
>> % \stop
>>
>> \page
>> \setuppapersize[A4][A4]
>> P�gina 3.
>>
>> \page
>> P�gina 4.
>>
>> \stoptext
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> ntg-context mailing list
>> ntg-context@ntg.nl
>> http://www.ntg.nl/mailman/listinfo/ntg-context
>>     
enough suffereing ... 

% for cont-new.tex: 

\unprotect

\def\definepapersize
  {\dotripleempty\dodefinepapersize}

\def\dodefinepapersize[#1][#2][#3]%
  {\ifsecondargument
     \doifsomething{#1} % to be sure
       {\doifassignmentelse{#2}
          {\getparameters
             [\??pp#1] % geen \c!scale, scheelt hash ruimte
             [\c!width=\@@ppwidth,\c!height=\@@ppheight,\c!offset=\@@ppoffset,#2]}
          {\setvalue{\??pp:1:#1}{#2}%
           \setvalue{\??pp:2:#1}{#3}}}%
   \else
     \getparameters[\??pp][#1]%
     \setuppapersize
   \fi}

\def\dosetuppapersize[#1][#2]%
  {\doifassignmentelse{#1}
     {\setuppaper[#1]}
     {\doifelsenothing{#2}
        {\expanded{\dodosetuppapersize
           [\executeifdefined{\??pp:1:#1}{#1}]%
           [\executeifdefined{\??pp:2:#1}{}]}}
        {\doifassignmentelse{#2}
           {\getparameters[\??pp\executeifdefined{\??pp:1:#1}{#1}][#2]}
           {\expanded{\dodosetuppapersize
              [\executeifdefined{\??pp:1:#1}{#1}]%
              [\executeifdefined{\??pp:1:#2}{#2}]}}}}}

\let\reinstatepapersize\relax

\def\adaptpapersize
  {\global\let\reinstatepapersize\restorepapersize
   \setuppapersize}

\appendtoks
  \reinstatepapersize
  \global\let\reinstatepapersize\relax
\to \everyaftershipout

\protect 

\definepapersize[main] [A4] [A4]
\definepapersize[extra][A4,landscape] [A4,landscape]

\starttext
    \setuppapersize[main]
    Page 1. \page
    Page 2. \page
    \setuppapersize[extra]
    Page 2 \page
    \setuppapersize[main]
    Page 3. \page
    Page 4. \page
    \adaptpapersize[extra]
    Page 5. \page
    Page 6. \page
\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
-----------------------------------------------------------------

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Changing page orientation - Landscape/Portrait
  2006-04-11 10:18         ` Peter Rolf
  2006-04-11 12:57           ` Hans Hagen
@ 2006-04-13  0:55           ` Miguel Queiros
  2006-04-13  8:49             ` Hans Hagen
  2006-04-13 11:36             ` Peter Rolf
  1 sibling, 2 replies; 10+ messages in thread
From: Miguel Queiros @ 2006-04-13  0:55 UTC (permalink / raw)


> > \placetable{Just an example}{\externalfigure[teste.tmp]}
> 
> This is what I call 'creative usage' of a feature :)
> Better use \getbuffer for this.

I was using \externalfigure because I saw that on the manual,
and because I wanted to scale down the table to the width of the
page. :)

Can I do that with a buffer/table withou using \externalfigure ?

I looked at the wiki and I should think about using 
only natural tables as they seem to be much better... but
I'v had problems trying to get some multipage tables
to work... 

Thanks,
Miguel Queirós


_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Changing page orientation - Landscape/Portrait
  2006-04-13  0:55           ` Miguel Queiros
@ 2006-04-13  8:49             ` Hans Hagen
  2006-04-13 11:36             ` Peter Rolf
  1 sibling, 0 replies; 10+ messages in thread
From: Hans Hagen @ 2006-04-13  8:49 UTC (permalink / raw)


Miguel Queiros wrote:
>>> \placetable{Just an example}{\externalfigure[teste.tmp]}
>>>       
>> This is what I call 'creative usage' of a feature :)
>> Better use \getbuffer for this.
>>     
>
> I was using \externalfigure because I saw that on the manual,
> and because I wanted to scale down the table to the width of the
> page. :)
>
> Can I do that with a buffer/table withou using \externalfigure ?
>
> I looked at the wiki and I should think about using 
> only natural tables as they seem to be much better... but
>   
depends on the kind of table, in many situations tabulate is better (more text oriented); 

in most xml flows there is just the html approach to tables, and catching all in one kin dof table is impossible, if only because of typographical demands (unless one is willing to configure each detail) 

Hans 

-----------------------------------------------------------------
                                          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
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Changing page orientation - Landscape/Portrait
  2006-04-13  0:55           ` Miguel Queiros
  2006-04-13  8:49             ` Hans Hagen
@ 2006-04-13 11:36             ` Peter Rolf
  1 sibling, 0 replies; 10+ messages in thread
From: Peter Rolf @ 2006-04-13 11:36 UTC (permalink / raw)


Miguel Queiros wrote:
>>> \placetable{Just an example}{\externalfigure[teste.tmp]}
>> This is what I call 'creative usage' of a feature :)
>> Better use \getbuffer for this.
> 
> I was using \externalfigure because I saw that on the manual,
> and because I wanted to scale down the table to the width of the
> page. :)
>
Sorry, my lack of knowledge :)

> Can I do that with a buffer/table withou using \externalfigure ?
> 
\placetable{Just an expample}{\scale[sx=2,sy=2]{\getbuffer[teste]}}

but this is not so handy (only factors, no fixed dimensions). So your
method is the best and easiest way to scale a table. This really makes
me smile.

Greets, Peter

> I looked at the wiki and I should think about using 
> only natural tables as they seem to be much better... but
> I'v had problems trying to get some multipage tables
> to work... 
> 
> Thanks,
> Miguel Queirós
> 
> 
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2006-04-13 11:36 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-09 11:30 Changing page orientation - Landscape/Portrait Miguel Queiros
2006-04-09 12:43 ` Peter Rolf
2006-04-10 12:21   ` Miguel Queiros
2006-04-10 12:53     ` Peter Rolf
2006-04-10 22:05       ` Miguel Queiros
2006-04-11 10:18         ` Peter Rolf
2006-04-11 12:57           ` Hans Hagen
2006-04-13  0:55           ` Miguel Queiros
2006-04-13  8:49             ` Hans Hagen
2006-04-13 11:36             ` Peter Rolf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).