Difference between revisions of "Command/setupparagraphs"

From ConTeXt wiki
(cleanup)
 
(19 intermediate revisions by 5 users not shown)
Line 4: Line 4:
 
}}
 
}}
  
 +
== [[Help:Reference|Syntax]] (autogenerated) ==
 +
<syntax>setupparagraphs</syntax>
 
== [[Help:Reference|Syntax]] ==
 
== [[Help:Reference|Syntax]] ==
 
<table cellspacing="4" cellpadding="2" class="cmd">
 
<table cellspacing="4" cellpadding="2" class="cmd">
Line 15: Line 17:
 
   <tr valign="top" class="second">
 
   <tr valign="top" class="second">
 
     <td class="cmd">[...]</td>
 
     <td class="cmd">[...]</td>
     <td>number each </td>
+
     <td>''number'' each </td>
 
   </tr>
 
   </tr>
 
   <tr valign="top" class="third">
 
   <tr valign="top" class="third">
     <td class="cmd">[[Reference/en/keyword:style|style]]</td>
+
     <td class="cmd">[[Command/keyword:style|style]]</td>
     <td>[[Reference/en/value:normal|normal]] [[Reference/en/value:bold|bold]] [[Reference/en/value:slanted|slanted]] [[Reference/en/value:boldslanted|boldslanted]] [[Reference/en/value:type|type]] [[Reference/en/value:cap|cap]] [[Reference/en/value:small...|small...]] [[Reference/en/value:command|command]] </td>
+
     <td>[[Command/value:normal|normal]] [[Command/value:bold|bold]] [[Command/value:slanted|slanted]] [[Command/value:boldslanted|boldslanted]] [[Command/value:type|type]] [[Command/value:cap|cap]] [[Command/value:small...|small...]] [[Command/value:command|command]] </td>
 
   </tr>
 
   </tr>
 
   <tr valign="top" class="third">
 
   <tr valign="top" class="third">
     <td class="cmd">[[Reference/en/keyword:width|width]]</td>
+
     <td class="cmd">[[Command/keyword:width|width]]</td>
     <td>[[Reference/en/value:dimension|dimension]] </td>
+
     <td>[[Command/value:dimension|dimension]] </td>
 
   </tr>
 
   </tr>
 
   <tr valign="top" class="third">
 
   <tr valign="top" class="third">
     <td class="cmd">[[Reference/en/keyword:height|height]]</td>
+
     <td class="cmd">[[Command/keyword:height|height]]</td>
     <td>[[Reference/en/value:dimension|dimension]] </td>
+
     <td>[[Command/value:dimension|dimension]] </td>
 
   </tr>
 
   </tr>
 
   <tr valign="top" class="third">
 
   <tr valign="top" class="third">
     <td class="cmd">[[Reference/en/keyword:align|align]]</td>
+
     <td class="cmd">[[Command/keyword:align|align]]</td>
     <td>[[Reference/en/value:left|left]] [[Reference/en/value:right|right]] [[Reference/en/value:middle|middle]] [[Reference/en/value:width|width]] </td>
+
     <td>[[Command/value:flushleft|flushleft]] [[Command/value:flushright|flushright]] [[Command/value:righttoleft|righttoleft]] [[Command/value:lefttoright|lefttoright]] [[Command/value:middle|middle]] [[Command/value:width|width]] </td>
 
   </tr>
 
   </tr>
 
   <tr valign="top" class="third">
 
   <tr valign="top" class="third">
     <td class="cmd">[[Reference/en/keyword:tolerance|tolerance]]</td>
+
     <td class="cmd">[[Command/keyword:tolerance|tolerance]]</td>
     <td>[[Reference/en/value:verystrict|verystrict]] [[Reference/en/value:strict|strict]] [[Reference/en/value:tolerant|tolerant]] [[Reference/en/value:verytolerant|verytolerant]] [[Reference/en/value:stretch|stretch]] </td>
