From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: How to typeset a line as if it had zero height
Date: Wed, 03 Aug 2016 16:11:03 +0200 [thread overview]
Message-ID: <57A1FB77.2020302@gmail.com> (raw)
In-Reply-To: <51980bcd-b44a-a821-4c54-ca4277e2add5@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 777 bytes --]
> Henri Menke <mailto:henrimenke@gmail.com>
> 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
[-- Attachment #1.2: Type: text/html, Size: 1869 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2016-08-03 14:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-02 20:16 Joseph Canedo
2016-08-02 21:40 ` Henri Menke
2016-08-03 14:11 ` Wolfgang Schuster [this message]
[not found] ` <57a24a76.47cbc20a.13c7.3dde@mx.google.com>
2016-08-04 4:56 ` Wolfgang Schuster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57A1FB77.2020302@gmail.com \
--to=schuster.wolfgang@gmail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).