LaTeX 挑战:CD 封面混合了水平和垂直(90° 旋转)文本

LaTeX 挑战:CD 封面混合了水平和垂直(90° 旋转)文本

有时,当我看到一份文件时,我会想知道如何将其输入到 LaTeX 中。在这种情况下,我想知道一种很好的方法来重现下面显示的 CD 封面(João Gilberto“巴西”)。现在,让我们忘记颜色,专注于几何图形。

我的想法是使用 tikz 和rotatebox(来自 spinning 包),但它似乎效率很低(即使使用(my_node.south east)或 之类的东西anchor=west)。你会怎么做?也许创建一个表?

覆盖


(这是我尝试过的:

\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}

得到结果: 测试

答案1

对此的“啊哈!”时刻是意识到每行的缩进等于当前行的倍数\baselineskip——可选参数允许\cdcov您随意更改它。信息的输入相对简单(分号分隔的条目),但最终的组装必须由用户完成。我使用原始图形作为模型,对拼写错误表示歉意

\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}

不是一针一线的 TiZ 无处不在!

在此处输入图片描述

答案2

在此处输入图片描述

\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}

相关内容