Difference between revisions of "Proceedings style"

From Wiki
Jump to navigation Jump to search
Line 1: Line 1:
I made this in 2008 for some 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!
+
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!
 
This one works only with XeTeX/LuaTeX. Use UTF-8 encoding!
  
 +
--[[User:Hraban|Hraban]] 22:24, 28 April 2008 (CEST)
  
 
==Environment==
 
==Environment==
Line 12: Line 13:
 
\mainlanguage [de]
 
\mainlanguage [de]
  
\setuptolerance [{verytolerant, verystrict}]
+
\setuptolerance [{verytolerant, verystrict}] % page breaking
  
 
%% Fonts
 
%% Fonts
Line 24: Line 25:
 
\setupbodyfontenvironment [default][em=italic] % use italic as em, not slanted
 
\setupbodyfontenvironment [default][em=italic] % use italic as em, not slanted
  
 +
% some shortcuts
 
\def\TextBig{\switchtobodyfont[gyr-mix, rm, 10pt]}
 
\def\TextBig{\switchtobodyfont[gyr-mix, rm, 10pt]}
 
\def\TextNormal{\switchtobodyfont[gyr-mix, rm, 8pt]}
 
\def\TextNormal{\switchtobodyfont[gyr-mix, rm, 8pt]}
Line 86: Line 88:
 
   \doiftextelse%
 
   \doiftextelse%
 
   {\sectionworldparameter\c!author}%
 
   {\sectionworldparameter\c!author}%
   {\rm\tf\sectionworldparameter\c!author\crlf\vskip0.25em}
+
   {\ss\tf\sectionworldparameter\c!author\crlf\vskip0.25em}
 
   {}%
 
   {}%
 
   }
 
   }
Line 132: Line 134:
 
style={\ss\bf},  
 
style={\ss\bf},  
 
before={\blank}, after={\blank}]
 
before={\blank}, after={\blank}]
 +
 
