ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Simple problem with quotation paragraph
@ 2006-05-04 10:08 Gerben Wierda
  2006-05-04 11:27 ` ConTeXt frustrations (was: simple problem) Gerben Wierda
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Gerben Wierda @ 2006-05-04 10:08 UTC (permalink / raw)


I am having a simple problem I can't solve by reading the manuals.

I want to quote a fragment of a book which contains amongst others a
discussion (Plato's Protagoras to be precise). Normally, my book has no
whitespace between paragraphs and small indentation, but here I want a
small amount of whitespace between paragraphs and also narrower. I'd like
to setup some form of quotation paragraph style to use. I started out with
\startquotation but I do not want quotes, so now I use startnarrower, but
what I need is a paragraph style. Maybe another font (1pt smaller) is nice
too. And noindenting while the rest of the book uses indenting.

What I would like to do is something like

\startBookQuote
\stopBookQuote

and on the inside I get a small whitespace between paragraphs, no
indentation, a smaller font and a narrower textwidth.

My last try was:

\defineparagraphs[BookQuote][n=1,before={\indenting[never]\whitespace\startnarrower},after={\indenting[yes]\nowhitespace\stopnarrower}]

in my environment file, but that gave me page breaks as soon as
\startBookQuote was given and the quotes themselves do not receive page
breaks, hence a quote more than one page (I have a few) ends up being a
column of one page but just running from the page.

So, it seems \defineparagraphs is out, because I do not get page breaks
inside the quote. But what should I do?

Thanks in advance,

G

PS. any sight on a decent ConTeXt book, btw? The manuals and wiki seldomly
give me answers that work for me and often I find ConTeXt rather
counterintuitive, e.g. setupparagraphs for something that is a
table/column kind of thing, or confusing (\define vs \setup vs rest)

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

* ConTeXt frustrations (was: simple problem)
  2006-05-04 10:08 Simple problem with quotation paragraph Gerben Wierda
@ 2006-05-04 11:27 ` Gerben Wierda
  2006-05-04 17:34 ` Simple problem with quotation paragraph Aditya Mahajan
  2006-05-04 18:04 ` Peter Rolf
  2 siblings, 0 replies; 4+ messages in thread
From: Gerben Wierda @ 2006-05-04 11:27 UTC (permalink / raw)


> \defineparagraphs[BookQuote][n=1,before={\indenting[never]\whitespace\startnarrower},after={\indenting[yes]\nowhitespace\stopnarrower}]
>
> in my environment file, but that gave me page breaks as soon as
> \startBookQuote was given and the quotes themselves do not receive page
breaks, hence a quote more than one page (I have a few) ends up being a
column of one page but just running from the page.
>
> So, it seems \defineparagraphs is out, because I do not get page breaks
inside the quote. But what should I do?

Another try was simpler, using plain TeX instead of ConTeXt's mechanisms,
but had another unexpected effect:

\def\startBookQuote{\indenting[never]\whitespace\startnarrower}
\def\stopBookQuote{\stopnarrower\indenting[yes]\nowhitespace}

The result of which is close to what I want, but after the first
\startBookQuote-\stopBookQuote pair the whitespace between paragraphs
stays, surprisingly enough (notwithstanding the \nowhitespace).

Si=o, I remove the entire whitespace/nowhitespace and find out that I
*still* get whitespace!? OK, I seem to need to remove
\setupwhitespace[small] from my environment file, where I had:
\setupwhitespace[small]
\nowhitespace
But, contrary to indentation, the \setupwhitespace not only sets it up, it
also turns it on. With indentation, I hat \setupindentation and did not
get that working until I turned it on with \indenting[yes]. In other
words, two opposite behaviours for likewise actions.

I find this kind of chaotic behaviour typical for my experience with
ConTeXt and I get pretty frustrated to the point I start thinking I should
have stayed with LaTeX and use the memoir class. Whatever LaTeX's
limitations in what it can do, it generally does what one expects. In my
own personal experience with ConTeXt I can definitely not say that.

G

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

