ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Quotation blocs with repetition symbol in the left column
@ 2014-03-28 14:42 Stéphane Goujet
  2014-06-01 11:38 ` Stéphane Goujet
  0 siblings, 1 reply; 4+ messages in thread
From: Stéphane Goujet @ 2014-03-28 14:42 UTC (permalink / raw)
  To: ntg-context

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

Hello,


  I am trying to typeset old books and I chose to keep close to the
original typography.
  I have attached two images of what I try to mimic an I try to sum up
the requirements hereinbelow. Any advice is appreciated.

=================
1) It must work when starting from a new line as well as when starting
from the middle of the current line. 2 different environments are
allowed.

2) The environnement is wrapped in guillemets.

3a) There must be no extra space before the opening guillemet when
starting from the middle of the current line.

3b) The must be no extra space after the closing guillemet.

4) The quote repetition symbol must appear in the beginning of every
line, except the first one.

5) Paragraphs should be automatically indented. Manual indentation is
bearable.

6a) When there is an indentation, the quote repetition symbol must be
indented too.

6b) When the bloc starts on a new line, the opening guillemet must be
indented.

7) The quote repetition symbol must be a setup parameter of the
environment, or easily modifiable within the environment definition.
(in the example images, it is a *closing* guillemet, but in other books
it can be an *opening* guillemet).

8) This environment must work within footnotes too.
=================


  So far, I have tried to use line numbering to achieve this result.
But there are several problems:
-- extra space before beginning of bloc,
-- quote repetition symbol appears on the first line even when it the
beginning of the environment,
-- no automatic indentation,
-- no indentation of quote repetition symbol,
-- lines overflow in the right margin (seems that the "width" used for
the numbering is not substracted from the text width),
-- no effect in footnotes,

and I am not unsure whether carrying on tweaking line numbering is the
way to go.


  Here is a minimal(?) example showing the different possibilities and
troubles:

=================
\setuppapersize[A4]
\enableregime[utf-8]
\mainlanguage[fr]
\language[fr]
\setcharacterspacing[frenchpunctuation]
\setupindenting[first,yes,medium]

\definestartstop[bloccitel][before={
   \setuplinenumbering[location=text,command={»\gobbleoneargument},width=.75em]
   \startlinenumbering
   \setupindenting[first,yes,medium]
   «
},
  after={»\stoplinenumbering}]


\starttext

First check: «normal spacing of guillemets».

Second check: a normal paragraph, to show {\bf normal right margin
limit}. \input tufte

Let's start with a quote block on a {\bf new line}:

\startbloccitel
First paragraph ({\bf quote repetition symbol is not wanted
here}):\input tufte

Second paragraph ({\bf not automatically indented}):\input tufte

\indentation Third paragraph with manual indentation({\bf quote
repetition symbol is not indented}):\input tufte
\stopbloccitel

Now, a quote block starting just there, {\bf in the middle of a line}
({\bf space after colon is too big}):\startbloccitel\input tufte

\input tufte
\stopbloccitel . This a bit of text at the end of the quotation. It
{\bf seems fine}.

And let's call a {\bf footnote}\footnote{\startbloccitel\input tufte

\input tufte
\stopbloccitel}. Unfortunately {\bf no quote repetition symbol will
appear in it}.

\stoptext
=================


  If needed, here is the Context I use :

=================
stephane@cuisine ~/test/ctx/quote_block $ context --version

mtx-context     | ConTeXt Process Management 0.60
mtx-context     |
mtx-context     | main context
file: /opt/context/tex/texmf-context/tex/context/base/context.mkiv
mtx-context     | current version: 2014.03.27 20:04
=================


Faithfully yours,
  Stéphane.

[-- Attachment #2: quote_block-current_line.png --]
[-- Type: image/png, Size: 26907 bytes --]

[-- Attachment #3: quote_block-new_line.png --]
[-- Type: image/png, Size: 28170 bytes --]

[-- Attachment #4: Type: text/plain, Size: 485 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] 4+ messages in thread

* Re: Quotation blocs with repetition symbol in the left column
  2014-03-28 14:42 Quotation blocs with repetition symbol in the left column Stéphane Goujet
@ 2014-06-01 11:38 ` Stéphane Goujet
  2014-06-01 15:18   ` Hans Hagen
  2014-06-01 15:22   ` Rik Kabel
  0 siblings, 2 replies; 4+ messages in thread
From: Stéphane Goujet @ 2014-06-01 11:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1779 bytes --]

On Fri, 28 Mar 2014, Stéphane Goujet wrote:

>  I am trying to typeset old books and I chose to keep close to the
> original typography.
> =================
> 1) It must work when starting from a new line as well as when starting
> from the middle of the current line. 2 different environments are
> allowed.
>
> 2) The environnement is wrapped in guillemets.
>
> 3a) There must be no extra space before the opening guillemet when
> starting from the middle of the current line.
>
> 3b) The must be no extra space after the closing guillemet.
>
> 4) The quote repetition symbol must appear in the beginning of every
> line, except the first one.
>
> 5) Paragraphs should be automatically indented. Manual indentation is
> bearable.
>
> 6a) When there is an indentation, the quote repetition symbol must be
> indented too.
>
> 6b) When the bloc starts on a new line, the opening guillemet must be
> indented.
>
> 7) The quote repetition symbol must be a setup parameter of the
> environment, or easily modifiable within the environment definition.
> (in the example images, it is a *closing* guillemet, but in other books
> it can be an *opening* guillemet).
>
> 8) This environment must work within footnotes too.
> =================

   I just fortuitously learned on Luatex mailing list that it only took 
this command : \localleftbox{}

   So, the quotation block would be :

================
\define\qbopen{«}
\define\qbrep{»}
\define\qbclose{»}
\definestartstop
    [bloccite]
    [before=\qbopen~\begingroup\localleftbox{\qbrep~},
     after=\endgroup~\qbclose]
================

   Might need a bit of kerning to have all spaces look good, but basically, 
this is it. Just this...


Goodbye,
   Stéphane Goujet.

