3

in this question Showcase of beautiful wine bottle labels made with LaTeX/TikZ and friends I asked for wine bottle labels. Here is my own attempt. I still have to play with fonts.

enter image description here

I'm quite happy with the design but not with the code. It is based on a table layout in a tcolorbox (for the background picture). So my question is: is it possible to achieve a design like my label with "cleaner code"? Maybe there is a cleaner solution without using tables?

Here is my code so far:

\documentclass[a4paper]{memoir}
\usepackage[table,dvipsnames]{xcolor}
\usepackage[most]{tcolorbox}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{ragged2e}
\usepackage{kpfonts}
\usepackage{PTSansCaption} 
\usepackage{rotating}
\usepackage{multirow}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{soul}
\usepackage[]{graphicx}
\usepackage{array}
\usepackage{calc}
\newlength{\bls}
\setlength{\bls}{\baselineskip-\doublerulesep}


\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}


\sodef\an{}{.4em}{1em plus1em}{2em plus.1em minus.1em}


\tcbset{
bgtable/.style={
freelance,
frame code={\draw[] (interior.north west) -- (interior.north east);}
center title,
fonttitle=\bfseries\sffamily,
watermark graphics=#1,
watermark stretch=1.00,
watermark opacity=0.3,
arc=0pt,
outer arc=0pt,
nobeforeafter}
}
\pagestyle{empty}

\begin{document}

\noindent\begin{tcolorbox}[
  bgtable=papiro.png,
  tabularx*={}{C{20mm} | L{30mm} L{10mm} @{}C{1mm} @{}L{18mm} @{}C{1mm} @{}| L{20mm}},
  watermark stretch=1.00,
  width=10.8cm,
  watermark opacity=0.8,
  top=.51cm,
  bottom=.31cm,
]
%erste Linie über Tabelle
   & \multicolumn{6}{c}{}  \\[-2\bls] \cline{2-6}

%erste Zeile
     \multicolumn{1}{r|}{\multirow{6}{*}{\includegraphics[width=.9cm]{path2456.png}~~\,}} &
     \multicolumn{5}{c|}{\raisebox{-.7pt}{\scshape\sffamily \bfseries \so{MET 8$\cdot$\&$\cdot$30}}} & 
     \multicolumn{1}{l}{\multirow{7}{*}{\begin{turn}{90}\ttfamily  herb\end{turn}}} \\
     \cline{2-6}

%%zweite Zeile
   & \multicolumn{1}{c}{\multirow{5}{*}{\parbox{3cm}{\tiny
       \scshape \RaggedRight Honig,  Wasser, Äpfel, Hefe, 
       und vor allem Zeit braucht man, um selbstgemachten Met verschenken
       zu können. Du hälst gerade ein solches Geschenk in der Hand. \newline Wenn es Dir
      schmeckt, lass es mich wissen.}} 
       }  
       & \multicolumn{2}{l}{} 
       & \multicolumn{2}{l|}{}    
       &\\
%
%%dritte Zeile
   &    
     & \multicolumn{1}{l}{\tiny Charge:} 
     &    
     & \multicolumn{1}{l}{\tiny Flaschennummer:}    
     &
     &\\ \cline{3-3} \cline{5-5} 

%%vierte Zeile
   & 
     & \multicolumn{1}{|l|}{\ttfamily 09\,/\,13} 
     & 
     & \multicolumn{1}{|c|}{\ttfamily 3\,/\,15} 
     &
     &\\ \cline{3-3} \cline{5-5} 

%%%%%%%%%%%%%%%%%%%%%%%%%%
%%leere ``Zeile``
     \cline{3-3} \cline{5-5}& \multicolumn{5}{c|}{} & \multicolumn{1}{c}{}  \\[-\bls] \cline{3-5}
%%%%%%%%%%%%%%%%%%%%%%%%%%
%%fünfte Zeile
   &
     & \multicolumn{3}{|l|}{{\tiny gebraut von:} \ttfamily Schmendrich}      
     & \\
     \cline{3-5} 
   & \multicolumn{5}{r|}{\miniscule \sffamily natürlich mit Schwefel} 
   & \multicolumn{1}{r}{}\\ \cline{2-6}

\end{tcolorbox}



\end{document}
  • 1
    why is every entry in a \multicolumn ? It means tabularx and the original table specification aren't used at all??? – David Carlisle Mar 23 '14 at 16:17
  • I got the basic frame of that table from excel2latex. It is for the vertical lines. In some places I wanted the lines only for a cell but not for the whole row. Is there another way to achieve that without using multicolumn? – schmendrich Mar 23 '14 at 16:27
  • sorry I'm an idiot:-) I'll delete my comments. – David Carlisle Mar 23 '14 at 17:42
  • Are you loading booktabs just for its spacing? I notice you are still using \cline. – cfr Mar 23 '14 at 19:53
  • 3
    Wouldn't be easier to translate the design to tikz nodes? Well, admittedly I always use tikz even if it is not the more appropriate tool, but in this case I think it fits well. And the question has tag fun! :-) – JLDiaz Oct 13 '15 at 9:16

Browse other questions tagged or ask your own question.