Although I've been using LaTeX for a long time, I never defined "dynamic" new commands. Here is what I have in mind:
I define a new command such as \newitem with the following inputs
\newitem{category}{style}{ref}{title}
Now, I want to use category and style to sort in the content list, to use ref in the bibtex, and use title to be shown. However, I don't know how to implement this.
I want the content to be listed according to category first, then according to the style. Additionally, I don't know how to add ref to the bibtex systematically.
Let me just explain what I expect from my \newitem to do. Consider, I have the following in my TeX file:
\newitem{spin}{lecture}{Ed. Nelson, someconference}{New method to rotate spin}
\newitem{ion}{paper}{Loss et al, someaddress}{New method to manipulate ions}
\newitem{spin}{paper}{Z. Yu et al, pra.....}{Another method to rotate spin} .....
I expect the following PDF output:
Table of Content
- Spin
Lecture
1. New method to rotate spin
2. ....
...
Paper
1. Another method to rotate spin
2. .... - Ion
Lecture
1. ....
2. ...
....
Paper
1. New method to manipulate ions
2. ...... ...
References
[1] Ed. Nelson, someconference
[2] Loss et al, someaddress
[3] Z. Yu et al, pra.....
P.S. Sorry for the confusing question.
\label/\refvs.\cite/bibliography). – Heiko Oberdiek Jan 25 '14 at 22:14.csvfile) and sorting it with thedatatoolpackage. But it is not at all clear what the logic of the sorting scheme is. Why 'spin' before 'ion'? why 'lecture' before 'paper'? how many total categories are there? And why do you want to input them all in an unsystematic way? It would be so easy to sort the above\newitems by hand that I don't see where the advantage lies for not doing it yourself... – jon Feb 02 '14 at 23:112. ...? How would you organize the input? – egreg Feb 03 '14 at 07:48.bibdatabase for papers etc. you want to cite and then learn how to cite these and produce a list of references in a document. Once you are confident doing that, then you can work on expanding on that knowledge. Right now, there's just too much here for one question. It isn't a matter of explaining how to create a new command, it is also everything else ;). – cfr Aug 06 '15 at 01:02.bibfile, you could potentially do most of this that way. That is, put the categories etc. into the.bibfile and then use the filters and selective printing commands provided by Biblatex. – cfr Aug 06 '15 at 01:07