Browse Source

customize song headers and footers.

- introduce two new options:
   - 'url' that links to the artist's website
   - 'original' that refers to the original song
- display the album in the song header
remotes/karagrat/master
Romain Goffe 13 years ago
parent
commit
5dcbb55593
  1. BIN
      img/internet.png
  2. 216
      img/src/internet.svg
  3. 20
      tex/crepbook.cls

BIN
img/internet.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

216
img/src/internet.svg

@ -0,0 +1,216 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
id="svg11300"
height="22"
width="22"
version="1.0"
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="internet.svg"
inkscape:export-filename="/home/crep/desktop/applications-internet.png"
inkscape:export-xdpi="73.639999"
inkscape:export-ydpi="73.639999">
<metadata
id="metadata45">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1625"
inkscape:window-height="1026"
id="namedview43"
showgrid="false"
inkscape:zoom="15.170655"
inkscape:cx="-0.42694966"
inkscape:cy="25.572501"
inkscape:window-x="55"
inkscape:window-y="24"
inkscape:window-maximized="1"
inkscape:current-layer="svg11300" />
<defs
id="defs3">
<linearGradient
id="linearGradient3156">
<stop
id="stop3158"
style="stop-color:#fff"
offset="0" />
<stop
id="stop3160"
style="stop-color:#fff;stop-opacity:0"
offset="1" />
</linearGradient>
<linearGradient
id="linearGradient5575"
y2="24.654"
xlink:href="#linearGradient3156"
gradientUnits="userSpaceOnUse"
x2="29.725"
gradientTransform="matrix(-.080599 -.53926 .24452 .0082709 8.3675 28.1)"
y1="55.647"
x1="30.502" />
<linearGradient
id="linearGradient5577"
y2="20.664"
xlink:href="#linearGradient3156"
gradientUnits="userSpaceOnUse"
x2="28.29"
gradientTransform="matrix(-.048560 -.54248 .33934 -.019372 3.6551 28.93)"
y1="-2.3103"
x1="28.221" />
<linearGradient
id="linearGradient5579"
y2="20.664"
xlink:href="#linearGradient3156"
gradientUnits="userSpaceOnUse"
x2="28.29"
gradientTransform="matrix(.54285 -.0033948 .00054207 .37140 -4.4843 4.0902)"
y1="-.81503"
x1="27.889" />
<linearGradient
id="linearGradient5581"
y2="20.664"
xlink:href="#linearGradient3156"
gradientUnits="userSpaceOnUse"
x2="28.29"
gradientTransform="matrix(.53414 -.14026 .096919 .34395 -6.5733 9.6565)"
y1="61.853"
x1="24.335" />
<radialGradient
id="radialGradient5863"
gradientUnits="userSpaceOnUse"
cy="4.625"
cx="62.625"
gradientTransform="matrix(.94118 0 0 .23529 -47.941 21.412)"
r="10.625">
<stop
id="stop8840"
offset="0" />
<stop
id="stop8842"
style="stop-opacity:0"
offset="1" />
</radialGradient>
<radialGradient
id="radialGradient5552"
fy="6.8828"
xlink:href="#linearGradient3156"
gradientUnits="userSpaceOnUse"
cy="13.344"
cx="21.419"
gradientTransform="matrix(.70713 0 0 .47143 -7.0986 1.2927)"
r="14" />
<radialGradient
id="radialGradient5555"
xlink:href="#linearGradient3156"
gradientUnits="userSpaceOnUse"
cy="33"
cx="102.75"
gradientTransform="matrix(1.1993 0 0 1.1 -115.8 -32.1)"
r="9" />
</defs>
<g
id="g6339"
transform="translate(0,-2)">
<path
id="path6401"
style="opacity:.4;fill-rule:evenodd;enable-background:new;fill:url(#radialGradient5863)"
d="m21 22.5c0 1.381-4.477 2.5-10 2.5-5.5228 0-10-1.119-10-2.5s4.4772-2.5 10-2.5 10 1.1193 10 2.5z" />
<path
id="path6653"
style="stroke-linejoin:round;stroke:#2e3436;stroke-linecap:round;fill:#555753"
d="m21.5 13c0 5.796-4.704 10.5-10.5 10.5s-10.5-4.704-10.5-10.5c0-5.7959 4.704-10.5 10.5-10.5s10.5 4.704 10.5 10.5z" />
<path
id="path6657"
style="fill:#eeeeec"
d="m20.682 10.847-0.094 0.36235c-0.27818-0.23108-0.59051-0.42541-0.90767-0.62836l-0.6962 0.07221-0.63607-0.50684v0.62725l0.54495 0.29067 0.36272 0.28955 0.48473-0.38642c0.12202 0.1611 0.24237 0.3222 0.36355 0.4833v0.48277l-0.54578 0.43457-0.99879 0.4833-0.75642 0.53208-0.48474-0.3876 0.24237-0.43457-0.48398-0.38642-0.81738-1.2315-0.6962-0.55498-0.18223 0.14448 0.27327 0.70064 0.51405 0.4105c0.29359 0.59743 0.58401 1.1684 0.96955 1.7395 0.59784 0 1.1614-0.04474 1.7552-0.09746v0.33828l-0.72635 1.2559-0.66614 0.53091-0.54495 0.82216v1.3519l0.18223 0.53208-0.30258 0.24083-0.66697 0.29008-0.6962 0.4105 0.57585 0.4587-0.78732 0.48388 0.15125 0.31304-1.181 0.94258h-0.78649l-0.66614 0.29008h-0.4246v-0.38642l-0.18057-0.77402c-0.23429-0.48506-0.47824-0.96665-0.72635-1.4482 0-0.35548 0.03007-0.70751 0.06022-1.0629l0.30342-0.48277-0.4246-0.58022 0.0309-0.79692-0.57585-0.4587 0.28793-0.66394-0.46849-0.37468h-0.81822l-0.2727-0.217-0.8174 0.363-0.3326-0.266-0.7573 0.459c-0.514-0.411-1.0289-0.822-1.5437-1.232l-0.6052-1.015 0.545-0.579-0.3026-0.241 0.6653-1.112c0.5466-0.479 1.1176-0.9392 1.6951-1.4007l1.0297-0.19321 1.1501-0.096342 0.78732 0.14507 1.12 0.79633 0.3937-0.31362 0.54412-0.048142 1.0297 0.24135h0.78732l0.54495-0.33828 0.24237-0.24135-0.54578-0.24135-0.9085-0.048142c-0.252-0.2465-0.486-0.5056-0.786-0.7247l-0.303 0.0964-0.121 0.6283-0.545-0.4345-0.121-0.4839-0.605-0.3371h-0.2432l0.60592 0.48277-0.24237 0.43457-0.48398 0.096342 0.303-0.4346-0.546-0.1927-0.483-0.3864-0.9092 0.1445-0.1204 0.1926-0.5449 0.242-0.3026 0.5315-0.7564 0.2654-0.3335-0.2654h-0.36272v-0.86972l0.78732-0.29008h0.60517l-0.122-0.3377-0.4832-0.3383 0.8166-0.121 0.4539-0.3618 0.3627-0.4351h0.66697l-0.18223-0.3377 0.4246-0.19321v0.38642l0.90767 0.14448 0.90767-0.53091 0.06097-0.24194 0.78648-0.38613c-0.28468 0.024952-0.56935 0.043268-0.84754 0.096636v-0.43509l0.30258-0.48306h-0.30258l-0.66497 0.43457-0.18223 0.24165 0.18223 0.33858-0.303 0.5791-0.484-0.1932-0.423-0.3377-0.6669 0.3377-0.2424-0.7726 1.1501-0.5312v-0.29008l0.7271-0.33799 1.1501-0.19351 0.78732 0.19351 1.0899 0.48277h-0.78732l0.78732 0.57964 0.60517-0.48277s2.4081 1.2085 3.6518 2.8799c1.2102 1.6263 1.7168 3.4747 1.7697 3.8588z" />
<path
id="path6661"
style="opacity:.4;stroke-linejoin:round;stroke:url(#radialGradient5555);stroke-linecap:round;stroke-width:1.0517;fill:none"
d="m20.374 13c0 5.1745-4.1995 9.3742-9.3739 9.3742s-9.3739-4.1996-9.3739-9.3742 4.1995-9.3742 9.3739-9.3742 9.3739 4.1996 9.3739 9.3742z" />
<path
id="path6663"
style="opacity:.4;fill:url(#radialGradient5552)"
d="m21.01 9.5518c0 3.6432-4.4351 5.6481-9.8998 5.6481s-9.8998-2.0049-9.8998-5.6481 4.4351-7.552 9.8998-7.552 9.8998 3.9087 9.8998 7.552z" />
<path
id="path6665"
style="opacity:.5;stroke:url(#linearGradient5581);stroke-linecap:round;stroke-width:.99694;fill:none"
d="m20.347 11.545c0.93672 3.3243-2.4889 7.118-7.6514 8.4736-5.1624 1.356-10.107-0.24-11.044-3.565-0.93619-3.324 2.4895-7.1176 7.6519-8.4732 5.1621-1.3556 10.107 0.2404 11.043 3.5642z" />
<path
id="path6667"
style="opacity:.5;stroke:url(#linearGradient5579);stroke-linecap:round;stroke-width:1.0004;fill:none"
d="m20.5 12.941c0.0052 3.5896-4.2437 6.5261-9.4903 6.559-5.2466 0.03281-9.5041-2.8505-9.5093-6.4401-0.00524-3.5896 4.2437-6.5261 9.4903-6.559 5.2466-0.032811 9.5041 2.8505 9.5093 6.4401z" />
<path
id="path6669"
style="opacity:.5;stroke:url(#linearGradient5577);stroke-linecap:round;stroke-width:1.0009;fill:none"
d="m9.6502 3.5066c3.2798-0.1873 6.3188 3.9113 6.7878 9.1544 0.47 5.243-1.809 9.645-5.088 9.832-3.2799 0.188-6.319-3.911-6.7884-9.154-0.4693-5.2431 1.8089-9.6452 5.0886-9.8324z" />
<path
id="path6671"
style="opacity:.9;stroke:url(#linearGradient5575);stroke-linecap:round;stroke-width:.98696;fill:none"
d="m10.59 3.4946c2.3633 0.079938 6.6007 5.2149 7.3797 10.427 0.77899 5.212-2.1955 8.5272-4.5588 8.4473-2.364-0.08-4.9111-4.37-5.6901-9.582-0.779-5.2121 0.5053-9.3724 2.8691-9.2924z" />
<g
id="g6673"
style="opacity:.6;stroke-width:2.108"
transform="matrix(.49781 -.13842 .13541 .50886 -1.647 2.0422)">
<path
id="path6675"
style="opacity:.8;fill:#fff"
d="m31.375 37.875c0 0.9665-0.7835 1.75-1.75 1.75s-1.75-0.7835-1.75-1.75 0.7835-1.75 1.75-1.75 1.75 0.7835 1.75 1.75z"
transform="matrix(.85714 0 0 .85714 4.1071 5.0357)" />
</g>
<g
id="g6677"
style="opacity:.6;stroke-width:2.1112"
transform="matrix(.49172 -.11974 .15605 .51358 -14.084 4.1819)">
<path
id="path6679"
style="opacity:.5;fill:#fff"
d="m31.375 37.875c0 0.9665-0.7835 1.75-1.75 1.75s-1.75-0.7835-1.75-1.75 0.7835-1.75 1.75-1.75 1.75 0.7835 1.75 1.75z"
transform="matrix(.85714 0 0 .85714 4.1071 5.0357)" />
</g>
<g
id="g6681"
style="opacity:.6;stroke-width:2.1103"
transform="matrix(.47705 -.16815 .19641 .49982 -6.4521 -6.9074)">
<path
id="path6683"
style="opacity:.8;fill:#fff"
d="m31.375 37.875c0 0.9665-0.7835 1.75-1.75 1.75s-1.75-0.7835-1.75-1.75 0.7835-1.75 1.75-1.75 1.75 0.7835 1.75 1.75z"
transform="matrix(.85714 0 0 .85714 4.1071 5.0357)" />
</g>
<g
id="g6685"
style="opacity:.6;stroke-width:2.1575"
transform="matrix(.51592 -.14876 -.0086906 .50593 -10.12 -6.3754)">
<path
id="path6687"
style="opacity:.5;fill:#fff"
d="m31.375 37.875c0 0.9665-0.7835 1.75-1.75 1.75s-1.75-0.7835-1.75-1.75 0.7835-1.75 1.75-1.75 1.75 0.7835 1.75 1.75z"
transform="matrix(.85714 0 0 .85714 4.1071 5.0357)" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 10 KiB

