Guest User

Untitled

a guest
Mar 22nd, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.05 KB | None | 0 0
  1. DeclareSourcemap{
  2. maps{
  3. map{
  4. step[fieldset=entrykey, fieldvalue={<entryke>}]
  5. step[fieldset=note, fieldvalue={text for <entrykey>}]
  6. }
  7. }
  8. }
  9.  
  10. begin{filecontents}{biblatex-dm.cfg}
  11. DeclareDatamodelFields[type=field,datatype=literal]{notesonlyformystudents}
  12. DeclareDatamodelEntryfields{notesonlyformystudents}
  13. end{filecontents}
  14.  
  15. DeclareFieldFormat{notesonlyformystudents}{#1}
  16. renewbibmacro{finentry}{finentryparprintfield{notesonlyformystudents}}
  17.  
  18. documentclass[a4paper,10pt]{article}
  19. usepackage{natbib}
  20. usepackage{datatool}
  21. usepackage{etoolbox}
  22.  
  23. %% database for personal temporary notes
  24. DTLnewdb{bibnotes}
  25.  
  26. %% command for notes
  27. defbibnote#1#2{%
  28. DTLnewrow{bibnotes}
  29. DTLnewdbentry{bibnotes}{mylabel}{#1}
  30. DTLnewdbentry{bibnotes}{mynote}{#2}
  31. }
  32.  
  33. %% patching the output
  34. makeatletter
  35. %% if natbib is loaded
  36. patchcmd{@lbibitem}%
  37. {item[hfilNAT@anchor{#2}{NAT@num}]}%
  38. {%
  39. item[hfilNAT@anchor{#2}{NAT@num}]%
  40. DTLforeach[DTLiseq{mylabel}{#2}]{bibnotes}{mylabel=mylabel,mynote=mynote}{textit{mynote}}
  41. }{}{message{^^JPatching failed^^J}}%
  42.  
  43. %% if natbib is not loaded
  44. % patchcmd{@lbibitem}%
  45. % {item[@biblabel {#1}hfill ]}%
  46. % {%
  47. % item[@biblabel {#1}hfill ]%
  48. % DTLforeach[DTLiseq{mylabel}{#2}]{bibnotes}{mylabel=mylabel,mynote=mynote}{textit{mynote}}
  49. % }{}{message{^^JPatching failed^^J}}%
  50. % patchcmd{@bibitem}%
  51. % {item}%
  52. % {%
  53. % item%
  54. % DTLforeach[DTLiseq{mylabel}{#1}]{bibnotes}{mylabel=mylabel,mynote=mynote}{textit{mynote}}
  55. % }{}{message{^^JPatching failed^^J}}%
  56. makeatother
  57.  
  58. begin{document}
  59.  
  60. cite{GhJaEn02,MeGa05,MuBeBoRo99}
  61.  
  62. bibnote{GhJaEn02}{This is important }
  63. bibnote{GhJaEn02}{to understand chickens!}
  64. bibnote{MeGa05}{This is about penguins:}
  65. bibnote{MuBeBoRo99}{Cheese!}
  66.  
  67. bibliographystyle{plainnat}
  68. bibliography{test}
  69. end{document}
  70.  
  71. makeatletter
  72. newcommand{bibnote}[2]{@namedef{#1note}{#2}}
  73. makeatother
  74.  
  75. renewbibmacro{finentry}{finentryparcsname thefield{entrykey}noteendcsnamefinentry}
  76.  
  77. FUNCTION {fin.entry}
  78. { add.period$
  79. write$
  80. newline$
  81. "parcsname " write$
  82. cite$ write$
  83. "noteendcsname" write$
  84. newline$
  85. }
Add Comment
Please, Sign In to add comment