Difference between revisions of "Uno style"

From Wiki
Jump to navigation Jump to search
m (Changed new link to proper media: style.)
m (added Category "Sample documents")
 
(One intermediate revision by one other user not shown)
Line 5: Line 5:
 
There is a downloadable version [[media:Uno.tex|here]].
 
There is a downloadable version [[media:Uno.tex|here]].
  
<pre>
+
<texcode>
 
\startenvironment env_uno
 
\startenvironment env_uno
 
\project project_uno
 
\project project_uno
  
\enableregime [il1] % input encoding iso-latin1
+
\enableregime [il1] % input encoding iso-latin1
\mainlanguage [de]
+
\mainlanguage [de]
\setupencoding [default=ec] % font encoding
+
\setupencoding [default=ec] % font encoding
  
 
% FONT SETTINGS
 
% FONT SETTINGS
\usetypescriptfile [type-ubuch] % type definitions
+
\usetypescriptfile [type-ubuch] % type definitions (typescripts)
 
\usetypescript [fiee][ubuch]
 
\usetypescript [fiee][ubuch]
\setupbodyfont [ubuch,rm,10pt]
+
\setupbodyfont [ubuch, rm, 10pt]
 
\setupbodyfontenvironment[default][em=italic] % make italic default instead of slanted
 
\setupbodyfontenvironment[default][em=italic] % make italic default instead of slanted
  
\setupindenting [\bodyfontsize]
+
\setupindenting [\bodyfontsize] % 1em indent
\setupalign [hanging] % that's not enough...
+
\setupalign [hanging] % doesn't work this way
  
 
% LINE BREAKING SETTINGS (not that good...)
 
% LINE BREAKING SETTINGS (not that good...)
 
\setuptolerance [{horizontal, verytolerant},{vertical, verystrict}]
 
\setuptolerance [{horizontal, verytolerant},{vertical, verystrict}]
 
\clubpenalty=8000 % no clubs / keine Schusterjungen
 
\clubpenalty=8000 % no clubs / keine Schusterjungen
\widowpenalty=8000 % no widows / keine Hurenkinder
+
\widowpenalty=8000 % no widows / keine Hurenkinder
 
%\tolerance=1750 % line breaking tolerance (ca. 500--3000)
 
%\tolerance=1750 % line breaking tolerance (ca. 500--3000)
 
%\emergencystretch=10 pt % additional stretching space per line
 
%\emergencystretch=10 pt % additional stretching space per line
Line 31: Line 31:
 
% HEADINGS
 
% HEADINGS
 
\setupheads [sectionnumber=no, align=right,
 
\setupheads [sectionnumber=no, align=right,
page=no, style=\bf, tolerance=verytolerant]
+
page=no, style=\bf, tolerance=verytolerant]
 
\setuphead [part]
 
\setuphead [part]
[style={\ss\bfc}, page=yes, number=yes,
+
[style={\ss\bfc}, page=yes, number=yes,
frame=off, placehead=yes, align=right,
+
frame=off, placehead=yes, align=right,
before={},
+
before={},
after=\blank, header=empty]
+
after=\blank, header=empty]
 
\setuphead [chapter]
 
\setuphead [chapter]
[style={\ss\bfb}, header=empty, page=no,
+
[style={\ss\bfb}, header=empty, page=no,
before={\vfil\blank}, after={}, align=right]
+
before={\vfil\blank}, after={}, align=right]
 
\setuphead [title][chapter]
 
\setuphead [title][chapter]
 
\setuphead [subject]
 
\setuphead [subject]
[style={\ss\bf}, before=\blank, after=\blank]
+
[style={\ss\bf}, before=\blank, after=\blank]
%\setuphead [subsubject] [style=\bf]
 
  
\definelist [part]
+
% define lists for ToC
\setuplist [part]
+
\definelist [part]
[before=\blank, style={\ss\bf},
+
\setuplist [part]
partnumber=no, pagenumber=no,
+
[before=\blank, style={\ss\bf},
margin=0pt, width=0pt, distance=0pt]
+
partnumber=no, pagenumber=no,
\definelist [chapter]
+
margin=0pt, width=0pt, distance=0pt]
\setuplist [chapter]
+
\definelist [chapter]
[alternative=b, partnumber=no, criterium=all,
+
\setuplist [chapter]
margin=0pt, width=0pt, distance=0pt, limittext={}]
+
[alternative=b, partnumber=no, criterium=all,
 +
margin=0pt, width=0pt, distance=0pt, limittext={}]
 
