From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/95665 Path: news.gmane.org!.POSTED!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: How to typeset a line as if it had zero height Date: Wed, 03 Aug 2016 16:11:03 +0200 Message-ID: <57A1FB77.2020302@gmail.com> References: <57a0ff86.c310c20a.42ec2.6f7d@mx.google.com> <51980bcd-b44a-a821-4c54-ca4277e2add5@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8916278590947966669==" X-Trace: blaine.gmane.org 1470233545 6643 195.159.176.226 (3 Aug 2016 14:12:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 3 Aug 2016 14:12:25 +0000 (UTC) User-Agent: Postbox 4.0.8 (Macintosh/20151105) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Aug 03 16:12:19 2016 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bUwtl-0000hM-M2 for gctc-ntg-context-518@m.gmane.org; Wed, 03 Aug 2016 16:11:53 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 4A2A314161; Wed, 3 Aug 2016 16:11:20 +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 Nyq9lqlWHLx3; Wed, 3 Aug 2016 16:11:18 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 9802414168; Wed, 3 Aug 2016 16:11:18 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id C303914161 for ; Wed, 3 Aug 2016 16:11:17 +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 sTDcHG6krEr6 for ; Wed, 3 Aug 2016 16:11:17 +0200 (CEST) Original-Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 0A4D314150 for ; Wed, 3 Aug 2016 16:11:06 +0200 (CEST) Original-Received: by mail-wm0-f41.google.com with SMTP id f65so449683905wmi.0 for ; Wed, 03 Aug 2016 07:11:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to; bh=pBMBChFWqyEdU9FTzKJvZxKDfdJ8LklS19012r22WYk=; b=wMGxs5k+VysXqlKIiHms/tJMrDAFQg4BRl5r75+67mQLtxAM99w3taSS7lou9NyV24 Cnckf13PlKFJQIJCq9OiQz5hQW3oDdPehD2pA/qvueTaqURs0ftIB1MU+oI89CUE0s0x JktL5i7Mh5jJDFswGXUwj9u+wX8f/dAUVPr5fSZLXZu1wWnbA+RMZdX3GJqazXziCaG6 VMPR3ZrQekaIlfUKmjKWXjYLo6fYXYaiN0ZmW2bCxVT2yNuNeKA0h1J8ahk8Ol8cnAWP qBi5P310EYJPCfd8Vhk3oeWzNOKQnOYx9vSaCGlrLPbKu+8T2oWCuYn6cRxiHcoKTthS pkTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to; bh=pBMBChFWqyEdU9FTzKJvZxKDfdJ8LklS19012r22WYk=; b=diCSF/YC+ttZGxKscKTDpWhwuPlTkrLeJO32c6Afvte6MHkrDVwm6mbuDXJNt6KRrP r/RVm4ikPvZscLbH7vTpUUdVasuAPornitRcDpFF/D3/WuyLkZ/dmxJ9ifMcqCqsDDbK qw9/8wtqn/DfxnN02Rsf28HzR3TkevDSSts0btyLtXqbfoEF8+ke34c8pmt9jtOXXycR ia4btXUtBUr/D+Cu2bPR8cxxU5zkpranOX91PR+KAKPLL8PsKindp6CyVLgPchnNVW+1 /INr7y8exP1xVYyKZzfxvKcfsl9DJN4fKmpJ0GpUCEANaGDhXtif7PsWBKl0HdS0m8DZ Ls1g== X-Gm-Message-State: AEkooutXzZLTpTtAQm1/Bs42oeqnAOv/CD8VC2XoV0cQsdXl3PbHGFgtfXoyLgF5kVICCw== X-Received: by 10.194.123.228 with SMTP id md4mr58471287wjb.91.1470233466472; Wed, 03 Aug 2016 07:11:06 -0700 (PDT) Original-Received: from keima.localdomain (x2f2cc92.dyn.telefonica.de. [2.242.204.146]) by smtp.gmail.com with ESMTPSA id o4sm7953940wjd.15.2016.08.03.07.11.05 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 03 Aug 2016 07:11:05 -0700 (PDT) In-Reply-To: <51980bcd-b44a-a821-4c54-ca4277e2add5@gmail.com> X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 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.org gmane.comp.tex.context:95665 Archived-At: This is a multi-part message in MIME format. --===============8916278590947966669== Content-Type: multipart/alternative; boundary="------------080909000107080906050406" This is a multi-part message in MIME format. --------------080909000107080906050406 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit > Henri Menke > 2. August 2016 um 23:40 > Joseph, > > I have come up with this very plain TeXy solution. > > Cheers, Henri > > --- > > \starttext > > \startsection[title=Section] > > \dontleavehmode% manually start a paragraph (smash does not) > \smash{% remove height > \rlap{% remove width > \raise \baselineskip \hbox to \textwidth{% shift one line back > \rightaligned{Line}% typset right aligned > }% > }% > }% > \input knuth > > \stopsection > > \stoptext You can use \offset to shift the text to a different position. \define[1]\MoveText {\dontleavehmode\offset[width=0pt,height=0pt,y=-\lineheight]{\rightaligned{#1}}\GotoPar} \starttext \startsection[title=Section] \MoveText{Line} \input knuth \stopsection \stoptext Wolfgang --------------080909000107080906050406 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
2. August 2016 um 23:40
Joseph,

I have come up with this very plain TeXy solution.

Cheers, Henri

---

\starttext

\startsection[title=Section]

\dontleavehmode% manually start a paragraph (smash does not)
\smash{% remove height
\rlap{% remove width
\raise \baselineskip \hbox to \textwidth{% shift one line back
\rightaligned{Line}% typset right aligned
}%
}%
}%
\input knuth

\stopsection

\stoptext
You can use \offset to shift the text to a different position.

\define[1]\MoveText
  {\dontleavehmode\offset[width=0pt,height=0pt,y=-\lineheight]{\rightaligned{#1}}\GotoPar}

\starttext

\startsection[title=Section]

\MoveText{Line}

\input knuth

\stopsection

\stoptext

Wolfgang
--------------080909000107080906050406-- --===============8916278590947966669== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============8916278590947966669==--