ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* rotated (landscape) pages in portrait document
@ 2010-10-01 15:41 Mojca Miklavec
  2010-10-01 16:12 ` Wolfgang Schuster
  2010-10-01 16:26 ` Wolfgang Schuster
  0 siblings, 2 replies; 6+ messages in thread
From: Mojca Miklavec @ 2010-10-01 15:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear list,

First one question: what is the MKIV-way of doing something like

\startbuffer[a]
% set text width for formula somehow
\startformula\startalign
\NC a \NC = b \NR
\stopalign\stopformula
\stopbuffer

\framed{\rotate[rotation=90]{\externalfigure[\jobname-a.tmp]}}

possibly adjusting width of formula to actual width (even if that is
done manually)?


And the other question: is there some quick trick that would "rotate
the whole page" inside a document, so that the page would still be
portrait, but text would be rotated with textwidth and textheight
swapped, but with preserved main header (in reality I do not care
about the header).

I would like to put a narrow, but several lines long equation
(\startalign) on left (bottom) and image on the right (top).

I was playing with an approximation

\rotate[rotation=90]{\vbox{
\startformula\startalign[n=6,align={middle,middle,right,middle,left,left}]
\NC l \NC\hbox to 1em{}\NC m_l \NC\hbox to 1em{}\NC \text{orb.}\hbox
to 2em{} \NC Y_{lm}\NR
\NC 0 \NC\NC 0    \NC\NC s           \NC \frac{1}{2}\sqrt{\frac{
1}{π}}                     \NR
\NC 1 \NC\NC 0    \NC\NC p_z         \NC \frac{1}{2}\sqrt{\frac{
3}{π}}\frac{z}{r}          \NR
\NC 1 \NC\NC \pm1 \NC\NC p_x         \NC \frac{1}{2}\sqrt{\frac{
3}{π}}\frac{x}{r}          \NR
\NC   \NC\NC      \NC\NC p_y         \NC \frac{1}{2}\sqrt{\frac{
3}{π}}\frac{y}{r}          \NR
\NC 2 \NC\NC 0    \NC\NC d_{z^2}     \NC \frac{1}{4}\sqrt{\frac{
5}{π}}\frac{3z^2-r^2}{r^2} \NR
\NC 2 \NC\NC \pm1 \NC\NC d_{xz}      \NC
\frac{1}{2}\sqrt{\frac{15}{π}}\frac{xz}{r^2}       \NR
\NC   \NC\NC      \NC\NC d_{yz}      \NC
\frac{1}{2}\sqrt{\frac{15}{π}}\frac{yz}{r^2}       \NR
\NC 2 \NC\NC \pm2 \NC\NC d_{xy}      \NC
\frac{1}{2}\sqrt{\frac{15}{π}}\frac{xy}{r^2}       \NR
\NC   \NC\NC      \NC\NC d_{x^2-y^2} \NC
\frac{1}{4}\sqrt{\frac{15}{π}}\frac{x^2-y^2}{r^2}  \NR
\stopalign\stopformula}}
% and then externalfigure on the right ...

but the formula takes exactly \textwidth space, I didn't manage to
convince it to consume less space (I could probably change textwidth
locally).

I know for workarounds (typesetting a different document for example
and then include the page), but I really wonder if switching
orientation just for a page (to typeset a table for example) is doable
in some elegant way.

This is all low priority though.

Thanks a lot,
    Mojca
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: rotated (landscape) pages in portrait document
  2010-10-01 15:41 rotated (landscape) pages in portrait document Mojca Miklavec
