Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for empty cventry arguments #531

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions awesome-cv.cls
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,10 @@
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} L{\textwidth - 4.5cm} R{4.5cm}}
\ifempty{#2#3}
{\entrypositionstyle{#1} & \entrydatestyle{#4} \\}
\ifempty{#1#4}
{\entrytitlestyle{#2} & \entrylocationstyle{#3} \\}
\ifempty{#1#3}
{\entrytitlestyle{#2} & \entrydatestyle{#4} \\}
{\entrytitlestyle{#2} & \entrylocationstyle{#3} \\
Comment on lines +671 to 675
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If 1 & 4 (position & date) are empty, doesn't this mean we show double 2 (title) regardless of 3 or anything else?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't show 2 twice but should throw lots of errors and possibly fail to build in some situations, like if only 2 is not empty. Also doesn't fix the issue with \ifempty where when the "if" conditions are not satisfied the "else" doesn't print as expected because missing args.

If we want something user-proof this is a half measure and not much better than what's there already. Probably worse in certain cases too. 5 args with 2 states is...quite a few combinations to account for and this probably isn't the place or way to handle it in the .cls file.

\entrypositionstyle{#1} & \entrydatestyle{#4} \\}
\ifstrempty{#5}
Expand Down
Loading