* Re: Simple problem with quotation paragraph
  2006-05-04 10:08 Simple problem with quotation paragraph Gerben Wierda
  2006-05-04 11:27 ` ConTeXt frustrations (was: simple problem) Gerben Wierda
@ 2006-05-04 17:34 ` Aditya Mahajan
  2006-05-04 18:04 ` Peter Rolf
  2 siblings, 0 replies; 4+ messages in thread
From: Aditya Mahajan @ 2006-05-04 17:34 UTC (permalink / raw)


On Thu, 4 May 2006, Gerben Wierda wrote:

> I am having a simple problem I can't solve by reading the manuals.
>
> I want to quote a fragment of a book which contains amongst others a
> discussion (Plato's Protagoras to be precise). Normally, my book has no
> whitespace between paragraphs and small indentation, but here I want a
> small amount of whitespace between paragraphs and also narrower. I'd like
> to setup some form of quotation paragraph style to use. I started out with
> \startquotation but I do not want quotes, so now I use startnarrower, but
> what I need is a paragraph style. Maybe another font (1pt smaller) is nice
> too. And noindenting while the rest of the book uses indenting.
>
> What I would like to do is something like
>
> \startBookQuote
> \stopBookQuote
>
> and on the inside I get a small whitespace between paragraphs, no
> indentation, a smaller font and a narrower textwidth.
>
> My last try was:
>
> \defineparagraphs[BookQuote][n=1,before={\indenting[never]\whitespace\startnarrower},after={\indenting[yes]\nowhitespace\stopnarrower}]

\startstop narrower form a group, so \indenting[yes] and \nowhitespace 
have no effect. You should change the order of those with stopnarrow.

> in my environment file, but that gave me page breaks as soon as
> \startBookQuote was given and the quotes themselves do not receive page
> breaks, hence a quote more than one page (I have a few) ends up being a
> column of one page but just running from the page.
>
> So, it seems \defineparagraphs is out, because I do not get page breaks
> inside the quote. But what should I do?

Does this work?

\definestartstop
   [BookQuote]
   [before={\startnarrower\whitespace\setupindenting[no]\tfx},
    after={\stopnarrower}]

I am using \tfx for a smaller font, but you can define your own for 
getting something 1pt smaller.


Aditya

-- 
Aditya Mahajan, EECS Systems, University of Michigan
http://www.eecs.umich.edu/~adityam || Ph: 7342624008

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

* Re: Simple problem with quotation paragraph
  2006-05-04 10:08 Simple problem with quotation paragraph Gerben Wierda
  2006-05-04 11:27 ` ConTeXt frustrations (was: simple problem) Gerben Wierda
  2006-05-04 17:34 ` Simple problem with quotation paragraph Aditya Mahajan
@ 2006-05-04 18:04 ` Peter Rolf
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Rolf @ 2006-05-04 18:04 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 2103 bytes --]

Hi Gerben,

here is a solution that works with a local layout. For sure there are
better ways to reach your desired style, but I have no experience with
this stuff.

Greets, Peter


Gerben Wierda wrote:
> I am having a simple problem I can't solve by reading the manuals.
> 
> I want to quote a fragment of a book which contains amongst others a
> discussion (Plato's Protagoras to be precise). Normally, my book has no
> whitespace between paragraphs and small indentation, but here I want a
> small amount of whitespace between paragraphs and also narrower. I'd like
> to setup some form of quotation paragraph style to use. I started out with
> \startquotation but I do not want quotes, so now I use startnarrower, but
> what I need is a paragraph style. Maybe another font (1pt smaller) is nice
> too. And noindenting while the rest of the book uses indenting.
> 
> What I would like to do is something like
> 
> \startBookQuote
> \stopBookQuote
> 
> and on the inside I get a small whitespace between paragraphs, no
> indentation, a smaller font and a narrower textwidth.
> 
> My last try was:
> 
> \defineparagraphs[BookQuote][n=1,before={\indenting[never]\whitespace\startnarrower},after={\indenting[yes]\nowhitespace\stopnarrower}]
> 
> in my environment file, but that gave me page breaks as soon as
> \startBookQuote was given and the quotes themselves do not receive page
> breaks, hence a quote more than one page (I have a few) ends up being a
> column of one page but just running from the page.
> 
> So, it seems \defineparagraphs is out, because I do not get page breaks
> inside the quote. But what should I do?
> 
> Thanks in advance,
> 
> G
> 
> PS. any sight on a decent ConTeXt book, btw? The manuals and wiki seldomly
> give me answers that work for me and often I find ConTeXt rather
> counterintuitive, e.g. setupparagraphs for something that is a
> table/column kind of thing, or confusing (\define vs \setup vs rest)
> 
> 
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
> 
> 


[-- Attachment #2: gerben.tex --]
[-- Type: text/plain, Size: 674 bytes --]

% interface=en output=pdftex
% Time-stamp: <Donnerstag, 04 Mai 2006 19:39:38; gerben.tex>
%

\setupindenting[medium,yes]

\starttext

\dorecurse{5}{\input knuth\par\relax}


\start % here starts something.....

% local definitions (layout/font stuff,...)
\startlocal
\setupwhitespace[medium]
\setupindenting[none]

\switchtobodyfont[10pt]

%\setuplayout[]
\stoplocal

% the content between \stoplocal and the final \stop
% is shown in the local layout

\startnarrower

\dorecurse{5}{\input dawkins\relax\par}

\stopnarrower

\stop % .....and here it ends

\dorecurse{5}{\input ward\par\relax}

\stoptext



%%% Local Variables:
%%% mode: context
%%% TeX-master: ""
%%% End:

[-- Attachment #3: Type: text/plain, Size: 139 bytes --]

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

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

end of thread, other threads:[~2006-05-04 18:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-04 10:08 Simple problem with quotation paragraph Gerben Wierda
2006-05-04 11:27 ` ConTeXt frustrations (was: simple problem) Gerben Wierda
2006-05-04 17:34 ` Simple problem with quotation paragraph Aditya Mahajan
2006-05-04 18:04 ` Peter Rolf

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