% define combined table of contents
 
% define combined table of contents
 
\definecombinedlist [inhalt]
 
\definecombinedlist [inhalt]
[part, chapter]
+
[part, chapter]
[level=chapter, placehead=yes, criterium=all,
+
[level=chapter, placehead=yes, criterium=all,
style={\tfc\em}, alternative=b,
+
style={\tfc\em}, alternative=b,
offset=none]
+
offset=none]
 
\setupcombinedlist [inhalt]
 
\setupcombinedlist [inhalt]
[partnumber=no,
+
[partnumber=no,
interaction=all]
+
interaction=all]
 
% define index
 
% define index
 
\setupregister [index]
 
\setupregister [index]
[partnumber=no, criterium=all,
+
[partnumber=no, criterium=all,
pagestyle={\tf},  
+
pagestyle={\tf},  
style={\WORD},  
+
style={\WORD}, % use uppercase header characters!
interaction=pagenumber,
+
interaction=pagenumber,
align=yes]
+
align=yes]
  
 
\definepapersize [UNO] [width=138mm, height=212mm]
 
\definepapersize [UNO] [width=138mm, height=212mm]
 +
 
\startmode[correction]
 
\startmode[correction]
\setuppapersize [UNO] [A4]
+
\setuppapersize [UNO] [A4]
 
\stopmode
 
\stopmode
 
\startnotmode[correction]
 
\startnotmode[correction]
\setuparranging [2SIDE] % imposing
+
 
\setuppapersize [UNO] [UNO]
+
\setuparranging [2SIDE] % imposing
 +
\setuppapersize [UNO] [UNO]
 
\stopnotmode
 
\stopnotmode
  
 
\setuplayout [alternative=doublesided,
 
\setuplayout [alternative=doublesided,
location=middle,
+
location=middle,
grid=yes, marking=on,
+
grid=yes, marking=on,
backspace=13mm, width=105mm,
+
backspace=13mm, width=105mm,
leftmargindistance=0pt,
+
leftmargindistance=0pt,
topspace=13mm,
+
topspace=13mm,
header=15pt, headerdistance=12pt,
+
header=15pt, headerdistance=12pt,
footer=18pt,
+
footer=18pt,
textheight=11.5mm]
+
textheight=11.5mm]
\setuptolerance [verytolerant]
+
\setuptolerance [verytolerant]
 
\setupheader [text][state=stop]
 
\setupheader [text][state=stop]
 
\setupheadertexts [][chapter][part][]
 
\setupheadertexts [][chapter][part][]
Line 95: Line 97:
 
\setupbackgrounds [header][text][frame=off, bottomframe=on]
 
\setupbackgrounds [header][text][frame=off, bottomframe=on]
  
\setuppagenumbering [alternative=doublesided,
+
\setuppagenumbering [alternative=doublesided,
partnumber=no, sectionnumber=no, way=bytext,
+
partnumber=no, sectionnumber=no, way=bytext,
location={text,footer,right}]
+
location={text,footer,right}]
 
\setuppagenumber [state=start]
 
\setuppagenumber [state=start]
\setupfootnotes [way=bypage]
+
\setupfootnotes [way=bypage] % footnote numbering starting from 1 on every page
  
 
\def\dots{\thinspace.\thinspace.\thinspace.\thinspace} % ellipsis with smaller spaces (Ellipse mit kleineren Abständen)
 
\def\dots{\thinspace.\thinspace.\thinspace.\thinspace} % ellipsis with smaller spaces (Ellipse mit kleineren Abständen)
  
 
% some chapters have long titles, and the publisher wanted to get something different in the t.o.c.:
 
% some chapters have long titles, and the publisher wanted to get something different in the t.o.c.:
\def\NurLang#1{\nomarking{\nolist{#1}}} % not in header line, not in toc (nicht in die Kopfzeile, nicht ins Inhaltsverzeichnis)
+
\def\NurLang#1{\nomarking{\nolist{#1}}} % not in header line, not in toc (nicht in die Kopfzeile, nicht ins Inhaltsverzeichnis)
 
