0

There should be a simple solution for this table column width problem, but I'm having trouble making it work.

I have taken a CV template and tried to add a (random) company logo to the left of the experience block, but finding a way to do that without impacting the overall width has been challenging. The Latex is below, followed by an image of the problem.

\newcommand*{\cventry}[5]{%
  \vspace{-2.0mm}
  \setlength\tabcolsep{0pt}
  \setlength{\extrarowheight}{0pt}
  % I added this line, creating a table so that the logo can take up the first col
  % and the default company info section can take up the second col
  \begin{tabular}[c]{@{} c p{4.5in} @{}}
    % raisebox to center the company logo vertically next to the paragraph of text to the right
    \raisebox{-.5\height}{\includegraphics[width=1cm, height=0.25in]{sky_logo.jpeg}}
      \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} L{\textwidth - 8.5cm} R{4.5cm}}
        \ifempty{#2#3}
          {\entrypositionstyle{#1} & \entrydatestyle{#4} \\}
          {\entrytitlestyle{#2} & \entrylocationstyle{#3} \\
          \entrypositionstyle{#1} & \entrydatestyle{#4} \\}
        \multicolumn{2}{L{\textwidth}}{\descriptionstyle{#5}}
      \end{tabular*}%
  \end{tabular}
}


Which results in this: enter image description here

The tables overflow the text area to the right. Is there an easy fix?

**as requested, here is a link to view the project in overleaf.

6
  • 2
    Welcome to TeX.SE! As usual here can you please make your code snippet be compilable resulting in your issue? Then we do not have to guess what you are doing ...
    – Mensch
    Commented Apr 24, 2022 at 17:46
  • I've included a link for anyone to view the project now hope this helps Commented Apr 24, 2022 at 18:11
  • 1
    I can assure you that the information on the project is not my own and are simply placeholder details (but I appreciate your comment). I don't believe the link will die anytime soon, but if it does I'll be sure to replace it! Commented Apr 24, 2022 at 18:40
  • 2
    The code can't be compiled on its own as is, which makes it very hard to test. Provide a minimal working example if you can. Not sure why there is a tabular* within a tabular here, but I doubt \begin{tabular*}{\textwidth} could be right for the inner tabular.
    – frabjous
    Commented Apr 24, 2022 at 20:12
  • 1
    @hungrycable2813 I tried your link but all I got back was "Join Project" "Project not found". Why haven't you replaced this? DO NOT LINK TO OTHER SOURCES. Commented Apr 25, 2022 at 18:10

1 Answer 1

1

Using the original awesome-cv.cls add before \begin{document}

\renewcommand*{\cventry}[5]{%
    \vspace{-2.0mm}
    \setlength\tabcolsep{0pt}
    \setlength{\extrarowheight}{0pt}
        \begin{minipage}{1.5cm}\centering\includegraphics[width=1cm, height=0.25in]{sky_logo.jpeg}\end{minipage}\hfill
        \begin{minipage}{\textwidth-2cm}\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} L{\textwidth - 4.5cm} R{4.5cm}}
            \ifempty{#2#3}
            {\entrypositionstyle{#1} & \entrydatestyle{#4} \\}
            {\entrytitlestyle{#2} & \entrylocationstyle{#3} \\
                \entrypositionstyle{#1} & \entrydatestyle{#4} \\}
            \multicolumn{2}{L{\textwidth}}{\descriptionstyle{#5}}
        \end{tabular*}%
    \end{minipage}
}

There are two minipages side by side: the first with the logo and the second with the tabular.

b

1
  • Thank you very much! I acknowledge the time taken as some comments mentioned it was hard to test - I'm very grateful Commented Apr 25, 2022 at 8:34

You must log in to answer this question.

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