Difference between revisions of "Command/item"

From Wiki
Jump to navigation Jump to search
(Fill in entire page)
m
Line 29: Line 29:
 
\stopitemize
 
\stopitemize
 
</context>
 
</context>
 +
 +
=== Item list of a special shape ===
 +
 +
(Based on code by Wolfgang Schuster)
 +
 +
First "block" of item has a fixed width and the following paragraph is hanging by the same distance.
 +
 +
<texcode source=yes mode=mkiv>
 +
\define[1]\ItemCommand{\hangindent=1.5in\relax\simplealignedbox{1.5in}{flushleft}{#1\hss--- }\ignorespaces}
 +
 +
\setupitemize[command=\ItemCommand]
 +
 +
\starttext
 +
  \startitemize
 +
    \item{Ward} \input ward
 +
 +
      \input ward
 +
 +
    \item{Knuth} \input knuth
 +
  \stopitemize
 +
\stoptext
 +
</texcode>
 +
 +
(Note: The ConTeXt version here on wiki gives unhanged shape of items compared to that produced by ConTeXt beta / 30.5.2014.)
 +
 +
[[File:Item-SpecShape.jpg|700px]]
  
 
== See also ==
 
== See also ==

Revision as of 08:02, 30 May 2014

\item

Syntax

\item[ref,ref,...]
[ref,ref,...]

Description

Used in itemizations. Prints an ordinary item.

Example

Here is one list:
\startitemize
    \item First item
\stopitemize

Here is another list:
\startitemize[n]
    \item First item (numbered list)
\stopitemize

Item list of a special shape

(Based on code by Wolfgang Schuster)

First "block" of item has a fixed width and the following paragraph is hanging by the same distance.

\define[1]\ItemCommand{\hangindent=1.5in\relax\simplealignedbox{1.5in}{flushleft}{#1\hss--- }\ignorespaces}

\setupitemize[command=\ItemCommand]

\starttext
  \startitemize
    \item{Ward} \input ward

      \input ward

    \item{Knuth} \input knuth
  \stopitemize
\stoptext

(Note: The ConTeXt version here on wiki gives unhanged shape of items compared to that produced by ConTeXt beta / 30.5.2014.)

Item-SpecShape.jpg

See also

  • \startitemize
  • \item to print ordinary items
  • \sym to print an item with a custom symbol
  • \mar to print an item with margin text
  • \sub to print an item with a continuation mark
  • \its to print an item with a row of marks (for response ranges)
  • \ran to print a range for the \its row
  • \head to print a head within the list
  • \but to print an item whose mark is an interactive button

Help from ConTeXt-Mailinglist/Forum

All issues with: