Download the file
  1. \NeedsTeXFormat{LaTeX2e}
  2. \ProvidesClass{audiocd}[2006/03/25 0.2]
  3. \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
  4. \ProcessOptions
  5. \LoadClass[a4paper,12pt]{article}
  6. \RequirePackage[latin1]{inputenc}
  7. \RequirePackage[T1]{fontenc}
  8. \RequirePackage{lmodern}
  9. \RequirePackage[dvips,nohead,nofoot,left=0cm,right=0cm,top=2cm]{geometry}
  10. \RequirePackage{array}
  11.  
  12. \pagestyle{empty}
  13. \setlength{\fboxsep}{0pt}
  14. \setlength{\fboxrule}{0.1mm}
  15. \setlength{\parindent}{0pt}
  16.  
  17. \ifx\pdfoutput\undefined
  18. \RequirePackage[dvips]{graphicx}
  19. \DeclareGraphicsExtensions{.eps}
  20. \RequirePackage[dvips]{color}
  21. \else
  22. \RequirePackage[pdftex]{graphicx}
  23. \DeclareGraphicsExtensions{.png,.jpg,.pdf}
  24. \RequirePackage[pdftex]{color}
  25. \fi
  26.  
  27. \def\audiocd@setcommand#1{\textsl{Set a #1 with \textbackslash{}#1}}
  28.  
  29. \def\audiocd@title {\audiocd@setcommand{title}}
  30. \let\audiocd@subtitle=\relax
  31. \let\audiocd@supertitle=\relax
  32. \let\audiocd@artist=\relax
  33. \let\audiocd@cover=\relax
  34. \let\audiocd@cover@head=\relax
  35. \let\audiocd@date=\relax
  36.  
  37. \def\audiocd@sidetext{\textbf{\audiocd@title}}
  38. \def\audio@cover@bg{white}
  39.  
  40. \newcommand\supertitle[1]{\gdef\audiocd@supertitle{#1}}
  41. \renewcommand\title[1]{\gdef\audiocd@title{#1}}
  42. \newcommand\subtitle[1]{\gdef\audiocd@subtitle{#1}}
  43. \newcommand\sidetext[1]{\gdef\audiocd@sidetext{\textbf{#1}}}
  44. \newcommand\artist[1]{\gdef\audiocd@artist{#1}}
  45. \newcommand\coverhead[1]{\gdef\audiocd@cover@head{#1}}
  46. \newcommand\cover[1]{\gdef\audiocd@cover{#1}}
  47. \renewcommand\date[1]{\gdef\audiocd@date{#1}}
  48. \newcommand\coverbackground[1]{\gdef\audio@cover@bg{#1}}
  49.  
  50. \newsavebox{\frameenvbox}
  51. \newenvironment{frameenv}
  52. {\begin{lrbox}{\frameenvbox}}
  53. {\end{lrbox}\framebox{\usebox{\frameenvbox}}}
  54.  
  55. \newcommand{\coverbox}{\fcolorbox{black}{\audio@cover@bg}}
  56.  
  57. \newenvironment{block}[3]{%
  58. \begin{minipage}{13.5cm}%
  59. \begin{center}
  60. \textbf{\ifx\relax#1\relax
  61. \audiocd@title
  62. \else
  63. #1
  64. \fi}
  65. \vspace{.3em plus0em minus 0.2em}
  66.  
  67. \ifx\relax#2\relax
  68. \if\audiocd@artist\relax
  69. \else
  70. {\small \audiocd@artist\ifx\relax#3\relax
  71. \if\audiocd@date\relax
  72. \else, \audiocd@date
  73. \fi
  74. \else, #3\fi}
  75. \vspace{.5em}
  76.  
  77. \fi
  78. \else
  79. {\small #2\ifx\relax#3\relax
  80. \if\audiocd@date\relax
  81. \else, \audiocd@date
  82. \fi
  83. \else, #3\fi}
  84. \vspace{.5em}
  85.  
  86. \fi
  87. \begin{minipage}{12.9cm}
  88. \sffamily\scriptsize
  89. }{%
  90. \end{minipage}% 12.9cm
  91. \end{center}%
  92. \end{minipage}% 13.5cm
  93. \vspace{1em plus1em minus1em}
  94. }
  95.  
  96. \newenvironment{content}{
  97. \begin{center}%
  98. \textbf{\audiocd@title}
  99. \vspace{.5em}
  100.  
  101. \if\audiocd@artist\relax\else
  102. {\small \audiocd@artist\if\audiocd@date\relax\else, \audiocd@date\fi}
  103. \vspace{.5em}
  104.  
  105. \fi
  106. \begin{minipage}{12.9cm}
  107. \sffamily\scriptsize
  108.  
  109. }{%
  110. \end{minipage}%
  111. \end{center}%
  112. }
  113.  
  114. \AtBeginDocument{%
  115. \begin{center}
  116. \sffamily
  117. \fbox{\parbox[c][11.95cm][c]{1.99cm}{\ }}\hspace{-\fboxrule}%
  118. \fbox{\parbox[c][11.95cm][c]{2.39cm}{\ }}\hspace{-\fboxrule}%
  119. \coverbox{\begin{minipage}[c][11.95cm][c]{12.15cm}%
  120. \begin{center}
  121. \if\audiocd@cover\relax
  122. \if\audiocd@cover@head\relax\else
  123. \vspace*{1cm}
  124.  
  125. \textit{\scriptsize \audiocd@cover@head}\fi
  126. \vfill
  127.  
  128. \if\audiocd@supertitle\relax\else
  129. \textbf{\large \audiocd@supertitle}
  130. \medskip
  131.  
  132. \fi
  133. \textbf{\LARGE \audiocd@title}
  134. \if\audiocd@subtitle\relax\else
  135. \medskip
  136.  
  137. \textbf{\large \audiocd@subtitle}
  138. \fi
  139. \vfill
  140.  
  141. \if\audiocd@artist\relax\else
  142. \audiocd@artist
  143. \vspace{5mm}
  144.  
  145. \fi
  146. \else
  147. \center\includegraphics[height=11.95cm,width=12.15cm,keepaspectratio]{\audiocd@cover}%
  148. \fi
  149. \end{center}
  150. \end{minipage}}\hspace{-\fboxrule}%
  151. \fbox{\parbox[c][11.95cm][c]{2.39cm}{\ }}\hspace{-\fboxrule}%
  152. \fbox{\parbox[c][11.95cm][c]{1.99cm}{\ }}
  153. \vspace{1cm}
  154.  
  155. \fbox{\begin{minipage}[c][11.8cm][c]{0.65cm}%
  156. \hspace{1.50mm}\rotatebox{-90}{\audiocd@sidetext}%
  157. \end{minipage}}\hspace{-\fboxrule}%
  158. \begin{frameenv}%
  159. \begin{minipage}[c][11.8cm][c]{13.7cm}%
  160. }
  161.  
  162. \AtEndDocument{%
  163. \end{minipage}
  164. \end{frameenv}\hspace{-\fboxrule}%
  165. \fbox{\begin{minipage}[c][11.8cm][c]{0.65cm}%
  166. \hspace{1.50mm}\rotatebox{-90}{\audiocd@sidetext}%
  167. \end{minipage}}
  168. \end{center}
  169. }
  170.