From: Ursula Hermann <ursula.hermann@univie.ac.at>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Frame
Date: Fri, 22 Feb 2019 08:41:59 +0000 [thread overview]
Message-ID: <0cad8dc3285440d19f21febd7ac18e77@univie.ac.at> (raw)
In-Reply-To: <d60b0e72-b3d1-0278-8fd7-4be7d7b3a8e6@gmail.com>
High list!
Another example, instead oft he cow, I took another figure:
\setuppapersize
[A5]
\setupexternalfigures
[location=default]
\setupindenting
[yes, small]
\setupwhitespace
[small]
\defineframedtext
[prettyblock]
[width=10cm,
indenting={yes, small},
background=color, backgroundcolor=lightgreen,
foreground=color, foregroundcolor=black,
offset=2mm,
align=flushleft]
\starttext
\startprettyblock
\setupindenting[next]
The Earth, as a habitat for animal life, is in old age and has a fatal
illness. Several, in fact.
It would be happening whether humans had ever evolved or not.
\placefigure
[][fig:church]
{Stephanus Church.}
{\externalfigure[ma-cb-24][width=.4\textwidth]}
\stopprettyblock
\setupindenting[next]
Below, we have two separate columns; but up here, for the nonce, we have but the one.
\startcolumns [n=2]
Text, text, text \dots
all in the first column
\column
Words, words, words \dots
all in the second column.
And look ye here! Even more words!
\stopcolumns
\stoptext
Works great.
Many Regards
Uschi
-----Ursprüngliche Nachricht-----
Von: ntg-context <ntg-context-bounces@ntg.nl> Im Auftrag von Wolfgang Schuster
Gesendet: Donnerstag, 21. Februar 2019 18:24
An: mailing list for ConTeXt users <ntg-context@ntg.nl>; Marco Patzer <lists@homerow.info>
Betreff: Re: [NTG-context] Frame
Marco Patzer schrieb am 21.02.19 um 12:19:
> On Thu, 21 Feb 2019 10:50:21 +0000
> Ursula Hermann <ursula.hermann@univie.ac.at> wrote:
>
>> Here is my example:
>>
>> \setuppapersize[A5]
>> \setupcolors[state=start]
> This is the default, no need to start the colours any longer.
>
>> {\framed
>> [width=10cm,
>> background=color,backgroundcolor=darkblue,
>> foreground=color,foregroundcolor=white,
>> align={flushleft}]
>> {The Earth, as a habitat for animal life, is in old age and has a
>> fatal illness. Several, in fact.\par \setupindenting[yes, small] It
>> would be happening whether humans had ever evolved or not.
>>
>> \externalfigure[cow.pdf][width=1cm]}
>>
>> \setupwhitespace[small]
>> \starttext
>> Below, we have two separate columns; but up here, for the nonce, we
>> have but the one.
>>
>> \startcolumns[n=2] % Two columns, please
>> Text, text, text \dots
>> all in the first column
>> \column
>> Words, words, words \dots
>> all in the second column.
>> And look ye here! Even more words!
>> \stopcolumns
>> \stoptext
>> Why can‘t I see the cow?
> You're missing
>
> \setupexternalfigures
> [location=default]
>
> Without setting the location context doesn't check the system
> directories for the sample images.
>
> Furthermore, you're typesetting before \starttext. That's why your
> font is monospaced.
>
> And I try to separate content from style. That's why I move all style
> information before \starttext and after \starttext comes only content
> and markup (if possible). Nothing wrong with mixing it, but it's
> easier to read and easier to change the layout after the fact.
> I'd write your example as follows.
>
> \setuppapersize
> [A5]
>
> \setupexternalfigures
> [location=default]
>
> \setupindenting
> [yes, small]
>
> \setupwhitespace
> [small]
>
> \defineframedtext
> [prettyblock]
> [width=10cm,
> indenting={yes, small},
> background=color, backgroundcolor=darkblue,
> foreground=color, foregroundcolor=white,
> offset=2mm,
> align=flushleft]
>
> \starttext
>
> \startprettyblock
> \noindentation
You don’t need \noindentation when you add “next” to the indenting options.
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
___________________________________________________________________________________
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2019-02-22 8:41 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-19 13:01 Frame Ursula Hermann
2019-02-19 13:10 ` Frame Marco Patzer
2019-02-19 13:17 ` Frame Ursula Hermann
2019-02-20 9:44 ` Frame Ursula Hermann
2019-02-20 10:10 ` Frame Ursula Hermann
2019-02-20 11:31 ` Frame Ursula Hermann
2019-02-20 14:38 ` Frame Lars
2019-02-21 10:50 ` Frame Ursula Hermann
2019-02-21 11:19 ` Frame Marco Patzer
2019-02-21 12:17 ` Frame Ursula Hermann
2019-02-21 17:24 ` Frame Wolfgang Schuster
2019-02-21 17:56 ` Frame Marco Patzer
2019-02-22 8:41 ` Ursula Hermann [this message]
[not found] <3.0.6.32.19991125223734.0099fd30@pop.wxs.nl>
[not found] ` <Pine.GSO.3.95.991127143029.984A-200000@AMath0>
1999-11-28 19:34 ` Frame Hans Hagen
1999-11-28 20:17 ` Frame Hans Hagen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0cad8dc3285440d19f21febd7ac18e77@univie.ac.at \
--to=ursula.hermann@univie.ac.at \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).