Mercurial > dottes
comparison dottes.tex @ 330:473d335235b8
Put tune title, image and following content into a table.
Use tabularx to put tune title, image and any following content into
a table. This should (a) get the following content closer to the tune image,
and (b) stop LaTeX splitting them over a page.
| author | Jim Hague <jim.hague@acm.org> |
|---|---|
| date | Mon, 05 Aug 2013 18:06:00 +0100 |
| parents | 48eb1da4a4c8 |
| children | 583c06d0e9ef |
comparison
equal
deleted
inserted
replaced
| 329:48eb1da4a4c8 | 330:473d335235b8 |
|---|---|
| 4 \usepackage{color} | 4 \usepackage{color} |
| 5 \usepackage{fontspec} | 5 \usepackage{fontspec} |
| 6 \usepackage[margin=0.75in]{geometry} | 6 \usepackage[margin=0.75in]{geometry} |
| 7 \usepackage{graphicx} | 7 \usepackage{graphicx} |
| 8 \usepackage{fancyhdr} | 8 \usepackage{fancyhdr} |
| 9 \usepackage{tabularx} | |
| 9 \usepackage{longtable} | 10 \usepackage{longtable} |
| 10 \usepackage[UKenglish]{babel} | 11 \usepackage[UKenglish]{babel} |
| 11 \usepackage[UKenglish]{isodate} | 12 \usepackage[UKenglish]{isodate} |
| 12 | 13 |
| 13 % Non-indented paragraphs with space between them. | 14 % Non-indented paragraphs with space between them. |
| 47 | 48 |
| 48 % Show the main tune graphic and optional change. | 49 % Show the main tune graphic and optional change. |
| 49 % Args are tune name, tune title, tune subtitle, composer, tune graphic | 50 % Args are tune name, tune title, tune subtitle, composer, tune graphic |
| 50 % filename, change name, change title, credit. | 51 % filename, change name, change title, credit. |
| 51 \newcommand{\showtune}[8]{% | 52 \newcommand{\showtune}[8]{% |
| 52 \vfill | 53 \phantomsection |
| 53 \begin{center} | 54 \begin{tabularx}{\textwidth}{LCR} |
| 54 \phantomsection | 55 \addcontentsline{toc}{section}{#2} |
| 55 \addcontentsline{toc}{section}{#2} | |
| 56 \begin{tabular*}{\textwidth}{@{} p{0.25\textwidth} @{\extracolsep{\fill}} c >{\raggedleft\arraybackslash}p{0.25\textwidth} @{}} | |
| 57 & \hypertarget{#1}{\Large{#2}} & \emph{#4} \\ | 56 & \hypertarget{#1}{\Large{#2}} & \emph{#4} \\ |
| 58 \ifemptyarg{#3}{}{% | 57 \ifemptyarg{#3}{}{% |
| 59 & #3 & \\ | 58 & #3 & \\ |
| 60 }% | 59 } |
| 61 \end{tabular*} | 60 \multicolumn{3}{c}{% |
| 62 \includegraphics[width=\textwidth,height=0.85\textheight,keepaspectratio]{#5} | 61 \includegraphics[width=\textwidth,height=0.8\textheight,keepaspectratio]{#5}% |
| 63 \end{center} | 62 }\tabularnewline |
| 64 \ifemptyarg{#8}{}{% | 63 \multicolumn{3}{p{\textwidth}}{% |
| 65 From {#8}. | 64 \ifemptyarg{#8}{}{From {#8}. }% |
| 66 }% | 65 \ifemptyarg{#6}{}{Change: \hyperlink{#6}{#7}.}% |
| 67 \ifemptyarg{#6}{}{% | 66 }\tabularnewline |
| 68 Change: \hyperlink{#6}{#7}. | 67 \end{tabularx} |
| 69 }% | 68 \vfill |
| 70 } | 69 } |
| 71 | 70 |
| 72 % Show the tune first line. Generate table row. | 71 % Show the tune first line. Generate table row. |
| 73 % Args are the tune name, tune title and the first line graphic filename. | 72 % Args are the tune name, tune title and the first line graphic filename. |
| 74 \newcommand{\showfirstline}[3]{% | 73 \newcommand{\showfirstline}[3]{% |
| 224 | 223 |
| 225 \mainmatter | 224 \mainmatter |
| 226 | 225 |
| 227 \addcontentsline{toc}{chapter}{Tunes} | 226 \addcontentsline{toc}{chapter}{Tunes} |
| 228 | 227 |
| 228 { | |
| 229 \newcolumntype{L}{p{0.25\textwidth}}% | |
| 230 \newcolumntype{R}{>{\raggedleft\arraybackslash}p{0.25\textwidth}}% | |
| 231 \newcolumntype{C}{>{\centering\arraybackslash}X}% | |
| 232 \renewcommand{\tabularxcolumn}[1]{m{#1}}% | |
| 233 \renewcommand{\tabcolsep}{0pt} | |
| 234 | |
| 229 \input{tunes.tex} | 235 \input{tunes.tex} |
| 236 } | |
| 230 | 237 |
| 231 % ----- | 238 % ----- |
| 232 | 239 |
| 233 \cleardoublepage | 240 \cleardoublepage |
| 234 | 241 |
