* Some question regarding Layers
@ 2009-12-17 13:05 Erik Margraf
2009-12-17 13:21 ` Wolfgang Schuster
0 siblings, 1 reply; 8+ messages in thread
From: Erik Margraf @ 2009-12-17 13:05 UTC (permalink / raw)
To: ntg-context
[-- Attachment #1.1: Type: text/plain, Size: 890 bytes --]
Hi all,
i have two questions regarding the use of layers.
-- Is there an easy way to position a layer in the middle of the page.
My intent is to position some kind of graphic/picture there.
I usually try to wrap the picture in a "hbox to \paperwidth {\hfil
\externalfigure{} \hfil} and then
wrapping the hbox in a vbox
-- Is there a better way to achieve this?
-- How to do that with layers?
-- Is it possible to define and position layers in one Macro. I have
something like the following
in mind (untested):
\define[1]\MLayer{
\definelayer[#1]
\setlayer[#1][state=start]{\externalfigure[#1]}
}
My experience so far is, that it's necessary for a layer to appear that
it is listed in "pagebackgrounds"
ist this true? With this it seems, that a macro like that above is
impossible, true?
thanks in advance for your help
Erik
[-- Attachment #1.2: Type: text/html, Size: 994 bytes --]
[-- Attachment #2: Type: text/plain, Size: 486 bytes --]
___________________________________________________________________________________
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] 8+ messages in thread
* Re: Some question regarding Layers
2009-12-17 13:05 Some question regarding Layers Erik Margraf
@ 2009-12-17 13:21 ` Wolfgang Schuster
2009-12-17 16:48 ` Contextual spacing Andreas Harder
[not found] ` <ca5756140912181256i60f90dbcm8dc864337c659a6b@mail.gmail.com>
0 siblings, 2 replies; 8+ messages in thread
From: Wolfgang Schuster @ 2009-12-17 13:21 UTC (permalink / raw)
To: erik.margraf, mailing list for ConTeXt users
Am 17.12.2009 um 14:05 schrieb Erik Margraf:
> Hi all,
> i have two questions regarding the use of layers.
>
> -- Is there an easy way to position a layer in the middle of the page.
> My intent is to position some kind of graphic/picture there.
> I usually try to wrap the picture in a "hbox to \paperwidth {\hfil \externalfigure{} \hfil} and then
> wrapping the hbox in a vbox
> -- Is there a better way to achieve this?
> -- How to do that with layers?
>
> -- Is it possible to define and position layers in one Macro. I have something like the following
> in mind (untested):
>
> \define[1]\MLayer{
> \definelayer[#1]
> \setlayer[#1][state=start]{\externalfigure[#1]}
> }
> My experience so far is, that it's necessary for a layer to appear that it is listed in "pagebackgrounds"
> ist this true? With this it seems, that a macro like that above is impossible, true?
\define[1]\MLayer
{\definelayer[#1]%
\expandparameters\setupbackgrounds[page][background={\currentvalue,#1}]%
\setlayerframed[#1][width=\paperwidth,height=\paperheight,frame=off,align={middle,middle}]{\externalfigure[#1]}}
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] 8+ messages in thread
* Contextual spacing
2009-12-17 13:21 ` Wolfgang Schuster
@ 2009-12-17 16:48 ` Andreas Harder
2009-12-17 17:19 ` Wolfgang Schuster
[not found] ` <ca5756140912181256i60f90dbcm8dc864337c659a6b@mail.gmail.com>
1 sibling, 1 reply; 8+ messages in thread
From: Andreas Harder @ 2009-12-17 16:48 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi all,
please have a look at the attached example. Is there a (not manually) possibility to reduce the space of two consecutive headers? Another situation is if a header with ‘before=,’ is followed by an environment with 'before=\blank’ …
\setupdelimitedtext[blockquote][before=\blank,after=\blank]
\setuphead[subject][after=,style=\bfa]
\starttext
\subject{No space after the header}
\input tufte
\subject{Space from the \tex{blockquote}-environment} % \vskip-\lineheight
\startblockquote
\input tufte
\stopblockquote
\input tufte
\startblockquote
\input tufte
\stopblockquote
\startcolumns
\section{Section}
\input tufte \par
\subsection{Subsection}
\input tufte \par \column
\section{Section} % \vskip-1.25\lineheight
\subsection{Subsection}
\input tufte \par
\input tufte \par
\stopcolumns
\stoptext
Thanks in advance
Andreas
___________________________________________________________________________________
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] 8+ messages in thread
* Re: Contextual spacing
2009-12-17 16:48 ` Contextual spacing Andreas Harder
@ 2009-12-17 17:19 ` Wolfgang Schuster
2009-12-17 23:05 ` Andreas Harder
0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Schuster @ 2009-12-17 17:19 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 17.12.2009 um 17:48 schrieb Andreas Harder:
> Hi all,
>
> please have a look at the attached example. Is there a (not manually) possibility to reduce the space of two consecutive headers? Another situation is if a header with ‘before=,’ is followed by an environment with 'before=\blank’ …
>
> \setupdelimitedtext[blockquote][before=\blank,after=\blank]
\setupdelimitedtext[...][spacebefore=default,spaceafter=default]
you can now use before/after for different settings
> \setuphead[subject][after=,style=\bfa]
>
> \starttext
> \subject{No space after the header}
>
> \input tufte
interesting because it works in MkII when i add \setupinterlinespace[...] to the preamble
> \subject{Space from the \tex{blockquote}-environment} % \vskip-\lineheight
>
> \startblockquote
> \input tufte
> \stopblockquote
>
> \input tufte
>
> \startblockquote
> \input tufte
> \stopblockquote
>
> \startcolumns
> \section{Section}
> \input tufte \par
> \subsection{Subsection}
> \input tufte \par \column
> \section{Section} % \vskip-1.25\lineheight
> \subsection{Subsection}
> \input tufte \par
> \input tufte \par
> \stopcolumns
>
> \stoptext
see http://www.ntg.nl/pipermail/ntg-context/2008/034443.html
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] 8+ messages in thread
* Re: Contextual spacing
2009-12-17 17:19 ` Wolfgang Schuster
@ 2009-12-17 23:05 ` Andreas Harder
2009-12-18 5:31 ` Wolfgang Schuster
0 siblings, 1 reply; 8+ messages in thread
From: Andreas Harder @ 2009-12-17 23:05 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 2124 bytes --]
Am 17.12.2009 um 18:19 schrieb Wolfgang Schuster:
>
> Am 17.12.2009 um 17:48 schrieb Andreas Harder:
>
>> Hi all,
>>
>> please have a look at the attached example. Is there a (not manually) possibility to reduce the space of two consecutive headers? Another situation is if a header with ‘before=,’ is followed by an environment with 'before=\blank’ …
>>
>> \setupdelimitedtext[blockquote][before=\blank,after=\blank]
>
> \setupdelimitedtext[...][spacebefore=default,spaceafter=default]
>
> you can now use before/after for different settings
>
>> \setuphead[subject][after=,style=\bfa]
>>
>> \starttext
>> \subject{No space after the header}
>>
>> \input tufte
>
> interesting because it works in MkII when i add \setupinterlinespace[...] to the preamble
>
>> \subject{Space from the \tex{blockquote}-environment} % \vskip-\lineheight
>>
>> \startblockquote
>> \input tufte
>> \stopblockquote
>>
>> \input tufte
>>
>> \startblockquote
>> \input tufte
>> \stopblockquote
>>
>> \startcolumns
>> \section{Section}
>> \input tufte \par
>> \subsection{Subsection}
>> \input tufte \par \column
>> \section{Section} % \vskip-1.25\lineheight
>> \subsection{Subsection}
>> \input tufte \par
>> \input tufte \par
>> \stopcolumns
>>
>> \stoptext
>
> see http://www.ntg.nl/pipermail/ntg-context/2008/034443.html
Hello Wolfgang,
thanks for the hint, but I don’t get it. How can I bind a signal to a heading? If I understand right a signal is a tag that can be attached to a macro …? So I’ve tried the following:
\newsignal\SpaceAfterSection
\def\TestSpace
{\ifdim\lastskip=\SpaceAfterSection \blank[nowhite]
\else \blank[2*big]\fi}
\setuphead[section] [after=\SpaceAfterSection]
\setuphead[subsection] [before=\TestSpace]
\starttext % \showgrid
\startcolumns
\section{Section}
\input tufte \par
\subsection{Subsection}
\input tufte \par \column
\section{Section}
\subsection{Subsection}
\input tufte \par
\input tufte \par
\stopcolumns
\stoptext
I appreciate your help!
Andreas
PS. I use only MkIV
[-- Attachment #1.2: Type: text/html, Size: 4262 bytes --]
[-- Attachment #2: Type: text/plain, Size: 486 bytes --]
___________________________________________________________________________________
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] 8+ messages in thread
[parent not found: <ca5756140912181256i60f90dbcm8dc864337c659a6b@mail.gmail.com>]
end of thread, other threads:[~2009-12-19 14:36 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-17 13:05 Some question regarding Layers Erik Margraf
2009-12-17 13:21 ` Wolfgang Schuster
2009-12-17 16:48 ` Contextual spacing Andreas Harder
2009-12-17 17:19 ` Wolfgang Schuster
2009-12-17 23:05 ` Andreas Harder
2009-12-18 5:31 ` Wolfgang Schuster
2009-12-18 12:34 ` Andreas Harder
[not found] ` <ca5756140912181256i60f90dbcm8dc864337c659a6b@mail.gmail.com>
2009-12-19 14:36 ` Some question regarding Layers 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).