Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DeclareSourcemap{
- maps{
- map{
- step[fieldset=entrykey, fieldvalue={<entryke>}]
- step[fieldset=note, fieldvalue={text for <entrykey>}]
- }
- }
- }
- begin{filecontents}{biblatex-dm.cfg}
- DeclareDatamodelFields[type=field,datatype=literal]{notesonlyformystudents}
- DeclareDatamodelEntryfields{notesonlyformystudents}
- end{filecontents}
- DeclareFieldFormat{notesonlyformystudents}{#1}
- renewbibmacro{finentry}{finentryparprintfield{notesonlyformystudents}}
- documentclass[a4paper,10pt]{article}
- usepackage{natbib}
- usepackage{datatool}
- usepackage{etoolbox}
- %% database for personal temporary notes
- DTLnewdb{bibnotes}
- %% command for notes
- defbibnote#1#2{%
- DTLnewrow{bibnotes}
- DTLnewdbentry{bibnotes}{mylabel}{#1}
- DTLnewdbentry{bibnotes}{mynote}{#2}
- }
- %% patching the output
- makeatletter
- %% if natbib is loaded
- patchcmd{@lbibitem}%
- {item[hfilNAT@anchor{#2}{NAT@num}]}%
- {%
- item[hfilNAT@anchor{#2}{NAT@num}]%
- DTLforeach[DTLiseq{mylabel}{#2}]{bibnotes}{mylabel=mylabel,mynote=mynote}{textit{mynote}}
- }{}{message{^^JPatching failed^^J}}%
- %% if natbib is not loaded
- % patchcmd{@lbibitem}%
- % {item[@biblabel {#1}hfill ]}%
- % {%
- % item[@biblabel {#1}hfill ]%
- % DTLforeach[DTLiseq{mylabel}{#2}]{bibnotes}{mylabel=mylabel,mynote=mynote}{textit{mynote}}
- % }{}{message{^^JPatching failed^^J}}%
- % patchcmd{@bibitem}%
- % {item}%
- % {%
- % item%
- % DTLforeach[DTLiseq{mylabel}{#1}]{bibnotes}{mylabel=mylabel,mynote=mynote}{textit{mynote}}
- % }{}{message{^^JPatching failed^^J}}%
- makeatother
- begin{document}
- cite{GhJaEn02,MeGa05,MuBeBoRo99}
- bibnote{GhJaEn02}{This is important }
- bibnote{GhJaEn02}{to understand chickens!}
- bibnote{MeGa05}{This is about penguins:}
- bibnote{MuBeBoRo99}{Cheese!}
- bibliographystyle{plainnat}
- bibliography{test}
- end{document}
- makeatletter
- newcommand{bibnote}[2]{@namedef{#1note}{#2}}
- makeatother
- renewbibmacro{finentry}{finentryparcsname thefield{entrykey}noteendcsnamefinentry}
- FUNCTION {fin.entry}
- { add.period$
- write$
- newline$
- "parcsname " write$
- cite$ write$
- "noteendcsname" write$
- newline$
- }
Add Comment
Please, Sign In to add comment