\def\ExtraTOCline#1{\writebetweenlist[chapter]{\placeongrid{\noindent #1}}}
 
\def\ExtraTOCline#1{\writebetweenlist[chapter]{\placeongrid{\noindent #1}}}
\setupmarking [chapter][limittext={}] % \nomarking must not show an ellipsis
+
\setupmarking [chapter][limittext={}] % \nomarking must not show an ellipsis
  
 
% lazy index commands
 
% lazy index commands
\def\Tindex#1{\index{#1}#1} % at the same time to text and index (gleichzeitig ins Register und in den Text)
+
\def\Tindex#1{\index{#1}#1} % at the same time to text and index (gleichzeitig ins Register und in den Text)
 
\def\Person#1#2{\index{#2, #1}#1 #2} % names in text and "switched" in the index (Nachname, Vorname ins Register)
 
\def\Person#1#2{\index{#2, #1}#1 #2} % names in text and "switched" in the index (Nachname, Vorname ins Register)
  
Line 125: Line 127:
  
 
% some chapters need remarks that are no footnotes
 
% some chapters need remarks that are no footnotes
\definestartstop [Anmerkung] [before={\vfill\startlinecorrection\vbox\bgroup\switchtobodyfont[ss,8pt]\noindent},
+
\definestartstop [Anmerkung]
after={\egroup\stoplinecorrection}]
+
[before={\vfill\startlinecorrection\vbox\bgroup\switchtobodyfont[ss,8pt]\noindent},
 +
after={\egroup\stoplinecorrection}]
  
\setupfloats [width=fit, align=right]
+
\setupfloats [width=fit, align=right]
 
\setupexternalfigures [directory={./bilder}]
 
\setupexternalfigures [directory={./bilder}]
\setupcaptions [number=no, align=right,
+
\setupcaptions [number=no, align=right,
before={\blank[3pt]},  
+
before={\blank[3pt]},  
after={\blank[small]}, style={\ss\tfx}]
+
after={\blank[small]}, style={\ss\tfx}]
\setupcombinations [width=fit, align=right, style={\ss\tfx}]
+
\setupcombinations [width=fit, align=right, style={\ss\tfx}]
  
 
\stopenvironment
 
\stopenvironment
</pre>
+
</texcode>
 +
 
 +
[[Category:Sample documents]]

Latest revision as of 23:18, 11 August 2005

< Sample documents

This is the environment for a german collection of Kofi Annan's speeches, see "UNvollendeter Weg".

There is a downloadable version here.

\startenvironment env_uno
\project project_uno

\enableregime	[il1]		% input encoding iso-latin1
\mainlanguage	[de]
\setupencoding	[default=ec]	% font encoding

% FONT SETTINGS
\usetypescriptfile	[type-ubuch] % type definitions (typescripts)
\usetypescript		[fiee][ubuch]
\setupbodyfont		[ubuch, rm, 10pt]
\setupbodyfontenvironment[default][em=italic] % make italic default instead of slanted

\setupindenting		[\bodyfontsize] % 1em indent
\setupalign		[hanging] % doesn't work this way

% LINE BREAKING SETTINGS (not that good...)
\setuptolerance		[{horizontal, verytolerant},{vertical, verystrict}]
\clubpenalty=8000		% no clubs / keine Schusterjungen
\widowpenalty=8000		% no widows / keine Hurenkinder
%\tolerance=1750		% line breaking tolerance (ca. 500--3000)
%\emergencystretch=10 pt	% additional stretching space per line

% HEADINGS
\setupheads			[sectionnumber=no, align=right,
				page=no, style=\bf, tolerance=verytolerant]
\setuphead			[part]
				[style={\ss\bfc}, page=yes, number=yes,
				frame=off, placehead=yes, align=right,
				before={},
				after=\blank, header=empty]
\setuphead			[chapter]
				[style={\ss\bfb}, header=empty, page=no,
				before={\vfil\blank}, after={}, align=right]
