From: Taco Hoekwater <taco@elvenkind.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Typesetting poetry with particular indenting
Date: Thu, 2 Jul 2020 15:56:38 +0200 [thread overview]
Message-ID: <D906CE98-0729-46EA-A99F-C1A7D93A2BCC@elvenkind.com> (raw)
In-Reply-To: <CA+b=C5WdZPYDXr4JURHJDP7Nedz34o1+OHyOKdBtCHiL-n_yyg@mail.gmail.com>
I was having fun with this as well while Hans was writing his generic solution.
Here is an explicit ‘indent each 2nd and 3rd line’:
%%%%%%%%
\unprotect
\installindentingmethod {three} {\c_spac_indentation_toggle_state\plusthree}
\unexpanded\def\spac_indentation_tri_toggle_indeed
{\glet\checkindentation\spac_indentation_tri_toggle}
\unexpanded\def\spac_indentation_tri_toggle
{\gdef\checkindentation
{\spac_indentation_remove
\gdef\checkindentation{\spac_indentation_tri_toggle_indeed}}}
% this next macro is redefinition of a core macro !
\def\spac_indentation_check_toggle
{\ifcase\c_spac_indentation_toggle_state
% nothing
\or
\spac_indentation_no_toggle
\or
\spac_indentation_do_toggle
\or
\spac_indentation_tri_toggle
\fi}
\protect
%%%%%%%%%%
to be used with:
\setuplines[indenting=three]
Best wishes,
Taco
> On 2 Jul 2020, at 15:01, Tommaso Gordini <illinguista1972@gmail.com> wrote:
>
> \starttext
>
> \setupindenting[yes,1em]
> \setuplines[indenting=even]
>
> \startlines
> Per correr miglior acque alza le vele
> omai la navicella del mio ingegno,
> che lascia dietro a sé mar sì crudele;
> e canterò di quel secondo regno
> dove l'umano spirito si purga
> e di salire al ciel diventa degno.
> \stoplines
>
> \stoptext
Taco Hoekwater
Elvenkind BV
___________________________________________________________________________________
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:[~2020-07-02 13:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-02 13:01 Tommaso Gordini
2020-07-02 13:40 ` Hans Hagen
2020-07-02 14:15 ` Wolfgang Schuster
2020-07-02 14:48 ` Hans Hagen
2020-07-02 14:59 ` Wolfgang Schuster
2020-07-02 13:56 ` Taco Hoekwater [this message]
2020-07-02 14:48 ` Tommaso Gordini
2020-07-02 15:05 ` Wolfgang Schuster
2020-07-02 15:14 ` Tommaso Gordini
2020-07-02 15:33 ` Tommaso Gordini
2020-07-02 18:46 ` Wolfgang Schuster
2020-07-02 21:29 ` Floris van Manen
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=D906CE98-0729-46EA-A99F-C1A7D93A2BCC@elvenkind.com \
--to=taco@elvenkind.com \
--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).