|
35 | 35 | \usepackage{perpage} % gives us \MakePerPage for custom resets |
36 | 36 |
|
37 | 37 | %------------------------------------------------------------------------------ |
38 | | -% FOOTNOTE SETUP |
| 38 | +% PUBLICATION ANNOTATION SYMBOLS |
| 39 | +% |
| 40 | +% \cvfnmark{equalcontrib} — outputs a superscript * to mark equal-contribution |
| 41 | +% authors in usera fields. Always outputs *, no dynamic counter needed. |
| 42 | +% |
| 43 | +% The legend ("* equal contributions...") is printed once at the top of the |
| 44 | +% Publications section via \cvpublegend, not repeated per subsection. |
39 | 45 | %------------------------------------------------------------------------------ |
40 | | -\newcounter{cvfootnote} |
41 | | - |
42 | | -\pretocmd{\cvsection}{\setcounter{cvfootnote}{0}}{}{} |
| 46 | +\newcommand{\cvfnmark}[1]{\textsuperscript{*}} |
43 | 47 |
|
44 | | -\newcommand{\cvfnsymbol}[1]{% |
45 | | - \ifcase#1\or *\or \textdagger\or \textdaggerdbl |
46 | | - \or \textsection\or \textparagraph |
47 | | - \else ?? |
48 | | - \fi |
49 | | -} |
50 | | - |
51 | | -\newcommand{\cvfnmark}[1]{% |
52 | | - \stepcounter{cvfootnote}% |
53 | | - \edef\@cvfnval{\thecvfootnote}% |
54 | | - \textsuperscript{\cvfnsymbol{\@cvfnval}}% |
55 | | - \expandafter\xdef\csname cvfnlabel@#1\endcsname{\@cvfnval}% |
56 | | -} |
57 | | - |
58 | | -\newcommand{\cvfnnote}[2]{% |
59 | | - \ifcsname cvfnlabel@#1\endcsname |
60 | | - \noindent\textsuperscript{\cvfnsymbol{\csname cvfnlabel@#1\endcsname}}% |
61 | | - \,{\footnotesize #2}\par\smallskip |
62 | | - \fi |
63 | | -} |
64 | | - |
65 | | -\newenvironment{cvpubfootnotes}{% |
66 | | - \vspace{2pt}% |
67 | | - \begin{footnotesize}% |
68 | | -}{% |
69 | | - \end{footnotesize}% |
| 48 | +% \cvpublegend: prints the symbol legend once at the top of a section. |
| 49 | +% Place immediately after \cvsection{Publications}. |
| 50 | +\newcommand{\cvpublegend}{% |
| 51 | + \vspace{-2pt}% |
| 52 | + {\footnotesize * equal contributions, shared first authorship}% |
70 | 53 | \vspace{4pt}% |
71 | 54 | } |
72 | 55 |
|
|
171 | 154 | %------------------------------------------------------------------------------ |
172 | 155 | % BOLD OWN NAME IN BIBLIOGRAPHY |
173 | 156 | % |
174 | | -% Entries that go through the normal name formatter (no authorlist field) |
175 | | -% will have "Hakimi" bolded automatically. Entries with an authorlist field |
| 157 | +% Entries that go through the normal name formatter (no usera field) |
| 158 | +% will have "Hakimi" bolded automatically. Entries with a usera field |
176 | 159 | % bypass the formatter — bold is applied manually via \textbf in the .bib. |
177 | 160 | % Change \cvownfamilyname if the CV owner's name changes. |
178 | 161 | %------------------------------------------------------------------------------ |
179 | 162 | \def\cvownfamilyname{Hakimi} |
180 | 163 |
|
181 | 164 | \DeclareNameFormat{boldifown}{% |
182 | 165 | \ifstrequal{\namepartfamily}{\cvownfamilyname}{% |
183 | | - \textbf{% |
| 166 | + \cvbibname{% |
184 | 167 | \usebibmacro{name:family-given}{\namepartfamily}{\namepartgiveni}% |
185 | 168 | {\namepartprefix}{\namepartsuffix}% |
186 | 169 | }% |
|
191 | 174 | \usebibmacro{name:andothers}% |
192 | 175 | } |
193 | 176 |
|
194 | | -% NOTE: entries using the `authorlist` field bypass the name formatter. |
| 177 | +% NOTE: entries using the `usera` field bypass the name formatter. |
195 | 178 | % Bold your name manually there, e.g.: authorlist = {\textbf{Hakimi, S}, ...} |
196 | 179 |
|
197 | 180 | %------------------------------------------------------------------------------ |
198 | | -% AUTHORLIST FIELD |
| 181 | +% CUSTOM AUTHOR STRING — uses built-in `usera` field |
| 182 | +% |
| 183 | +% For entries with equal-contribution authors or other non-standard author |
| 184 | +% formatting, set the `usera` field in the .bib file to a pre-formatted |
| 185 | +% LaTeX string. Biber always passes `usera` through as a literal (no parsing). |
199 | 186 | % |
200 | | -% Custom verbatim field for pre-formatted author strings with LaTeX commands |
201 | | -% (\textbf, \cvfnmark, etc.). Declared verbatim so biber does not sanitise it. |
202 | | -% The author macro checks for this field and uses it instead of \printnames. |
| 187 | +% Use \cvbibname{} (not \textbf{}) for bold names — it uses \bfseries which |
| 188 | +% works reliably in Awesome-CV's fontspec context. Use ~ for spaces inside |
| 189 | +% name initials, e.g. "Hakimi,~S" to prevent TeX from dropping the space. |
| 190 | +% |
| 191 | +% Example: |
| 192 | +% usera = {\cvbibname{Hakimi,~S}\cvfnmark{equalcontrib}, Lee,~J\cvfnmark{equalcontrib}}, |
| 193 | +% |
| 194 | +% When `usera` is present it replaces the normal \printnames{author} output. |
| 195 | +% When absent, \printnames{author} runs normally (with boldifown applied). |
203 | 196 | %------------------------------------------------------------------------------ |
204 | | -% authorlist: custom verbatim field for pre-formatted author strings. |
205 | | -% Declared for all common entry types so biber passes it through unmodified. |
206 | | -\DeclareDatamodelFields[type=field, datatype=verbatim]{authorlist} |
207 | | -\DeclareDatamodelEntryfields[article,inproceedings,unpublished,misc,patent,incollection]{authorlist} |
208 | | -\DeclareFieldFormat{authorlist}{#1} |
| 197 | + |
| 198 | +% \cvbibname: bold name for usera fields and boldifown. |
| 199 | +% Keeps \sffamily (matching bib body font) but forces series b (Bold), |
| 200 | +% overriding the \fontseries{l} (Light) set by \bodyfontlight. |
| 201 | +\newcommand{\cvbibname}[1]{{\sffamily\fontseries{b}\selectfont #1}} |
| 202 | + |
| 203 | +\DeclareFieldFormat{usera}{#1} |
209 | 204 |
|
210 | 205 | \renewbibmacro*{author}{% |
211 | | - \iffieldundef{authorlist}{% |
| 206 | + \iffieldundef{usera}{% |
212 | 207 | \printnames{author}% |
213 | 208 | }{% |
214 | | - \printfield{authorlist}% |
| 209 | + \printfield{usera}% |
215 | 210 | }% |
216 | 211 | } |
217 | 212 |
|
|
222 | 217 | \DeclareNameAlias{editor}{boldifown}% |
223 | 218 | } |
224 | 219 |
|
225 | | -%------------------------------------------------------------------------------ |
226 | | -% NOTE FIELD SUPPRESSION |
227 | | -% |
228 | | -% The note field is used in some .bib entries for equal-contribution text |
229 | | -% (e.g. "* equal contributions"). We suppress it from printing inline since |
230 | | -% that information is handled by \cvfnmark in the authorlist field instead. |
231 | | -% |
232 | | -% Exception: @misc entries (Science Communication) may use note legitimately. |
233 | | -% We restore note printing for @misc via a per-type field format override. |
234 | | -%------------------------------------------------------------------------------ |
235 | | -\DeclareFieldFormat{note}{} |
236 | | -\renewbibmacro*{note+pages}{% |
237 | | - \printfield{pages}% |
238 | | -} |
239 | | -% Restore note for @misc entries (scicomm uses it for publication details) |
240 | | -\DeclareFieldFormat[misc]{note}{#1} |
| 220 | +% Note: the note field prints normally for all entry types. |
| 221 | +% Equal-contribution markers should be in the authorlist field (via \cvfnmark), |
| 222 | +% NOT in the note field. See journals.bib and conference.bib for examples. |
| 223 | +% Entries with note = {* equal contributions...} should have that note removed. |
241 | 224 |
|
242 | 225 | \addbibresource{refs/journals.bib} |
243 | 226 | \addbibresource{refs/preprints.bib} |
|
490 | 473 | }{% |
491 | 474 | \cvsection{Publications}% |
492 | 475 | }% |
| 476 | + \cvpublegend% |
493 | 477 |
|
494 | 478 | \iftoggle{showJournals}{% |
495 | 479 | \startbibsection{journals}% |
|
503 | 487 | heading=cvsubsection]% |
504 | 488 | }% |
505 | 489 | \finishbibsection{journals}% |
506 | | - \begin{cvpubfootnotes} |
507 | | - \cvfnnote{equalcontrib}{equal contributions, shared first authorship} |
508 | | - \cvfnnote{alphalist}{authors listed alphabetically} |
509 | | - \end{cvpubfootnotes}% |
510 | 490 | }{} |
511 | 491 |
|
512 | 492 | \iftoggle{showPreprints}{% |
|
523 | 503 | heading=cvsubsection]% |
524 | 504 | }% |
525 | 505 | \finishbibsection{preprints}% |
526 | | - \begin{cvpubfootnotes} |
527 | | - \cvfnnote{equalcontrib}{equal contributions, shared first authorship} |
528 | | - \end{cvpubfootnotes}% |
529 | 506 | }{} |
530 | 507 |
|
531 | 508 | \iftoggle{showConferenceProceedings}{% |
|
540 | 517 | heading=cvsubsection]% |
541 | 518 | }% |
542 | 519 | \finishbibsection{conference}% |
543 | | - \begin{cvpubfootnotes} |
544 | | - \cvfnnote{equalcontrib}{equal contributions, shared first authorship} |
545 | | - \cvfnnote{bestpaper}{Best Paper Award recognition} |
546 | | - \end{cvpubfootnotes}% |
547 | 520 | }{} |
548 | 521 |
|
549 | 522 | \iftoggle{showConferencePresentations}{% |
|
579 | 552 | \cvsection{Patents}% |
580 | 553 | }% |
581 | 554 | \startbibsection{patents}% |
| 555 | + \vspace{2pt}% |
582 | 556 | \printpatents |
583 | 557 | \finishbibsection{patents}% |
584 | 558 | }% |
|
593 | 567 |
|
594 | 568 | \ifbool{showTalksSection}{% |
595 | 569 | \cvsection{Talks \& Science Communication}% |
596 | | - |
| 570 | + \vspace{2pt}% |
597 | 571 | % sections/talks.tex should use \cvsubsection{Invited Talks} (not \cvsection) |
598 | 572 | % to render as a subsection under this top-level heading. |
599 | 573 | \iftoggle{showTalks}{\input{sections/talks}}{} |
|
0 commit comments