Difference between revisions of "Command/item"

From ConTeXt wiki
Jump to navigationJump to search
m (Category Itemizations)
 
(3 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
|attributes=
 
|attributes=
 
}}
 
}}
 +
 +
== [[Help:Reference|Syntax]] (autogenerated) ==
 +
<syntax>item</syntax>
  
 
== [[Help:Reference|Syntax]] ==
 
== [[Help:Reference|Syntax]] ==
 +
 
<table cellspacing="4" cellpadding="2" class="cmd">
 
<table cellspacing="4" cellpadding="2" class="cmd">
 
   <tr>
 
   <tr>
Line 14: Line 18:
 
</table>
 
</table>
  
 +
== Description ==
 +
 +
Used in itemizations. Prints an ordinary item.
 +
 +
== Example ==
 +
 +
<context source=yes>
 +
Here is one list:
 +
\startitemize
 +
    \item First item
 +
\stopitemize
 +
 +
Here is another list:
 +
\startitemize[n]
 +
    \item First item (numbered list)
 +
\stopitemize
 +
</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
  
== Description ==
+
      \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.)
  
== Example ==
+
[[File:Item-SpecShape.jpg|700px]]
<!-- Please fill in an example if you can -->
 
  
 
== See also ==
 
== See also ==
<!-- something like {{cmd|goto}} -->
+
* {{cmd|startitemize}}
 +
* {{cmd|item}} to print ordinary items
 +
* {{cmd|sym}} to print an item with a custom symbol
 +
* {{cmd|mar}} to print an item with margin text
 +
* {{cmd|sub}} to print an item with a continuation mark
 +
* {{cmd|its}} to print an item with a row of marks (for response ranges)
 +
* {{cmd|ran}} to print a range for the {{cmd|its}} row
 +
* {{cmd|head}} to print a head within the list
 +
* {{cmd|but}} to print an item whose mark is an interactive button
  
 
== Help from ConTeXt-Mailinglist/Forum ==
 
== Help from ConTeXt-Mailinglist/Forum ==

Latest revision as of 16:34, 11 November 2019

\item

Syntax (autogenerated)

\item[...,...]
[...,...]reference


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: