Changes

Jump to navigation Jump to search
350 bytes added ,  13:21, 9 August 2020
m
Text replacement - "<cmd>" to "{{cmd|"
< [[Sample_documents]] I made this in 2008 for some political seminary proceedings (Klingberger Reihe Nr.5, [http://verlag.unitarier.de/?menu=0-2-3 Verlag Deutsche Unitarier]). Every chapter is by an other author, and the author must show up in the table of contents, so there's a special handling of chapter titles using newish and undocumented <{{cmd>|startsectionworld</cmd> }} - thanks to Wolfgang Schuster!
This one works only with XeTeX/LuaTeX. Use UTF-8 encoding!
--[[User:Hraban|Hraban]] 22:24, 28 April 2008 (CEST)
 
One year later, "Klingberger Reihe Nr.6" was published. Since I switched to MkIV (continuous beta), some setups weren't working any longer. Maybe some could have been easier before... This one worked with betas from mid of May 2009.
 
--[[User:Hraban|Hraban]] 19:54, 19 May 2009 (UTC)
==Environment==
\version [final] % final, temporary, concept
\mainlanguage [de]% German
\setuptolerance [{verytolerant, verystrict}] % page breaking
%% Fonts
 
\definefontfeature[default][default][expansion=quality,protrusion=quality]
\setupalign[hz,hanging]
\starttypescript [fiee] [gyr-mix]
\definetypeface [gyr-mix] [rm] [serif] [schola] [default] \definetypeface [gyr-mix] [ss] [sans] [heros] \definetypeface [gyr-mix] [tt] [mono] [defaultmodern] \definetypeface [gyr-mix] [mm] [math] [sans]
\stoptypescript
\usetypescript [fiee][gyr-mix]
width=115mm, height=192mm
]
 
\setupindenting[yes, small, next]
% Pagination
%% Chapter Titling
% with help from Wolfgang Schuster et.al., 2008-04-15\define\ChapterAuthor% start WS {\doiftext{\theChapterAuthor} {\unprotectrm\tf\theChapterAuthor\crlf\vskip0.25em}}
\resetvaluedefine\ChapterTitle {{\ss\??swbfb\v!chaptertheChapterTitle}}
\startsetups chapter:listdefine\ChapterSubTitle {\doiftext{\theChapterSubTitle} {\crlf\vskip0.2em\ss\bf\theChapterSubTitle}}
\defdefine[2]\ChapterCommand{\marking[chapter]{{\nomarkingtheChapterTitle}% \vbox{\unskipChapterAuthor\nolistChapterTitle\crlf}ChapterSubTitle}}
\doiftextelse{let\sectionworldparametertheChapterAuthor\c!author}relax {\expanded{let\writetolist[theChapterTitle\v!chapter]relax {}{\sectionworldparameterlet\c!author:theChapterSubTitle\space \sectionworldparameter\c!text}}} {\expanded{\writetolist[\v!chapter] {}{\sectionworldparameter\c!text}}}relax
\defdefine[3]\ChapterAuthor{Title% \doiftextelse% {\sectionworldparameterdef\c!authortheChapterAuthor{#1}% { \ss\tfdef\sectionworldparameter\c!author\crlf\vskip0.25em} theChapterTitle{#2}% } \def\ChapterTitle{theChapterSubTitle{\ss\bfb\sectionworldparameter\c!text#3}} \def\ChapterSubTitle{% \doiftextelse% {#1}{\sectionworldparameter\c!subtitlechapter{#1: #2}}% {\crlf\vskip0.2em\ss\bf\sectionworldparameter\c!subtitlechapter{#2}% {}% }
% use this like \stopsetups \setupsectionworld [chapter] [setups=Title{chapter:listName Author}, author=] \def\ChapterCommand#1#2% {\vboxArticle Title}{\ChapterAuthor\ChapterTitle\ChapterSubTitle}Article Subtitle\let\ChapterAuthor\relax\let\ChapterTitle\relax\let\ChapterSubTitle\relax \protect% stop WS
\setuphead[chapter][
incrementnumber header=no, command=\ChapterCommand, page=yes, number=no, align={flushleft,nothyphenated,verytolerant}, style=, header=high ] \def\MyChapter#1#2#3{\startsectionworldsetuphead[chaptertitle][author page=yes, number=no, align={#1flushleft,nothyphenated,verytolerant}, text command=, style={#2\ss\bfb}, subtitle before={}, after={#3\blank}]}% a stupid shortcut - don't forget \stopsectionworld at the end of the chapter! 
\setuphead[section][
page=no,
style={\ss\bf},
before={\blank}, after={\blank}]
 
\setuphead[subsection][
page=no,
[chapter]
[level=chapter, placehead=no,
criterium=all, alternative=b,
offset=none]
\setupcombinedlist [inhalt] [partnumber=no,sectionnumber=no,headnumber=no,numbercommand=\relax
%% Index
\setupregister[index][n=2, balance=no, indicator=no, pagestyle=normal, textcommand=\MyIndexLine]
% selector (undocumented feature)
% use like \select{title}{First Version}{Second Version}
% depending on the setup, either version is used
% very helpful for different versions of titles in t.o.c. and headers
\defineselector[title][max=2,n=2]
\setupselector[title][n=1]
%% Misc
% Header\def\dotssetupheader[text][state=stop,style={\thinspace.\thinspace.ss\thinspace.\thinspacetfx},% frame=off,bottomframe=on]% I don't like the default \setupheadertexts[text][{\dots or setupselector[title][n=2]\textellipsisgetmarking[chapter]}][pagenumber]
% Header
\setupheader[text][state=stop, style={\ss\tfx}, frame=off, bottomframe=on]
\setupheadertexts[text][chapter][pagenumber]
\setupmarking[chapter][limittext={}]
% Color & Background
\setupinteraction[state=startstop, color=black, style={\tf}]\setupcolors[state=start, rgb=no, cmyk=noyes, overprint=yes]\definecolor[graugray][k=.1]
\setupbackground[
background=screencolor, colorbackgroundcolor=graulightgray,
leftoffset=1em, rightoffset=1em,
topoffset=0.5em, bottomoffset=0.5em]
% Tables and Lists
\setupTABLE[frame=off, split=yes, distance=1em]
\setuptabulate[indentnext=no, align=right]
\setupitemgroup[itemize][packed][indentnext=no]
\setupfootnotessetupnote[footnote][% way=bypage, conversion numberconversion=set 2] , % use asterisk, dagger etc. for footnotes per page prefix=no]
\setupexternalfigures[directory={img},width=\textwidth] % all figures are in ./img
\setupindenting[yes, small, next]
\stopenvironment
==Product==
<texcode>
\startproduct prd_KR05prd_KR06
\project project_proceedings
% ToC
{
\setuppagenumbering[location=] % sswitch switch off page numbering on ToC page
% neither chapter nor title seems to work here, same with \completeinhalt
\component c_03_freiheit
% etc.
 
\setupheader[text][state=stop]
 
\stopbodymatter
<texcode>
\startcomponent c_00_sample
\product prd_KR05prd_KR06
\project project_proceedings
\language[en]
\MyChapterTitle%
{Author}%
{Sample title \\with second line}%
{and subtitle}
\input tufte
\stopsectionworld % \start... is contained in \MyChapter
\stopcomponent
</texcode>
<texcode>
\startcomponent c_00_imprint
\product prd_KR05prd_KR06
\project project_proceedings
\stopcomponent
</texcode>
 
 
[[Category:Sample documents]]

Navigation menu