ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "T. Kurt Bond" <tkurtbond@gmail.com>
To: context mailing list <ntg-context@ntg.nl>
Subject: \startplacetable[location=none] doesn't have a "Table X" label, but \startplacetable[location=force] does
Date: Sun, 13 Jun 2021 15:39:40 -0400	[thread overview]
Message-ID: <CAN1EhV_upYrWeANyjzu3xnEbyycLu8fPQY6-wJi0=raCbM1vfQ@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 2137 bytes --]

I've got three questions:

   1.

   I've got a document with some xtables. If I use
   \startplacetable[location=none] the tables *don't* have a "Table X"
   label, but they float and end up in locations where I don't want them. If I
   use \startplacetable[location=force] the tables *do* have a "Table X"
   label (which I don't want), but the tables *do* show up where I want
   them, that is, they don't float.

   How do I get rid of the "Table X" label when I use
   \startplacetable[location=force]?
   2.

   Also, when I constructed the example I used

   \startmode[locationforce]
   \startplacetable[location=force]
   \stopmode
   \startnotmode[locationforce]
   \startplacetable[location=none]
   \stopmode

   so I could build both outputs from the same input file. When the
   locationforce mode was *not* set the command finished with no errors,
   but when the locationforce mode *was* set the command finished with the
   error:

   tex error       > tex error on line 229 in file
./table-location-label-wrong.ctx: The file ended when scanning an
argument.

   however, when I used

   \doifmodeelse{locationforce}{\startplacetable[location=force]}{\startplacetable[location=none]}

   instead, it worked fine.
   3.

   Even when I use the --noconsole option on my context invocation, there
   is a lot of information that is written to the console. It looks like the
   information is repeated for each run context makes over the file. Is there
   some way to get this information to show up in the log file, instead of on
   the console?

ConTeXt's version information:

ConTeXt  ver: 2021.06.13 19:21 LMTX  fmt: 2021.6.13  int: english/english.

I've attached my example (table-location-label.ctx), the GNUmakefile I use
to build it using --mode so that the same source produces both the version
with location=force and location=none, and the two PDF output files (
table-location-label-none.pdf and table-location-label-force.pdf).

I've also attached the version where I tried to use \startmode/\startnotmode
 (table-location-label-wrong.ctx).

-- 
T. Kurt Bond, tkurtbond@gmail.com, https://tkurtbond.github.io

[-- Attachment #1.2: Type: text/html, Size: 8418 bytes --]

[-- Attachment #2: table-location-label-force.pdf --]
[-- Type: application/pdf, Size: 29322 bytes --]

[-- Attachment #3: table-location-label-none.pdf --]
[-- Type: application/pdf, Size: 28869 bytes --]

[-- Attachment #4: table-location-label-wrong.ctx --]
[-- Type: application/octet-stream, Size: 7737 bytes --]

\definepapersize[statement][height=8.5in,width=5.5in]
\setuppapersize[statement][statement]

%\setupfloat[table][default={nonumber}]

\definemode[locationforce][keep]

\starttext

\section[title={Gear},reference={gear}]

Some games may assume the character has the trappings of a middle class
lifestyle, while others may take place in a world of fantasy where only
those items in your pack mean the difference between life and death.

Characters might start with one piece of related gear for each skill
they allocated dice to during character creation. For example a pistol
for the Pistols skill, a medic bag for Medicine, etc. For anything else,
beg the GM.

\startmode[locationforce]
\startplacetable[location=force]
\stopmode
\startnotmode[locationforce]
\startplacetable[location=none]
\stopmode
\startxtable
\startxtablehead[head]
\startxrow
\startxcell[width={0.22\textwidth}]  \stopxcell
\startxcell[width={0.18\textwidth}] {\bf Damage} \stopxcell
\startxcell[width={0.26\textwidth}]  \stopxcell
\startxcell[width={0.19\textwidth}] {\bf Damage} \stopxcell
\stopxrow
\stopxtablehead
\startxtablebody[body]
\startxrow
\startxcell[width={0.22\textwidth}] Axe \stopxcell
\startxcell[width={0.18\textwidth}] +3D \stopxcell
\startxcell[width={0.26\textwidth}] {\em Modern Tech} \stopxcell
\startxcell[width={0.19\textwidth}]  \stopxcell
\stopxrow
\startxrow
\startxcell[width={0.22\textwidth}] Club \stopxcell
\startxcell[width={0.18\textwidth}] +1D+1 \stopxcell
\startxcell[width={0.26\textwidth}] Light Pistol \stopxcell
\startxcell[width={0.19\textwidth}] 3D+2 \stopxcell
\stopxrow
\startxrow
\startxcell[width={0.22\textwidth}] Hatchet \stopxcell
\startxcell[width={0.18\textwidth}] +1D+1 \stopxcell
\startxcell[width={0.26\textwidth}] Heavy Pistol \stopxcell
\startxcell[width={0.19\textwidth}] 4D \stopxcell
\stopxrow
\startxrow
\startxcell[width={0.22\textwidth}] Halberd \stopxcell
\startxcell[width={0.18\textwidth}] +3D \stopxcell
\startxcell[width={0.26\textwidth}] Rifle \stopxcell
\startxcell[width={0.19\textwidth}] 5D \stopxcell
\stopxrow
\startxrow
\startxcell[width={0.22\textwidth}] Knife \stopxcell
\startxcell[width={0.18\textwidth}] +1D \stopxcell
\startxcell[width={0.26\textwidth}] Shotgun \stopxcell
\startxcell[width={0.19\textwidth}] 4D+2 \stopxcell
\stopxrow
\startxrow
\startxcell[width={0.22\textwidth}] Mace \stopxcell
\startxcell[width={0.18\textwidth}] +1D+1 \stopxcell
\startxcell[width={0.26\textwidth}] BFG \stopxcell
\startxcell[width={0.19\textwidth}] 6D \stopxcell
\stopxrow
\startxrow
\startxcell[width={0.22\textwidth}] Rapier \stopxcell
\startxcell[width={0.18\textwidth}] +2D \stopxcell
\startxcell[width={0.26\textwidth}] {\em Sci-Fi Tech} \stopxcell
\startxcell[width={0.19\textwidth}]  \stopxcell
\stopxrow
\startxrow
\startxcell[width={0.22\textwidth}] Staff \stopxcell
\startxcell[width={0.18\textwidth}] +1D+2 \stopxcell
\startxcell[width={0.26\textwidth}] Plasma Pistol \stopxcell
\startxcell[width={0.19\textwidth}] 5D \stopxcell
\stopxrow
\startxrow
\startxcell[width={0.22\textwidth}] Spear \stopxcell
\startxcell[width={0.18\textwidth}] +2D \stopxcell
\startxcell[width={0.26\textwidth}] Plasma Rifle \stopxcell
\startxcell[width={0.19\textwidth}] 6D \stopxcell
\stopxrow
\startxrow
\startxcell[width={0.22\textwidth}] Sword \stopxcell
\startxcell[width={0.18\textwidth}] +2D+2 \stopxcell
\startxcell[width={0.26\textwidth}] Plasma BFG \stopxcell
\startxcell[width={0.19\textwidth}] 7D \stopxcell
\stopxrow
\startxrow
\startxcell[width={0.22\textwidth}] Sword, 2h \stopxcell
\startxcell[width={0.18\textwidth}] +3D+1 \stopxcell
\startxcell[width={0.26\textwidth}] Plasma Sword \stopxcell
\startxcell[width={0.19\textwidth}] +4D \stopxcell
\stopxrow
\startxrow
\startxcell[width={0.22\textwidth}] Warhammer \stopxcell
\startxcell[width={0.18\textwidth}] +3D \stopxcell
\startxcell[width={0.26\textwidth}] {\em Ranges in Feet} \stopxcell
\startxcell[width={0.19\textwidth}] {\em (S/M/L)} \stopxcell
\stopxrow
\startxrow
\startxcell[width={0.22\textwidth}] Bow \stopxcell
\startxcell[width={0.18\textwidth}] +2D+2 \stopxcell
\startxcell[width={0.26\textwidth}] Bow \stopxcell
\startxcell[width={0.19\textwidth}] 30/100/300 \stopxcell
\stopxrow
\startxrow
\startxcell[width={0.22\textwidth}] Crossbow \stopxcell
\startxcell[width={0.18\textwidth}] 4D+1 \stopxcell
\startxcell[width={0.26\textwidth}] Crossbow \stopxcell
\startxcell[width={0.19\textwidth}] 50/150/400 \stopxcell
\stopxrow
\startxrow
\startxcell[width={0.22\textwidth}] {\em Armor} \stopxcell
\startxcell[width={0.18\textwidth}] {\em Value} \stopxcell
\startxcell[width={0.26\textwidth}] All Pistols \stopxcell
\startxcell[width={0.19\textwidth}] 30/100/350 \stopxcell
\stopxrow
\startxrow
\startxcell[width={0.22\textwidth}] Leather \stopxcell
\startxcell[width={0.18\textwidth}] +2 \stopxcell
\startxcell[width={0.26\textwidth}] All Rifles \stopxcell
\startxcell[width={0.19\textwidth}] 100/350/500 \stopxcell
\stopxrow
\startxrow
\startxcell[width={0.22\textwidth}] Chainmail \stopxcell
\startxcell[width={0.18\textwidth}] +6 \stopxcell
\startxcell[width={0.26\textwidth}] Shotguns \stopxcell
\startxcell[width={0.19\textwidth}] 50/150/400 \stopxcell
\stopxrow
\startxrow
\startxcell[width={0.22\textwidth}] Platemail \stopxcell
\startxcell[width={0.18\textwidth}] +9 \stopxcell
\startxcell[width={0.26\textwidth}] BFG \stopxcell
\startxcell[width={0.19\textwidth}] 100/400/700 \stopxcell
\stopxrow
\stopxtablebody
\startxtablefoot[foot]
\startxrow
\startxcell[width={0.22\textwidth}] Shield \stopxcell
\startxcell[width={0.18\textwidth}] +4 \stopxcell
\startxcell[width={0.26\textwidth}] Grenades \stopxcell
\startxcell[width={0.19\textwidth}] 10/20/30 \stopxcell
\stopxrow
\stopxtablefoot
\stopxtable
\stopplacetable

\section[title={The Game Mechanics},reference={the-game-mechanics}]

\subsection[title={General (non-combat)
Challenges},reference={general-non-combat-challenges}]

Characters roll the appropriate attribute plus skill against a set
target number based on the task attempted.

\startmode[locationforce]
\startplacetable[location=force]
\stopmode
\startnotmode[locationforce]
\startplacetable[location=none]
\stopmode
\startxtable
\startxtablehead[head]
\startxrow
\startxcell {\bf Difficulty} \stopxcell
\startxcell {\bf Target Number} \stopxcell
\stopxrow
\stopxtablehead
\startxtablebody[body]
\startxrow
\startxcell Very Easy \stopxcell
\startxcell 2--5 \stopxcell
\stopxrow
\startxrow
\startxcell Easy \stopxcell
\startxcell 6--10 \stopxcell
\stopxrow
\startxrow
\startxcell Moderate \stopxcell
\startxcell 11--15 \stopxcell
\stopxrow
\startxrow
\startxcell Difficult \stopxcell
\startxcell 16--20 \stopxcell
\stopxrow
\startxrow
\startxcell Very Difficult \stopxcell
\startxcell 21--30 \stopxcell
\stopxrow
\stopxtablebody
\startxtablefoot[foot]
\startxrow
\startxcell Heroic \stopxcell
\startxcell 31+ \stopxcell
\stopxrow
\stopxtablefoot
\stopxtable
\stopplacetable

{\bf Very Easy:} Nearly everyone can do it. These checks should only be
made if a success is critical to the scenario at hand.

{\bf Easy:} Characters will seldom have trouble with these tasks, but an
untrained individual may find them challenging.

{\bf Moderate:} Average character have a reasonable chance of failing at
this level. Consistent success often requires training in the skill or a
high level of natural ability.

{\bf Difficult:} Tasks at this level are truly challenging. To succeed a
character needs to be well skilled or very lucky.

{\bf Very Difficult:} Challenges of this level fall into the domain of
masters in the skill being used; few others will succeed at them.

{\bf Heroic:} These challenges are almost impossible. Only the very
lucky or true masters can consistently succeed at them.

\stoptext

[-- Attachment #5: table-location-label.ctx --]
[-- Type: application/octet-stream, Size: 7608 bytes --]

\definepapersize[statement][height=8.5in,width=5.5in]
\setuppapersize[statement][statement]

\definemode[locationforce][keep]

\starttext

\section[title={Gear},reference={gear}]

Some games may assume the character has the trappings of a middle class
lifestyle, while others may take place in a world of fantasy where only
those items in your pack mean the difference between life and death.

Characters might start with one piece of related gear for each skill
they allocated dice to during character creation. For example a pistol
for the Pistols skill, a medic bag for Medicine, etc. For anything else,
beg the GM.

\doifmodeelse{locationforce}{\startplacetable[location=force]}{\startplacetable[location=none]}
\startxtable
\startxtablehead[head]
\startxrow
\startxcell[width={0.22\textwidth}]  \stopxcell
\startxcell[width={0.18\textwidth}] {\bf Damage} \stopxcell
\startxcell[width={0.26\textwidth}]  \stopxcell
\startxcell[width={0.19\textwidth}] {\bf Damage} \stopxcell
\stopxrow
\stopxtablehead
\startxtablebody[body]
\startxrow
\startxcell[width={0.22\textwidth}] Axe \stopxcell
\startxcell[width={0.18\textwidth}] +3D \stopxcell
\startxcell[width={0.26\textwidth}] {\em Modern Tech} \stopxcell
\startxcell[width={0.19\textwidth}]  \stopxcell
\stopxrow
\startxrow
\startxcell[width={0.22\textwidth}] Club \stopxcell
\startxcell[width={0.18\textwidth}] +1D+1 \stopxcell
\startxcell[width={0.26\textwidth}] Light Pistol \stopxcell
\startxcell[width={0.19\textwidth}] 3D+2 \stopxcell
\stopxrow
\startxrow
\startxcell[width={0.22\textwidth}] Hatchet \stopxcell
\startxcell[width={0.18\textwidth}] +1D+1 \stopxcell
\startxcell[width={0.26\textwidth}] Heavy Pistol \stopxcell
\startxcell[width={0.19\textwidth}] 4D \stopxcell
\stopxrow
\startxrow
\startxcell[width={0.22\textwidth}] Halberd \stopxcell
\startxcell[width={0.18\textwidth}] +3D \stopxcell
\startxcell[width={0.26\textwidth}] Rifle \stopxcell
\startxcell[width={0.19\textwidth}] 5D \stopxcell
\stopxrow
\startxrow
\startxcell[width={0.22\textwidth}] Knife \stopxcell
\startxcell[width={0.18\textwidth}] +1D \stopxcell
\startxcell[width={0.26\textwidth}] Shotgun \stopxcell
\startxcell[width={0.19\textwidth}] 4D+2 \stopxcell
\stopxrow
\startxrow
\startxcell[width={0.22\textwidth}] Mace \stopxcell
\startxcell[width={0.18\textwidth}] +1D+1 \stopxcell
\startxcell[width={0.26\textwidth}] BFG \stopxcell
\startxcell[width={0.19\textwidth}] 6D \stopxcell
\stopxrow
\startxrow
\startxcell[width={0.22\textwidth}] Rapier \stopxcell
\startxcell[width={0.18\textwidth}] +2D \stopxcell
\startxcell[width={0.26\textwidth}] {\em Sci-Fi Tech} \stopxcell
\startxcell[width={0.19\textwidth}]  \stopxcell
\stopxrow
\startxrow
\startxcell[width={0.22\textwidth}] Staff \stopxcell
\startxcell[width={0.18\textwidth}] +1D+2 \stopxcell
\startxcell[width={0.26\textwidth}] Plasma Pistol \stopxcell
\startxcell[width={0.19\textwidth}] 5D \stopxcell
\stopxrow
\startxrow
\startxcell[width={0.22\textwidth}] Spear \stopxcell
\startxcell[width={0.18\textwidth}] +2D \stopxcell
\startxcell[width={0.26\textwidth}] Plasma Rifle \stopxcell
\startxcell[width={0.19\textwidth}] 6D \stopxcell
\stopxrow
\startxrow
\startxcell[width={0.22\textwidth}] Sword \stopxcell
\startxcell[width={0.18\textwidth}] +2D+2 \stopxcell
\startxcell[width={0.26\textwidth}] Plasma BFG \stopxcell
\startxcell[width={0.19\textwidth}] 7D \stopxcell
\stopxrow
\startxrow
\startxcell[width={0.22\textwidth}] Sword, 2h \stopxcell
\startxcell[width={0.18\textwidth}] +3D+1 \stopxcell
\startxcell[width={0.26\textwidth}] Plasma Sword \stopxcell
\startxcell[width={0.19\textwidth}] +4D \stopxcell
\stopxrow
\startxrow
\startxcell[width={0.22\textwidth}] Warhammer \stopxcell
\startxcell[width={0.18\textwidth}] +3D \stopxcell
\startxcell[width={0.26\textwidth}] {\em Ranges in Feet} \stopxcell
\startxcell[width={0.19\textwidth}] {\em (S/M/L)} \stopxcell
\stopxrow
\startxrow
\startxcell[width={0.22\textwidth}] Bow \stopxcell
\startxcell[width={0.18\textwidth}] +2D+2 \stopxcell
\startxcell[width={0.26\textwidth}] Bow \stopxcell
\startxcell[width={0.19\textwidth}] 30/100/300 \stopxcell
\stopxrow
\startxrow
\startxcell[width={0.22\textwidth}] Crossbow \stopxcell
\startxcell[width={0.18\textwidth}] 4D+1 \stopxcell
\startxcell[width={0.26\textwidth}] Crossbow \stopxcell
\startxcell[width={0.19\textwidth}] 50/150/400 \stopxcell
\stopxrow
\startxrow
\startxcell[width={0.22\textwidth}] {\em Armor} \stopxcell
\startxcell[width={0.18\textwidth}] {\em Value} \stopxcell
\startxcell[width={0.26\textwidth}] All Pistols \stopxcell
\startxcell[width={0.19\textwidth}] 30/100/350 \stopxcell
\stopxrow
\startxrow
\startxcell[width={0.22\textwidth}] Leather \stopxcell
\startxcell[width={0.18\textwidth}] +2 \stopxcell
\startxcell[width={0.26\textwidth}] All Rifles \stopxcell
\startxcell[width={0.19\textwidth}] 100/350/500 \stopxcell
\stopxrow
\startxrow
\startxcell[width={0.22\textwidth}] Chainmail \stopxcell
\startxcell[width={0.18\textwidth}] +6 \stopxcell
\startxcell[width={0.26\textwidth}] Shotguns \stopxcell
\startxcell[width={0.19\textwidth}] 50/150/400 \stopxcell
\stopxrow
\startxrow
\startxcell[width={0.22\textwidth}] Platemail \stopxcell
\startxcell[width={0.18\textwidth}] +9 \stopxcell
\startxcell[width={0.26\textwidth}] BFG \stopxcell
\startxcell[width={0.19\textwidth}] 100/400/700 \stopxcell
\stopxrow
\stopxtablebody
\startxtablefoot[foot]
\startxrow
\startxcell[width={0.22\textwidth}] Shield \stopxcell
\startxcell[width={0.18\textwidth}] +4 \stopxcell
\startxcell[width={0.26\textwidth}] Grenades \stopxcell
\startxcell[width={0.19\textwidth}] 10/20/30 \stopxcell
\stopxrow
\stopxtablefoot
\stopxtable
\stopplacetable

\section[title={The Game Mechanics},reference={the-game-mechanics}]

\subsection[title={General (non-combat)
Challenges},reference={general-non-combat-challenges}]

Characters roll the appropriate attribute plus skill against a set
target number based on the task attempted.

\doifmodeelse{locationforce}{\startplacetable[location=force]}{\startplacetable[location=none]}
\startxtable
\startxtablehead[head]
\startxrow
\startxcell {\bf Difficulty} \stopxcell
\startxcell {\bf Target Number} \stopxcell
\stopxrow
\stopxtablehead
\startxtablebody[body]
\startxrow
\startxcell Very Easy \stopxcell
\startxcell 2--5 \stopxcell
\stopxrow
\startxrow
\startxcell Easy \stopxcell
\startxcell 6--10 \stopxcell
\stopxrow
\startxrow
\startxcell Moderate \stopxcell
\startxcell 11--15 \stopxcell
\stopxrow
\startxrow
\startxcell Difficult \stopxcell
\startxcell 16--20 \stopxcell
\stopxrow
\startxrow
\startxcell Very Difficult \stopxcell
\startxcell 21--30 \stopxcell
\stopxrow
\stopxtablebody
\startxtablefoot[foot]
\startxrow
\startxcell Heroic \stopxcell
\startxcell 31+ \stopxcell
\stopxrow
\stopxtablefoot
\stopxtable
\stopplacetable

{\bf Very Easy:} Nearly everyone can do it. These checks should only be
made if a success is critical to the scenario at hand.

{\bf Easy:} Characters will seldom have trouble with these tasks, but an
untrained individual may find them challenging.

{\bf Moderate:} Average character have a reasonable chance of failing at
this level. Consistent success often requires training in the skill or a
high level of natural ability.

{\bf Difficult:} Tasks at this level are truly challenging. To succeed a
character needs to be well skilled or very lucky.

{\bf Very Difficult:} Challenges of this level fall into the domain of
masters in the skill being used; few others will succeed at them.

{\bf Heroic:} These challenges are almost impossible. Only the very
lucky or true masters can consistently succeed at them.

\stoptext

[-- Attachment #6: Type: text/plain, Size: 493 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
___________________________________________________________________________________

             reply	other threads:[~2021-06-13 19:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-13 19:39 T. Kurt Bond [this message]
2021-06-14  9:51 ` Wolfgang Schuster
2021-06-15 16:23   ` T. Kurt Bond

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='CAN1EhV_upYrWeANyjzu3xnEbyycLu8fPQY6-wJi0=raCbM1vfQ@mail.gmail.com' \
    --to=tkurtbond@gmail.com \
    --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).