Difference between revisions of "Command/setupparagraphs"

From Wiki
Jump to navigation Jump to search
(Create reference page)
 
(cleanup)
Line 1: Line 1:
<!-- please remove this and the following line if you have checked this page -->
 
{{Reference_Cleanup}}
 
 
{{Reference
 
{{Reference
 
|name=setupparagraphs
 
|name=setupparagraphs
Line 72: Line 70:
 
== Example ==
 
== Example ==
  
<code source="tex">
+
<context source="yes" text="results in">
 
% Source: ConText Manual ms-cb-en.pdf
 
% Source: ConText Manual ms-cb-en.pdf
  
Line 78: Line 76:
 
% Insert a blank line just before and just after the paragraph.  
 
% Insert a blank line just before and just after the paragraph.  
 
\defineparagraphs  
 
\defineparagraphs  
[mypar][n=3,before={\blank},after={\blank}]  
+
[mypar]
 +
        [n=3,
 +
        before={\blank},
 +
        after={\blank}]  
  
 
% The first column occupies 10% of the text's width and is rendered bold.  
 
% The first column occupies 10% of the text's width and is rendered bold.  
\setupparagraphs [mypar][1][width=.1\textwidth,style=bold]  
+
\setupparagraphs
 +
        [mypar]
 +
        [1]
 +
        [width=.1\textwidth,
 +
        style=bold]  
  
 
% The second column occupies 40% of the text's width.  
 
% The second column occupies 40% of the text's width.  
\setupparagraphs [mypar][2][width=.4\textwidth]
+
\setupparagraphs
 +
        [mypar]
 +
        [2]
 +
        [width=.4\textwidth]
  
 
% The third column uses default settings. It will occupy  
 
% The third column uses default settings. It will occupy  
Line 106: Line 114:
  
 
\stopmypar % end paragraph body  
 
\stopmypar % end paragraph body  
 
+
</context>
</code>
 
  
  

Revision as of 07:33, 14 April 2010

\setupparagraphs

Syntax

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


Description

Example

% Source: ConText Manual ms-cb-en.pdf

% 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