From: Hans Hagen <pragma@wxs.nl>
To: Pavneet Arora <pavneet_arora@waroc.com>,
mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Inline stacking of text
Date: Mon, 13 Mar 2017 00:27:45 +0100 [thread overview]
Message-ID: <15eb984a-ce88-d822-e54b-ea966b2d5f19@wxs.nl> (raw)
In-Reply-To: <20170311155213.GA24509@lahore>
On 3/11/2017 4:52 PM, Pavneet Arora wrote:
> Really simple problem that has had me bashing my head for a while, so I
> thought that I would reach out and ask for help:
>
> I need to create large type title/sub-title combinations in-line. I
> need the sub-titles to be stacked so that they share the same baseline
> as the title. Unfortunately, I cannot seem to get the baseline
> alignment to work.
>
> Also, I seem to have to add the '\setupwhitespace[-1.0em] to squish the
> lines together. Is there a better way?
>
> Appreciate any guidance.
>
> advTHANKSance.
>
> MWE--8<----
>
> \setuppapersize[letter,portrait]
>
> \definefontfamily[mainface][rm][Latin Modern]
> \definefontfamily[mainface][ss][Latin Sans]
> \definefontfamily[mainface][mm][Latin Modern Math]
> \setupbodyfont[mainface,80pt]
>
> \setupinterlinespace[line=2.2ex]
> \setupwhitespace[none]
>
> \starttext
> \definedfont[Sans at 50pt]{TITLE---}%
> \framed[frame=off,location=middle,align=flushleft]{%
> \definedfont[Sans at 25pt]\setupinterlinespace\setupwhitespace[-1.0em]{SUB-TITLE\\ SUB-TITLE}}%
> \stoptext
>
> ----->8----
\starttext
\start
\definefont[whatever][Sans at 50pt]
\dontleavehmode\inframed
[foregroundstyle=whatever,
frame=off,
location=middle,
align=flushleft]
{TITLE---}%
\dontleavehmode\inframed
[foregroundstyle=whatever,
frame=off,
location=middle,
align=flushleft]
{\definedfont[Sans at 25pt] SUB-TITLE}%
\stopoverlay}
\stoptext
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2017-03-12 23:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-11 15:52 Pavneet Arora
2017-03-12 23:27 ` Hans Hagen [this message]
2017-04-14 10:16 ` Meer, Hans van der
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=15eb984a-ce88-d822-e54b-ea966b2d5f19@wxs.nl \
--to=pragma@wxs.nl \
--cc=ntg-context@ntg.nl \
--cc=pavneet_arora@waroc.com \
/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).