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>,
	Mike Cooper <mike@murchisondrillingschools.com>
Subject: Re: tabulate inside itemize
Date: Wed, 29 Jul 2020 19:09:37 +0200	[thread overview]
Message-ID: <918a1dfa-cd26-5318-0f02-cb965a3ac18a@gmail.com> (raw)
In-Reply-To: <SN6PR11MB2576F5AAABEFCF120D669AE2BD700@SN6PR11MB2576.namprd11.prod.outlook.com>

Mike Cooper schrieb am 29.07.2020 um 18:38:
> I would normally use tab stops and line breaks to achieve the following 
> in a numbered list:
> 
> 1. DC=3.20 bbl =420 ft
> HWDP= 3.90 bbl =450 ft
> DP= 34.63 bbl = 2,037 ft
> Totals = 41.73 bbl = 2,907 ft
> 
> 2. [next step …]
> 
> This is what I tried, but the output has a blank line at the number.I 
> can’t find anything about tabulate inside itemize.
> 
> \starttext
> 
> \startitemize[n]
> \startitem \starttabulate[|l|l|r|l|r|]
> \NC DC \NC = \NC 3.20 bbl \NC = \NC 420 ft \NC \NR
> \NC HWDP \NC = \NC 3.90 bbl \NC = \NC 450 ft \NC \NR
> \NC DP \NC = \NC 34.63 bbl \NC =\NC 2,037 ft \NC \NR
> \NC DC \NC = \NC 41.73 bbl \NC =\NC 2,907 ft \NC \NR
> \stoptabulate \stopitem
> \startitem Convert 2,907 to TVD: \\TVD = 2,907 × cosine 45° = 2,907 × 
> 0.707 = 2,056 ft \stopitem
> \startitem ΔP = 2,056 ft × 0.052 × (15 – 7.2) = 834 psi
> \stopitemize
> 
> \stoptext
> 
> Is there some way to stop the blank line or should I use an entirely 
> different approach?

1. Use \blank[overlay] to continue on the first line of the item entry

2. Disable the blank line at the start of the table with "before="

\starttext

\startitemize[n]
     \startitem \blank[overlay]
         \starttabulate[|l|c|r|c|r|][before=,after=]
         \NC DC   \NC = \NC  3.20 bbl \NC = \NC   420 ft \NC\NR
         \NC HWDP \NC = \NC  3.90 bbl \NC = \NC   450 ft \NC\NR
         \NC DP   \NC = \NC 34.63 bbl \NC = \NC 2,037 ft \NC\NR
         \NC DC   \NC = \NC 41.73 bbl \NC = \NC 2,907 ft \NC\NR
         \stoptabulate
     \stopitem
     \startitem
         Convert 2,907 to TVD:\crlf
         TVD = 2,907 × cosine 45° = 2,907 × 0.707 = 2,056 ft
     \stopitem
     \startitem
         ΔP = 2,056 ft × 0.052 × (15 – 7.2) = 834 psi
     \stopitem
\stopitemize

\stoptext


You can also get rid of the = in your table when you use the \EQ column 
separator and set the sign for the separator to =.

\starttext

\starttabulate[|l|r|r|][EQ={=}]
\NC DC   \EQ  3.20 bbl \EQ   420 ft \NC\NR
\NC HWDP \EQ  3.90 bbl \EQ   450 ft \NC\NR
\NC DP   \EQ 34.63 bbl \EQ 2,037 ft \NC\NR
\NC DC   \EQ 41.73 bbl \EQ 2,907 ft \NC\NR
\stoptabulate

\stoptext


Wolfgang
___________________________________________________________________________________
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:[~2020-07-29 17:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-29 16:38 Mike Cooper
2020-07-29 17:09 ` Wolfgang Schuster [this message]
2020-07-29 17:20   ` Hans Hagen
2020-07-29 17:11 ` Hans Hagen
2020-07-29 17:26   ` Mike Cooper
2020-07-29 17:12 ` Aditya Mahajan
2020-07-29 17:27   ` Mike Cooper

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=918a1dfa-cd26-5318-0f02-cb965a3ac18a@gmail.com \
    --to=wolfgang.schuster.lists@gmail.com \
    --cc=mike@murchisondrillingschools.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).