@ 2010-10-01 16:12 ` Wolfgang Schuster
  2010-10-03 22:57   ` Mojca Miklavec
  2010-10-01 16:26 ` Wolfgang Schuster
  1 sibling, 1 reply; 6+ messages in thread
From: Wolfgang Schuster @ 2010-10-01 16:12 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 01.10.2010 um 17:41 schrieb Mojca Miklavec:

> Dear list,
> 
> First one question: what is the MKIV-way of doing something like
> 
> \startbuffer[a]
> % set text width for formula somehow
> \startformula\startalign
> \NC a \NC = b \NR
> \stopalign\stopformula
> \stopbuffer
> 
> \framed{\rotate[rotation=90]{\externalfigure[\jobname-a.tmp]}}
> 
> possibly adjusting width of formula to actual width (even if that is
> done manually)?


Something like this?

\startbuffer[a]
\startTEXpage[width=\textheight]
\startformula\startalign
\NC a \NC = b \NR
\stopalign\stopformula
\stopTEXpage
\stopbuffer

\starttext
\framed{\rotate[rotation=90]{\getbuffer[a]}}
\stoptext

Wolfgang

___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: rotated (landscape) pages in portrait document
  2010-10-01 15:41 rotated (landscape) pages in portrait document Mojca Miklavec
  2010-10-01 16:12 ` Wolfgang Schuster
@ 2010-10-01 16:26 ` Wolfgang Schuster
  1 sibling, 0 replies; 6+ messages in thread
From: Wolfgang Schuster @ 2010-10-01 16:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 01.10.2010 um 17:41 schrieb Mojca Miklavec:

> And the other question: is there some quick trick that would "rotate
> the whole page" inside a document, so that the page would still be
> portrait, but text would be rotated with textwidth and textheight
> swapped, but with preserved main header (in reality I do not care
> about the header).
> 
> I would like to put a narrow, but several lines long equation
> (\startalign) on left (bottom) and image on the right (top).
> 
> I was playing with an approximation
> 
> \rotate[rotation=90]{\vbox{
> \startformula\startalign[n=6,align={middle,middle,right,middle,left,left}]
> \NC l \NC\hbox to 1em{}\NC m_l \NC\hbox to 1em{}\NC \text{orb.}\hbox
> to 2em{} \NC Y_{lm}\NR
> \NC 0 \NC\NC 0    \NC\NC s           \NC \frac{1}{2}\sqrt{\frac{
> 1}{π}}                     \NR
> \NC 1 \NC\NC 0    \NC\NC p_z         \NC \frac{1}{2}\sqrt{\frac{
> 3}{π}}\frac{z}{r}          \NR
> \NC 1 \NC\NC \pm1 \NC\NC p_x         \NC \frac{1}{2}\sqrt{\frac{
> 3}{π}}\frac{x}{r}          \NR
> \NC   \NC\NC      \NC\NC p_y         \NC \frac{1}{2}\sqrt{\frac{
> 3}{π}}\frac{y}{r}          \NR
> \NC 2 \NC\NC 0    \NC\NC d_{z^2}     \NC \frac{1}{4}\sqrt{\frac{
> 5}{π}}\frac{3z^2-r^2}{r^2} \NR
> \NC 2 \NC\NC \pm1 \NC\NC d_{xz}      \NC
> \frac{1}{2}\sqrt{\frac{15}{π}}\frac{xz}{r^2}       \NR
> \NC   \NC\NC      \NC\NC d_{yz}      \NC
> \frac{1}{2}\sqrt{\frac{15}{π}}\frac{yz}{r^2}       \NR
> \NC 2 \NC\NC \pm2 \NC\NC d_{xy}      \NC
> \frac{1}{2}\sqrt{\frac{15}{π}}\frac{xy}{r^2}       \NR
> \NC   \NC\NC      \NC\NC d_{x^2-y^2} \NC
> \frac{1}{4}\sqrt{\frac{15}{π}}\frac{x^2-y^2}{r^2}  \NR
> \stopalign\stopformula}}
> % and then externalfigure on the right ...
> 
> but the formula takes exactly \textwidth space, I didn't manage to
> convince it to consume less space (I could probably change textwidth
> locally).
> 
> I know for workarounds (typesetting a different document for example
> and then include the page), but I really wonder if switching
> orientation just for a page (to typeset a table for example) is doable
> in some elegant way.

\starttext

\bTABLE[orientation=90,frame=off,width=\textwidth,height=.5\textheight,align=lohi]
    \bTR
        \bTD \externalfigure[cow] \eTD
    \eTR
    \bTR
        \bTD
            \starttabulate[|Mc|Mr|Ml|Ml|]
            \NC l \NC m_l \NC \text{orb.} \NC Y_{lm}                                            \NC\NR
            \NC 0 \NC 0   \NC s           \NC \frac{1}{2}\sqrt{\frac{1}{π}}                     \NC\NR
            \NC 1 \NC 0   \NC p_z         \NC \frac{1}{2}\sqrt{\frac{3}{π}}\frac{z}{r}          \NC\NR
            \NC 1 \NC ±1  \NC p_x         \NC \frac{1}{2}\sqrt{\frac{3}{π}}\frac{x}{r}          \NC\NR
            \NC   \NC     \NC p_y         \NC \frac{1}{2}\sqrt{\frac{3}{π}}\frac{y}{r}          \NC\NR
            \NC 2 \NC 0   \NC d_{z^2}     \NC \frac{1}{4}\sqrt{\frac{5}{π}}\frac{3z^2-r^2}{r^2} \NC\NR
            \NC 2 \NC ±1  \NC d_{xz}      \NC \frac{1}{2}\sqrt{\frac{15}{π}}\frac{xz}{r^2}      \NC\NR
            \NC   \NC     \NC d_{yz}      \NC \frac{1}{2}\sqrt{\frac{15}{π}}\frac{yz}{r^2}      \NC\NR
            \NC 2 \NC ±2  \NC d_{xy}      \NC \frac{1}{2}\sqrt{\frac{15}{π}}\frac{xy}{r^2}      \NC\NR
            \NC   \NC     \NC d_{x^2-y^2} \NC \frac{1}{4}\sqrt{\frac{15}{π}}\frac{x^2-y^2}{r^2} \NC\NR
            \stoptabulate
        \eTD
    \eTR
\eTABLE

\stoptext

Wolfgang

___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: rotated (landscape) pages in portrait document
  2010-10-01 16:12 ` Wolfgang Schuster
@ 2010-10-03 22:57   ` Mojca Miklavec
  2010-10-03 23:59     ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Mojca Miklavec @ 2010-10-03 22:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, Oct 1, 2010 at 18:12, Wolfgang Schuster wrote:
>
> Am 01.10.2010 um 17:41 schrieb Mojca Miklavec:
>
>> Dear list,
>>
>> First one question: what is the MKIV-way of doing something like
>>
>> \startbuffer[a]
>> % set text width for formula somehow
>> \startformula\startalign
>> \NC a \NC = b \NR
>> \stopalign\stopformula
>> \stopbuffer
>>
>> \framed{\rotate[rotation=90]{\externalfigure[\jobname-a.tmp]}}
>>
>> possibly adjusting width of formula to actual width (even if that is
>> done manually)?
>
>
> Something like this?
>
> \startbuffer[a]
> \startTEXpage[width=\textheight]
> \startformula\startalign
> \NC a \NC = b \NR
> \stopalign\stopformula
> \stopTEXpage
> \stopbuffer
>
> \starttext
> \framed{\rotate[rotation=90]{\getbuffer[a]}}
> \stoptext

Nasty!

I would never even think that something like
    \rotate[rotation=90]{\startTEXpage[width=5cm] \input tufte \stopTEXpage}
would work.

I didn't need the width= parameter (in fact I wanted to have a
narrower formula, so I'm glad that this worked ...).

Related to your second suggestion (I still like formula for some
reason) ... do you have any idea why the spacing around formula is
broken? If I use \startTEXpage[width=...] or when I draw a frame
around formula the spacing is OK, only in this example it seems as if
formula was infinitely thin. A bug?

Thanks a lot,
    Mojca


\startbuffer[a]
\startTEXpage
\startformula\startalign[n=6,align={middle,middle,right,middle,left,left}]
\NC l \NC\hbox to 1em{}\NC m_l \NC\hbox to 1em{}\NC \text{orb.}\hbox
to 2em{} \NC Y_{lm}\NR
\NC 0 \NC\NC 0    \NC\NC s           \NC \frac{1}{2}\sqrt{\frac{
1}{π}}                     \NR
\NC 1 \NC\NC 0    \NC\NC p_z         \NC \frac{1}{2}\sqrt{\frac{
3}{π}}\frac{z}{r}          \NR
\NC 1 \NC\NC \pm1 \NC\NC p_x         \NC \frac{1}{2}\sqrt{\frac{
3}{π}}\frac{x}{r}          \NR
\NC   \NC\NC      \NC\NC p_y         \NC \frac{1}{2}\sqrt{\frac{
3}{π}}\frac{y}{r}          \NR
\NC 2 \NC\NC 0    \NC\NC d_{z^2}     \NC \frac{1}{4}\sqrt{\frac{
5}{π}}\frac{3z^2-r^2}{r^2} \NR
\NC 2 \NC\NC \pm1 \NC\NC d_{xz}      \NC
\frac{1}{2}\sqrt{\frac{15}{π}}\frac{xz}{r^2}       \NR
\NC   \NC\NC      \NC\NC d_{yz}      \NC
\frac{1}{2}\sqrt{\frac{15}{π}}\frac{yz}{r^2}       \NR
\NC 2 \NC\NC \pm2 \NC\NC d_{xy}      \NC
\frac{1}{2}\sqrt{\frac{15}{π}}\frac{xy}{r^2}       \NR
\NC   \NC\NC      \NC\NC d_{x^2-y^2} \NC
\frac{1}{4}\sqrt{\frac{15}{π}}\frac{x^2-y^2}{r^2}  \NR
\stopalign\stopformula
\stopTEXpage
\stopbuffer

\starttext

\bTABLE[orientation=90,width=\textwidth,align=lohi]
   \bTR
       \bTD
           \externalfigure[cow][width=10cm]
       \eTD
   \eTR
   \bTR
       \bTD\strut
           \getbuffer[a]
       \eTD
   \eTR
\eTABLE

\framed{\getbuffer[a]}

\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: rotated (landscape) pages in portrait document
  2010-10-03 22:57   ` Mojca Miklavec