\setuphead[subsection][
 
\setuphead[subsection][
 
page=no,  
 
page=no,  
Line 182: Line 185:
 
\setupitemgroup[itemize][packed][indentnext=no]
 
\setupitemgroup[itemize][packed][indentnext=no]
  
\setupfootnotes[way=bypage, conversion=set 2]
+
\setupfootnotes[way=bypage, conversion=set 2] % use asterisk, dagger etc. for footnotes per page
  
\setupexternalfigures[directory={img}]
+
\setupexternalfigures[directory={img}] % all figures are in ./img
  
 +
% some words that got bad hyphenation
 
\hyphenation{
 
\hyphenation{
 
% en
 
% en
Line 217: Line 221:
  
 
\startfrontmatter
 
\startfrontmatter
\component c_00_titel
+
\component c_00_titlepage
\component c_00_impressum
+
\component c_00_imprint
 
\stopfrontmatter
 
\stopfrontmatter
  
Line 226: Line 230:
  
 
\setuppagenumbering[state=start]
 
\setuppagenumbering[state=start]
 +
% ToC
 
{
 
{
 
\setuppagenumbering[location=] % should switch off page numbering on ToC page, but doesn't work
 
\setuppagenumbering[location=] % should switch off page numbering on ToC page, but doesn't work
Line 234: Line 239:
 
\blank[3*big]
 
\blank[3*big]
 
 
\placeinhalt
+
\placeinhalt % ToC
  
 
}
 
}
Line 257: Line 262:
 
</texcode>
 
</texcode>
  
== Sample Component==
+
== Sample Components==
 +
 
 +
===Chapter===
 
<texcode>
 
<texcode>
 
\startcomponent c_00_sample
 
\startcomponent c_00_sample
Line 273: Line 280:
  
 
\stopsectionworld % \start... is contained by \MyChapter
 
\stopsectionworld % \start... is contained by \MyChapter
 +
\stopcomponent
 +
</texcode>
 +
 +
===Title page===
 +
<texcode>
 +
\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
 +
</texcode>
 +
 +
===Imprint===
 +
<texcode>
 +
\startcomponent c_00_imprint
 +
\product prd_KR05
 +
\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
 
\stopcomponent
 
</texcode>
 
</texcode>

Revision as of 20:26, 28 April 2008

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)

Environment

\startenvironment env_proceedings
\project project_proceedings

\version		[final] % final, temporary, concept
\mainlanguage		[de]

\setuptolerance		[{verytolerant, verystrict}] % page breaking

%% Fonts

\starttypescript	[fiee]	[gyr-mix]
	\definetypeface	[gyr-mix]	[rm]	[serif]	[schola]	[default]
	\definetypeface	[gyr-mix]	[ss]	[sans]	[heros]	[default] 
\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
			]

\setupindenting[yes, small, next]

% 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

% with help from Wolfgang Schuster et.al., 2008-04-15
% start WS
\unprotect

\resetvalue{\??sw\v!chapter}

\startsetups chapter:list

\def\\{{\nomarking{\unskip\nolist\crlf}}}

  \doiftextelse{\sectionworldparameter\c!author}
    {\expanded{\writetolist[\v!chapter]
      {\sectionworldparameter\c!author:\space
       \sectionworldparameter\c!text}{}}}
    {\expanded{\writetolist[\v!chapter]
      {\sectionworldparameter\c!text}{}}}

  \def\ChapterAuthor{%
  	\doiftextelse%
  	{\sectionworldparameter\c!author}%
  	{\ss\tf\sectionworldparameter\c!author\crlf\vskip0.25em}
  	{}%
  }
  \def\ChapterTitle{{\ss\bfb\sectionworldparameter\c!text}}
  \def\ChapterSubTitle{%
  	\doiftextelse%
  	{\sectionworldparameter\c!subtitle}%
  	{\crlf\vskip0.2em\ss\bf\sectionworldparameter\c!subtitle}%
  	{}%
  }

\stopsetups

\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 % unsure if we need this at all...
  [chapter]
  [incrementnumber=no,
   command=\ChapterCommand, 
   page=yes, 
   number=no, 
   align={flushleft,nothyphenated,verytolerant}, 
   style=,
   ]

\def\MyChapter#1#2#3{\startsectionworld[chapter][author={#1}, text={#2}, subtitle={#3}]}

\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]


%% Index

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

\def\MyIndexLine#1{#1\hfill}
\setupregister[index][n=2, balance=no, indicator=no, pagestyle=normal, textcommand=\MyIndexLine]


%% Misc

\def\dots{\thinspace.\thinspace.\thinspace.\thinspace}


% Header
\setupheader[text][state=stop, style={\ss\tfx}, frame=off, bottomframe=on]
\setupheadertexts[text][chapter][pagenumber]
\setupmarking[chapter][limittext={}]	

% Color
\setupinteraction[state=start, color=black, style={\tf}]
\setupcolors[state=start, rgb=no, cmyk=no]
\definecolor[grau][k=.1]
\setupbackground[
	background=screen, color=grau, 
	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]

\setupfootnotes[way=bypage, conversion=set 2] % use asterisk, dagger etc. for footnotes per page

\setupexternalfigures[directory={img}] % all figures are in ./img

% some words that got bad hyphenation
\hyphenation{
% en
de-mo-cra-cy
de-mo-gra-phi-cal-ly
fun-da-men-ta-lists
know-led-ge
ma-ni-fe-sta-ti-ons
par-ti-cu-lar
so-cie-ty
}

\stopenvironment

Product

\startproduct prd_KR05
\project project_proceedings

%% PDF Setup

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

%% Vorspann

\startfrontmatter
	\component c_00_titlepage
	\component c_00_imprint
\stopfrontmatter

%% Inhalt

\startbodymatter

	\setuppagenumbering[state=start]
% ToC
	{
	\setuppagenumbering[location=] % should switch off page numbering on ToC page, but doesn't work
	\setupheader[text][state=stop]

	% 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.
\stopbodymatter

%% Appendix

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

Sample Components

Chapter

\startcomponent c_00_sample
\product prd_KR05
\project project_proceedings

\language[en]

\MyChapter%
{Author}%
{Sample title \\with second line}%
{and subtitle}

\input tufte

\stopsectionworld % \start... is contained by \MyChapter
\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_KR05
\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