From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/62295 Path: news.gmane.org!not-for-mail From: Talal Al-Azem Newsgroups: gmane.comp.tex.context Subject: Re: placing a paragraph with non-standard interlinear spacing onto the grid Date: Sun, 3 Oct 2010 20:14:04 +0100 Message-ID: <2EC34801-80B5-4F78-8998-F04B6C6BE415@fastmail.fm> References: <7C6E1236-E2D7-417B-8A0B-53FD8B45E4D7@fastmail.fm> <901A8F2F-3461-405C-9A24-568A5C458235@alazem.org> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: multipart/mixed; boundary="===============1969326602==" X-Trace: dough.gmane.org 1286133273 7528 80.91.229.12 (3 Oct 2010 19:14:33 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 3 Oct 2010 19:14:33 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Sun Oct 03 21:14:31 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P2U0y-0002NQ-B9 for gctc-ntg-context-518@m.gmane.org; Sun, 03 Oct 2010 21:14:28 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id EFC77CA733; Sun, 3 Oct 2010 21:14:25 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 8SHEjLLxYgv1; Sun, 3 Oct 2010 21:14:22 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id CF5E4CA729; Sun, 3 Oct 2010 21:14:22 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D0758CA729 for ; Sun, 3 Oct 2010 21:14:20 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id TTTMylgXs747 for ; Sun, 3 Oct 2010 21:14:08 +0200 (CEST) Original-Received: from filter4-til.mf.surf.net (filter4-til.mf.surf.net [194.171.167.220]) by balder.ntg.nl (Postfix) with ESMTP id B1CE9CA723 for ; Sun, 3 Oct 2010 21:14:08 +0200 (CEST) Original-Received: from cambridge.eukhosting.net (cambridge.eukhosting.net [92.48.108.230]) by filter4-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id o93JE7fw014409 for ; Sun, 3 Oct 2010 21:14:07 +0200 Original-Received: from alazem.seh.ox.ac.uk ([163.1.175.247]:35641 helo=[10.0.1.5]) by cambridge.eukhosting.net with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69) (envelope-from ) id 1P2U15-00058w-EW for ntg-context@ntg.nl; Sun, 03 Oct 2010 20:14:35 +0100 In-Reply-To: <901A8F2F-3461-405C-9A24-568A5C458235@alazem.org> X-Mailer: Apple Mail (2.1081) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cambridge.eukhosting.net X-AntiAbuse: Original Domain - ntg.nl X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - fastmail.fm X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=92.48.108.230; country=GB; region=P9; city=Maidenhead; latitude=51.5167; longitude=-0.7000; http://maps.google.com/maps?q=51.5167,-0.7000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 05Deje7Gr - ac4e65ad87fa - 20101003 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.220 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:62295 Archived-At: --===============1969326602== Content-Type: multipart/alternative; boundary=Apple-Mail-3-735882768 --Apple-Mail-3-735882768 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 Dear all, By way of further definition and clarification of the issue: back in the = world of LaTeX, I was kindly given the following code on CTT by Donald = Arseneau to produce the desired effect. Mind you, it was only meant to = work with a paragraph if the entire paragraph was on one page; it = wouldn't work if split across pages: %%% Donald Arseneau=92s Gridblock Environment %%% % For placing paragraphs into a box, and that box then % being placed on a =93grid=94 of the baselineskip. This ensures % that following paragraphs are also on the grid. \makeatletter \@ifundefined{@tempdimc}{\newdimen\@tempdimc}{}=20 \newenvironment{gridblock}{\par=20 \setbox\@tempboxa\vtop\bgroup=20 }{\par\egroup=20 % measurements of top=20 \@tempdima=3D\ht\@tempboxa=20 \@tempdimc=3D\dp\@tempboxa=20 \ifdim\@tempdima>\ht\strutbox=20 \advance\@tempdimc\@tempdima=20 \@tempdima=3D\ht\strutbox=20 \advance\@tempdimc-\@tempdima=20 \fi=20 % measurements of bottom=20 \setbox\@tempboxa\vbox{\unvbox\@tempboxa}%=20 \ifdim\dp\@tempboxa>\dp\strutbox=20 \@tempdimb=3D\dp\strutbox=20 \else=20 \@tempdimb=3D\dp\@tempboxa=20 \fi=20 \advance\@tempdimc-\@tempdimb=20 \@tempcnta=3D\@tempdimc=20 \divide\@tempcnta\baselineskip=20 \advance\@tempdimc -\@tempcnta\baselineskip=20 \ifdim\@tempdimc >2\vfuzz \advance\@tempdimc-\baselineskip \fi=20 \divide\@tempdimc\tw@=20 \vbox to\@tempdima{}%=20 \nobreak \nointerlineskip \kern-\@tempdima \kern-\@tempdimc \nobreak=20= \box\@tempboxa=20 \nobreak \nointerlineskip \kern-\@tempdimb \kern-\@tempdimc \nobreak=20= \hbox{\vrule height \z@ width \z@ depth \@tempdimb}%=20 }=20 \makeatother Seeing how systematised ConTeXt is, I'm assuming something much simpler = could probably be used to achieve the same effect? Kind regards, Talal On 3 Oct 2010, at 20:10, Talal Al-Azem wrote: > By way of further definition and clarification of the issue: back in = the world of LaTeX, I was kindly given the following code on CTT by = Donald Arseneau to produce the desired effect. Mind you, it was only = meant to work with a paragraph if the entire paragraph was on one page; = it wouldn't work if split across pages: >=20 > %%% Donald Arseneau=92s Gridblock Environment %%% > % For placing paragraphs into a box, and that box then > % being placed on a =93grid=94 of the baselineskip. This ensures > % that following paragraphs are also on the grid. > \makeatletter > \@ifundefined{@tempdimc}{\newdimen\@tempdimc}{}=20 > \newenvironment{gridblock}{\par=20 > \setbox\@tempboxa\vtop\bgroup=20 > }{\par\egroup=20 > % measurements of top=20 > \@tempdima=3D\ht\@tempboxa=20 > \@tempdimc=3D\dp\@tempboxa=20 > \ifdim\@tempdima>\ht\strutbox=20 > \advance\@tempdimc\@tempdima=20 > \@tempdima=3D\ht\strutbox=20 > \advance\@tempdimc-\@tempdima=20 > \fi=20 > % measurements of bottom=20 > \setbox\@tempboxa\vbox{\unvbox\@tempboxa}%=20 > \ifdim\dp\@tempboxa>\dp\strutbox=20 > \@tempdimb=3D\dp\strutbox=20 > \else=20 > \@tempdimb=3D\dp\@tempboxa=20 > \fi=20 > \advance\@tempdimc-\@tempdimb=20 > \@tempcnta=3D\@tempdimc=20 > \divide\@tempcnta\baselineskip=20 > \advance\@tempdimc -\@tempcnta\baselineskip=20 > \ifdim\@tempdimc >2\vfuzz \advance\@tempdimc-\baselineskip \fi=20 > \divide\@tempdimc\tw@=20 > \vbox to\@tempdima{}%=20 > \nobreak \nointerlineskip \kern-\@tempdima \kern-\@tempdimc \nobreak=20= > \box\@tempboxa=20 > \nobreak \nointerlineskip \kern-\@tempdimb \kern-\@tempdimc \nobreak=20= > \hbox{\vrule height \z@ width \z@ depth \@tempdimb}%=20 > }=20 > \makeatother >=20 >=20 > Seeing how systematised ConTeXt is, I'm assuming something much = simpler could probably be used to achieve the same effect? >=20 > Kind regards, > Talal >=20 >=20 > On 2 Oct 2010, at 23:23, Talal Al-Azem wrote: >=20 >> Dear all, >>=20 >> This is important for anyone working with mixed language (font) = texts. In my example, the overall document is Latin-based (e.g. = English), with a paragraph of Arabic text; I want this Arabic paragraph = as a whole to fit onto the grid (though obviously the individual Arabic = lines of the paragraph would not). >>=20 >> Currently, when I typeset an English paragraph, followed by an Arabic = paragraph, followed by an English paragraph, the second English = paragraph is no longer on the grid, having been throw off by the Arabic = one. I'm looking for some way to automatically calculate and fill in the = vspace needed for this. >>=20 >> This is not the same as the issue of an Arabic word or phrase (or = mathematic formula) being typeset in the midst of Latin text, as = discussed http://www.mail-archive.com/ntg-context@ntg.nl/msg46163.html. = Having read a few other matters on the mailing list (largely involving = Idris and Hans), I'm sure it's possible, but I can't figure it out. >>=20 >> Any help would be most appreciated. >>=20 >> Kind regards, >> Talal >=20 --Apple-Mail-3-735882768 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252
By way of further definition = and clarification of the issue: back in the world of LaTeX, I was kindly = given the following code on CTT by Donald Arseneau to produce the = desired effect. Mind you, it was only meant to work with a paragraph if = the entire paragraph was on one page; it wouldn't work if split across = pages:

%%% Donald Arseneau=92s Gridblock = Environment %%%
% For placing paragraphs into a box, and that = box then
% being placed on a =93grid=94 of the baselineskip. = This ensures
% that following paragraphs are also on the = grid.
\makeatletter
\@ifundefined{@tempdimc}{\newdimen= \@tempdimc}{} 
\newenvironment{gridblock}{\par 
<= div>  \setbox\@tempboxa\vtop\bgroup 
}{\par\egrou= p 
  % measurements of = top 
  \@tempdima=3D\ht\@tempboxa 
  \@tempdimc=3D\dp\@tempboxa 
  \ifdim= \@tempdima>\ht\strutbox 
   =  \advance\@tempdimc\@tempdima 
   =  \@tempdima=3D\ht\strutbox 
   =  \advance\@tempdimc-\@tempdima 
  \fi <= /div>
  % measurements of = bottom 
  \setbox\@tempboxa\vbox{\unvbox\@tempbox= a}% 
  \ifdim\dp\@tempboxa>\dp\strutbox <= /div>
   =  \@tempdimb=3D\dp\strutbox 
  \else 
   =  \@tempdimb=3D\dp\@tempboxa 
  \fi 
 \advance\@tempdimc-\@tempdimb 
  \@t= empcnta=3D\@tempdimc 
  \divide\@tempcnta\baselin= eskip 
  \advance\@tempdimc = -\@tempcnta\baselineskip 
  \ifdim\@tempdimc = >2\vfuzz \advance\@tempdimc-\baselineskip = \fi 
  \divide\@tempdimc\tw@ 
&nbs= p; \vbox to\@tempdima{}% 
  \nobreak = \nointerlineskip \kern-\@tempdima \kern-\@tempdimc = \nobreak 
  \box\@tempboxa 
 =  \nobreak \nointerlineskip \kern-\@tempdimb \kern-\@tempdimc = \nobreak 
  \hbox{\vrule height \z@ width \z@ = depth = \@tempdimb}% 
\makeatother

=

Seeing how systematised ConTeXt is, I'm = assuming something much simpler could probably be used to achieve the = same effect?

Kind = regards,
Talal


On 2 Oct = 2010, at 23:23, Talal Al-Azem wrote:

Dear all,

This is = important for anyone working with mixed language (font) texts. In my = example,  the overall document is Latin-based (e.g. English), with = a paragraph of Arabic text; I want this Arabic paragraph as a whole to = fit onto the grid (though obviously the individual Arabic lines of the = paragraph would not).

Currently, when I typeset an English = paragraph, followed by an Arabic paragraph, followed by an English = paragraph, the second English paragraph is no longer on the grid, having = been throw off by the Arabic one. I'm looking for some way to = automatically calculate and fill in the vspace needed for = this.

This is not the same as the issue of an Arabic word or = phrase (or mathematic formula) being typeset in the midst of Latin text, = as discussed http= ://www.mail-archive.com/ntg-context@ntg.nl/msg46163.html. Having = read a few other matters on the mailing list (largely involving Idris = and Hans), I'm sure it's possible, but I can't figure it out.

Any = help would be most appreciated.

Kind = regards,
Talal


= --Apple-Mail-3-735882768-- --===============1969326602== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============1969326602==--