diff options
author | Karl Berry <karl@freefriends.org> | 2010-07-04 23:05:01 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-07-04 23:05:01 +0000 |
commit | c771a14f26b294657e2236b705a7dc8ea9688bfd (patch) | |
tree | 1438e2a7e679cc64cf9a774b48bab0e3345044cc /Master/texmf-dist/source/latex | |
parent | aaaeb30859dca58379cfade7cc0a573630a5c109 (diff) |
new latex package simplecd 1.0 (4jul10)
git-svn-id: svn://tug.org/texlive/trunk@19231 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex')
-rw-r--r-- | Master/texmf-dist/source/latex/simplecd/simplecd.dtx | 732 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/simplecd/simplecd.ins | 53 |
2 files changed, 785 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/simplecd/simplecd.dtx b/Master/texmf-dist/source/latex/simplecd/simplecd.dtx new file mode 100644 index 00000000000..4b6b3245eae --- /dev/null +++ b/Master/texmf-dist/source/latex/simplecd/simplecd.dtx @@ -0,0 +1,732 @@ + +% \iffalse meta-comment +% +% Copyright (C) 2010 by Daniel Majoros +% +% This file may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either +% version 1.2 of this license or (at your option) any later +% version. The latest version of this license is in: +% +% http://www.latex-project.org/lppl.txt +% +% and version 1.2 or later is part of all distributions of +% LaTeX version 1999/12/01 or later. +% +% \fi +% +%\iffalse +%<package>\NeedsTeXFormat{LaTeX2e} +%<package>\ProvidesPackage{simplecd} +%<package> [2010/07/01 v1.0 simple cd, dvd covers] +% +%<*driver> +\documentclass{ltxdoc} +\usepackage{simplecd} +\usepackage{fix-cm} +\usepackage{rotating} + +\EnableCrossrefs +\CodelineIndex +\RecordChanges + +\begin{document} + \DocInput{./simplecd.dtx} +\end{document} +%</driver> +%\fi +% +% \CheckSum{451} +% +% \CharacterTable +% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +% Digits \0\1\2\3\4\5\6\7\8\9 +% Exclamation \! Double quote \" Hash (number) \# +% Dollar \$ Percent \% Ampersand \& +% Acute accent \' Left paren \( Right paren \) +% Asterisk \* Plus \+ Comma \, +% Minus \- Point \. Solidus \/ +% Colon \: Semicolon \; Less than \< +% Equals \= Greater than \> Question mark \? +% Commercial at \@ Left bracket \[ Backslash \\ +% Right bracket \] Circumflex \^ Underscore \_ +% Grave accent \` Left brace \{ Vertical bar \| +% Right brace \} Tilde \~} +% +% \changes{v1.0}{2010/07/01}{Initial version} +% +% \DoNotIndex{\newline, \\, \space, \begin, \end, \rule, \cline, \hspace, \vspace, \centering, \DeclareRobustCommand} +% \DoNotIndex{\newcommand, \newlength, \setlength, \parbox, \line, \putline, \resizebox, \unitlength} +% \DoNotIndex{\put, \RequirePackage, \vrule, \DeclareOption, \fontsize, \ProcessOptions, \relax} +% \DoNotIndex{\renewcommand, \selectfont, \multicolumn, \! , !\! , !\ } +% +% \GetFileInfo{simplecd.sty} +% +% \title{The \textsf{simplecd} package\thanks{This document +% corresponds to \textsf{simplecd}~\fileversion, +% dated~\filedate.}} +% \author{D\'aniel Majoros} +% +% \maketitle + +% \begin{abstract} +% The simplecd package provides printable cut-outs for various CD, DVD and other disc holders. +% The name of the package comes form it's implementation and ease of use. +% \end{abstract} +% +% \section{Introduction} +% The \textsf{simplecd} package was created for producing cut-outs for creating covers, inlays(inlets) for +% optical disc packaging such as jewel cases, keepcases. The covers were aimed for containing only +% simple text with different font sizes, but since it is only a |\parbox| in a tabular enviroment's cell, it can +% contain anything that a |\parbox| can contain. +% +% There are also macros which can resize ready-to-print images to the appropriate size. +% +% It is worth to decrease the document's margins, so the covers can fit onto +% an A4 sized paper. For this, use the \textsf{geometry} package, like so: \\ +% |\usepackage[left=1cm, top=1cm, right=1cm, bottom=1cm]{geometry}| +% +% Since \textsf{simplecd} package uses the \textsf{rotating} package for rotation, one important +% note from the \textsf{rotating} package's documentation must be mentioned here. +% \begin{quotation} +% Note that the package uses rotation facilities from the graphicx package. When +% generating DVI output, users should note that rotation is typically not visible in +% a DVI viewer: conversion to, and viewing, PostScript or PDF is necessary. +% \end{quotation} +% +% \section{Usage} +% +% This section gives a detailed information on macros. Lists their parameters also. The universal macros are +% also detailed, which are behind the simple ones, and can be parmeterised with additional information +% to meet other requirements. +% +% Do not put too many text inside a cover, or an unwanted resize can happen. Some of the examples in this +% documentation were rotated, and all of them were shrunk. +% +% \DescribeMacro{\covers} +% The first and foremost macro is for the standard jewel case and it's backsheet with two spines. +% The parameters of the |\covers| macro are as follows: +% |\covers| \oarg{backsheet text} \marg{cover title} \marg{spine text}. The first two can be +% whole paragraphs with different font sized texts. For a new line, you can use |\\|, +% and for a skip, use |\vspace{length to skip}| in the text after a new line. Besides the first text part, +% the other texts after a |\vspace| can be resized with the \textsf{fix-cm} package's |\fontsize| command. +% The spine text will be printed on both spines. The spine +% text should be short enough to fit into the desired space. +% +% Example: \\ +% |\covers|\\ +% \indent |[{\Large Backsheet text}]| \\ +% \indent |{{\Huge Jewelcase Title} \\ \vspace{1cm} Subtitle}| \\ +% \indent |{Spine Text}| \\ +% +% \resizebox{0.95\textwidth}{!}{\covers[{\Large Backsheet text}]{{\Huge Jewelcase Title} \\ \vspace{1cm} Subtitle}{Spine Text}} +% +% \vspace*{0.5cm} +% +% \DescribeMacro{\frontcover} +% The |\frontcover|, which is called in the previously mentioned macro, produces the front cover for +% the jewel case. It's mandatory argument is the cover text: |\frontcover| \marg{cover text}. +% +% \DescribeMacro{\backsheet} +% The |\backsheet| macro is also called from the |\covers| macro. It produces the backsheet with two +% identical spines. The usage is |\backsheet| \oarg{backsheet middle text} \marg{spine text}. +% +% \DescribeMacro{\jewelspine} +% The |\jewelspine| macro creates a single spine for the jewelcase. It's usage is |\jewelspine| \marg{spine text}. +% +% \DescribeMacro{\djewel} +% The |\djewel| macro creates a double page jewel case cover. Text can be put on one side, then it should be folded +% in half. The usage is: |\djewel| \marg{first page text} \marg{second page text}. +% +% Example: \\ +% |\djewel| \\ +% \indent |{\fontsize{70}{36}\selectfont Big Title}| \\ +% \indent |{Second page}| \\ +% +% \begin{sideways}\resizebox{0.48\textwidth}{!}{\djewel{\fontsize{70}{36}\selectfont Big Title}{Second page}}\end{sideways} +% +% \vspace*{0.5cm} +% +% This is also an example of using costum sized fonts with the \textsf{fix-cm} package. +% +% \DescribeMacro{\slimdvd} \DescribeMacro{\dvd} +% The |\slimdvd| and |\dvd| macros creates a slim and a simple DVD keepcase. Text can be put on both +% sides plus the spine area. \DescribeMacro{\bluray} The |\bluray| macro creates a keepcase for Blu-Ray disks. +% Their usage is: |\dvd| \oarg{backside text} \marg{cover text} \marg{spine text}. +% +% Example: \DescribeMacro{\slimdvd} \\ +% |\slimdvd| \\ +% \indent |[{\Large Backsheet text}]| \\ +% \indent |{{\Huge \underline{SlimDVD Title}} \\ \vspace{1cm} Subtitle}| \\ +% \indent |{Spine Text}| \\ +% +% \begin{turn}{270}\resizebox{0.65\textwidth}{!}{\slimdvd[{\Large Backsheet text}]% +% {{\Huge \underline{SlimDVD Title}} \\ \vspace{1cm} Subtitle}{Spine Text}} \end{turn} +% +% \vspace*{0.5cm} +% +% \DescribeMacro{\keepcase} +% The above mentioned macros are really similar, thus the introduction of the |\keepcase| macro. With this, one can create +% a costum sized keepcase in the format of cover, spine and a backside. It's usage is: +% |\keepcase| \oarg{backtext} \marg{cover text} \marg{spinetext} \marg{cover height} \marg{cover width} \marg{spine width}. +% The cover width refers to one side's width without the spine. +% +% \DescribeMacro{\sleeve} +% The |\sleeve| macro creates a disk-sleeve which requires some glue after cutting it out. The upper part +% can be used to close the sleeve. Text can be put on +% it's cover. The usage is: |\sleeve| \marg{cover text}. +% +% Example: \\ +% |\sleeve| |{{\Huge Sleeve text}}| \\ +% +% \resizebox{0.5\textwidth}{!}{\sleeve{{\Huge Sleeve text}}} +% +% \vspace*{0.5cm} +% +% \DescribeMacro{\coverimg} \DescribeMacro{\backsheetimg} \DescribeMacro{\dvdimg} \DescribeMacro{\slimdvdimg} +% \DescribeMacro{\blurayimg} +% The macros width the \emph{img} ending are expecting an image, and resizing this image to the appropriate cover +% size. The macros are |\coverimg|, |\backsheetimg|, |\dvdimg|, |\slimdvdimg|, |\blurayimg|. Their usage is +% |\coverimg| \parg{picture}. No image macro for +% the sleeve. These macros does not keep the aspect ratio of the given image, thus it should already be at the +% correct ratio. +% +% An example without the result: +% |\dvdimg{includegraphics{coverpic}}| \\ +% +% \vspace*{0.5cm} +% +% \DescribeMacro{\dvdinlay} \DescribeMacro{\blurayinlay} +% The |\dvdinlay| and |\blurayinlay| macros create a one sided inlay for the appropriate keepcases. +% Their usage is |\dvdinlay| \marg{text}. \DescribeMacro{\inlay} With the universal |\inlay| macro, one can create +% a costum sized inlay. It's usage is: |\inlay| \marg{text} \marg{inlay width} \marg{inlay height}. +% +% Example: \\ +% |\dvdinlay| \\ +% \indent |{{\Large DVD Inlay}| \\ +% \ \\ +% \indent |\vspace{5cm} TextTextText| \\ +% \ \\ +% \indent |\vspace{1cm} {\fontsize{20}{36}\selectfont TextText}}| \\ +% +% \resizebox{0.5\textwidth}{!}% +% {\dvdinlay{{\Large DVD Inlay} +% +% \vspace{5cm} TextTextText +% +% \vspace{1cm} {\fontsize{20}{36}\selectfont TextText}}} +% +% \vspace*{0.5cm} +% +% \section{Package Options} +% +% All of the above presented macros are containing some text alignment lengths. Without them, the texts would be +% centered vertically in the cells. The |noalign| option zeroes these alignment lengths, so one can align the +% texts individually with the |\vspace| commands inside the text. +% +% As default, all covers contain folding lines. With the |nofold| option these can be removed. The only exception is +% the |\sleeve| macro where the areas to be glued are keeping their folding lines. +% +% The |spiner| option rotates all spine texts with $180^\circ$. The \textsf{rotating} package (which is used for +% rotating) is somewhat incompatible with +% utf8 encoding and/or T1 font type when it comes to upside-down text. So do not use the packages mentioned below +% with this option: +% \begin{quotation} +% \noindent +% |\usepackage{t1enc}| \\ +% |\usepackage{ucs}| \\ +% |\usepackage[utf8x]{inputenc}| \\ +% |\usepackage[T1]{fontenc}| \\ +% \end{quotation} +% +% \StopEventually{\PrintChanges\PrintIndex} +% +% \section{Implementation} +% +% Used for rotating text. +% \begin{macrocode} +\RequirePackage{rotating} +% \end{macrocode} +% +% Used for setting fix font size for spine texts. +% \begin{macrocode} +\RequirePackage{fix-cm} +% \end{macrocode} +% +% Used for the m tabular column +% \begin{macrocode} +\RequirePackage{array} +% \end{macrocode} +% +% Used for calculating lengths +% \begin{macrocode} +\RequirePackage{calc} +% \end{macrocode} + +% The |noalign| option sets all text aligning lengths to zero. +% \begin{macrocode} +\DeclareOption{noalign}{ + \setlength{\sc@jfcalign}{0cm} + \setlength{\sc@jbsalign}{0cm} + \setlength{\sc@slalign}{0cm} + \setlength{\sc@kcfalign}{0cm} + \setlength{\sc@kcbalign}{0cm} + \setlength{\sc@inalign}{0cm} + \setlength{\sc@djewsalign}{0cm} +} +% \end{macrocode} +% +% The |nofold| option removes the folding lines on the cut-outs. +% \begin{macrocode} +\DeclareOption{nofold}{ + \renewcommand{\sc@hfoldline}[1]{} + \setlength{\sc@vfoldline}{0pt} +} +% \end{macrocode} + +% \begin{macro}{\sc@hfoldline} +% Creates a horizontal folding line. \\ +% Usage: |\sc@hfoldline| \marg{columns} +% \begin{macrocode} +\newcommand{\sc@hfoldline}[1]{ + \cline{#1} +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\sc@vfoldline} +% Size of the default vertical folding line. +% \begin{macrocode} +\newlength{\sc@vfoldline} +\setlength{\sc@vfoldline}{0.4pt} +% \end{macrocode} +% \end{macro} + +% Redefines rotation degrees to rotate spine text with $180^\circ$. +% \begin{macrocode} +\DeclareOption{spiner}{ + \renewcommand{\sc@spinerotone}{180} + \renewcommand{\sc@spinerottwo}{90} + \renewcommand{\sc@spinerotthree}{270} +} +% \end{macrocode} + +% \begin{macro}{\sc@spinerotone} +% No rotation by default. \\ +% Usage: |\sc@spinerotone| +% \begin{macrocode} +\newcommand{\sc@spinerotone}{0} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\sc@spinerottwo} +% Default rotation degree. \\ +% Usage: |\sc@spinerottwo| +% \begin{macrocode} +\newcommand{\sc@spinerottwo}{270} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\sc@spinerotthree} +% Default rotation degree. \\ +% Usage: |\sc@spinerotthree| +% \begin{macrocode} +\newcommand{\sc@spinerotthree}{90} +% \end{macrocode} +% \end{macro} + +% Dimension names are created as follows: prefixed with |sc@|, then some letters for +% identifying the case, then place, then width or height. +% +%% CD jewelcase dimensions +% \begin{macrocode} +\newlength{\sc@cdjccoverheight} +\setlength{\sc@cdjccoverheight}{120mm} +\newlength{\sc@cdjccoverwidth} +\setlength{\sc@cdjccoverwidth}{120mm} +\newlength{\sc@cdjcbackheight} +\setlength{\sc@cdjcbackheight}{117.5mm} +\newlength{\sc@cdjcbackwidth} +\setlength{\sc@cdjcbackwidth}{138mm} +\newlength{\sc@cdjcspinewidth} +\setlength{\sc@cdjcspinewidth}{6mm} +% \end{macrocode} + +%% Jewelcase spine fixed text font size +% \begin{macrocode} +\newcommand{\sc@cdjfontsize}{15} +% \end{macrocode} + +%% Disk sleeve dimensions +% \begin{macrocode} +\newlength{\sc@dsdim} +\setlength{\sc@dsdim}{125mm} +% \end{macrocode} + +%% Slim DVD keepcase dimensions +% \begin{macrocode} +\newlength{\sc@sdvdcoverwidth} +\setlength{\sc@sdvdcoverwidth}{128.5mm} +\newlength{\sc@sdvdspinewidth} +\setlength{\sc@sdvdspinewidth}{7mm} +% \end{macrocode} + +%% DVD keepcase dimensions +% \begin{macrocode} +\newlength{\sc@dvdkcheight} +\setlength{\sc@dvdkcheight}{183mm} +\newlength{\sc@dvdkccoverwidth} +\setlength{\sc@dvdkccoverwidth}{129.5mm} +\newlength{\sc@dvdkcspinewidth} +\setlength{\sc@dvdkcspinewidth}{14mm} +\newlength{\sc@dvdkcinletwidth} +\setlength{\sc@dvdkcinletwidth}{115mm} +\newlength{\sc@dvdkcinletheight} +\setlength{\sc@dvdkcinletheight}{175mm} +% \end{macrocode} + +%% Blu-Ray case dimensions +% \begin{macrocode} +\newlength{\sc@brcoverwidth} +\setlength{\sc@brcoverwidth}{128mm} +\newlength{\sc@brcoverheight} +\setlength{\sc@brcoverheight}{149mm} +\newlength{\sc@brspinewidth} +\setlength{\sc@brspinewidth}{14mm} +\newlength{\sc@brinletwidth} +\setlength{\sc@brinletwidth}{115mm} +\newlength{\sc@brinletheight} +\setlength{\sc@brinletheight}{140mm} +% \end{macrocode} + +%% Width and correction of the invisible |\rule|'s column +% \begin{macrocode} +\newlength{\sc@ircwidth} +\setlength{\sc@ircwidth}{0.1mm} +\newlength{\sc@ircorr} +\setlength{\sc@ircorr}{1mm} +% \end{macrocode} + +% Naming conventions in the aligning lengths: first letters are for the case, then f for front, b for back, +% and the align word. +% +%%Text aligning lengths +% These lengths ensure that the text is not in the vertical center of a cell, +% instead, they are little above of the center. +% \begin{macrocode} +\newlength{\sc@jfcalign} +\setlength{\sc@jfcalign}{1.5cm} +\newlength{\sc@jbsalign} +\setlength{\sc@jbsalign}{3cm} +\newlength{\sc@slalign} +\setlength{\sc@slalign}{1.5cm} +\newlength{\sc@kcfalign} +\setlength{\sc@kcfalign}{4cm} +\newlength{\sc@kcbalign} +\setlength{\sc@kcbalign}{3cm} +\newlength{\sc@inalign} +\setlength{\sc@inalign}{3cm} +\newlength{\sc@djewsalign} +\setlength{\sc@djewsalign}{3cm} +% \end{macrocode} + +% \begin{macrocode} +\ProcessOptions\relax +% \end{macrocode} + +% The covers are created as simple tabular cells, and in the rightmost cell is an invisible |\rule| that +% ensures the height of the cell regardless of the text inserted into the other cells. The width of the +% cells are provided by the m column type of the \texttt{array} package. +% +% The space produced with the |\vspace| macros are for aligning purposes. Without them, the texts would be +% vertically centered in the cell. + +% \begin{macro}{\covers} +% Creates a jewel case cover with a front and a backsheet. \\ +% Usage: |\covers| \oarg{backsheet text} \marg{cover title} \marg{spine text} +% \begin{macrocode} +\DeclareRobustCommand{\covers}[3][\ ]{ + \frontcover{#2} + + \vspace*{0.5cm} + \backsheet[#1]{#3} +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\frontcover} +% Creates front cover for a jewel case. \\ +% Usage: |\frontcover| \marg{cover title} +% \begin{macrocode} +\DeclareRobustCommand{\frontcover}[1]{ + \sc@cell{#1}{\sc@cdjccoverwidth}{\sc@cdjccoverheight}% + {\vspace{\sc@jfcalign}} +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\backsheet} +% Creates backsheet for a jewel case with 2 spines. \\ +% Usage: |\backsheet| \oarg{backsheet middle text} \marg{spine text} +% \begin{macrocode} +\DeclareRobustCommand{\backsheet}[2][\ ]{ + \begin{tabular}% + {|@{\hspace{0.4mm}}m{\sc@cdjcspinewidth-0.4mm}@{}% + !{\vrule width \sc@vfoldline}% + @{}m{\sc@cdjcbackwidth}@{}% + !{\vrule width \sc@vfoldline}@{}% + m{\sc@cdjcspinewidth-0.4mm}@{\hspace{0.4mm}}% + |m{\sc@ircwidth}} + \cline{1-3} + \centering% + \begin{turn}{\sc@spinerotthree}% + {\fontsize{\sc@cdjfontsize}{36}\selectfont #2 }% + \end{turn} % + & \parbox[c]{\sc@cdjcbackwidth}{\centering #1 \\ + \vspace{\sc@jbsalign}}% + & \centering % + \begin{turn}{\sc@spinerottwo}% + {\fontsize{\sc@cdjfontsize}{36}\selectfont #2}% + \end{turn} & \rule{0pt}{\sc@cdjcbackheight-\sc@ircorr} \\ + \cline{1-3} + \end{tabular} +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\jewelspine} +% Creates a single spine for a jewel case. \\ +% Usage: |\jewelspine| \marg{text} +% \begin{macrocode} +\DeclareRobustCommand{\jewelspine}[1]{ + \begin{tabular}{|@{}m{\sc@cdjcbackheight}@{}|m{\sc@ircwidth}} + \cline{1-1} % + \centering % + {\fontsize{\sc@cdjfontsize}{36}\selectfont #1}& % + \rule{0pt}{\sc@cdjcspinewidth-0.1cm} \\ + \cline{1-1} + \end{tabular} +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\sleeve} +% Creates a disk sleeve for cutting out and glueing together. \\ +% Usage: |\sleeve| \marg{middle text} +% \begin{macrocode} +\DeclareRobustCommand{\sleeve}[1]{ + \begin{tabular}{m{10mm}|@{}m{\sc@dsdim}@{}|m{10mm}m{\sc@ircwidth}} + \multicolumn{3}{c}{ \setlength{\unitlength}{0.5cm} + \begin{picture}(0,0)% + \put(-12.5,-0.25){\line(1,1){4}} + \put(-8.5,3.75){\line(1,0){17}} + \put(12.5,-0.25){\line(-1,1){4}} + \end{picture} \rule{0pt}{3cm}} \\ + \cline{2-2} + \centering \setlength{\unitlength}{0.5cm} + \begin{picture}(0,0)% + \put(1.45,-12.38){\line(-1,1){1.5}}% + \put(-0.06,-10.9){\line(0,1){22.08}} % + \put(-0.06,11.18){\line(1,1){1.5}}% + \end{picture} & \parbox[c]{\sc@dsdim}% + {\centering #1 \\ \vspace{\sc@slalign}} &% + \setlength{\unitlength}{0.5cm} % + \begin{picture}(0,0)% + \put(-0.45,-12.38){\line(1,1){1.5}}% + \put(1.04,-10.9){\line(0,1){22.08}} % + \put(1.04,11.18){\line(-1,1){1.5}}% + \end{picture} & \rule{0pt}{\sc@dsdim-\sc@ircorr}\\ + \sc@hfoldline{2-2} + & & & \rule{0pt}{\sc@dsdim-0.1cm} \\ + \cline{2-2} + \end{tabular} +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\keepcase} +% Universal macro for creating keepcases in various sizes. +% Usage: |\keepcase| \oarg{backtext} \marg{cover text} \marg{spinetext} \marg{cover height} \marg{cover width} \marg{spine width} +% \begin{macrocode} +\DeclareRobustCommand{\keepcase}[6][]{ + \begin{tabular}{|@{}m{#4}@{}|m{\sc@ircwidth}} + \cline{1-1} + \centering + \begin{sideways} \parbox[c]{#5}{\centering #2 % + \\ \vspace{\sc@kcfalign}} % + \end{sideways} & \rule{0pt}{#5-\sc@ircorr} \\ + \sc@hfoldline{1-1} \centering % + \begin{turn}{\sc@spinerotone}% + #3 % + \end{turn}% + & \rule{0pt}{#6-\sc@ircorr} \\ + \sc@hfoldline{1-1}% + \centering % + \begin{sideways} \parbox[c]{#5}{\centering #1\ \\ % + \vspace{\sc@kcbalign}} \end{sideways} & % + \rule{0pt} {#5-\sc@ircorr}\\ + \cline{1-1} + \end{tabular} +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\slimdvd} +% Creates a slim dvd keepcase cover. \\ +% Usage: |\slimdvd| \oarg{back text} \marg{cover text} \marg{spine text} +% \begin{macrocode} +\DeclareRobustCommand{\slimdvd}[3][]{ + \keepcase[#1]{#2}{#3}{\sc@dvdkcheight}{\sc@sdvdcoverwidth}% + {\sc@sdvdspinewidth} +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\dvd} +% Creates a dvd keepcase. \\ +% Usage: |\dvd| \oarg{back text} \marg{cover text} \marg{spine text} +% \begin{macrocode} +\DeclareRobustCommand{\dvd}[3][]{ + \keepcase[#1]{#2}{#3}{\sc@dvdkcheight}{\sc@dvdkccoverwidth-1.5mm}% + {\sc@dvdkcspinewidth} +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\bluray} +% Creates a Blu-Ray keepcase.\\ +% Usage: |\bluray| \oarg{backtext} \marg{cover text} \marg{spine text} +% \begin{macrocode} +\DeclareRobustCommand{\bluray}[3][]{ + \keepcase[#1]{#2}{#3}{\sc@brcoverheight}{\sc@brcoverwidth}% + {\sc@brspinewidth} +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\coverimg} +% Resizes the image for a jewel case cover. \\ +% Usage: |\coverimg| \parg{picture} +% \begin{macrocode} +\DeclareRobustCommand{\coverimg}[1]{ + \resizebox{\sc@cdjccoverwidth}{\sc@cdjccoverheight}{#1} +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\backsheetimg} +% Resizes the image for a jewel case backsheet with spines. \\ +% Usage: |\backsheetimg| \parg{picture} +% \begin{macrocode} +\DeclareRobustCommand{\backsheetimg}[1]{ + \resizebox{\sc@cdjcbackwidth+\sc@cdjcspinewidth*2}% + {\sc@cdjcbackheight}{#1} +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\slimdvdimg} +% Resizes an image for the slim dvd keepcase. \\ +% Usage: |\slimdvdimg| \parg{picture} +% \begin{macrocode} +\DeclareRobustCommand{\slimdvdimg}[1]{ + \resizebox{\sc@dvdkcheight}% + {\sc@sdvdcoverwidth*2+\sc@sdvdspinewidth}{#1} +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\dvdimg} +% Resizes an image for a dvd keepcase. \\ +% Usage: |\dvdimg| \parg{picture} +% \begin{macrocode} +\DeclareRobustCommand{\dvdimg}[1]{ + \resizebox{\sc@dvdkcheight}% + {\sc@dvdkccoverwidth*2+\sc@dvdkcspinewidth}{#1} +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\blurayimg} +% Resizes an image for the Blu-Ray keepcase. \\ +% Usage: |\blurayimg| \parg{picture} +% \begin{macrocode} +\DeclareRobustCommand{\blurayimg}[1]{ + \resizebox{\sc@brcoverheight}% + {\sc@brcoverwidth*2+\sc@brspinewidth}{#1} +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\sc@cell} +% Creates a single cell for a cover, inlay. \\ +% Usage: |\sc@cell| \marg{text} \marg{width} \marg{height} \marg{aligning space} +% \begin{macrocode} +\DeclareRobustCommand{\sc@cell}[4]{ + \begin{tabular}{|@{}m{#2}@{}|m{\sc@ircwidth}} + \cline{1-1}% + \centering % + \parbox[c]{#2}{\centering #1 \\ #4} & \rule{0pt}{{#3}-\sc@ircorr}\\ + \cline{1-1} + \end{tabular} +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\inlay} +% Creates a costum sized inlay. +% Usage: |\inlay| \marg{text} \marg{width} \marg{height} +% \begin{macrocode} +\DeclareRobustCommand{\inlay}[3]{ + \sc@cell{#1}{#2}{#3}{\vspace{\sc@inalign}} +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\dvdinlay} +% Creates an inlay card for a dvd/slimdvd keepcase. \\ +% Usage: |\dvdinlay| \marg{text} +% \begin{macrocode} +\DeclareRobustCommand{\dvdinlay}[1]{ + \inlay{#1}{\sc@dvdkcinletwidth}{\sc@dvdkcinletheight} +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\blurayinlay} +% Creates an inlay for a Blu-Ray keepcase. +% Usage: |\blurayinlay| \marg{text} +% \begin{macrocode} +\DeclareRobustCommand{\blurayinlay}[1]{ + \inlay{#1}{\sc@brinletwidth}{\sc@brinletheight} +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\djewel} +% Creates a two-page jewel case cover. \\ +% Usage: |\djewel| \marg{first page text} \marg{second page text} +% \begin{macrocode} +\DeclareRobustCommand{\djewel}[2]{ + \begin{tabular}{|@{}m{\sc@cdjccoverheight}@{}|m{\sc@ircwidth}} + \cline{1-1} % + \centering% + \begin{turn}{270}% + \parbox[c]{\sc@cdjccoverwidth-\sc@ircorr}% + {\centering #2 \\ \vspace{\sc@djewsalign}}% + \end{turn}& \rule{0pt}{\sc@cdjccoverwidth-\sc@ircorr} \\ + \sc@hfoldline{1-1} % + \centering% + \begin{turn}{270}% + \parbox[c]{\sc@cdjccoverwidth-\sc@ircorr}% + {\centering #1 \\ \vspace{\sc@jfcalign}}% + \end{turn} & \rule{0pt}{\sc@cdjccoverwidth-\sc@ircorr} \\ + \cline{1-1} + \end{tabular} +} +% \end{macrocode} +% \end{macro} +% +% \Finale +\endinput diff --git a/Master/texmf-dist/source/latex/simplecd/simplecd.ins b/Master/texmf-dist/source/latex/simplecd/simplecd.ins new file mode 100644 index 00000000000..930379a291e --- /dev/null +++ b/Master/texmf-dist/source/latex/simplecd/simplecd.ins @@ -0,0 +1,53 @@ +%% +%% Copyright (C) 2010 by Daniel Majoros +%% +%% This file may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either +%% version 1.2 of this license or (at your option) any later +%% version. The latest version of this license is in: +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.2 or later is part of all distributions of +%% LaTeX version 1999/12/01 or later. +%% + +\input docstrip.tex +\keepsilent + +\preamble + +This is a generated file. + +Copyright (C) 2010 by Daniel Majoros + +This file may be distributed and/or modified under the +conditions of the LaTeX Project Public License, either +version 1.2 of this license or (at your option) any later +version. The latest version of this license is in: + + http://www.latex-project.org/lppl.txt + +and version 1.2 or later is part of all distributions of +LaTeX version 1999/12/01 or later. + +\endpreamble + +\generate{\file{simplecd.sty}{\from{./simplecd.dtx}{package}}} + +\obeyspaces +\Msg{****************************************************} +\Msg{* *} +\Msg{* To finish the installation you have to move the *} +\Msg{* following file into a directory searched by TeX: *} +\Msg{* *} +\Msg{* simplecd.sty *} +\Msg{* *} +\Msg{* To produce the documentation run the file *} +\Msg{* simplecd.dtx through LaTeX. *} +\Msg{* *} +\Msg{* Happy TeXing! *} +\Msg{* *} +\Msg{****************************************************} + +\endbatchfile |