+
     <td>[[Command/value:verystrict|verystrict]] [[Command/value:strict|strict]] [[Command/value:tolerant|tolerant]] [[Command/value:verytolerant|verytolerant]] [[Command/value:stretch|stretch]] </td>
 
   </tr>
 
   </tr>
 
   <tr valign="top" class="third">
 
   <tr valign="top" class="third">
     <td class="cmd">[[Reference/en/keyword:distance|distance]]</td>
+
     <td class="cmd">[[Command/keyword:distance|distance]]</td>
     <td>[[Reference/en/value:dimension|dimension]] </td>
+
     <td>[[Command/value:dimension|dimension]] </td>
 
   </tr>
 
   </tr>
 
   <tr valign="top" class="third">
 
   <tr valign="top" class="third">
     <td class="cmd">[[Reference/en/keyword:before|before]]</td>
+
     <td class="cmd">[[Command/keyword:before|before]]</td>
     <td>[[Reference/en/value:command|command]] </td>
+
     <td>[[Command/value:command|command]] </td>
 
   </tr>
 
   </tr>
 
   <tr valign="top" class="third">
 
   <tr valign="top" class="third">
     <td class="cmd">[[Reference/en/keyword:after|after]]</td>
+
     <td class="cmd">[[Command/keyword:after|after]]</td>
     <td>[[Reference/en/value:command|command]] </td>
+
     <td>[[Command/value:command|command]] </td>
 
   </tr>
 
   </tr>
 
   <tr valign="top" class="third">
 
   <tr valign="top" class="third">
     <td class="cmd">[[Reference/en/keyword:inner|inner]]</td>
+
     <td class="cmd">[[Command/keyword:inner|inner]]</td>
     <td>[[Reference/en/value:command|command]] </td>
+
     <td>[[Command/value:command|command]] </td>
 
   </tr>
 
   </tr>
 
   <tr valign="top" class="third">
 
   <tr valign="top" class="third">
     <td class="cmd">[[Reference/en/keyword:command|command]]</td>
+
     <td class="cmd">[[Command/keyword:command|command]]</td>
     <td>[[Reference/en/value:command|command]] </td>
+
     <td>[[Command/value:command|command]] </td>
 
   </tr>
 
   </tr>
 
   <tr valign="top" class="third">
 
   <tr valign="top" class="third">
     <td class="cmd">[[Reference/en/keyword:rule|rule]]</td>
+
     <td class="cmd">[[Command/keyword:rule|rule]]</td>
     <td>[[Reference/en/value:on|on]] [[Reference/en/value:off|off]] </td>
+
     <td>[[Command/value:on|on]] [[Command/value:off|off]] </td>
 
   </tr>
 
   </tr>
 
</table>
 
</table>
 
  
 
== Description ==  
 
== Description ==  
 
+
Setup the paragraphs of a side-by-side environment defined with {{cmd|defineparagraphs}}. This command occurs in two forms. One to set options for the entire environment:
 
+
<texcode>
 +
\setupparagraphs[EnglishLatin][each][n=2,before=\blank]
 +
</texcode>
 +
And one to set options for specific paragraphs (columns) in the environment:
 +
<texcode>
 +
\setupparagraphs[EnglishLatin][2][color=red,width=.6\textwidth]
 +
</texcode>
  
 
== Example ==
 
== Example ==
Line 72: Line 79:
 
<context source="yes" text="results in">
 
<context source="yes" text="results in">
 
% Source: ConText Manual ms-cb-en.pdf
 
% Source: ConText Manual ms-cb-en.pdf
 +
\setuppapersize[A5] % narrower page --> better-sized picture for the wiki.
  
 
% Define a paragraph environment with 3 columns.  
 
% Define a paragraph environment with 3 columns.  
Line 100: Line 108:
  
 
\startmypar % begin paragraph body with 1st column  
 
\startmypar % begin paragraph body with 1st column  
1252  
+
    1252  
 
 
 
\mypar % switch to 2nd column
 
\mypar % switch to 2nd column
 
+
    Hasselt obtains its city charter from bishop Hendrik van Vianden.  
Hasselt obtains its city charter from bishop Hendrik van Vianden.  
 
 
 
 
\mypar % switch to 3rd column
 
\mypar % switch to 3rd column
 
+
    Hendrik van Vianden was pressed by other towns not to agree  
