0

I have the current design

\begin{tikzpicture} 
\def\longitudUno{2}
\def\longitudDos{3.6}
\def\pico{0.25}
\def\altura{0.5}
\def\separación{\longitudUno+0.08}

\draw [azulPalido,fill=azulPalido,line width=0pt,xshift=6.05cm]  (0,0) -- (0,\altura) -- (\longitudUno,\altura)-- (\longitudUno+\pico,\altura/2) -- (\longitudUno,0) -- cycle;

\draw [azulOscuro,fill=azulOscuro,line width=0pt,xshift=6.05cm]  (\separación,0) -- (\separación+\longitudDos,0) -- (\separación+\longitudDos+\pico,\altura/2) -- (\separación+\longitudDos,\altura) -- (\separación,\altura) -- (\separación+\pico,\altura/2) -- cycle;

\node[text=white,font=\bfseries,] at (7.1,0.25){Business};
\node[text=white,font=\bfseries,] at (10.1,0.25){Ireland bailout};

\end{tikzpicture}

to draw

what I have designed

Like you can see in newspapers like http://www.theguardian.com/business/2011/apr/03/irish-property-going-for-a-song

However, I would with this design I have to manually place the texts and specify the box lenghts (variable 'longitud') as well as the position of elements without any anchor posibility. Is there a way I could improve this? Maybe with a custom node shape?

1

1 Answer 1

4

Thanks to @Claudio Fiandrino for the comment

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{shapes,arrows}

\begin{document}

\tikzset{product size/.style={minimum width=2cm, 
    minimum height=0.5cm,
  },
  product/.style={
    draw,signal, 
    signal to=east, 
    signal from=west,
    product size,
    fill=gray!50!black,
    draw=gray!50!white,
    text=white,font=\bfseries,
  },
  otroproduct/.style={
    draw,signal, 
    signal to=east, 
    %signal from=west,
    product size,
    fill=gray!50!black,
    draw=gray!50!white,
    text=white,font=\bfseries,
  },  
}

\definecolor{azulPalido}{RGB}{74,100,217}
\definecolor{azulOscuro}{RGB}{35,49,120}

\begin{tikzpicture}
    \node[otroproduct,fill=azulPalido, draw=white] (first) {Business};
    \node[product, fill=azulOscuro, draw = white, anchor=west] at (first.east){Ireland bailout};
\end{tikzpicture}

\end{document}

This is the final result: resultado final

You must log in to answer this question.

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