Generaldecreasing numbers in CV in multiple categories

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
DominikinUS
Posts: 3
Joined: Wed Sep 20, 2023 12:30 am

decreasing numbers in CV in multiple categories

Post by DominikinUS »

Hello

I hope someone of you here can help me with this - my knowledge in LaTEX is limited...

I am writing my CV, have different kinds of Research Publications (categories: Journal Articles, Books and Chapters, Posters and Presentations, Patents)

it works to sort in (newest first, oldest last), and I can set the number of these to decrease, but: I did set here a fixed number (the number of Journal Articles) - which is the wrong number for Books and Chapters.
Journal Articles counts down from my set number to 1, but Books and Chapters counts down from the same number to 5....

this is the code, I have a question for the last line (I assume it could be set there)

Code: Select all

Code, edit and compile here:
\RequirePackage[bibstyle=apa6,sorting=ymdnt,uniquename=init,defernumbers=true]{biblatex}
\RequirePackage{csquotes}
%% Added 17 Jan 2018 from https://tex.stackexchange.com/a/140641/226 and https://tex.stackexchange.com/a/46879/226
\DeclareSortingTemplate{ymdnt}{
\sort{
\field{presort}
}
\sort[final]{
\field{sortkey}
}
\sort[direction=descending]{
\field[strside=left,strwidth=4]{sortyear}
\field[strside=left,strwidth=4]{year}
\literal{9999}
}
\sort[direction=descending]{
\field[padside=left,padwidth=2,padchar=0]{month}
\literal{00}
}
\sort[direction=descending]{
\field[padside=left,padwidth=2,padchar=0]{day}
\literal{00}
}
\sort{
\field{sortname}
\field{author}
\field{editor}
\field{translator}
\field{sorttitle}
\field{title}
}
\sort{
\field{sorttitle}
\field{title}
}
}
\RequirePackage{tikz}
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{
\node[shape=circle,text=white,fill=MarkerColour!80!black,font=\sffamily\scriptsize\bfseries,inner sep=1pt,text height=1.35ex,minimum width=1.5em,text centered] (char) {#1};}}
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
I have the line AtBeginBibliography{\setcounter{bibitem}{11}}
how can I program a variable which works for every category?


Thank you!!!
Dominik

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Stefan Kottwitz
Site Admin
Posts: 10323
Joined: Mon Mar 10, 2008 9:44 pm

decreasing numbers in CV in multiple categories

Post by Stefan Kottwitz »

Hi Dominik,

welcome to the forum!

As the LaTeX compiler in my brain is pretty small ;-) I would prefer to see code that can be tested (Infominimal working example). Not sure if you get an answer from anybody without.

Stefan
LaTeX.org admin
DominikinUS
Posts: 3
Joined: Wed Sep 20, 2023 12:30 am

decreasing numbers in CV in multiple categories

Post by DominikinUS »

Hello Stefan

thank you for this hint. I am not sure if these are all files you might need.
I will post here setting code and the reference code (not the bib file)
First the setting code (this are all settings in this overleaf project):

Code: Select all

Code, edit and compile here:
\RequirePackage{silence}
\WarningsOff[longtable]
\WarningsOff[array]
\usepackage{ifxetex,ifluatex}
\newif\ifxetexorluatex
\ifxetex
\xetexorluatextrue
\else
\ifluatex
\xetexorluatextrue
\else
\xetexorluatexfalse
\fi
\fi
\RequirePackage{graphicx}
\RequirePackage[hyphens]{url}
\RequirePackage{babel}
\raggedright
\RequirePackage[fixed]{fontawesome5}
\newcommand{\smallcaps}[1]{\textsc{\lowercase{#1}}}
\RequirePackage[a4paper,nohead,nofoot,hmargin=2.25cm,vmargin=2cm]{geometry}
\RequirePackage{relsize}
\RequirePackage[dvipsnames,svgnames]{xcolor}
\RequirePackage{tikz}
\usetikzlibrary{shapes,shadows}
\RequirePackage{comment}
\definecolor{SwishLineColour}{HTML}{88AC0B}
\definecolor{MarkerColour}{HTML}{B6073F}
% If you're not a researcher nor an academic, you probably don't need biblatex; delete this line.
\RequirePackage[bibstyle=apa6,sorting=ymdnt,uniquename=init,defernumbers=true]{biblatex}
\RequirePackage{csquotes}
%% Added 17 Jan 2018 from https://tex.stackexchange.com/a/140641/226 and https://tex.stackexchange.com/a/46879/226
\DeclareSortingTemplate{ymdnt}{
\sort{
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

and the publications.tex:

Code: Select all

Code, edit and compile here:
%% Sometimes when a section can't be nicely modelled with the \entry[]... mechanism; hack our own
\makerubrichead{Research Publications}
%% Assuming you've already given \addbibresource{own-bib.bib} in the main doc. Right? Right???
\nocite{*}
%% If you just want everything in one list
% \printbibliography[heading={none}]
\printbibliography[heading={subbibliography},title={Journal Articles},type=article]
%\printbibliography[heading={subbibliography},title={Conference Proceedings},type=inproceedings]
\printbibliography[heading={subbibliography},title={Books and Chapters},filter={booksandchapters}]
\printbibliography[heading={subbibliography},title={Posters and Presentations},type={misc}]
\printbibliography[heading={subbibliography},title={Patent},type={patent}]
% \printbibliography[heading=subbibliography]
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Thank you for your help in advance!
Dominik
User avatar
Stefan Kottwitz
Site Admin
Posts: 10323
Joined: Mon Mar 10, 2008 9:44 pm

decreasing numbers in CV in multiple categories

Post by Stefan Kottwitz »

Hi Dominik,

to mention the best way to get help in an internet forum: if code is provided that can be tested, there's often a reader who runs the code, notices the error, tries a fix and test it, and often sends the solution in a few code lines. Happens all the time and is part of the fun of supporting LaTeX on the internet.

In the topic here, we have a lot of code. If it's compilable, no problem, I can debug a 1000-line LaTeX file. However, I don't reconstruct a 100-line issue in my head to assume and guess where the error may be, unable to test it. The usual way (reader tests, fixes, posts the code) fails here. Sometimes, there's an idea and advice that goes without testing, I just doubt here.

It can be hard to create a Infominimal working example or minimalbeispiel.de/mini-en.html (follow the two links link) but the (famous) procedure is worth it and, once understood, is nearly 100% guarantee to get a solution.

Just friendly forum talk. :)

Stefan
LaTeX.org admin
DominikinUS
Posts: 3
Joined: Wed Sep 20, 2023 12:30 am

decreasing numbers in CV in multiple categories

Post by DominikinUS »

Hello Stefan

thank you for your reply!
my problem in this case is not that I get an error code, but I want another way of numbering the items in the subsections of Research Publications (decreasing numbers, starting at 22 for Journal Articles, 3 for Books and Chapers, 12 for Posters and Presentations)

I did set the "AtBeginBibliography{\setcounter{bibitem}{22}}" to 22 for Journal Articles, but this gives numbers 22, 21 and 20 for "Books and Chapers" - while it should be here 3, 2, 1
how can I program a variable which works for every category?

Is there something like "length of bibitem"?

I know this is a different question than an error with the code - I just don't know how to program this

Thank you!!!
Dominik
Post Reply