Hendrik van Vianden was pressed by other towns not to agree  
+
    with the charter. It took Hasselt a long period of time to  
with the charter. It took Hasselt a long period of time to  
+
    convince the Bishop. After supporting the Bishop in a small  
convince the Bishop. After supporting the Bishop in a small  
+
    war against the Drents, the charter was released.  
war against the Drents, the charter was released.  
 
 
 
 
\stopmypar % end paragraph body  
 
\stopmypar % end paragraph body  
 
</context>
 
</context>
Line 118: Line 121:
  
 
== See also ==
 
== See also ==
<!-- something like [[cmd:goto|\goto]] -->
+
* {{cmd|defineparagraphs}}
 +
* {{cmd|definetabulate}}, {{cmd|setuptabulate}}, and {{cmd|starttabulate}} for tables
 +
 
 +
== Help from ConTeXt-Mailinglist/Forum ==
 +
All issues with:
 +
{{Forum|{{SUBPAGENAME}}}}
 +
 
 +
{{Columns navbox}}
  
[[Category:Reference/en|setupparagraphs]]
+
[[Category:Command/Paragraphs|setupparagraphs]]
 +
[[Category:Command/Tables|setupparagraphs]]
 +
[[Category:Command/Columns|setupparagraphs]]

Latest revision as of 14:30, 13 October 2019

\setupparagraphs

Syntax (autogenerated)

\setupparagraphs[...][...,...][...=...,...]
[...]name
[...,...]each number
nnumber
beforecommand
aftercommand
widthdimension
distancedimension
heightdimension fit
topcommand
bottomcommand
alignsee \setupalign
innercommand
commandcommand
ruleon off
rulethicknessdimension
rulecolorcolor
stylestyle command
colorcolor


\setupparagraphs[...][...=...,...]
[...]name:number
nnumber
beforecommand
aftercommand
widthdimension
distancedimension
heightdimension fit
topcommand
bottomcommand
alignsee \setupalign
innercommand
commandcommand
ruleon off
rulethicknessdimension
rulecolorcolor
stylestyle command
colorcolor


Syntax

\setupparagraphs[...][...][...,...=...,...]
[...] name
[...] number each
style normal bold slanted boldslanted type cap small... command
width dimension
height dimension
align flushleft flushright righttoleft lefttoright middle width
tolerance verystrict strict tolerant verytolerant stretch
distance dimension
before command
after command
inner command
command command
rule on off

Description

Setup the paragraphs of a side-by-side environment defined with \defineparagraphs. This command occurs in two forms. One to set options for the entire environment:

\setupparagraphs[EnglishLatin][each][n=2,before=\blank]

And one to set options for specific paragraphs (columns) in the environment:

\setupparagraphs[EnglishLatin][2][color=red,width=.6\textwidth]

Example

% Source: ConText Manual ms-cb-en.pdf
\setuppapersize[A5] % narrower page --> better-sized picture for the wiki.

% Define a paragraph environment with 3 columns. 
% Insert a blank line just before and just after the paragraph. 
\defineparagraphs 
	[mypar]
        [n=3,
         before={\blank},
         after={\blank}] 

% The first column occupies 10% of the text's width and is rendered bold. 
\setupparagraphs
        [mypar]
        [1]
        [width=.1\textwidth,
         style=bold] 

% The second column occupies 40% of the text's width. 
\setupparagraphs
        [mypar]
        [2]
        [width=.4\textwidth]

% The third column uses default settings. It will occupy 
% the remaining 50% of the text's width.
 
% Set a paragraph with "mypar"

\startmypar % begin paragraph body with 1st column 
    1252 
\mypar % switch to 2nd column
    Hasselt obtains its city charter from bishop Hendrik van Vianden. 
\mypar % switch to 3rd column
    Hendrik van Vianden was pressed by other towns not to agree 
    with the charter. It took Hasselt a long period of time to 
    convince the Bishop. After supporting the Bishop in a small 
    war against the Drents, the charter was released. 
\stopmypar % end paragraph body 

results in


See also

Help from ConTeXt-Mailinglist/Forum

All issues with: