1

In my document, I have inter-paragraph spacing on. However, I haven’t found a way to stop it from inserting a space before a tabulation.

\setupwhitespace[line]
\setuptabulation[before=]

\starttext
  How do I remove the spacing after this line?\nowhitespace
  \starttabulate
    \NC This
      \NC is
        \NC\NR
    \NC a
        \NC tabulation.
        \NC\NR
  \stoptabulate
\stoptext

rendered output

PS: Should I be using a tabulation? I only want to typeset simple data in a structure like this.

4
  • 2
    tabulate is fine for small tables, although you can use \bTABLE .. \eTABLE instead. Try \blank[disable] for \nowhitespace
    – user193767
    Apr 9, 2020 at 12:03
  • \blank[disable] works, thanks! What’s the difference between \nowhitespace and \blank[disable]? Why does the former work for normal text but not for tabulations? Apr 9, 2020 at 12:20
  • 1
    For some reason there is a hardcoded \whitespace in the before code of tabulate which can be removed using \blank[disable] as was already pointed out. github.com/contextgarden/context-mirror/blob/… Apr 10, 2020 at 3:18
  • 1
    Tabulate is better suited to be used in the running text unlike other types like natural tables which work better with floats. When you consider this adding parskip at the begin makes sense but you can remove the inserted space with \setuptabulate[before={\blank[back]}]. Apr 10, 2020 at 6:03

1 Answer 1

1

While the tabulate environment can be used within a float it is optimized to be used in the text flow. As a result of this the environment provides keys to adjust the spacing before and after the table but as you notices even when the spaces are disabled you get a parskip at both ends.

To get rid of the space before the table you can use \blank[back] to get rid of the previously added whitespace and at the end \blank[nowhite] to remove the following whitespace.

\setuppapersize[A5]

\setupalign[raggedright,nothyphenated]

\setupwhitespace[big]

\starttext

\samplefile{jojomayer}

\starttabulate
\NC Jojo Mayer \NC \samplefile{jojomayer} \NC\NR
\stoptabulate

\samplefile{jojomayer}

\starttabulate[before=,after=]
\NC Jojo Mayer \NC \samplefile{jojomayer} \NC\NR
\stoptabulate

\samplefile{jojomayer}

\starttabulate[before={\blank[back]},after={\blank[nowhite]}]
\NC Jojo Mayer \NC \samplefile{jojomayer} \NC\NR
\stoptabulate

\samplefile{jojomayer}

\stoptext

produces:

enter image description here

To get rid of the whitespace for all tables you can set both settings at the begin of document with the \setuptabulate command.

\setuptabulate
  [before={\blank[back]},
    after={\blank[nowhite]}]

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .