2

I have a document like this:

\starttext
    \definepapersize[card][height=8.5in,width=11in]
    \setuppapersize[card][letter, landscape]
    \definemakeup[jeopardy][align=middle,headerstate=start]
\startmakeup[jeopardy]    
    Text
\stopmakeup
\startmakeup[jeopardy]    
    More text
\stopmakeup
\startmakeup[jeopardy]    
    This has a whole paragraph. There is some more writing. This has lots.
\stopmakeup

\stopttext

How can I make the text to expand to fill the available space, not including the page margins? E.g. page one with "Text" might expand 2000% to fill the page, but "More text" is larger, so it expands to 1560%. The last page has a whole paragraph, so maybe only expands 550% to fill that text to the maximum size.

Village
  • 13,603
  • 23
  • 116
  • 219
  • 1
    See also https://tex.stackexchange.com/questions/366619/adjust-font-size-to-fit-long-words-in-vbox/366689#366689 – Henri Menke Jun 11 '20 at 22:09

1 Answers1

5

Use \scale[width=\textwidth]{text to be inserted}. More details in the Wiki:

https://wiki.contextgarden.net/Command/scale

Btw your example has a typo in \stoptext

EDIT

If you want line breaks, use a \framed inside \scale

\scale[width=\textwidth]{\framed[frame=off,offset=0cm,align=middle,location=middle] {Text \\ to \\ break}}

I've added some line to your MWE so you can see it working.

\starttext
    \definepapersize[card][height=8.5in,width=11in]
    \setuppapersize[card][letter, landscape]
    \definemakeup[jeopardy][align=middle,headerstate=start]
\startmakeup[jeopardy]    
    \scale[width=\textwidth]{Text}
\stopmakeup
\startmakeup[jeopardy]    
    \scale[width=\textwidth]{More text}
\stopmakeup
\startmakeup[jeopardy]    
    \scale[width=\textwidth]{This has a whole paragraph. There is some more writing. This has lots.}
\stopmakeup
\startmakeup[jeopardy]
\scale[width=\textwidth]{\framed[frame=off,offset=0cm,align=middle,location=middle] {I \\ am \\ awesome}}
\stopmakeup

\stoptext

enter image description here enter image description here enter image description here

  • This works great! Is there a way to allow it to give text carriage returns? E.g. the text as a whole line is large, but if carriage return allowed, it can fill even larger. – Village Jun 11 '20 at 20:43
  • \framed and co. do what you want. Examples are given in the Wiki. If you edit your question to be more precise and include examples, I can help you :) –  Jun 11 '20 at 20:47
  • See my edited answer –  Jun 11 '20 at 21:24