TransWikia.com

AwesomeCV projects section remove space in cventry

TeX - LaTeX Asked by K Split X on February 21, 2021

I want to modify the cventry definition in the AwesomeCV template.

In my projects section, I don’t have a position or date, and I want this extra space to disappear.

Here is the initial cventry:

newcommand*{cventry}[5]{%
  vspace{-2.0mm}
  setlengthtabcolsep{0pt}
  setlength{extrarowheight}{0pt}
  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*}%
}

and it gives the following result:

enter image description here

when passed:

  cventry
    {} % Job title
    {Project Name} % Organization
    {Youtube Link} % Location
    {} % Date(s)
    {
      begin{cvitems} % Description(s) of tasks/responsibilities
          item {Project item 1}
      end{cvitems}
    }

Now to get rid of the extra space, I modified cventry to be the following:

newcommand*{cventry}[5]{%
  vspace{-2.0mm}
  setlengthtabcolsep{0pt}
  setlength{extrarowheight}{0pt}
  begin{tabular*}{textwidth}{@{extracolsep{fill}} L{textwidth - 4.5cm} R{4.5cm}}
    ifempty{#2#3}
      {entrypositionstyle{#1} & entrydatestyle{#4} }
      {entrytitlestyle{#2} & entrylocationstyle{#3} 
      ifempty{#1}{}{entrypositionstyle{#1} & entrydatestyle{#4} }}
    multicolumn{2}{L{textwidth}}{descriptionstyle{#5}}
  end{tabular*}%
}

basically changed the line entrypositionstyle{#1} & entrydatestyle{#4} } to be ifempty{#1}{}{entrypositionstyle{#1} & entrydatestyle{#4} }}

enter image description here

The space is gone, but something is messing up with the columns. I also get this error:

enter image description here

How can I fix this?

Thanks

One Answer

Use the following code in your preamble to patch command cventry:

renewcommand*{cventry}[5]{%
  vspace{-2.0mm}
  setlengthtabcolsep{0pt}
  setlength{extrarowheight}{0pt}
  begin{tabular*}{textwidth}{@{extracolsep{fill}} L{textwidth - 4.5cm} R{4.5cm}}
    ifempty{#2#3}
      {ifempty{#1#4}{}{entrypositionstyle{#1} & entrydatestyle{#4} }}
      {entrytitlestyle{#2} & entrylocationstyle{#3} 
       ifempty{#1#4}{}{entrypositionstyle{#1} & entrydatestyle{#4}}}
    ifempty{#5}{}{multicolumn{2}{L{textwidth}}{descriptionstyle{#5}}}
  end{tabular*}%
  par % <============================================================== missing in class
}

Please see that I added checks for empty parameter 1 and 4 and for empty parameter 5.

With the following compilable code

%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
% Awesome CV LaTeX Template for CV/Resume
%
% This template has been downloaded from:
% https://github.com/posquit0/Awesome-CV
%
% Author:
% Claud D. Park <[email protected]>
% http://www.posquit0.com
%
% Template license:
% CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/)
%


%-------------------------------------------------------------------------------
% CONFIGURATIONS
%-------------------------------------------------------------------------------
% A4 paper size by default, use 'letterpaper' for US letter
documentclass[11pt, a4paper]{awesome-cv}

% Configure page margins with geometry
geometry{left=1.4cm, top=.8cm, right=1.4cm, bottom=1.8cm, footskip=.5cm}

% Specify the location of the included fonts
fontdir[fonts/]

% Color for highlights
% Awesome Colors: awesome-emerald, awesome-skyblue, awesome-red, awesome-pink, awesome-orange
%                 awesome-nephritis, awesome-concrete, awesome-darknight
colorlet{awesome}{awesome-red}
% Uncomment if you would like to specify your own color
% definecolor{awesome}{HTML}{CA63A8}

% Colors for text
% Uncomment if you would like to specify your own color
% definecolor{darktext}{HTML}{414141}
% definecolor{text}{HTML}{333333}
% definecolor{graytext}{HTML}{5D5D5D}
% definecolor{lighttext}{HTML}{999999}

% Set false if you don't want to highlight section with awesome color
setbool{acvSectionColorHighlight}{true}

% If you would like to change the social information separator from a pipe (|) to something else
renewcommand{acvHeaderSocialSep}{quadtextbarquad}


renewcommand*{cventry}[5]{%
  vspace{-2.0mm}
  setlengthtabcolsep{0pt}
  setlength{extrarowheight}{0pt}
  begin{tabular*}{textwidth}{@{extracolsep{fill}} L{textwidth - 4.5cm} R{4.5cm}}
    ifempty{#2#3}
      {ifempty{#1#4}{}{entrypositionstyle{#1} & entrydatestyle{#4} }}
      {entrytitlestyle{#2} & entrylocationstyle{#3} 
       ifempty{#1#4}{}{entrypositionstyle{#1} & entrydatestyle{#4}}}
    ifempty{#5}{}{multicolumn{2}{L{textwidth}}{descriptionstyle{#5}}}
  end{tabular*}%
  par % <============================================================== missing in class
}



%-------------------------------------------------------------------------------
%   PERSONAL INFORMATION
%   Comment any of the lines below if they are not required
%-------------------------------------------------------------------------------
% Available options: circle|rectangle,edge/noedge,left/right
% photo{./examples/profile.png}
name{Claud D.}{Park}
position{Software Architect{enskipcdotpenskip}Security Expert}
address{42-8, Bangbae-ro 15-gil, Seocho-gu, Seoul, 00681, Rep. of KOREA}

mobile{(+82) 10-9030-1843}
email{[email protected]}
homepage{www.posquit0.com}
github{posquit0}
linkedin{posquit0}
% gitlab{gitlab-id}
% stackoverflow{SO-id}{SO-name}
% twitter{@twit}
% skype{skype-id}
% reddit{reddit-id}
% medium{madium-id}
% googlescholar{googlescholar-id}{name-to-display}
%% firstname and lastname will be used
% googlescholar{googlescholar-id}{}
% extrainfo{extra informations}

quote{``Be the change that you want to see in the world."}


%-------------------------------------------------------------------------------
begin{document}

% Print the header with above personal informations
% Give optional argument to change alignment(C: center, L: left, R: right)
makecvheader

% Print the footer with 3 arguments(<left>, <center>, <right>)
% Leave any of these blank if they are not needed
makecvfooter
  {today}
  {Claud D. Park~~~·~~~Curriculum Vitae}
  {thepage}


%-------------------------------------------------------------------------------
%   CV/RESUME CONTENT
%   Each section is imported separately, open each file in turn to modify content
%-------------------------------------------------------------------------------
%input{cv/education.tex}
begin{cventries}
    cventry
        {1 Degree ...}
        {2 University of ...}
        {3 London}
        {4 2011-2015}
        {5 begin{cvitems} % Description(s) bullet points
                item {ipsum dorem}
        end{cvitems}}

    cventry
        {}
        {2 College}
        {3 College}
        {4 2010-2011}
        {5 ipsum dorem}

    cventry
        {1 Degree}
        {}
        {}
        {4 2010-2011}
        {5 ipsum dorem}

  cventry
    {} % Job title
    {Project Name} % Organization
    {Youtube Link} % Location
    {} % Date(s)
    {
      begin{cvitems} % Description(s) of tasks/responsibilities
          item {Project item 1}
      end{cvitems}
    }
end{cventries}

%-------------------------------------------------------------------------------
end{document}

you get the following result:

enter image description here

Answered by Mensch on February 21, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP