From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/112209 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gerben Wierda Newsgroups: gmane.comp.tex.context Subject: Solution: LMTX initial (drop cap) in combination with indenting Date: Thu, 22 Jul 2021 10:05:32 +0200 Message-ID: <0BE4B77E-39F1-41B5-BD9C-02301049D972@rna.nl> References: <88D4E660-D4F9-4D17-9346-568712110D06@rna.nl> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Content-Type: multipart/mixed; boundary="===============2693563286086810832==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14729"; mail-complaints-to="usenet@ciao.gmane.io" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Jul 22 10:06:23 2021 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m6Tio-0003cj-UG for gctc-ntg-context-518@m.gmane-mx.org; Thu, 22 Jul 2021 10:06:22 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 92DF7285F3B; Thu, 22 Jul 2021 10:05:42 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZG6gUCmnmTfF; Thu, 22 Jul 2021 10:05:39 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 76ED4285F2B; Thu, 22 Jul 2021 10:05:39 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 0B811285F20 for ; Thu, 22 Jul 2021 10:05:38 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XCt8zP4RUK-F for ; Thu, 22 Jul 2021 10:05:36 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=213.125.118.53; helo=mail.rna.nl; envelope-from=gerben.wierda@rna.nl; receiver= Original-Received: from mail.rna.nl (mail.rna.nl [213.125.118.53]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 3F15E2839FB for ; Thu, 22 Jul 2021 10:05:35 +0200 (CEST) Original-Received: from hermione.rna.nl (hermione.rna.nl [192.168.2.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.rna.nl (Postfix) with ESMTPSA id 0C69D8B3D298 for ; Thu, 22 Jul 2021 10:05:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rna.nl; s=dkim_rsa2048; t=1626941133; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=dt08SCNHb2fEVpWJ3wTJ28M65vJNVZOYrgP77HAlfms=; b=KQHadFX9Z12hVzeI9G3SAZApJW9JzxABcIwi03Bj84OJg/Nmzk13nw6s8w/EdgEyvp/mkc vTCLmYUIYhcknVBvh97jGKIzUVOI8Jw33fMvhIZRn0BtE/V1fScYnykqmqFCndbqVNyLVh yOvyigWKTmoYa5IW45gC0JmrJb9tptor9IwPBs7thM6M6L2Ik6tH+5Eh8POuBbIvAHjQo1 gcwmrOLwhobsDKtF32MjGS/ERXr1BWanmuQbgMN7piWUCdviK4Ag7j21BNBjRvcPDJh9/W 09OSqpIebFNAB7/lr6UVHuLGMD0gpLN13zRK7ux0SQq2PJ+Nm7Y9KhRihFp7Zg== In-Reply-To: X-Mailer: Apple Mail (2.3608.120.23.2.7) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.io gmane.comp.tex.context:112209 Archived-At: --===============2693563286086810832== Content-Type: multipart/alternative; boundary="Apple-Mail=_B1EEAD63-5E7D-44CD-A811-DC5F6CBA2DCC" --Apple-Mail=_B1EEAD63-5E7D-44CD-A811-DC5F6CBA2DCC Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On 21 Jul 2021, at 22:38, Nicola wrote: >=20 > On 2021-07-21, Gerben Wierda > wrote: >>> On 19 Jul 2021, at 09:56, Nicola wrote: >>>=20 >>> On 2021-07-18, Gerben Wierda wrote: >>>> PS. switching \kap and \bf has an interesting result, the first >>>> character of the words is not in bold. This did not happen with >>>> lettrine in mkii >>>=20 >>> I do not have an answer to your question, but I'd like to point out = that >>> you can keep using lettrine with ConTeXt LMTX, if you wish. You just >>> need to add the modules manually, currently: >>>=20 >>> https://wiki.contextgarden.net/Modules#ConTeXt_LMTX >>=20 >> I=E2=80=99ve tried this. Installed the modules and then I get with >=20 > I was sure that I had used lettrine with MKIV in a document of mine, = but > after your reply I double checked that and, in fact, I was using > lettrine only with MKII. On the plus side, I have recovered my = settings > for MKIV (which work with LMTX as well). >=20 > I think that the `distance` parameter of \setupinitials does what you > want. Besides, if your font provides real small capitals, you may use > \definefirstline. >=20 > This is how I set up things in one of my documents: >=20 > = %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%= %%%%%% > = \definefontfeature[default][default][protrusion=3Dquality,expansion=3Dqual= ity,onum=3Dno,lnum=3Dyes] >=20 > % \definefirstline below requires a font that implements small = capitals as > % a feature (Latin Modern does not). I have used this: > % \definefontfamily[mainfont][serif][Sorts Mill Goudy] [ > % tf=3Dname:Sorts Mill Goudy Regular, > % it=3Dname:Sorts Mill Goudy Italic, > % ] > % If you don't have the font above, try this: > \setupbodyfont[heros] >=20 > \setupbodyfont[mainfont,11pt] >=20 > \definemeasure[CAindent][12pt] > \setupindenting[yes,\measure{CAindent}] >=20 > % Every chapter body text starts with a drop cap: > \defineinitial[normal][ > n=3D3, > m=3D1, > distance=3D18pt, %%%%%%%%% <=3D=3D Add this %%%%%%%% > state=3Dstart > ] >=20 > % Special case: drop cap starting with a quote > \defineinitial[quote][ > n=3D3, > m=3D2, > distance=3D13pt, > hoffset=3D5pt, % Move drop cap a bit to the left > method=3Dnone > ] >=20 > % Some initials may need special adjustments, depending on the font > \defineinitial[Q][ > voffset=3D2\lineheight, > n=3D3, > m=3D1, > distance=3D18pt, > state=3Dstart > ] >=20 > % Full first line in small caps > \definefirstline[smallcapsfirstline][ > alternative=3Dline, > style=3Dsmallcaps, > ] >=20 > % First n words in small caps (three in this case) > \definefirstline[smallcapsfirstlinethree][ > alternative=3Dword, > n=3D3, > style=3Dsmallcaps, > ] >=20 > \starttext > \setfirstline[smallcapsfirstlinethree] > \setinitial[normal] Suppose we have a system for the approval of > loans. \input knuth > \blank[2*big] >=20 > \setfirstline[smallcapsfirstline] > \setinitial[quote] =E2=80=9CSuppose we have a system for the approval = of > loans.=E2=80=9D \input knuth > \blank[2*big] >=20 > \setfirstline[smallcapsfirstline] > \setinitial[Q] Quo usque tandem abutere, Catilina, patientia nostra? = quam diu > etiam furor iste tuus nos1 eludet? quem ad finem sese effrenata = iactabit > audacia? >=20 > \stoptext > = %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%= %%%%%% >=20 > I hope this will give you some ideas! >=20 > References: >=20 > https://wiki.contextgarden.net/Command/setupinitial = > https://wiki.contextgarden.net/Command/definefirstline = > https://www.fontsquirrel.com/fonts/Sorts-Mill-Goudy = >=20 > Nicola Hi Nicola, Thanks. This solves the indentation of the initial itself. What remains = is the indentation of the text immediately after, e.g. the 'uppose = we=E2=80=99. Minimum example (also visible in your example): = %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%= %%%%%% % This combination of indenting and initial does not work properly, the = text following the initial should be unindented \definemeasure[CAindent][12pt] \setupindenting[yes,\measure{CAindent}] % Every chapter body text starts with a drop cap: \defineinitial[normal][n=3D3,m=3D1,hoffset=3D\measure{CAindent},state=3Dst= art] \starttext \setinitial[normal] S {\bf{\kap uppose we}} have a system for the = approval of loans. \input knuth \stoptext = %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%= %%%%%% The =E2=80=98uppose we=E2=80=99 should not be indented more than the = lines directly below. I=E2=80=99ve tried everything, e.g. trying some = sort of noindent but so far without success. Setting indenting to =E2=80=98next', for = instance, increases the indenting of that first line after the initial. I=E2=80=99ve found the solution, though: = %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%= %%%%%% \definemeasure[CAindent][12pt] \setupindenting[yes,\measure{CAindent}] \setupinitial[n=3D3,m=3D1] \starttext \setupindenting[next] \placeinitial S {\bf{\kap uppose we}} have a system for the approval of loans. \input knuth \stoptext = %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%= %%%%%% What was required is an explicit \setupindenting[next] before the = \placeinitial. After that, the standard setting without tweaking work. G >=20 >=20 >=20 >=20 > = __________________________________________________________________________= _________ > If your question is of interest to others as well, please add an entry = to the Wiki! >=20 > 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 > = __________________________________________________________________________= _________ --Apple-Mail=_B1EEAD63-5E7D-44CD-A811-DC5F6CBA2DCC Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
On = 21 Jul 2021, at 22:38, Nicola <nvitacolonna@gmail.com> wrote:

On 2021-07-21, Gerben Wierda = <gerben.wierda@rna.nl> wrote:
On 19 Jul 2021, at = 09:56, Nicola <nvitacolonna@gmail.com> wrote:

On 2021-07-18, Gerben Wierda <gerben.wierda@rna.nl> wrote:
PS. switching \kap and \bf has an interesting = result, the first
character of the words is not in bold. = This did not happen with
lettrine in mkii

I do not have an answer to your = question, but I'd like to point out that
you can keep = using lettrine with ConTeXt LMTX, if you wish. You just
need= to add the modules manually, currently:

  https://wiki.contextgarden.net/Modules#ConTeXt_LMTX

I=E2=80=99ve tried this. = Installed the modules and then I get with

I was sure that I had used = lettrine with MKIV in a document of mine, but
after your reply I double = checked that and, in fact, I was using
lettrine only with MKII. On the plus side, I have recovered = my settings
for MKIV = (which work with LMTX as well).

I think that the `distance` parameter of \setupinitials does = what you
want. = Besides, if your font provides real small capitals, you may = use
\definefirstline.

This is how I set up things in one of my documents:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%= %%%%%%%%%%%%%%%%%
\definefontfeature[default][default][protrusion=3Dquality,expan= sion=3Dquality,onum=3Dno,lnum=3Dyes]

% \definefirstline below requires a font that implements = small capitals as
% a feature (Latin Modern does not). I have used = this:
% = \definefontfamily[mainfont][serif][Sorts Mill Goudy] [
%   tf=3Dname:Sorts = Mill Goudy Regular,
%   it=3Dname:Sorts Mill Goudy Italic,
% ]
% If you don't have the font = above, try this:
\setupbodyfont[heros]

\setupbodyfont[mainfont,11pt]

\definemeasure[CAindent][12pt]
\setupindenting[yes,\measure{CAindent}]

% Every chapter body text starts = with a drop cap:
\defineinitial[normal][
 n=3D3,
 m=3D1,
 distance=3D18pt, %%%%%%%%% <=3D=3D Add this = %%%%%%%%
 state=3Dstart
]

% Special = case: drop cap starting with a quote
\defineinitial[quote][
 n=3D3,
 m=3D2,
 distance=3D13pt,
 hoffset=3D5pt, % Move drop cap a bit to the = left
 method=3Dnone
]

% Some = initials may need special adjustments, depending on the font
\defineinitial[Q][
 voffset=3D2\lineheight,
 n=3D3,
 m=3D1,
 distance=3D18pt,
 state=3Dstart
]

% Full first = line in small caps
\definefirstline[smallcapsfirstline][
 alternative=3Dline, style=3Dsmallcaps,]

% First n words in small caps (three in this case)
\definefirstline[smallcapsfirstlinethree][
 alternative=3Dword, n=3D3,
 style=3Dsmallcaps,]

\starttext
\setfirstline[smallcapsfirstlinethree]
\setinitial[normal] Suppose we = have a system for the approval of
loans. \input knuth
\blank[2*big]

\setfirstline[smallcapsfirstline]
\setinitial[quote] =E2=80=9CSuppos= e we have a system for the approval of
loans.=E2=80=9D \input knuth
\blank[2*big]

\setfirstline[smallcapsfirstline]
\setinitial[Q] Quo usque tandem = abutere, Catilina, patientia nostra? quam diu
etiam furor iste tuus nos1 = eludet? quem ad finem sese effrenata iactabit
audacia?

\stoptext
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%= %%%%%%%%%%%%%%%%%

I hope this will give you some ideas!

References:

   https://wiki.contextgarden.net/Command/setupinitial
   https://wiki.contextgarden.net/Command/definefirstline
   https://www.fontsquirrel.com/fonts/Sorts-Mill-Goudy

Nicola

Hi = Nicola,

Thanks. This solves the = indentation of the initial itself. What remains is the indentation of = the text immediately after, e.g. the 'uppose we=E2=80=99. Minimum = example (also visible in your example):

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%= %%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This combination of indenting and = initial does not work properly, the text following the initial should be = unindented
\definemeasure[CAindent][12pt]
\setupindenting[yes,\measure{CAindent}]
% Every = chapter body text starts with a drop cap:

\defineinitial[normal][n=3D3,m=3D1,hoffset=3D\measure{CAindent}= ,state=3Dstart]

\starttext
\setinitial[normal] S {\bf{\kap uppose we}} have a system for = the approval of
loans. \input knuth
\stoptext
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%= %%%%%%%%%%%%%%%%%

The =E2=80=98uppose we=E2=80=99 should not be = indented more than the lines directly below. I=E2=80=99ve tried = everything, e.g. trying some sort of noindent
 but so far = without success. Setting indenting to =E2=80=98next', for instance, increases the indenting of that first line after the = initial.

I=E2=80=99ve found the = solution, though:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%= %%%%%%%%%%%%%%%%%
\definemeasure[CAindent][12pt]
\setupindenting[yes,\measure{CAindent}]
\setupinitial[n=3D3,m=3D1]

\starttext
\setupindenting[next]
\placeinitial S {\bf{\kap uppose we}} have a system for the = approval of
loans. \input knuth
\stoptext
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%= %%%%%%%%%%%%%%%%%

What was required = is an explicit \setupindenting[next] before the = \placeinitial. After that, the standard setting without tweaking = work.

G





_______________________________________________________________= ____________________
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
_______________________________________________________________= ____________________

= --Apple-Mail=_B1EEAD63-5E7D-44CD-A811-DC5F6CBA2DCC-- --===============2693563286086810832== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============2693563286086810832==--