Difference between revisions of "Proceedings style"

From Wiki
Jump to navigation Jump to search
(Wrong order for arguments in writetolist)
m (Text replacement - "<cmd>" to "{{cmd|")
 
(6 intermediate revisions by 5 users not shown)
Line 1: Line 1:
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!
+
< [[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}} - thanks to Wolfgang Schuster!
  
 
This one works only with XeTeX/LuaTeX. Use UTF-8 encoding!
 
This one works only with XeTeX/LuaTeX. Use UTF-8 encoding!
  
 
--[[User:Hraban|Hraban]] 22:24, 28 April 2008 (CEST)
 
--[[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==
 
==Environment==
Line 11: Line 17:
  
 
\version [final] % final, temporary, concept
 
\version [final] % final, temporary, concept
\mainlanguage [de]
+
\mainlanguage [de] % German
  
 
\setuptolerance [{verytolerant, verystrict}] % page breaking
 
\setuptolerance [{verytolerant, verystrict}] % page breaking
  
 
%% Fonts
 
%% Fonts
 +
 +
\definefontfeature[default][default][expansion=quality,protrusion=quality]
 +
\setupalign[hz,hanging]
  
 
\starttypescript [fiee] [gyr-mix]
 
\starttypescript [fiee] [gyr-mix]
\definetypeface [gyr-mix] [rm] [serif] [schola] [default]
+
\definetypeface [gyr-mix] [rm] [serif] [schola]
\definetypeface [gyr-mix] [ss] [sans] [heros] [default]  
+
\definetypeface [gyr-mix] [ss] [sans] [heros]
 +
\definetypeface [gyr-mix] [tt] [mono] [modern]
 +
\definetypeface [gyr-mix] [mm] [math] [sans]
 
\stoptypescript
 
\stoptypescript
 
\usetypescript [fiee][gyr-mix]
 
\usetypescript [fiee][gyr-mix]
Line 49: Line 60:
 
width=115mm, height=192mm
 
width=115mm, height=192mm
 
]
 
]
 
\setupindenting[yes, small, next]
 
  
 
% Pagination
 
% Pagination
Line 68: Line 77:
 
%% Chapter Titling
 
%% Chapter Titling
  
% with help from Wolfgang Schuster et.al., 2008-04-15
+
\define\ChapterAuthor
% start WS
+
{\doiftext{\theChapterAuthor}
\unprotect
+
{\rm\tf\theChapterAuthor\crlf\vskip0.25em}}
  
\resetvalue{\??sw\v!chapter}
+
\define\ChapterTitle
 +
{{\ss\bfb\theChapterTitle}}
  
\startsetups chapter:list
+
\define\ChapterSubTitle
 +
{\doiftext{\theChapterSubTitle}
 +
{\crlf\vskip0.2em\ss\bf\theChapterSubTitle}}
  
\def\\{{\nomarking{\unskip\nolist\crlf}}}
+
\define[2]\ChapterCommand{\marking[chapter]{\theChapterTitle}%
 +
\vbox{\ChapterAuthor\ChapterTitle\ChapterSubTitle}}
  
  \doiftextelse{\sectionworldparameter\c!author}
