Problem description

I am trying to make some custom Tikz sections, but I am lost at finding a way to make the Tikz box stretch accordingly to its text inside. In this example "Professional Experience" is too long for the lengths I have defined.

enter image description here

with associated code:



    \node (A) [rectangle,minimum width=\textwidth, minimum height=1cm,color=white,fill=white, text width=\textwidth+3cm,align=left] {};
    \draw (-7.2,0) -- (\textwidth,0);
    \fill[fill=lightorange] (A.north west) -- ($(A.north west)+(3.5cm,0)$) -- ($0.45*(A.north west)-0.5*(A.north west)-(0.5*\textwidth-2.5cm,0)$)--($(A.south west)+(3.5cm,0)$)--(A.south west);
    \node [color=white](A.north west) at ($0.5*(A.north west)-0.5*(A.north west)-(0.5*\textwidth-1cm,0)$) {\hspace{-1.25cm}\huge\textbf{\textsf{#4}}};

    \section{Professional Experience}

What I have tried

I looked at the CTAN pdf for tiks but have not found what I am looking for. I searched this Stack as well with no success. I tried changing the order in which the commands are written but that doesn't fix it.

Does anyone know how I can achieve what I am looking for ?



Browse other questions tagged .