ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
	Felix <fm117575@students.panola.edu>
Subject: [NTG-context] Re: Why does text within a very simple xtable seem to not want to take up a lot of free space?
Date: Tue, 24 Sep 2024 19:02:31 +0200	[thread overview]
Message-ID: <279b1125-a991-0479-8b6b-57e0c6a8c3e1@gmail.com> (raw)
In-Reply-To: <172715704277.1695.17008062591329562340@cgl.ntg.nl>

Felix  schrieb am 24.09.2024 um 07:50:
> \setuppapersize[letter][
>      letter
> ]
> 
> \setuplayout[
>      backspace=0.5in,
>      topspace=0.0in,
>      header=.5in, % No headers
>      footer=.5in, % Space for the footer
>      width=middle,
>      height=middle,
> ]
>   
> \setupbodyfont[12pt]

None of the lines above are necessary to show the effect and can be 
removed from your example.

> \starttext
> 
> \startxtable[frame=off,topframe=on,bottomframe=on,option=fixed,width=1tw,align=middle,]
>      \startxrow
>          \startxcell
>              {\tfa\setsmallcaps \startquotation Excellence is not a skill, it's an attitude. \stopquotation - Ralph Marston
>              }
>          \stopxcell
>      \stopxrow
> \stopxtable
> 
> \stoptext
> 
> inputting this code into ConTeXt LMTX 2024 will show you that text after \stopquotation will make - Ralph Marson go into a new line, but there is so much text on the sides beside the first line, that it makes me wonder why the 2nd line was even made. Did I do something wrong with my code?

The quotation environment is a block elements which can contain one or 
more paragraphs but the environment itself can't be part of a paragraph 
itself with the default setup.

The right command here is \quotation which just adds quotation marks 
around its argument.

There are also a few ways to improve your table:

1. Add \setupinterlinespace after the font switch to increase the 
vertical space for the larger text.

2. Remove the braces before and after \tfa because each table cell is a 
local group where font changes won't affect another cell.

3. Move the font changes to the foregroundstyle key to keep the cell 
free from unnecessary markup.

4. Use an \endash (or --) because the name after the quote and don't 
forget "\ " after \endash to ensure there is a space after the dash.

%%%% begin example
\starttext

\startxtable[frame=off,topframe=on,bottomframe=on,width=1tw,align=middle]
   \startxrow
     \startxcell[foregroundstyle=\tfa\setupinterlinespace\setsmallcaps]
       \quotation {Excellence is not a skill, it’s an attitude.}
       \endash\ Ralph Marston
     \stopxcell
   \stopxrow
\stopxtable

\stoptext
%%%% end example

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

      parent reply	other threads:[~2024-09-24 17:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-24  5:50 [NTG-context] " Felix 
2024-09-24  6:36 ` [NTG-context] " Mikael Sundqvist
2024-09-24 17:02 ` Wolfgang Schuster [this message]

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=279b1125-a991-0479-8b6b-57e0c6a8c3e1@gmail.com \
    --to=wolfgang.schuster.lists@gmail.com \
    --cc=fm117575@students.panola.edu \
    --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).