* \vtop with middle alignment in a screenplay
@ 2013-06-11 9:44 Jan Pohanka
2013-06-11 9:53 ` Wolfgang Schuster
0 siblings, 1 reply; 6+ messages in thread
From: Jan Pohanka @ 2013-06-11 9:44 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi all,
I'm trying to make a simple template for screenplays for our amateur
theatre.
I have following code and I'd like to have the single lines of the song
centered in a page, but preceded by a person name on the left
{Person 1:
\setupalign[middle]{\vtop{%
song asdf line 1\\
song line 2\\
song a line 3}}}
This code obviously does not work as I need. Can please someone advice
me proper ConTeXt way how to do it?
many thanks
Jan
___________________________________________________________________________________
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: \vtop with middle alignment in a screenplay
2013-06-11 9:44 \vtop with middle alignment in a screenplay Jan Pohanka
@ 2013-06-11 9:53 ` Wolfgang Schuster
2013-06-11 10:00 ` Jan Pohanka
0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Schuster @ 2013-06-11 9:53 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 11.06.2013 um 11:44 schrieb Jan Pohanka <xhpohanka@gmail.com>:
> Hi all,
>
> I'm trying to make a simple template for screenplays for our amateur theatre.
>
> I have following code and I'd like to have the single lines of the song centered in a page, but preceded by a person name on the left
>
> {Person 1:
> \setupalign[middle]{\vtop{%
> song asdf line 1\\
> song line 2\\
> song a line 3}}}
>
> This code obviously does not work as I need. Can please someone advice me proper ConTeXt way how to do it?
You can place the lyrics with the \startlines environment:
\starttext
Person 1:
\startlines[before=,align=middle]
song asdf line 1
song line 2
song a line 3
\stoplines
\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: \vtop with middle alignment in a screenplay
2013-06-11 9:53 ` Wolfgang Schuster
@ 2013-06-11 10:00 ` Jan Pohanka
2013-06-11 10:15 ` Wolfgang Schuster
0 siblings, 1 reply; 6+ messages in thread
From: Jan Pohanka @ 2013-06-11 10:00 UTC (permalink / raw)
To: mailing list for ConTeXt users
Dne 11.6.2013 11:53, Wolfgang Schuster napsal(a):
> Am 11.06.2013 um 11:44 schrieb Jan Pohanka <xhpohanka@gmail.com>:
>
>> Hi all,
>>
>> I'm trying to make a simple template for screenplays for our amateur theatre.
>>
>> I have following code and I'd like to have the single lines of the song centered in a page, but preceded by a person name on the left
>>
>> {Person 1:
>> \setupalign[middle]{\vtop{%
>> song asdf line 1\\
>> song line 2\\
>> song a line 3}}}
>>
>> This code obviously does not work as I need. Can please someone advice me proper ConTeXt way how to do it?
> You can place the lyrics with the \startlines environment:
>
> \starttext
>
> Person 1:
>
> \startlines[before=,align=middle]
> song asdf line 1
> song line 2
> song a line 3
> \stoplines
>
> \stoptext
>
Hi Wolfgang,
thank you for fast answer. Your solution works well, but I would like to
have the first line of lyrics on the same line with Person:
thanks
Jn
___________________________________________________________________________________
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: \vtop with middle alignment in a screenplay
2013-06-11 10:00 ` Jan Pohanka
@ 2013-06-11 10:15 ` Wolfgang Schuster
2013-06-11 10:24 ` Jan Pohanka
0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Schuster @ 2013-06-11 10:15 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 11.06.2013 um 12:00 schrieb Jan Pohanka <xhpohanka@gmail.com>:
> Hi Wolfgang,
> thank you for fast answer. Your solution works well, but I would like to have the first line of lyrics on the same line with Person:
You can place the name in the margin.
\setuplayout[backspace=4cm]
\definemargindata[Person][inmargin][style=normal]
\definelines[lyrics][align=middle]
%\showframe
\starttext
\Person{Person 1:}
\startlyrics
song asdf line 1
song line 2
song a line 3
\stoplyrics
\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: \vtop with middle alignment in a screenplay
2013-06-11 10:15 ` Wolfgang Schuster
@ 2013-06-11 10:24 ` Jan Pohanka
2013-06-11 10:30 ` Wolfgang Schuster
0 siblings, 1 reply; 6+ messages in thread
From: Jan Pohanka @ 2013-06-11 10:24 UTC (permalink / raw)
To: ntg-context
Dne 11.6.2013 12:15, Wolfgang Schuster napsal(a):
> You can place the name in the margin.
>
> \setuplayout[backspace=4cm]
>
> \definemargindata[Person][inmargin][style=normal]
>
> \definelines[lyrics][align=middle]
>
> %\showframe
>
> \starttext
>
> \Person{Person 1:}
>
> \startlyrics
> song asdf line 1
> song line 2
> song a line 3
> \stoplyrics
>
> \stoptext
>
Thank you again. Placing the names in the margin is not a bad idea, but
it would need to rework the rest of my macros as they do not count with
it. Also increasing the backspace causes that the lyrics is not centered
ideally.
Can you please kindly advice me some another solution? I can imagine
some negative hskip, but it is probably just ugly hack.
best regards
Jan
___________________________________________________________________________________
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: \vtop with middle alignment in a screenplay
2013-06-11 10:24 ` Jan Pohanka
@ 2013-06-11 10:30 ` Wolfgang Schuster
0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Schuster @ 2013-06-11 10:30 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 11.06.2013 um 12:24 schrieb Jan Pohanka <xhpohanka@gmail.com>:
> Dne 11.6.2013 12:15, Wolfgang Schuster napsal(a):
>> You can place the name in the margin.
>>
>> \setuplayout[backspace=4cm]
>>
>> \definemargindata[Person][inmargin][style=normal]
>>
>> \definelines[lyrics][align=middle]
>>
>> %\showframe
>>
>> \starttext
>>
>> \Person{Person 1:}
>>
>> \startlyrics
>> song asdf line 1
>> song line 2
>> song a line 3
>> \stoplyrics
>>
>> \stoptext
>>
>
> Thank you again. Placing the names in the margin is not a bad idea, but it would need to rework the rest of my macros as they do not count with it. Also increasing the backspace causes that the lyrics is not centered ideally.
> Can you please kindly advice me some another solution? I can imagine some negative hskip, but it is probably just ugly hack.
You can use the “command” key for margindata to move the text in the text area.
\define[1]\PersonCommand
{\rlap{\hskip\leftmargindistance\relax#1}}
\definemargindata[Person][inmargin][style=normal,command=\PersonCommand]
\definelines[lyrics][align=middle]
\showframe
\starttext
\Person{Person 1:}
\startlyrics
song asdf line 1
song line 2
song a line 3
\stoplyrics
\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
end of thread, other threads:[~2013-06-11 10:30 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-11 9:44 \vtop with middle alignment in a screenplay Jan Pohanka
2013-06-11 9:53 ` Wolfgang Schuster
2013-06-11 10:00 ` Jan Pohanka
2013-06-11 10:15 ` Wolfgang Schuster
2013-06-11 10:24 ` Jan Pohanka
2013-06-11 10:30 ` 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).