@ 2010-10-03 23:59     ` Hans Hagen
  2010-10-04 13:37       ` Mojca Miklavec
  0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2010-10-03 23:59 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Mojca Miklavec

On 4-10-2010 12:57, Mojca Miklavec wrote:

you can treat buffers like images:

\rotate[rotation=90]{\externalfigure[a.buffer][width=5cm]}



-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: rotated (landscape) pages in portrait document
  2010-10-03 23:59     ` Hans Hagen
@ 2010-10-04 13:37       ` Mojca Miklavec
  0 siblings, 0 replies; 6+ messages in thread
From: Mojca Miklavec @ 2010-10-04 13:37 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users

On Mon, Oct 4, 2010 at 01:59, Hans Hagen wrote:
> On 4-10-2010 12:57, Mojca Miklavec wrote:
>
> you can treat buffers like images:
>
> \rotate[rotation=90]{\externalfigure[a.buffer][width=5cm]}

Thanks. So \externalfigure[a.buffer] is a MKIV replacement for
\externalfigure[\jobname-a.tmp]. I was looking for that answer as
well.

But still, why does my example in previous mail result in "zero width"?

Thanks,
    Mojca
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2010-10-04 13:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-01 15:41 rotated (landscape) pages in portrait document Mojca Miklavec
2010-10-01 16:12 ` Wolfgang Schuster
2010-10-03 22:57   ` Mojca Miklavec
2010-10-03 23:59     ` Hans Hagen
2010-10-04 13:37       ` Mojca Miklavec
2010-10-01 16:26 ` Wolfgang Schuster

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