Proceedings style

From Wiki
Revision as of 20:05, 28 April 2008 by Hraban (talk | contribs) (New page: This one works only with XeTeX/LuaTeX. Use UTF-8 encoding! ==Environment== <texcode> \startenvironment env_proceedings \project project_proceedings \version [final] % final, temporary, ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

Environment

\startenvironment env_proceedings
\project project_proceedings

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

\setuptolerance		[{verytolerant, verystrict}]

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

\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}%
  	{\rm\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\ChapterTitle#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]

\setupexternalfigures[directory={img}]

\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_titel
	\component c_00_impressum
\stopfrontmatter

%% Inhalt

\startbodymatter

	\setuppagenumbering[state=start]
	{
	\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

	}

	\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