[-- Attachment #2: Type: text/plain, Size: 485 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] 4+ messages in thread

* Re: Quotation blocs with repetition symbol in the left column
  2014-06-01 11:38 ` Stéphane Goujet
@ 2014-06-01 15:18   ` Hans Hagen
  2014-06-01 15:22   ` Rik Kabel
  1 sibling, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2014-06-01 15:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 6/1/2014 1:38 PM, Stéphane Goujet wrote:
> On Fri, 28 Mar 2014, Stéphane Goujet wrote:
>
>>  I am trying to typeset old books and I chose to keep close to the
>> original typography.
>> =================
>> 1) It must work when starting from a new line as well as when starting
>> from the middle of the current line. 2 different environments are
>> allowed.
>>
>> 2) The environnement is wrapped in guillemets.
>>
>> 3a) There must be no extra space before the opening guillemet when
>> starting from the middle of the current line.
>>
>> 3b) The must be no extra space after the closing guillemet.
>>
>> 4) The quote repetition symbol must appear in the beginning of every
>> line, except the first one.
>>
>> 5) Paragraphs should be automatically indented. Manual indentation is
>> bearable.
>>
>> 6a) When there is an indentation, the quote repetition symbol must be
>> indented too.
>>
>> 6b) When the bloc starts on a new line, the opening guillemet must be
>> indented.
>>
>> 7) The quote repetition symbol must be a setup parameter of the
>> environment, or easily modifiable within the environment definition.
>> (in the example images, it is a *closing* guillemet, but in other books
>> it can be an *opening* guillemet).
>>
>> 8) This environment must work within footnotes too.
>> =================
>
>    I just fortuitously learned on Luatex mailing list that it only took
> this command : \localleftbox{}
>
>    So, the quotation block would be :
>
> ================
> \define\qbopen{«}
> \define\qbrep{»}
> \define\qbclose{»}
> \definestartstop
>     [bloccite]
>     [before=\qbopen~\begingroup\localleftbox{\qbrep~},
>      after=\endgroup~\qbclose]
> ================
>
>    Might need a bit of kerning to have all spaces look good, but
> basically, this is it. Just this...

In fact, you loose some of the advantages of quotations, so best is to 
extend the delimiter code. I've added this:

\mainlanguage[fr]

\starttext

\input tufte

\startquotation
     \input tufte
\stopquotation

\input tufte

\setupdelimitedtext
   [quotation]
   [nextleft=right,
    nextright=left]

\startquotation
     \input tufte
\stopquotation

\input tufte

\setupdelimitedtext
   [quotation]
   [nextleft={\symbol[nextleftquotation]},
    nextright={\symbol[nextrightquotation]}]

\startquotation
     \input tufte
\stopquotation

\input tufte

\stoptext

Will be in the next beta (not yet uploaded) and needs to be wikified.

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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] 4+ messages in thread

* Re: Quotation blocs with repetition symbol in the left column
  2014-06-01 11:38 ` Stéphane Goujet
  2014-06-01 15:18   ` Hans Hagen
@ 2014-06-01 15:22   ` Rik Kabel
  1 sibling, 0 replies; 4+ messages in thread
From: Rik Kabel @ 2014-06-01 15:22 UTC (permalink / raw)
  To: Stéphane Goujet, mailing list for ConTeXt users

On 2014-06-01 07:38, Stéphane Goujet wrote:
> On Fri, 28 Mar 2014, Stéphane Goujet wrote:
>
>>  I am trying to typeset old books and I chose to keep close to the
>> original typography.
>> =================
>> 1) It must work when starting from a new line as well as when starting
>> from the middle of the current line. 2 different environments are
>> allowed.
>>
>> 2) The environnement is wrapped in guillemets.
>>
>> 3a) There must be no extra space before the opening guillemet when
>> starting from the middle of the current line.
>>
>> 3b) The must be no extra space after the closing guillemet.
>>
>> 4) The quote repetition symbol must appear in the beginning of every
>> line, except the first one.
>>
>> 5) Paragraphs should be automatically indented. Manual indentation is
>> bearable.
>>
>> 6a) When there is an indentation, the quote repetition symbol must be
>> indented too.
>>
>> 6b) When the bloc starts on a new line, the opening guillemet must be
>> indented.
>>
>> 7) The quote repetition symbol must be a setup parameter of the
>> environment, or easily modifiable within the environment definition.
>> (in the example images, it is a *closing* guillemet, but in other books
>> it can be an *opening* guillemet).
>>
>> 8) This environment must work within footnotes too.
>> =================
>
>   I just fortuitously learned on Luatex mailing list that it only took 
> this command : \localleftbox{}
>
>   So, the quotation block would be :
>
> ================
> \define\qbopen{«}
> \define\qbrep{»}
> \define\qbclose{»}
> \definestartstop
>    [bloccite]
>    [before=\qbopen~\begingroup\localleftbox{\qbrep~},
>     after=\endgroup~\qbclose]
> ================
>
>   Might need a bit of kerning to have all spaces look good, but 
> basically, this is it. Just this...
>
>
> Goodbye,
>   Stéphane Goujet.

Perfect! Thank you.

-- 
Rik
___________________________________________________________________________________
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] 4+ messages in thread

end of thread, other threads:[~2014-06-01 15:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-28 14:42 Quotation blocs with repetition symbol in the left column Stéphane Goujet
2014-06-01 11:38 ` Stéphane Goujet
2014-06-01 15:18   ` Hans Hagen
2014-06-01 15:22   ` Rik Kabel

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