* Inline stacking of text
@ 2017-03-11 15:52 Pavneet Arora
2017-03-12 23:27 ` Hans Hagen
0 siblings, 1 reply; 3+ messages in thread
From: Pavneet Arora @ 2017-03-11 15:52 UTC (permalink / raw)
To: ConTeXt Mailing List
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----
--
Pavneet Arora m: +1 (647) 406-6843
Waroc Informatik t: +1 (416) 937-9276
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Inline stacking of text
2017-03-11 15:52 Inline stacking of text Pavneet Arora
@ 2017-03-12 23:27 ` Hans Hagen
2017-04-14 10:16 ` Meer, Hans van der
0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2017-03-12 23:27 UTC (permalink / raw)
To: Pavneet Arora, mailing list for ConTeXt users
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Inline stacking of text
2017-03-12 23:27 ` Hans Hagen
@ 2017-04-14 10:16 ` Meer, Hans van der
0 siblings, 0 replies; 3+ messages in thread
From: Meer, Hans van der @ 2017-04-14 10:16 UTC (permalink / raw)
To: NTG ConTeXt
[-- Attachment #1.1: Type: text/plain, Size: 871 bytes --]
The following was in answer to 3/11/2017 4:52 PM, Pavneet Arora:
On 13 Mar 2017, at 00:27, Hans Hagen <pragma@wxs.nl<mailto:pragma@wxs.nl>> wrote:
\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
A question about this code. The final } is equivalent to \stop and closes to \start at the beginning.
But I canot see the \stopoverlay matching a \startoverlay, as I would have expected.
What am I missing here?
Hans van der Meer
[-- Attachment #1.2: Type: text/html, Size: 13313 bytes --]
[-- Attachment #2: Type: text/plain, Size: 492 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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-04-14 10:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-11 15:52 Inline stacking of text Pavneet Arora
2017-03-12 23:27 ` Hans Hagen
2017-04-14 10:16 ` Meer, Hans van der
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).