Dear gang, We can use \struttedbox to force an eg, large expression to obey the surrounding interlinespace: ======================= {blah blah \struttedbox{\tfc blah blah}} blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah \struttedbox{\tfc blah blah}} blah blah blah blah blah blah ======================= but this has the drawback that the box cannot be broken across lines. Is there a way to force the interlinespace to remain constant and ignore the size of grouped insertions with big font sizes? Best wishes Idris -- Professor Idris Samawi Hamid, Editor-in-Chief International Journal of Shi`i Studies Department of Philosophy Colorado State University Fort Collins, CO 80523 -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Idris Samawi Hamid wrote:
Dear gang,
We can use \struttedbox to force an eg, large expression to obey the surrounding interlinespace:
======================= {blah blah \struttedbox{\tfc blah blah}} blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah \struttedbox{\tfc blah blah}} blah blah blah blah blah blah =======================
but this has the drawback that the box cannot be broken across lines. Is there a way to force the interlinespace to remain constant and ignore the size of grouped insertions with big font sizes?
\dontleavehmode \begstrut bla bla \endstrut \par ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Idris Samawi Hamid wrote:
Dear gang,
We can use \struttedbox to force an eg, large expression to obey the surrounding interlinespace:
======================= {blah blah \struttedbox{\tfc blah blah}} blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah \struttedbox{\tfc blah blah}} blah blah blah blah blah blah =======================
That was a bad example, just try it :-)
but this has the drawback that the box cannot be broken across lines. Is there a way to force the interlinespace to remain constant and ignore the size of grouped insertions with big font sizes?
Are you talking about a controlled environment here? In the general case, this can't be done. But if you have a chuck of well-controlled text, there is a trick: \lineskiplimit=-10000pt blaq blaq {\tfc blaq blaq} blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq {\tfc blaq blaq} blaq blaq blaq blaq blaq blaq Best wishes, Taco
On Thu, 27 Dec 2007 14:20:22 -0700
"Idris Samawi Hamid"
Dear gang,
We can use \struttedbox to force an eg, large expression to obey the surrounding interlinespace:
======================= {blah blah \struttedbox{\tfc blah blah}} blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah \struttedbox{\tfc blah blah}} blah blah blah blah blah blah =======================
but this has the drawback that the box cannot be broken across lines. Is there a way to force the interlinespace to remain constant and ignore the size of grouped insertions with big font sizes?
Best wishes Idris
\starttext %\lineskiplimit=0pt \lineskip=0pt blah blah {\tfc blah blah} blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah {\tfc blah blah} blah blah blah blah blah blah \stoptext Is this what you want? Wolfgang
On Fri, 28 Dec 2007 01:28:23 -0700, Hans Hagen
\dontleavehmode \begstrut bla bla \endstrut \par
On Fri, 28 Dec 2007 01:40:50 -0700, Taco Hoekwater
That was a bad example, just try it :-)
Ok, better example attached :-)
But if you have a chuck of well-controlled text, there is a trick:
\lineskiplimit=-10000pt blaq blaq {\tfc blaq blaq} blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq {\tfc blaq blaq} blaq blaq blaq blaq blaq blaq
On Fri, 28 Dec 2007 01:41:35 -0700, Wolfgang Schuster
%\lineskiplimit=0pt \lineskip=0pt
blah blah {\tfc blah blah} blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah {\tfc blah blah} blah blah blah blah blah blah
I have attached a file and pdf that illustrate all four scenarios; none of the above solutions seems to work, but maybe I need to tinker with the def's in test-strut.tex. For my purposes Hans' approach is the most useful (if we can make it work) because otherwise it makes me have to do more copy-editing of paragraphs and I might miss some (based on Taco's observation it is probably not wise to make this global). Best wishes Idris -- Professor Idris Samawi Hamid, Editor-in-Chief International Journal of Shi`i Studies Department of Philosophy Colorado State University Fort Collins, CO 80523 -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Idris Samawi Hamid wrote:
On Fri, 28 Dec 2007 01:28:23 -0700, Hans Hagen
wrote: \dontleavehmode \begstrut bla bla \endstrut \par
On Fri, 28 Dec 2007 01:40:50 -0700, Taco Hoekwater
wrote: That was a bad example, just try it :-)
Ok, better example attached :-)
There should be a \par or empty line before those \stop commands, otherwise none of the paragraph-based tricks work. Best wishes, Taco
On Fri, 28 Dec 2007 09:07:39 -0700, Taco Hoekwater
There should be a \par or empty line before those \stop commands, otherwise none of the paragraph-based tricks work.
Ok, yours works now, but not Wolfgang's or Hans'. Wolfgang's is essentially the same idea as yours so that's fine but if we could just get the Hans approach to work... Best wishes Idris -- Professor Idris Samawi Hamid, Editor-in-Chief International Journal of Shi`i Studies Department of Philosophy Colorado State University Fort Collins, CO 80523 -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Idris Samawi Hamid wrote:
On Fri, 28 Dec 2007 09:07:39 -0700, Taco Hoekwater
wrote: There should be a \par or empty line before those \stop commands, otherwise none of the paragraph-based tricks work.
Ok, yours works now, but not Wolfgang's or Hans'. Wolfgang's is essentially the same idea as yours so that's fine but if we could just get the Hans approach to work...
\unexpanded\def\Idrisized#1% {\begingroup \let\processword\struttedbox \processwords{#1}% \endgroup} blaq blaq blaq blaq blaq blaq blaq blaq \Idrisized{\tfc blaq blaq blaq blaq blaq blaq} blaq blaq blaq blaq \Idrisized{\tfc blaq blaq} blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Fri, 28 Dec 2007 09:39:56 -0700, Hans Hagen
\unexpanded\def\Idrisized#1% {\begingroup \let\processword\struttedbox \processwords{#1}% \endgroup} blaq blaq blaq blaq blaq blaq blaq blaq \Idrisized{\tfc blaq blaq blaq blaq blaq blaq} blaq blaq blaq blaq \Idrisized{\tfc blaq blaq} blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq
Thank you a million, Hans! And thank you, Taco and Wolfgang, for enriching my bag of tricks. You are all the best! Best wishes Idris -- Professor Idris Samawi Hamid, Editor-in-Chief International Journal of Shi`i Studies Department of Philosophy Colorado State University Fort Collins, CO 80523 -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
On Fri, 28 Dec 2007 09:39:56 -0700, Hans Hagen
\unexpanded\def\Idrisized#1% {\begingroup \let\processword\struttedbox \processwords{#1}% \endgroup} blaq blaq blaq blaq blaq blaq blaq blaq \Idrisized{\tfc blaq blaq blaq blaq blaq blaq} blaq blaq blaq blaq \Idrisized{\tfc blaq blaq} blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq
Hmm, there is a bug, unfortunately: Only the first word in #1 is processed, the rest are ignored. Adding grouping causes the argument to be treated as a box and the desired effect is lost. (pdf attached). Best Idris ===================================== % engine=luatex \starttext \start \unexpanded\def\Idrisized#1% {\begingroup \let\processword\struttedbox \processwords{#1}% \endgroup} blaq blaq blaq blaq blaq blaq blaq blaq \Idrisized{\tfc blaq blaq blaq blaq blaq blaq} blaq blaq blaq blaq \Idrisized{\tfc blaq blaq} blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq \blank blaq blaq blaq blaq blaq blaq blaq blaq \Idrisized{{\tfc blaq blaq blaq blaq blaq blaq}} blaq blaq blaq blaq \Idrisized{{\tfc blaq blaq}} blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq \stop \stoptext ===================================== -- Professor Idris Samawi Hamid, Editor-in-Chief International Journal of Shi`i Studies Department of Philosophy Colorado State University Fort Collins, CO 80523 -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Idris Samawi Hamid wrote:
On Fri, 28 Dec 2007 09:39:56 -0700, Hans Hagen
wrote: \unexpanded\def\Idrisized#1% {\begingroup \let\processword\struttedbox \processwords{#1}% \endgroup} blaq blaq blaq blaq blaq blaq blaq blaq \Idrisized{\tfc blaq blaq blaq blaq blaq blaq} blaq blaq blaq blaq \Idrisized{\tfc blaq blaq} blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq
Hmm, there is a bug, unfortunately: Only the first word in #1 is processed, the rest are ignored. Adding grouping causes the argument to be treated as a box and the desired effect is lost. (pdf attached).
\unexpanded\def\Idrisized#1#2% {\begingroup#1% \let\processword\struttedbox \processwords{#2}% \endgroup} blaq blaq blaq blaq blaq blaq blaq blaq \Idrisized\tfb{blaq blaq blaq blaq blaq blaq} blaq blaq blaq blaq \Idrisized\tfb{blaq blaq} blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq
Best Idris
===================================== % engine=luatex
\starttext
\start
\unexpanded\def\Idrisized#1% {\begingroup \let\processword\struttedbox \processwords{#1}% \endgroup}
blaq blaq blaq blaq blaq blaq blaq blaq \Idrisized{\tfc blaq blaq blaq blaq blaq blaq} blaq blaq blaq blaq \Idrisized{\tfc blaq blaq} blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq
\blank
blaq blaq blaq blaq blaq blaq blaq blaq \Idrisized{{\tfc blaq blaq blaq blaq blaq blaq}} blaq blaq blaq blaq \Idrisized{{\tfc blaq blaq}} blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq blaq
\stop
\stoptext =====================================
------------------------------------------------------------------------
___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
-- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Fri, 28 Dec 2007 13:34:00 -0700, Hans Hagen
\unexpanded\def\Idrisized#1#2% {\begingroup#1% \let\processword\struttedbox \processwords{#2}% \endgroup}
Ok, thanks a lot! Best Idris -- Professor Idris Samawi Hamid, Editor-in-Chief International Journal of Shi`i Studies Department of Philosophy Colorado State University Fort Collins, CO 80523 -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
participants (4)
-
Hans Hagen
-
Idris Samawi Hamid
-
Taco Hoekwater
-
Wolfgang Schuster