From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/111918 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Newsgroups: gmane.comp.tex.context Subject: First line of larger font paragraph on grid Date: Fri, 25 Jun 2021 10:30:29 +0000 Message-ID: <66c394dd7ff7484387dbe5d0cab8de5c@unibe.ch> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0645661736561408452==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13415"; mail-complaints-to="usenet@ciao.gmane.io" To: Original-X-From: ntg-context-bounces@ntg.nl Fri Jun 25 12:31:05 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 1lwj72-0003ID-Qt for gctc-ntg-context-518@m.gmane-mx.org; Fri, 25 Jun 2021 12:31:04 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 5D0AF2848DD; Fri, 25 Jun 2021 12:30:36 +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 ZU3fCEpFZ24a; Fri, 25 Jun 2021 12:30:34 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 19469284C2D; Fri, 25 Jun 2021 12:30:34 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 435092848DD for ; Fri, 25 Jun 2021 12:30:33 +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 saYWucUFWNaZ for ; Fri, 25 Jun 2021 12:30:31 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=130.92.0.83; helo=mailhub-lb2.unibe.ch; envelope-from=denis.maier@unibe.ch; receiver= Original-Received: from mailhub-lb2.unibe.ch (mailhub-lb2.unibe.ch [130.92.0.83]) (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 88981284C2F for ; Fri, 25 Jun 2021 12:30:31 +0200 (CEST) X-Virus-Scanned: By University of Bern - MGW Original-Received: from mail.campus.unibe.ch (aai-edge-01.campus.unibe.ch [130.92.13.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mailhub-lb2.unibe.ch (Postfix) with ESMTPS id 2FDFB5000C7 for ; Fri, 25 Jun 2021 12:30:30 +0200 (CEST) Thread-Topic: First line of larger font paragraph on grid Thread-Index: AddprLLy7Q9eFW+2SlaAaQDtP2ldDA== Accept-Language: de-CH, en-US Content-Language: de-DE x-originating-ip: [172.18.72.2] 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:111918 Archived-At: --===============0645661736561408452== Content-Language: de-DE Content-Type: multipart/alternative; boundary="_000_66c394dd7ff7484387dbe5d0cab8de5cunibech_" --_000_66c394dd7ff7484387dbe5d0cab8de5cunibech_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, I have some text in a larger font where the first line should be on the gri= d. Therefore, I've tried to adapt the solution from the wiki: https://wiki.= contextgarden.net/Grid_typesetting#Placing_titles_on_the_grid The interesting thing is that the section command indeed places the first l= ine on the grid, but using \framed directly does not give the desired resul= ts. I must be missing something obvious. Does anyone know a solution ? Thanks for your help, Denis =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D \setuplayout[grid=3Dyes] \showgrid \definefont [BigFont] [Bold at 20pt] [24pt] \unprotect \unexpanded\def\section_command#1#2{% \framed [ width=3D\textwidth, frame=3Doff, rulethickness=3D0pt, offset=3D0pt, loffset=3D-0pt, before=3D, location=3Dtop, align=3Dflushleft,]{#2}% } \setuphead [section] [ style=3D{\BigFont}, after=3D, before=3D{\blank[1*line]}, command=3D\section_command, ] \protect \defineframed[myframed][ width=3D\textwidth, frame=3Doff, rulethickness=3D0pt, offset=3D0pt, loffset=3D-0pt, before=3D, location=3Dtop, align=3Dflushleft,]] \starttext \blank[force,3*line,depth] \begingroup \BigFont \myframed{Lorem ipsum dolor sit amet consectetur adipisicing elit Lorem ips= um dolor sit amet consectetur adipisicing elit} \endgroup asdfasdf \page \blank[force,3*line,depth] \startsection [title=3DLorem ipsum dolor sit amet consectetur adipisicing e= lit Lorem ipsum dolor sit amet consectetur adipisicing elit] asdf \stopsection \stoptext =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --_000_66c394dd7ff7484387dbe5d0cab8de5cunibech_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi,

 

I have some text in a larger fo= nt where the first line should be on the grid. Therefore, I’ve tried to adapt the solution from the wiki: https://wiki.contextgarden.net/Grid_typesetting#Placing_titles_on_the_grid<= /a>

 

The interesting thing is that the section command in= deed places the first line on the grid, but using \framed directly does not= give the desired results.

 

I must be missing something obvious. Does anyone know a solution ?

 

Thanks for your help,

Denis

 

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

\setuplayout[grid=3Dyes]

\showgrid

 

\definefont  [BigFont]  [Bold at 20pt] [24= pt]

 

\unprotect

\unexpanded\def\section_command= #1#2{%

  \framed [

       width=3D\textwi= dth,

        &nbs= p;          frame=3Doff,=

        &nbs= p;          rulethickness=3D0pt,

        &nbs= p;          offset=3D0pt,

        &nbs= p;          loffset=3D-0pt,

       before=3D,=

       location=3Dtop,=

       align=3Dflushle= ft,]{#2}%

}

 

 

\setuphead [section] [

    style=3D{\BigFont},

    after=3D,

   before=3D{\blank[1= *line]},

  command=3D\section_comma= nd,

]

\protect

 

\defineframed[myframed][

        &nbs= p;          width=3D\textwidth,

        &nbs= p;          frame=3Doff,=

        &nbs= p;          rulethickness=3D0pt,

        &nbs= p;          offset=3D0pt,

        &nbs= p;          lo= ffset=3D-0pt,

     &= nbsp; before=3D,

     &= nbsp; location=3Dtop,

     &= nbsp; align=3Dflushleft,]]

        &nbs= p;         

\starttext

 

\blank[force,3*line,depth]

 

\begingroup

\BigFont

\myframed{Lorem ipsum dolor sit amet consectetur adi= pisicing elit Lorem ipsum dolor sit amet consectetur adipisicing elit}=

\endgroup

     &= nbsp;            

asdfasdf

 

\page

\blank[force,3*line,depth]=

 

\startsection [title=3DLorem ip= sum dolor sit amet consectetur adipisicing elit Lorem ipsum dolor sit amet = consectetur adipisicing elit]

      = asdf

\stopsection

 

\stoptext

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

 

 

 

--_000_66c394dd7ff7484387dbe5d0cab8de5cunibech_-- --===============0645661736561408452== 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== --===============0645661736561408452==--