4

From time to time, when I see a document, I am wondering how I could possibly type it into LaTeX. In this case, I would like to know a nice way to reproduce the CD cover shown below (João Gilberto "Brazil"). For now, let's forget about the colors and focus on the geometry.

My idea was to use tikz and rotatebox (from rotating package), but it seemed quite inefficient (even using stuff like (my_node.south east) or anchor=west). How would you proceed? Maybe creating a table?

cover


(Here is what I tried:

\documentclass[11pt]{article}
\usepackage[papersize={10cm, 10cm}, total={10cm,10cm}]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usepackage{graphicx,rotating}
\usepackage[sfdefault, light]{roboto}

\newcommand{\T}[2]{%
\color{#1} \scriptsize #2
}

\begin{document}
\thispagestyle{empty}
\pagecolor{yellow!5!white}

\begin{tikzpicture}[overlay, remember picture,yscale=-1]
\node at (5mm, 2mm)     {                               \T{green!50!gray}{Lado B}       };

\node[anchor=north] at (2mm, 7mm) {\rotatebox{90}{      \T{blue!40!gray}{Lado A}        }};
\node[anchor=west] at (5mm, 7mm) {                              \T{yellow}{NO TABULEIRO DA BAIANA}      };

\node[anchor=north] at (8mm, 12mm) {\rotatebox{90}{     \T{green!50!white}{AQUARELA DO BRASIL (BRASIL)}     }};
\node[anchor=west] at (8mm, 12mm) {         \T{blue!40!gray}{Ary Barroso}       };
\end{tikzpicture}

\end{document}

to get the result: test

2 Answers 2

6

The "AHA!" moment for this was realizing that the indentation for each line is equal to a multiple of the prevailing \baselineskip -- the optional argument to \cdcov allows you to alter this at will. The entry of the information is relatively straightforward (semicolon-separated entries), though the final assembly must be undertaken by the user. I used the original graphic as a model and I apologize for the mispellings

\documentclass{article}

\usepackage[papersize={4.75in,4.75in},margin=0.1in]{geometry}
\usepackage{graphicx}
\usepackage{varwidth}
\usepackage{xcolor}
\usepackage{fontspec}
\usepackage[sfdefault, light]{roboto}

%% |=====8><-----| %%

\newcounter{linenum}
\newsavebox{\ladoa}
\newsavebox{\ladob}

\def\separg#1{\setcounter{linenum}{0}\singarg#1;\end;}
\def\singarg#1;{%
    \ifx#1\end
        \let\next=\relax
    \else
        \noindent\hspace*{\dimexpr\baselineskip*\thelinenum}{#1}\par
        \stepcounter{linenum}%
        \let\next=\singarg
    \fi
    \next
}

\def\separgr#1{\setcounter{linenum}{0}\singargr#1;\endit;}
\def\singargr#1;{%
    \raggedleft
    \ifx#1\endit
        \let\next=\relax
    \else
        \noindent{#1}\hspace*{\dimexpr\baselineskip *\thelinenum\relax}\par
        \stepcounter{linenum}%
        \let\next=\singargr
    \fi
    \next
}

%% #1 is \baselineskip; #2=Lado A (semicolon separated entries); #3=Lado B, ;-separated
%% Note that the indentation is equal to the prevailing \baselineskip.
\newcommand{\cdcov}[3][1.6em]{% 
    \begin{varwidth}{\textwidth}
    \begin{lrbox}{\ladob}
        \begin{varwidth}{\textwidth}
            \baselineskip#1
            \separgr{#3}
        \end{varwidth}
    \end{lrbox}
    \begin{lrbox}{\ladoa}
        \begin{varwidth}{\textwidth}
            \baselineskip#1
            \separg{#2}
        \end{varwidth}
    \end{lrbox}
    \vspace*{2\baselineskip}
    \rotatebox{90}{\usebox{\ladob}}
    \par
    \vspace*{-\dimexpr\wd\ladob + 2\baselineskip\relax}
    \usebox{\ladoa}
    \end{varwidth}
}


\def\lg{\color{green!80!yellow}}
\def\dg{\color{green!80!black}}
\def\db{\color{blue!80!black}}
\def\dy{\color{yellow!70!orange}}

\parindent0pt

\begin{document}

\small

\cdcov[1.5em]{\dg Lado A;\dy NO TABULAREIRO DA BAIANA;\db Ary Berroso;\lg Participacao Especial: Maria Bethania;MILAGRE;Dorival Caymmi;CORDEIRO DE NANA;Mateus e Dadinho}{Lado B;AQUARELA DO BRASIL (BRASIS);Ary Barroso;DISSE ALGUEM (ALL OF ME);Seymour Simons, Gerald Marks,;Versao: Harold Barbosa;BAHIA COM H;Denis Brian}

\tiny

\vspace{0.25in}

\noindent\hspace{1.75in}\cdcov{Estudies de Gravacao: sigla (rj) XOUND GOOD, BRITANNIA;Estudios de Mixagem: SIGLA E WESTLAKE AUDIO;Tecnicos de Gracacao e Mixagem: CELIO MARTINS E JOES MOSS;Assistentes de Gravacao: RUSS BRICHER E EDUARDO RAMALKO (Britannia);Coordenacao nos Estados Unidos: JULIE SAYERS;Foto: ROGERIO SGANZERLA;Projecto de Capa e Desenho: ROGERIO DUARTE}{Producao Musical: JOAO GILBERTO;Producao Artistica: JOAO GILBERTO;Producao Executiva: GUTO GRACA MELLO,;KRIKOR TCHERKESIAN E ANDRE MIDANI;MARIA BETHANIA E CAETANO VELOSO;gentilmente cedidos pela Polygram;Arranjos e Regencias: HOHNNY MANDEL}

\end{document}

Not a stitch of TikZ anywhere!

enter image description here

6

enter image description here

\documentclass{article}

\usepackage{graphicx}
\usepackage{lmodern}

\newdimen\zz
\zz=25pt

\begin{document}
\makeatletter
\def\usezz{\ifcase\numexpr15-\@multicnt\relax
Something About This\or
Text  about that\or
MY NAME\or
some Other text\or
Random Words HERE\or
Some Name\or
This\or
THAT\or
ZZZZZZZ\or
\LaTeX\ text\or
\textit{Italic text}\or
Mathematics $x^2+y^2=z^2$\or
More plain text\or
Final words\or
\else
?%
\fi
}

\begin{picture}(0,0)
\multiput(0,0)(20,-20){15}{%
\fontsize\zz\zz\selectfont
\ifodd\@multicnt
{\quad\usezz}%
\else
\rotatebox[origin=r]{90}{\usezz\quad}%
\fi
\global\advance\zz -1pt
}
\end{picture}

\end{document}
4
  • 1
    As usual, a very nice solution, @David Carlisle. Any chance that you give a bit of explanation about this method? That would be great to learn from you again.
    – SebGlav
    Mar 6, 2021 at 16:26
  • +1 for not using TikZ ;)
    – user226564
    Mar 6, 2021 at 16:59
  • 2
    @SebGlav well it's just a simple invocation of multiput which is a core latex command not requiring any package, \multiput(0,0)(20,-20){15}{... executes ... 15 times, at each stage mioving the current point by (20,-20) ie to the left and down by 20pt. Mar 6, 2021 at 17:04
  • 1
    Thank you very much, Mister Carlisle. I'm not that into pure LaTeX and I'm always impressed by those straightforward solutions. If only I had more time to learn this too ;)
    – SebGlav
    Mar 6, 2021 at 17:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .