97049f37e78a5f9c4b9818f6fa1906181acbfc95
[librarian.git] / librarian / pdf / wl.cls
1 % -*- coding: utf-8 -*-
2 \NeedsTeXFormat{LaTeX2e}
3 \ProvidesClass{wl}[2011/11/28 wolnelektury.pl book style]
4
5 % PDF customizations
6 %
7 % nofootnotes - disable generation of footnotes
8 % nothemes - disable generation of themes
9 % defaultleading - default leading
10 % onehalfleading - leading of 1.5 (interlinia)
11 % doubleleading - double leading (interlinia)
12 % a4paper,... - paper size as required by LaTeX
13 % nowlfont - don't use customized WL font
14
15 \RequirePackage{fixltx2e}
16 \RequirePackage{setspace}
17 \RequirePackage{type1cm}
18 \DeclareOption{13pt}{%
19 \AtEndOfClass{%
20 % font size definitions, similar to ones in /usr/share/texmf-texlive/tex/latex/base/
21 \renewcommand\normalsize{%
22    \@setfontsize\normalsize{13pt}{14.5pt}%
23    \abovedisplayskip 12\p@ \@plus3\p@ \@minus7\p@
24    \abovedisplayshortskip \z@ \@plus3\p@
25    \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
26    \belowdisplayskip \abovedisplayskip
27    \let\@listi\@listI}\normalsize%
28 \renewcommand\footnotesize{%
29    \@setfontsize\footnotesize\@xpt\@xiipt
30    \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
31    \abovedisplayshortskip \z@ \@plus3\p@
32    \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
33    \def\@listi{\leftmargin\leftmargini
34                \topsep 6\p@ \@plus2\p@ \@minus2\p@
35                \parsep 3\p@ \@plus2\p@ \@minus\p@
36                \itemsep \parsep}%
37    \belowdisplayskip \abovedisplayskip
38 }%
39 }%
40 }
41
42 %% \DeclareOption{14pt}{\renewcommand{\normalsize}{\AtEndOfClass{\fontsize{14}{17}\selectfont}}}
43
44 \DeclareOption{defaultleading}{}
45 \DeclareOption{doubleleading}{\AtBeginDocument{\doublespacing}}%\setlength{\leading}{1em plus 0.5ex minus 0.2ex}}
46 \DeclareOption{onehalfleading}{\AtBeginDocument{\onehalfspacing}}%\setlength{\leading}{1em plus 0.5ex minus 0.2ex}}
47
48 %% This does not really work, since dvipdfm(x) will use it's configuration in /etc/texmf/dvipdfm(x) and force a global paper size setting.
49 \DeclareOption{a5paper}{%
50       \setlength{\paperheight}{210mm}%
51       \setlength{\paperwidth}{148mm}}
52
53
54 \newif\ifshowfootnotes \showfootnotestrue
55 \DeclareOption{nofootnotes}{\showfootnotesfalse}
56
57 \newif\ifshowthemes \showthemestrue
58 \DeclareOption{nothemes}{\showthemesfalse}
59
60 \newif\ifenablewlfont \enablewlfonttrue
61 \DeclareOption{nowlfont}{\enablewlfontfalse}
62
63 \newif\ifshowtoc \showtoctrue
64 \DeclareOption{notoc}{\showtocfalse}
65
66 \DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}}
67 \ProcessOptions\relax
68 \LoadClass[a4paper,oneside]{book}
69
70
71 \usepackage{trace}
72
73 \usepackage[MeX]{polski}
74
75 \usepackage[xetex]{graphicx}
76 \usepackage{fontspec}
77 \usepackage{xunicode}
78 \usepackage{xltxtra}
79
80 \usepackage{longtable}
81 \usepackage{tabu}
82 \usepackage{unicode-math}
83 \setmathfont{Latin Modern Math}
84
85 \usepackage[overload]{textcase}
86 \usepackage{scalefnt}
87 \usepackage[colorlinks=true,linkcolor=black,setpagesize=false,urlcolor=black,xetex]{hyperref}
88
89 \newfontfamily\alien[
90 SmallCapsFeatures = {Letters={SmallCaps,UppercaseSmallCaps}},
91 Numbers=OldStyle,
92 Scale=0.85,
93 LetterSpace=-1.0
94 ] {DejaVu Serif}
95
96 \ifenablewlfont
97 \setmainfont [
98 %ExternalLocation,
99 UprightFont = JunicodeWL-Regular,
100 ItalicFont = JunicodeWL-Italic,
101 BoldFont = JunicodeWL-Regular,
102 BoldItalicFont = JunicodeWL-Italic,
103 SmallCapsFont = JunicodeWL-Regular,
104 SmallCapsFeatures = {Letters={SmallCaps,UppercaseSmallCaps}},
105 Numbers=OldStyle,
106 Scale=1.04,
107 LetterSpace=-1.0
108 ] {JunicodeWL}
109
110 \defaultfontfeatures{
111 SizeFeatures={
112   {Size={-10.5}, FakeStretch=1.02, LetterSpace=2.0 },
113   {Size={10.5-12}, FakeStretch=2.00, LetterSpace=0.0 },
114   {Size={12-}, FakeStretch=0.98, LetterSpace=-2.0 }
115 }
116 }
117
118 \renewcommand{\textsc}[1]{%
119 {\addfontfeature{
120 SizeFeatures={
121   {Size={-10.5}, Scale=1.2, FakeStretch=1.02, LetterSpace=8.0 },
122   {Size={10.5-12}, Scale=1.2, FakeStretch=1.02, LetterSpace=8.0 },
123   {Size={12-}, FakeStretch=1.0, LetterSpace=8.0 }
124 },
125 Letters={SmallCaps,UppercaseSmallCaps}
126 }
127 #1}
128 }
129 \fi% enablewlfont
130
131 %{\Itshape JunicodeWL-Italic.ttf }
132 %{\bfseries Junicode-Bold.ttf }
133 %{\bfseries\itshape Junicode-BoldItalic.ttf }
134
135 \pagestyle{plain}
136 \usepackage{fancyhdr}
137 \usepackage{marginnote}
138
139
140 \makeatletter
141
142 % bottom figure below footnotes
143 \usepackage{fnpos}
144 \makeFNabove
145
146 \usepackage{color}
147 \definecolor{theme}{gray}{.3}
148
149 \setlength{\marginparsep}{2em}
150 \setlength{\marginparwidth}{8.5em}
151 \setlength{\oddsidemargin}{0pt}
152 \setlength{\voffset}{0pt}
153 \setlength{\topmargin}{0pt}
154 \setlength{\headheight}{0pt}
155 \setlength{\headsep}{0pt}
156 \setlength{\textheight}{24cm}
157
158 \pagestyle{fancy}
159 \fancyhf{}
160 \renewcommand{\headrulewidth}{0pt}
161 \renewcommand{\footrulewidth}{0pt}
162 \lfoot{{\footnotesize \textsc{\@author} \emph{\@title}}}
163 \cfoot{}
164 \rfoot{{\footnotesize \thepage}}
165
166 \clubpenalty=100000
167 \widowpenalty=100000
168
169
170 % see http://osdir.com/ml/tex.xetex/2005-10/msg00003.html
171 \newsavebox{\ximagebox}\newlength{\ximageheight}
172 \newsavebox{\xglyphbox}\newlength{\xglyphheight}
173 \newcommand{\xbox}[1]
174 {\savebox{\ximagebox}{#1}\settoheight{\ximageheight}{\usebox {\ximagebox}}%
175 \savebox{\xglyphbox}{\char32}\settoheight{\xglyphheight}{\usebox {\xglyphbox}}%
176 \raisebox{\ximageheight}[0pt][0pt]{%\raisebox{-\xglyphheight}[0pt] [0pt]{%
177 \makebox[0pt][l]{\usebox{\xglyphbox}}}%}%
178 \usebox{\ximagebox}%
179 \raisebox{0pt}[0pt][0pt]{\makebox[0pt][r]{\usebox{\xglyphbox}}}}
180
181 \newcommand{\makecover}[2]{
182         \pdfpagewidth=#1
183         \pdfpageheight=#2
184
185         \thispagestyle{empty}
186         \newlength{\PictHOffset}
187         \newlength{\PictVOffset}
188         \setlength{\PictHOffset}{1in}
189         \addtolength{\PictHOffset}{\hoffset}
190         \addtolength{\PictHOffset}{\oddsidemargin}
191
192         \setlength{\PictVOffset}{1in}
193         \addtolength{\PictVOffset}{\voffset}
194         \addtolength{\PictVOffset}{\topmargin}
195         \addtolength{\PictVOffset}{\headheight}
196         \addtolength{\PictVOffset}{\headsep}
197         \addtolength{\PictVOffset}{\topskip}
198         \addtolength{\PictVOffset}{-\pdfpageheight}
199
200         \noindent\hspace*{-\PictHOffset}%
201         \raisebox{\PictVOffset}[0pt][0pt]{\makebox[0pt][l]{%
202             \includegraphics[height=\pdfpageheight,width=\pdfpagewidth]{cover.png}}}
203         \clearpage
204
205         \setlength{\pdfpagewidth}{210mm}
206         \setlength{\pdfpageheight}{297mm}
207 }
208
209
210 \renewcommand{\maketitle}{
211     {
212     \thispagestyle{empty}
213     \footnotesize
214     \color{theme}
215
216     \noindent \begin{minipage}[t]{.35\textwidth}\vspace{0pt}
217         \href{http://www.wolnelektury.pl}{\xbox{\includegraphics[width=\textwidth]{wl-logo.png}}}
218     \end{minipage}
219     \begin{minipage}[t]{.65\textwidth}\vspace{0pt}
220
221     \ifflaglessadvertising
222     \else
223         \href{\bookurl}{Ta lektura}, podobnie jak tysiące innych, jest dostępna on-line na stronie
224         \href{http://www.wolnelektury.pl/}{wolnelektury.pl}.
225         \vspace{.5em}
226     \fi
227
228     \ifdefined\thanknote
229         \thanknote
230         \vspace{.5em}
231     \fi
232
233     Utwór opracowany został w ramach projektu \href{http://www.wolnelektury.pl/}{Wolne Lektury}
234     przez \href{http://nowoczesnapolska.org.pl}{fundację Nowoczesna Polska}.
235
236     \end{minipage}
237     \noindent \rule{\linewidth}{0.4pt}
238
239     \vspace{.6em}
240     \color{black}
241     }
242 }
243
244 \newcommand{\editorialsection}{
245   \begin{figure}[b!]
246   {
247     \footnotesize
248     \color{theme}
249     \noindent \rule{\linewidth}{0.4pt}
250
251     \ifdefined\sponsors
252         \marginnote{%
253             \centering%
254             \sponsors%
255         }
256     \fi
257
258     \rightsinfo
259     \vspace{.6em}
260
261     Źródło: \href{\bookurl}{\bookurl}
262
263     \vspace{.6em}
264     \sourceinfo
265
266     \publisherinfo
267
268     \description
269     \vspace{.6em}
270
271     \editors
272
273     \ifdefined\funders
274         \vspace{.6em}
275         \funders
276     \fi
277
278     \ifdefined\coverby
279         \vspace{.6em}
280         \coverby
281     \fi
282
283     \ifdefined\isbn
284         \vspace{.6em}
285         \isbn
286     \fi
287
288     \vspace{.6em}
289     \emph{Wesprzyj Wolne Lektury!}
290
291     Wolne Lektury to projekt fundacji Nowoczesna Polska – organizacji
292     pożytku publicznego działającej na rzecz wolności korzystania
293     z dóbr kultury.
294
295     Co roku do domeny publicznej przechodzi twórczość kolejnych autorów.
296     Dzięki Twojemu wsparciu będziemy je mogli udostępnić wszystkim bezpłatnie.
297
298     \vspace{.6em}
299     \emph{Jak możesz pomóc?}
300
301     Przekaż 1\% podatku na rozwój Wolnych Lektur:
302     Fundacja Nowoczesna Polska, KRS 0000070056.
303
304     Pomóż uwolnić konkretną książkę, wspierając
305     \href{http://www.wolnelektury.pl/wesprzyj/}{zbiórkę na stronie wolnelektury.pl}.
306
307     Przekaż darowiznę na konto:
308     \href{http://nowoczesnapolska.org.pl/pomoz-nam/wesprzyj-nas/}{szczegóły na stronie Fundacji}.
309
310     \color{black}
311   }
312   \end{figure}
313 }
314
315
316 \newcommand{\typosubsubsection}[1]{%
317 {\textsc{#1}}
318 }
319
320 \newcommand{\typosubsection}[1]{%
321 {\addfontfeature{
322 SizeFeatures={
323   {Size={-10}, Scale=1.2, FakeStretch=1.00, LetterSpace=8.0 },
324   {Size={10.5-12}, Scale=1.2, FakeStretch=1.00, LetterSpace=8.0 },
325   {Size={12-}, FakeStretch=1.0, LetterSpace=8.0 }
326 },
327 Letters={Uppercase}
328 }
329 \MakeUppercase{#1}}
330 }
331
332 \newcommand{\typosection}[1]{%
333 {\addfontfeature{FakeStretch=0.96, LetterSpace=-4.0}\emph{\scalefont{2}#1}}
334 %{\addfontfeature{Scale=2.0, FakeStretch=0.98, LetterSpace=-2.0}\emph{#1}}
335 }
336
337
338 \DeclareRobustCommand\authortoctext[1]{%
339 {\addvspace{10pt}\nopagebreak\leftskip0em\relax
340 \rightskip \@tocrmarg\relax
341 \noindent\itshape#1\par}}
342
343 \newcommand\authortoc[1]{%
344   \gdef\chapterauthor{#1}%
345   \addtocontents{toc}{\authortoctext{#1}}}
346
347
348 \newcommand{\tytul}[1]{%
349 #1%
350 \vspace{1em}%
351 }
352
353 \newcommand{\nazwapodutworu}[2]{%
354 \vspace{5ex}%
355 \section*{\typosection{#1}}%
356 \addcontentsline{toc}{section}{#2}%
357 }
358
359 \newcommand{\autorutworu}[1]{%
360 \subsection*{\typosubsection{#1}}%
361 }
362
363 \newcommand{\autorpodutworu}[1]{%
364 \vspace{5ex}%
365 \subsection*{\typosubsection{#1}}%
366 \authortoc{#1}%
367 }
368
369 \newcommand{\dzielonadrzedne}[1]{%
370 \subsection*{\typosubsubsection{#1}}%
371 }
372
373 \newcommand{\nazwautworu}[1]{%
374 \vspace{5ex}%
375 \section*{\typosection{#1}}%
376 }
377
378 \newcommand{\podtytul}[1]{%
379 \subsection*{\typosubsubsection{#1}}%
380 }
381
382 \newcommand{\translator}[1]{%
383 \subsection*{\typosubsubsection{tłum. #1}}%
384 }
385
386
387 \newcommand{\powiesc}[1]{#1}
388 \newcommand{\opowiadanie}[1]{#1}
389 \newcommand{\lirykal}[1]{#1}
390 \newcommand{\lirykalp}[1]{#1}
391 \newcommand{\dramatwierszowanyl}[1]{#1}
392 \newcommand{\dramatwierszowanylp}[1]{#1}
393 \newcommand{\dramatwspolczesny}[1]{#1}
394
395 \newcommand{\nota}[1]{%
396 \par{\raggedleft \emph{#1}}%
397 \vspace{5ex}%
398 }
399
400 \newcommand{\dedykacja}[1]{%
401 \begin{em}%
402 \begin{flushright}%
403 #1%
404 \end{flushright}%
405 \end{em}%
406 }
407
408 \newlength{\fboxhsep}
409 \newlength{\fboxvsep}
410
411 \newlength{\fboxtoprule}
412 \newlength{\fboxbottomrule}
413 \newlength{\fboxleftrule}
414 \newlength{\fboxrightrule}
415
416 \setlength{\fboxhsep}{5\fboxsep}
417 \setlength{\fboxvsep}{20\fboxsep}
418
419 \setlength{\fboxtoprule}{\fboxrule}
420 \setlength{\fboxleftrule}{\fboxrule}
421 \setlength{\fboxrightrule}{\fboxrule}
422 \setlength{\fboxbottomrule}{\fboxrule}
423
424
425
426 \def\@frameb@xother#1{%
427   \@tempdima\fboxtoprule
428   \advance\@tempdima\fboxvsep
429   \advance\@tempdima\dp\@tempboxa
430   \hbox{%
431     \lower\@tempdima\hbox{%
432       \vbox{%
433         \hrule\@height\fboxtoprule
434         \hbox{%
435           \vrule\@width\fboxleftrule
436           #1%
437           \vbox{%
438             \vskip\fboxvsep
439             \box\@tempboxa
440             \vskip\fboxvsep}%
441           #1%
442           \vrule\@width\fboxrightrule}%
443         \hrule\@height\fboxbottomrule}%
444     }%
445   }%
446 }
447
448
449 \long\def\fboxother#1{%
450   \leavevmode
451   \setbox\@tempboxa\hbox{%
452     \color@begingroup
453     \kern\fboxhsep{#1}\kern\fboxhsep
454     \color@endgroup}%
455   \@frameb@xother\relax}
456
457 \newcommand{\myfbox}[3]{%
458   \begingroup
459   \setlength{\fboxhsep}{#1}
460   \setlength{\fboxvsep}{#2}
461   \fboxother{#3}
462
463   \endgroup
464 }
465
466 \newcommand{\ramka}[1]{%
467 \par\vspace{1em}%
468 \edef\myindent{\the\parindent}%
469 \noindent\myfbox{1em}{1em}{%
470 \parbox{\dimexpr \textwidth - 2\fboxhsep - 2\fboxrule\relax}{%
471 \setlength{\parindent}{\myindent}%
472 #1%
473 }}%
474 \vspace{1em}%
475 }
476
477 \newcommand{\dlugicytat}[1]{%
478 \begin{quotation}%
479 #1%
480 \end{quotation}%
481 }
482
483 \newcommand{\poezjacyt}[1]{%
484 \begin{verse}%
485 #1%
486 \end{verse}%
487 }
488 \newcommand{\motto}[1]{%
489 \begin{em}%
490 #1%
491 \end{em}%
492 }
493 \newcommand{\listaosob}[2]{%
494 \par{#1}%
495 \begin{itemize}%
496 #2%
497 \end{itemize}%
498 }
499
500 \newcommand{\nagloweklisty}[1]{%
501 \typosubsubsection{#1}%
502 }
503
504 \newcommand{\listaosoba}[1]{%
505 \item[]{#1}%
506 }
507
508 \newcommand{\kwestia}[1]{%
509 \par{#1}%
510 }
511
512 \newcommand{\naglowekakt}[2]{%
513 \pagebreak
514 \subsection*{\typosubsection{\huge #1}}%
515 \addcontentsline{toc}{subsection}{#2}%
516 \vspace{5ex}%
517 }
518 \newcommand{\naglowekczesc}[2]{%
519 \pagebreak
520 \subsection*{\typosubsection{\huge #1}}%
521 \addcontentsline{toc}{subsection}{#2}%
522 \vspace{5ex}%
523 }
524 \newcommand{\srodtytul}[1]{%
525 \subsection*{\typosubsection{#1}}%
526 }
527
528 \newcommand{\naglowekscena}[2]{%
529 \subsubsection*{\typosubsubsection{\LARGE #1}}%
530 \addcontentsline{toc}{subsubsection}{#2}%
531 \vspace{5ex}%
532 }
533 \newcommand{\naglowekrozdzial}[2]{%
534 \subsubsection*{\typosubsubsection{\LARGE #1}}%
535 \addcontentsline{toc}{subsubsection}{#2}%
536 \vspace{5ex}%
537 }
538
539 \newcommand{\naglowekosoba}[1]{%
540 \medskip%
541 \par{\textsc{\MakeLowercase{#1}}}\nopagebreak%
542 }
543 \newcommand{\naglowekpodrozdzial}[1]{%
544 \vspace{5ex}\par{#1}\nopagebreak%
545 }
546
547 \newcommand{\miejsceczas}[1]{%
548 \par{\emph{#1}}%
549 }
550 \newcommand{\didaskalia}[1]{%
551 \par{\emph{#1}}%
552 }
553
554 \usepackage{intcalc}
555 \usepackage{color}
556 \definecolor{gray}{RGB}{200,200,200}
557 %\newcounter{parnum}
558 \newlength{\parnumwidth}
559 \setlength{\parnumwidth}{3em}
560 \newcommand{\N}{%
561   \leavevmode\refstepcounter{parnum}\reversemarginpar%
562   \marginnote{\textcolor{gray}{\small{\theparnum}}}%
563   \reversemarginpar}
564 \newcommand{\Nw}{%
565   \leavevmode\refstepcounter{parnum}\reversemarginpar%
566   \ifnum\intcalcMod{\value{parnum}}{5}=0%
567   \marginnote{\textcolor{gray}{\small{\theparnum}}}%
568   \fi\reversemarginpar}
569 \renewcommand{\N}{}
570 \renewcommand{\Nw}{}
571
572 \newcommand{\akap}[1]{%
573 \par{\N#1}%
574 }
575 \newcommand{\akapdialog}[1]{%
576 \par{\N#1}%
577 }
578 \newcommand{\akapcd}[1]{%
579 \par{\N#1}%
580 }
581
582 \newcommand{\mottopodpis}[1]{%
583 \begin{em}%
584 \begin{flushright}%
585 #1%
586 \end{flushright}%
587 \end{em}%
588 }
589
590 \newcommand{\strofa}[1]{%
591 \par{\noindent{\ignorespaces#1\vspace{1em}}}%
592 }
593
594 \newcommand{\wers}[1]{\Nw#1}
595
596 \newcommand{\wersakap}[1]{%
597 \Nw\hspace*{1em}#1%
598 }
599 \newcommand{\werscd}[1]{%
600 \Nw\hspace*{8em}#1%
601 }
602 \newcommand{\werswciety}[2][1em]{%
603 \Nw\hspace*{#1}#2%
604 }
605 \newcommand{\wersdoprawej}[1]{%
606 \Nw\hspace*{\fill}#1%
607 }
608
609 \ifshowfootnotes
610   \newcommand{\pa}[1]{\NoCaseChange{\footnote{#1 [przypis autorski]}}}
611   \newcommand{\pe}[1]{\NoCaseChange{\footnote{#1 [przypis edytorski]}}}
612   \newcommand{\pr}[1]{\NoCaseChange{\footnote{#1 [przypis redakcyjny]}}}
613   \newcommand{\pt}[1]{\NoCaseChange{\footnote{#1 [przypis tłumacza]}}}
614 \else
615   \newcommand{\pa}[1]{}
616   \newcommand{\pe}[1]{}
617   \newcommand{\pr}[1]{}
618   \newcommand{\pt}[1]{}
619 \fi
620
621 \newcommand{\mat}[1]{$#1$}
622
623 \newcommand{\didasktekst}[1]{%
624 \emph{#1}%
625 }
626 \newcommand{\slowoobce}[1]{%
627 \emph{#1}%
628 }
629 \newcommand{\tytuldziela}[1]{%
630 \emph{#1}%
631 }
632 \newcommand{\wyroznienie}[1]{%
633 \emph{#1}%
634 }
635 \newcommand{\indeksdolny}[1]{%
636 \textsubscript{#1}%
637 }
638 \newcommand{\wiekszeodstepy}[1]{%
639 \spaceskip 3\fontdimen2\font plus 3\fontdimen3\font minus 3\fontdimen4\font \relax%
640 #1%
641 \spaceskip \fontdimen2\font plus \fontdimen3\font minus \fontdimen4\font \relax%
642 }
643
644 \newcommand{\osoba}[1]{%
645 {\scshape \MakeLowercase{#1}}%
646 }
647
648 \newcommand{\sekcjaswiatlo}{%
649 \vspace{30pt}%
650 }
651
652 \newcommand{\sekcjaasterysk}{%
653 \vspace{10pt}%
654 \begin{center}%
655 \par{*}%
656 \end{center}%
657 }
658
659 \newcommand{\separatorlinia}{%
660 \vspace{10pt}%
661 \hrule{}%
662 \vspace{10pt}%
663 }
664
665 \newcommand{\motyw}[2][0]{%
666 \ifshowthemes
667 \mbox{}%
668 \marginpar{%
669 \vspace{-8pt}%
670 \vspace{-#1\baselineskip}%
671 \raggedright{\hspace{0pt}%
672 \footnotesize{\color{theme}{#2}}}%
673 \vspace{\baselineskip}%
674 }%
675 \fi
676 }
677
678 \newcommand{\ilustr}[2]{%
679 \vspace{1em}%
680 \par{\noindent\includegraphics[width=\linewidth]{#1}}%
681 \vspace{1em}
682 }