\setuphead			[title][chapter]
\setuphead			[subject]
				[style={\ss\bf}, before=\blank, after=\blank]

% define lists for ToC
\definelist			[part]
\setuplist			[part]
				[before=\blank, style={\ss\bf},
				partnumber=no, pagenumber=no,
				margin=0pt, width=0pt, distance=0pt]
\definelist			[chapter]
\setuplist			[chapter]
				[alternative=b, partnumber=no, criterium=all,
				margin=0pt, width=0pt, distance=0pt, limittext={}]
% define combined table of contents
\definecombinedlist		[inhalt]
				[part, chapter]
				[level=chapter, placehead=yes, criterium=all,
				style={\tfc\em}, alternative=b,
				offset=none]
\setupcombinedlist		[inhalt]
				[partnumber=no,
				interaction=all]
% define index
\setupregister			[index]
				[partnumber=no, criterium=all,
				pagestyle={\tf}, 
				style={\WORD}, 		% use uppercase header characters!
				interaction=pagenumber,
				align=yes]

\definepapersize		[UNO]	[width=138mm, height=212mm]

\startmode[correction]
\setuppapersize			[UNO]	[A4]
\stopmode
\startnotmode[correction]

\setuparranging			[2SIDE] % imposing
\setuppapersize			[UNO]	[UNO]
\stopnotmode

\setuplayout			[alternative=doublesided,
				location=middle,
				grid=yes, marking=on,
				backspace=13mm, width=105mm,
				leftmargindistance=0pt,
				topspace=13mm,
				header=15pt, headerdistance=12pt,
				footer=18pt,
				textheight=11.5mm]
\setuptolerance			[verytolerant]
\setupheader			[text][state=stop]
\setupheadertexts		[][chapter][part][]
\setupheader			[leftwidth=.8\hsize, rightwidth=.8\hsize]
\setupbackgrounds		[header][text][frame=off, bottomframe=on]

\setuppagenumbering		[alternative=doublesided,
				partnumber=no, sectionnumber=no, way=bytext,
				location={text,footer,right}]
\setuppagenumber		[state=start]
\setupfootnotes			[way=bypage] % footnote numbering starting from 1 on every page

\def\dots{\thinspace.\thinspace.\thinspace.\thinspace} % ellipsis with smaller spaces (Ellipse mit kleineren Abständen)

% some chapters have long titles, and the publisher wanted to get something different in the t.o.c.:
\def\NurLang#1{\nomarking{\nolist{#1}}}		% not in header line, not in toc (nicht in die Kopfzeile, nicht ins Inhaltsverzeichnis)
\def\ExtraTOCline#1{\writebetweenlist[chapter]{\placeongrid{\noindent #1}}}
\setupmarking	[chapter][limittext={}]		% \nomarking must not show an ellipsis

% lazy index commands
\def\Tindex#1{\index{#1}#1}		% at the same time to text and index (gleichzeitig ins Register und in den Text)
\def\Person#1#2{\index{#2, #1}#1 #2}	% names in text and "switched" in the index (Nachname, Vorname ins Register)

% subtitles
\def\Untertitel#1{\blank[3pt]{\ss\bf #1}\blank}
\def\Titel#1#2{{\nohyphens\chapter{#1}\Untertitel{#2}}}

\def\KomplexTitel#1#2#3{%
{\writetolist[chapter]{#3}{}%
\nohyphens\title{#1}%
\Untertitel{#2}}}

\def\Autor#1{\blank[small] \hfill #1}	% author right aligned (Autorenangabe rechtsbündig)
\def\ILink#1{\goto{#1}[URL(http://#1)]}

% some chapters need remarks that are no footnotes
\definestartstop	[Anmerkung]
			[before={\vfill\startlinecorrection\vbox\bgroup\switchtobodyfont[ss,8pt]\noindent},
			after={\egroup\stoplinecorrection}]

\setupfloats		[width=fit, align=right]
\setupexternalfigures	[directory={./bilder}]
\setupcaptions		[number=no, align=right,
			before={\blank[3pt]}, 
			after={\blank[small]}, style={\ss\tfx}]
\setupcombinations	[width=fit, align=right, style={\ss\tfx}]

\stopenvironment