+
\let\theChapterAuthor\relax
    {\expanded{\writetolist[\v!chapter]
+
\let\theChapterTitle\relax
      {}{\sectionworldparameter\c!author:\space
+
\let\theChapterSubTitle\relax
      \sectionworldparameter\c!text}}}
 
    {\expanded{\writetolist[\v!chapter]
 
      {}{\sectionworldparameter\c!text}}}
 
  
  \def\ChapterAuthor{%
+
\define[3]\Title%
  \doiftextelse%
+
{\def\theChapterAuthor{#1}%
  {\sectionworldparameter\c!author}%
+
\def\theChapterTitle{#2}%
  {\ss\tf\sectionworldparameter\c!author\crlf\vskip0.25em}
+
\def\theChapterSubTitle{#3}%
  {}%
+
\doiftextelse{#1}{\chapter{#1: #2}}{\chapter{#2}}}
  }
 
  \def\ChapterTitle{{\ss\bfb\sectionworldparameter\c!text}}
 
  \def\ChapterSubTitle{%
 
  \doiftextelse%
 
  {\sectionworldparameter\c!subtitle}%
 
  {\crlf\vskip0.2em\ss\bf\sectionworldparameter\c!subtitle}%
 
  {}%
 
  }
 
  
\stopsetups
+
% use this like \Title{Name Author}{Article Title}{Article Subtitle}
 
 
\setupsectionworld
 
  [chapter]
 
  [setups={chapter:list},
 
  author=]
 
 
 
\def\ChapterCommand#1#2%
 
  {\vbox{\ChapterAuthor\ChapterTitle\ChapterSubTitle}}
 
 
 
\let\ChapterAuthor\relax
 
\let\ChapterTitle\relax
 
\let\ChapterSubTitle\relax
 
 
 
\protect
 
% stop WS
 
  
 
\setuphead[chapter][
 
\setuphead[chapter][
  incrementnumber=no,
+
header=no,
  command=\ChapterCommand,  
+
command=\ChapterCommand,  
  page=yes,  
+
page=yes,
  number=no,  
+
number=no,
  align={flushleft,nothyphenated,verytolerant},  
+
align={flushleft,nothyphenated,verytolerant},  
  style=, header=high
+
style=,]
  ]
+
\setuphead[title][
 
+
page=yes,
\def\MyChapter#1#2#3{\startsectionworld[chapter][author={#1}, text={#2}, subtitle={#3}]}
+
number=no,
% a stupid shortcut - don't forget \stopsectionworld at the end of the chapter!
+
align={flushleft,nothyphenated,verytolerant},  
 
+
command=,
 +
style={\ss\bfb},  
 +
before={}, after={\blank}]
 
\setuphead[section][
 
\setuphead[section][
 
page=no,  
 
page=no,  
Line 134: Line 123:
 
style={\ss\bf},  
 
style={\ss\bf},  
 
before={\blank}, after={\blank}]
 
before={\blank}, after={\blank}]
 
 
\setuphead[subsection][
 
\setuphead[subsection][
 
page=no,  
 
page=no,  
Line 147: Line 135:
 
[chapter]
 
[chapter]
 
[level=chapter, placehead=no,  
 
[level=chapter, placehead=no,  
criterium=all,
+
criterium=all, alternative=b,
alternative=b,
 
 
offset=none]
 
offset=none]
\setupcombinedlist  [inhalt] [partnumber=no]
+
\setupcombinedlist  [inhalt]
 
+
[partnumber=no,sectionnumber=no,headnumber=no,numbercommand=\relax]
  
 
%% Index
 
%% Index
Line 160: Line 147:
 
\setupregister[index][n=2, balance=no, indicator=no, pagestyle=normal, textcommand=\MyIndexLine]
 
\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
 
%% Misc
  
\def\dots{\thinspace.\thinspace.\thinspace.\thinspace}
+
% Header
% I don't like the default \dots or \textellipsis
+
\setupheader[text][state=stop,style={\ss\tfx},%
 +
frame=off,bottomframe=on]
 +
 
 +
\setupheadertexts[text][{\setupselector[title][n=2]\getmarking[chapter]}][pagenumber]
  
% Header
 
\setupheader[text][state=stop, style={\ss\tfx}, frame=off, bottomframe=on]
 
\setupheadertexts[text][chapter][pagenumber]
 
 
\setupmarking[chapter][limittext={}]
 
\setupmarking[chapter][limittext={}]
  
 
% Color & Background
 
% Color & Background
\setupinteraction[state=start, color=black, style={\tf}]
+
\setupinteraction[state=stop, color=black, style={\tf}]
\setupcolors[state=start, rgb=no, cmyk=no]
+
\setupcolors[state=start, rgb=no, cmyk=yes, overprint=yes]
\definecolor[grau][k=.1]
+
\definecolor[gray][k=.1]
 
\setupbackground[
 
\setupbackground[
background=screen, color=grau,  
+
background=color, backgroundcolor=lightgray,  
 
leftoffset=1em, rightoffset=1em,
 
leftoffset=1em, rightoffset=1em,
 
topoffset=0.5em, bottomoffset=0.5em]
 
topoffset=0.5em, bottomoffset=0.5em]
  
 
% Tables and Lists
 
% Tables and Lists
\setupTABLE[frame=off, split=yes, distance=1em]
+
\setupTABLE[frame=off, split=yes]
 
\setuptabulate[indentnext=no, align=right]
 
\setuptabulate[indentnext=no, align=right]
 
\setupitemgroup[itemize][packed][indentnext=no]
 
\setupitemgroup[itemize][packed][indentnext=no]
  
\setupfootnotes[way=bypage, conversion=set 2] % use asterisk, dagger etc. for footnotes per page
+
\setupnote[footnote][%
 +
way=bypage,  
 +
numberconversion=set 2, % use asterisk, dagger etc. for footnotes per page
 +
prefix=no]
  
\setupexternalfigures[directory={img}] % all figures are in ./img
+
\setupexternalfigures[directory={img},width=\textwidth] % all figures are in ./img
  
 +
\setupindenting[yes, small, next]
  
 
\stopenvironment
 
\stopenvironment
Line 195: Line 192:
 
==Product==
 
==Product==
 
<texcode>
 
<texcode>
\startproduct prd_KR05
+
\startproduct prd_KR06
 
\project project_proceedings
 
\project project_proceedings
  
Line 221: Line 218:
 
% ToC
 
% ToC
 
{
 
{
\setuppagenumbering[location=] % sswitch off page numbering on ToC page
+
\setuppagenumbering[location=] % switch off page numbering on ToC page
  
 
% neither chapter nor title seems to work here, same with \completeinhalt
 
% neither chapter nor title seems to work here, same with \completeinhalt
Line 239: Line 236:
 
\component c_03_freiheit
 
\component c_03_freiheit
 
% etc.
 
% etc.
 +
 +
\setupheader[text][state=stop]
 +
 
\stopbodymatter
 
\stopbodymatter
  
Line 255: Line 255:
 
<texcode>
 
<texcode>
 
\startcomponent c_00_sample
 
\startcomponent c_00_sample
\product prd_KR05
+
\product prd_KR06
 
\project project_proceedings
 
\project project_proceedings
  
 
\language[en]
 
\language[en]
  
\MyChapter%
+
\Title%
 
{Author}%
 
{Author}%
{Sample title \\with second line}%
+
{Sample title}%
 
{and subtitle}
 
{and subtitle}
  
 
\input tufte
 
\input tufte
  
\stopsectionworld % \start... is contained in \MyChapter
 
 
\stopcomponent
 
\stopcomponent
 
</texcode>
 
</texcode>
Line 316: Line 315:
 
<texcode>
 
<texcode>
 
\startcomponent c_00_imprint
 
\startcomponent c_00_imprint
\product prd_KR05
+
\product prd_KR06
 
\project project_proceedings
 
\project project_proceedings
  
Line 350: Line 349:
 
\stopcomponent
 
\stopcomponent
 
</texcode>
 
</texcode>
 +
 +
 +
[[Category:Sample documents]]

Latest revision as of 13:21, 9 August 2020

< Sample_documents

I made this in 2008 for some political seminary proceedings (Klingberger Reihe Nr.5, 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 \startsectionworld - thanks to Wolfgang Schuster!

This one works only with XeTeX/LuaTeX. Use UTF-8 encoding!

--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.

--Hraban 19:54, 19 May 2009 (UTC)

Environment

\startenvironment env_proceedings
\project project_proceedings

\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]
	\definetypeface	[gyr-mix]	[ss]	[sans]	[heros]
	\definetypeface	[gyr-mix]	[tt]	[mono]	[modern]
	\definetypeface	[gyr-mix]	[mm]	[math]	[sans]
\stoptypescript
\usetypescript		[fiee][gyr-mix]
\setupbodyfont		[gyr-mix,rm,8pt]
\setupbodyfontenvironment	[default][em=italic] % use italic as em, not slanted

% some shortcuts
\def\TextBig{\switchtobodyfont[gyr-mix, rm, 10pt]}
\def\TextNormal{\switchtobodyfont[gyr-mix, rm, 8pt]}
\def\TextSmall{\switchtobodyfont[gyr-mix, rm, 6pt]}
\def\TextSmallSans{\switchtobodyfont[gyr-mix, ss, 6pt]}


%% Layout

\setuppapersize		[A5][A5]
% for imposition use:
%\setuppapersize		[A5][A4,landscape]
%\setuparranging		[2UP]

\setuplayout		[location=middle,
			alternative=doublesided,
			grid=yes,
			backspace=15mm,
			leftmargin=5mm, leftmargindistance=0mm,
			rightmargin=18mm, rightmargindistance=0mm,
			topspace=8mm, header=10mm, 
			footer=10mm,
			width=115mm, height=192mm
			]

% Pagination
\setuppagenumbering[
	alternative=doublesided,
	location={header,right},
	style={\ss\tfx},
	way=bypart,
	sectionnumber=no,
	strut=yes, state=stop]

\setupsectionblock[frontpart][page=no, number=no]
\setupsectionblock[bodypart][page=yes]
%\setupsectionblock[appendix][page=no]
\setupsectionblock[backpart][page=yes]

%% Chapter Titling

\define\ChapterAuthor
	{\doiftext{\theChapterAuthor}
	{\rm\tf\theChapterAuthor\crlf\vskip0.25em}}

\define\ChapterTitle
	{{\ss\bfb\theChapterTitle}}

\define\ChapterSubTitle
	{\doiftext{\theChapterSubTitle}
	{\crlf\vskip0.2em\ss\bf\theChapterSubTitle}}

\define[2]\ChapterCommand{\marking[chapter]{\theChapterTitle}%
	\vbox{\ChapterAuthor\ChapterTitle\ChapterSubTitle}}

\let\theChapterAuthor\relax
\let\theChapterTitle\relax
\let\theChapterSubTitle\relax

\define[3]\Title%
	{\def\theChapterAuthor{#1}%
	\def\theChapterTitle{#2}%
	\def\theChapterSubTitle{#3}%
	\doiftextelse{#1}{\chapter{#1: #2}}{\chapter{#2}}}

% use this like \Title{Name Author}{Article Title}{Article Subtitle}

\setuphead[chapter][
	header=no,
	command=\ChapterCommand, 
	page=yes,
	number=no,
	align={flushleft,nothyphenated,verytolerant}, 
	style=,]
\setuphead[title][
	page=yes, 
 	number=no, 
	align={flushleft,nothyphenated,verytolerant}, 
	command=,
	style={\ss\bfb}, 
	before={}, after={\blank}]
\setuphead[section][
	page=no, 
	number=no, 
	align={flushleft,nothyphenated,verytolerant}, 
	style={\ss\bf}, 
	before={\blank}, after={\blank}]
\setuphead[subsection][
	page=no, 
	number=no, 
	align={flushleft,nothyphenated,verytolerant}, 
	style={\ss\tf}, 
	before={\blank}, after={\vskip0.5em}]


%% ToC
\definecombinedlist	[inhalt]
				[chapter]
				[level=chapter, placehead=no, 
				criterium=all, alternative=b,
				offset=none]
\setupcombinedlist  [inhalt]
				[partnumber=no,sectionnumber=no,headnumber=no,numbercommand=\relax]

%% Index

\def\Tindex#1{\index{#1}#1}

\def\MyIndexLine#1{#1\hfill}
\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
\setupheader[text][state=stop,style={\ss\tfx},%
	frame=off,bottomframe=on]

\setupheadertexts[text][{\setupselector[title][n=2]\getmarking[chapter]}][pagenumber]

\setupmarking[chapter][limittext={}]	

% Color & Background
\setupinteraction[state=stop, color=black, style={\tf}]
\setupcolors[state=start, rgb=no, cmyk=yes, overprint=yes]
\definecolor[gray][k=.1]
\setupbackground[
	background=color, backgroundcolor=lightgray, 
	leftoffset=1em, rightoffset=1em,
	topoffset=0.5em, bottomoffset=0.5em]

% Tables and Lists
\setupTABLE[frame=off, split=yes]
\setuptabulate[indentnext=no, align=right]
\setupitemgroup[itemize][packed][indentnext=no]

\setupnote[footnote][%
	way=bypage, 
	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

\startproduct prd_KR06
\project project_proceedings

%% PDF Setup

\input spec-tst
\setupinteraction[state=start,
	author={Hraban},
	title={Sample Proceedings},
	subtitle={}
]

%% leader

\startfrontmatter
	\component c_00_titlepage
	\component c_00_imprint
\stopfrontmatter

%% Content

\startbodymatter

	\setuppagenumbering[state=start]
% ToC
	{
	\setuppagenumbering[location=] % switch off page numbering on ToC page

	% neither chapter nor title seems to work here, same with \completeinhalt	
	{\noindent\ss\bfb Inhalt}
	\blank[3*big]
	
	\placeinhalt % ToC

	\page[left]
	}

	\setupheader[text][state=start]

	% each component is one chapter
	\component c_01_vorwort
	\component c_02_programm
	\component c_03_freiheit
	% etc.

	\setupheader[text][state=stop]

\stopbodymatter

%% Appendix

\startbackmatter
	%\completeindex
	\component c_99_advertising
\stopbackmatter
\stopproduct

Sample Components

Chapter

\startcomponent c_00_sample
\product prd_KR06
\project project_proceedings

\language[en]

\Title%
{Author}%
{Sample title}%
{and subtitle}

\input tufte

\stopcomponent

Title page

\startcomponent c_00_titlepage
\product prd_KR05
\project project_proceedings


\TextBig
\setuppagenumbering[state=stop]

\framed[height=\textheight, width=\textwidth, frame=on, align=center]{%
\startlines

{\sc Klingberger Reihe Nr.\,}5

\vfill

{\bfa Wertekonsens in Europa}

Die grundgesetzliche Behinderung
der Integration in Deutschland

\blank

{\bfa Consensus on Values in Europe}

The Constitutional Obstruction
of Integration in Germany

\vfill

\vfill

\framed[frame=off, width=\textwidth, align=middle]{\externalfigure[JBK_logo.pdf][width=30mm]}

Jugend- und Bildungsstätte Klingberg

\stoplines
}
\stopcomponent

Imprint

\startcomponent c_00_imprint
\product prd_KR06
\project project_proceedings

\page
	\TextNormal

{\tfx
\startlines
Dedication, Funding
\stoplines
}

\strut\vfill
\framed[frame=off, align=bottom]{
\startlines

{\sc Klingberger Reihe Nr.\,}5

{\tfx
Publisher

Copyright

typeset by {\it fiëé visuëlle} using open source software (\TEX, \CONTEXT)

printed in Germany

ISBN 978-3-
} % tfx
\stoplines
} % framed

\stopcomponent