Difference between revisions of "Uno style"
Jump to navigation
Jump to search
(new) |
m (added Category "Sample documents") |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 3: | Line 3: | ||
This is the environment for a german collection of Kofi Annan's speeches, see [http://www.unitarier.de/verlag/?menu=0-2 "UNvollendeter Weg"]. | This is the environment for a german collection of Kofi Annan's speeches, see [http://www.unitarier.de/verlag/?menu=0-2 "UNvollendeter Weg"]. | ||
− | < | + | There is a downloadable version [[media:Uno.tex|here]]. |
+ | |||
+ | <texcode> | ||
\startenvironment env_uno | \startenvironment env_uno | ||
\project project_uno | \project project_uno | ||
− | \enableregime | + | \enableregime [il1] % input encoding iso-latin1 |
− | \mainlanguage | + | \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] % | + | \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 29: | Line 31: | ||
% HEADINGS | % HEADINGS | ||
\setupheads [sectionnumber=no, align=right, | \setupheads [sectionnumber=no, align=right, | ||
− | + | page=no, style=\bf, tolerance=verytolerant] | |
\setuphead [part] | \setuphead [part] | ||
− | + | [style={\ss\bfc}, page=yes, number=yes, | |
− | + | frame=off, placehead=yes, align=right, | |
− | + | before={}, | |
− | + | after=\blank, header=empty] | |
\setuphead [chapter] | \setuphead [chapter] | ||
− | + | [style={\ss\bfb}, header=empty, page=no, | |
− | + | before={\vfil\blank}, after={}, align=right] | |
\setuphead [title][chapter] | \setuphead [title][chapter] | ||
\setuphead [subject] | \setuphead [subject] | ||
− | + | [style={\ss\bf}, before=\blank, after=\blank] | |
− | |||
− | \definelist | + | % define lists for ToC |
− | \setuplist | + | \definelist [part] |
− | + | \setuplist [part] | |
− | + | [before=\blank, style={\ss\bf}, | |
− | + | partnumber=no, pagenumber=no, | |
− | \definelist | + | margin=0pt, width=0pt, distance=0pt] |
− | \setuplist | + | \definelist [chapter] |
− | + | \setuplist [chapter] | |
− | + | [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] | |
− | + | [level=chapter, placehead=yes, criterium=all, | |
− | + | style={\tfc\em}, alternative=b, | |
− | + | offset=none] | |
\setupcombinedlist [inhalt] | \setupcombinedlist [inhalt] | ||
− | + | [partnumber=no, | |
− | + | interaction=all] | |
% define index | % define index | ||
\setupregister [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] | \definepapersize [UNO] [width=138mm, height=212mm] | ||
+ | |||
\startmode[correction] | \startmode[correction] | ||
− | \setuppapersize | + | \setuppapersize [UNO] [A4] |
\stopmode | \stopmode | ||
\startnotmode[correction] | \startnotmode[correction] | ||
− | \setuparranging | + | |
− | \setuppapersize | + | \setuparranging [2SIDE] % imposing |
+ | \setuppapersize [UNO] [UNO] | ||
\stopnotmode | \stopnotmode | ||
\setuplayout [alternative=doublesided, | \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 | + | \setuptolerance [verytolerant] |
\setupheader [text][state=stop] | \setupheader [text][state=stop] | ||
\setupheadertexts [][chapter][part][] | \setupheadertexts [][chapter][part][] | ||
Line 93: | 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, | |
− | + | location={text,footer,right}] | |
\setuppagenumber [state=start] | \setuppagenumber [state=start] | ||
− | \setupfootnotes | + | \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 123: | 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] |
− | + | [before={\vfill\startlinecorrection\vbox\bgroup\switchtobodyfont[ss,8pt]\noindent}, | |
+ | after={\egroup\stoplinecorrection}] | ||
− | \setupfloats | + | \setupfloats [width=fit, align=right] |
\setupexternalfigures [directory={./bilder}] | \setupexternalfigures [directory={./bilder}] | ||
− | \setupcaptions | + | \setupcaptions [number=no, align=right, |
− | + | before={\blank[3pt]}, | |
− | + | after={\blank[small]}, style={\ss\tfx}] | |
− | \setupcombinations | + | \setupcombinations [width=fit, align=right, style={\ss\tfx}] |
\stopenvironment | \stopenvironment | ||
− | </ | + | </texcode> |
+ | |||
+ | [[Category:Sample documents]] |
Latest revision as of 23:18, 11 August 2005
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