20
tex/crepbook.cls

@ -64,6 +64,7 @@
\definecolor{tango-blue-3}{HTML}{204a87}
\RequirePackage[bookmarks,
bookmarksopen,
hyperfigures=true,
colorlinks=true,
linkcolor=tango-green-3,
urlcolor=tango-blue-3]{hyperref}
@ -205,6 +206,8 @@
\newcommand{\songalbum}{}
\newsongkey{cov}{\let\songcover\@empty}{\def\songcover{#1}}
\newsongkey{album}{\let\songalbum\@empty}{\def\songalbum{#1}}
\newsongkey{url}{\let\songurl\@empty}{\def\songurl{#1}}
\newsongkey{original}{\let\songoriginal\@empty}{\def\songoriginal{#1}}
\newcommand\cover{%
\ifpictures%
\ifx\songcover\@empty\else%
@ -216,6 +219,23 @@
\fi%
}
% display album in song header
\renewcommand{\extendprelude}{
{\bfseries\showauthors}
{\footnotesize\it\songalbum}
\IfStrEq{\songurl}{}{}{
\href{\songurl}{\includegraphics[width=.3cm]{internet}}
}
}
\renewcommand{\extendpostlude}{
{\footnotesize%
\IfStrEq{\songoriginal}{}{}{
\IfStrEq{\@lang}{english}{Original song:}{Chanson originale :}
\songoriginal
}
}
}
\newlength{\capoheight}
\setlength{\capoheight}{1.5cm}
\renewcommand\capo[1]{%

Loading…
Cancel
Save