* poem as a sidefloat
@ 2019-09-25 17:35 Henning Hraban Ramm
2019-09-25 18:45 ` Wolfgang Schuster
0 siblings, 1 reply; 5+ messages in thread
From: Henning Hraban Ramm @ 2019-09-25 17:35 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi, I’d like to have a small poem beside my text.
My approach doesn’t work, with or without \framed:
Since I need this only once, I thought I don’t need to define or setup my own float.
\setupfloat inherits from \setupframed, but the parameters width, style and background(color) don’t work.
Aren’t they supposed to work in \startplacefloat?
How can I suppress the caption? ("none" is supposed to work with \placefloat, but at least doesn’t in \startplacefloat)
With or without framed, vbox and lines didn’t change much. (Of course \framed adds a frame, but the text isn’t within).
\starttext
\dorecurse{2}{\input knuth}
\startplacefloat[
title=none, % doesn’t work
numbering=no, % wrong
location=left,
width=.33\textwidth, % doesn’t work
style=\tt, % doesn’t work
background=color,backgroundcolor=cyan, % doesn’t work
]%
%\framed[
% width=.33\textwidth,
% style=\tt,
% background=color,backgroundcolor=yellow,
%]{\vbox{%
\startlines
lichtung
manche meinen
lechts und rinks
kann man nicht
velwechsern.
werch ein illtum!
\wordright{ernst jandl}
\stoplines
%}}
\stopplacefloat
\dorecurse{2}{\input knuth}
\stoptext
Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: poem as a sidefloat
2019-09-25 17:35 poem as a sidefloat Henning Hraban Ramm
@ 2019-09-25 18:45 ` Wolfgang Schuster
2019-09-25 19:37 ` Henning Hraban Ramm
0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2019-09-25 18:45 UTC (permalink / raw)
To: mailing list for ConTeXt users, Henning Hraban Ramm
Henning Hraban Ramm schrieb am 25.09.2019 um 19:35:
> Hi, I’d like to have a small poem beside my text.
> My approach doesn’t work, with or without \framed:
>
> Since I need this only once, I thought I don’t need to define or setup my own float.
>
> \setupfloat inherits from \setupframed, but the parameters width, style and background(color) don’t work.
> Aren’t they supposed to work in \startplacefloat?
>
> How can I suppress the caption? ("none" is supposed to work with \placefloat, but at least doesn’t in \startplacefloat)
The first argument of \startplacefloat takes the name of the float
instance, e.g. figure (\startplacefloat [figure]) and the second
argument a limited list of keys. All other options like the background
color have to be set with \setupfloat and \setupcation.
> With or without framed, vbox and lines didn’t change much. (Of course \framed adds a frame, but the text isn’t within).
You have to put the poem in a framed or framedtext environment with the
setting width=fit. There is no way to to do this with the float
environment alone.
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: poem as a sidefloat
2019-09-25 18:45 ` Wolfgang Schuster
@ 2019-09-25 19:37 ` Henning Hraban Ramm
2019-09-25 20:10 ` Wolfgang Schuster
0 siblings, 1 reply; 5+ messages in thread
From: Henning Hraban Ramm @ 2019-09-25 19:37 UTC (permalink / raw)
To: mailing list for ConTeXt users
> Am 2019-09-25 um 20:45 schrieb Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>:
>
> Henning Hraban Ramm schrieb am 25.09.2019 um 19:35:
>> Hi, I’d like to have a small poem beside my text.
>> My approach doesn’t work, with or without \framed:
>>
>> Since I need this only once, I thought I don’t need to define or setup my own float.
>>
>> \setupfloat inherits from \setupframed, but the parameters width, style and background(color) don’t work.
>> Aren’t they supposed to work in \startplacefloat?
>>
>> How can I suppress the caption? ("none" is supposed to work with \placefloat, but at least doesn’t in \startplacefloat)
> The first argument of \startplacefloat takes the name of the float instance, e.g. figure (\startplacefloat [figure]) and the second argument a limited list of keys. All other options like the background color have to be set with \setupfloat and \setupcation.
>> With or without framed, vbox and lines didn’t change much. (Of course \framed adds a frame, but the text isn’t within).
> You have to put the poem in a framed or framedtext environment with the setting width=fit. There is no way to to do this with the float environment alone.
Thank you!
The following works, except:
- There’s too much space (2 lines?) within the frame before the poem.
- I’d like to insert some space below the float, spaceafter doesn’t work.
\definefloat[poem]
\setupfloat[poem][
location=left, % doesn’t work
width=0.33\textwidth,
background=color,backgroundcolor=cyan,
spaceafter=1em, % doesn’t work
]
\setupcaption[poem][
location=none,
number=no,
]
\starttext
\dorecurse{2}{\input knuth}
\startplacefloat[poem][location=left,]%
\framedtext[
frame=off,
width=fit,
style=\tt,
%background=color,backgroundcolor=yellow,
]{%
\startlines%
lichtung
manche meinen
lechts und rinks
kann man nicht
velwechsern.
werch ein illtum!
\wordright{ernst jandl}
\stoplines
}
\stopplacefloat
\dorecurse{2}{\input knuth}
\stoptext
Grüßlinge, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: poem as a sidefloat
2019-09-25 19:37 ` Henning Hraban Ramm
@ 2019-09-25 20:10 ` Wolfgang Schuster
2019-09-25 20:38 ` Henning Hraban Ramm
0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2019-09-25 20:10 UTC (permalink / raw)
To: mailing list for ConTeXt users, Henning Hraban Ramm
Henning Hraban Ramm schrieb am 25.09.2019 um 21:37:
> The following works, except:
> - There’s too much space (2 lines?) within the frame before the poem.
Use the framedtext environment.
> - I’d like to insert some space below the float, spaceafter doesn’t work.
You nee sidespacebefore/after but you can only set it for *all* floats.
\definefloat [poem]
% \setupfloat
% [sidespacebefore=medium]
\setupfloat
[poem]
[background=color,
backgroundcolor=cyan]
\setupcaption
[poem]
[number=none]
\starttext
\dorecurse{2}{\samplefile{knuth}}
\startplacefloat [poem] [location=left]
\startframedtext [frame=off,width=fit,offset=0.25ex]
\startlines [style=mono]
lichtung
manche meinen
lechts und rinks
kann man nicht
velwechsern.
werch ein illtum!
\wordright{ernst jandl}
\stoplines
\stopframedtext
\stopplacefloat
\dorecurse{2}{\samplefile{knuth}}
\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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: poem as a sidefloat
2019-09-25 20:10 ` Wolfgang Schuster
@ 2019-09-25 20:38 ` Henning Hraban Ramm
0 siblings, 0 replies; 5+ messages in thread
From: Henning Hraban Ramm @ 2019-09-25 20:38 UTC (permalink / raw)
To: mailing list for ConTeXt users
> Am 2019-09-25 um 22:10 schrieb Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>:
>
> Henning Hraban Ramm schrieb am 25.09.2019 um 21:37:
>> The following works, except:
>> - There’s too much space (2 lines?) within the frame before the poem.
> Use the framedtext environment.
Ah, I didn’t expect \startframedtext to behave differently than \framedtext.
>> - I’d like to insert some space below the float, spaceafter doesn’t work.
> You nee sidespacebefore/after but you can only set it for *all* floats.
Not good, but I’ll just setup my special case in a group.
Thank you again & all the best,
Hraban
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-09-25 20:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-25 17:35 poem as a sidefloat Henning Hraban Ramm
2019-09-25 18:45 ` Wolfgang Schuster
2019-09-25 19:37 ` Henning Hraban Ramm
2019-09-25 20:10 ` Wolfgang Schuster
2019-09-25 20:38 ` Henning Hraban Ramm
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).