Advertisement
Guest User

Untitled

a guest
Dec 4th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.47 KB | None | 0 0
  1. documentclass{article}
  2.  
  3. usepackage{lipsum}
  4.  
  5. %%%%%%%%%%
  6. % Colors %
  7. %%%%%%%%%%
  8. usepackage{xcolor}
  9. definecolor{lightgray}{HTML}{989898}
  10. colorlet{textcolor}{lightgray}
  11.  
  12. %%%%%%%%%
  13. % Fonts %
  14. %%%%%%%%%
  15. usepackage[quiet]{fontspec}
  16. defaultfontfeatures{Mapping=tex-text}
  17. setmainfont[Mapping=tex-text, Color=textcolor]{Arial}
  18.  
  19. %%%%%%%%%%%%
  20. % Geometry %
  21. %%%%%%%%%%%%
  22. setlength{parindent}{0pt}% No paragraph indentation
  23. setlength{parskip}{.5baselineskip plus 0.1baselineskip minus 0.1baselineskip}
  24.  
  25. usepackage[left=2cm,top=2cm,right=2cm,bottom=2cm]{geometry}
  26.  
  27. %%%%%%%%%%%%%%%%
  28. % Bibliography %
  29. %%%%%%%%%%%%%%%%
  30. begin{filecontents}{jobname.bib}
  31. @article{Doe2011,
  32. author = {Doe, John},
  33. journal = {Nucleic Acids Research},
  34. pages = {1--3},
  35. title = {{Title of paper}},
  36. volume = {39},
  37. year = {2011}
  38. }
  39. @article{Smith2013,
  40. author = {Smith, Josh},
  41. journal = {Nature},
  42. pages = {1--6},
  43. title = {{Overly complicated title}},
  44. volume = {85},
  45. year = {2013}
  46. }
  47. @article{Adams2016,
  48. author = {Adams, Brian},
  49. journal = {Science},
  50. pages = {10--15},
  51. title = {{Another absurd title}},
  52. volume = {2},
  53. year = {2016}
  54. }
  55. @phdthesis{Surname2012,
  56. author = {Surname, Name},
  57. location = {Some University},
  58. title = {{Some suitable thesis name}},
  59. type = {PhD Thesis},
  60. url = {http://thesis},
  61. year = {2012}
  62. }
  63. @misc{Willis2013,
  64. location = {Some Uni},
  65. note = {Work In Progress report},
  66. author = {Willis, William},
  67. title = {{This is the same title always}},
  68. type = {TALK},
  69. month = {07},
  70. year = {2013}
  71. }
  72. @misc{Willis2014,
  73. location = {Another Uni},
  74. note = {Poster Symposium},
  75. author = {Willis, William},
  76. title = {{This is the same title always}},
  77. type = {POSTER},
  78. month = {09},
  79. year = {2014}
  80. }
  81. @misc{Willis2014b,
  82. location = {Yet Another Uni},
  83. author = {Willis, William},
  84. title = {{This is the same title always}},
  85. type = {TALK},
  86. month = {09},
  87. year = {2014}
  88. }
  89. @misc{Willis2015,
  90. location = {Research Center},
  91. author = {Willis, William},
  92. title = {{New title}},
  93. type = {TALK},
  94. month = {09},
  95. year = {2014}
  96. }
  97. end{filecontents}
  98.  
  99. usepackage{biblatex}
  100. addbibresource{jobname.bib}
  101.  
  102.  
  103. begin{document}
  104. lipsum[1]
  105.  
  106. nocite{*}
  107. printbibliography
  108. end{document}
  109.  
  110. documentclass{article}
  111.  
  112. usepackage{amssymb} usepackage{lipsum}
  113.  
  114. %%%%%%%%%%
  115. % Colors %
  116. %%%%%%%%%%
  117. usepackage{xcolor}
  118. definecolor{lightgray}{HTML}{989898}
  119. colorlet{textcolor}{lightgray}
  120.  
  121. %%%%%%%%%
  122. % Fonts %
  123. %%%%%%%%%
  124. usepackage[quiet]{fontspec}
  125. defaultfontfeatures{Mapping=tex-text}
  126. setmainfont[Mapping=tex-text, Color=textcolor]{Arial}
  127.  
  128. %%%%%%%%%%%%
  129. % Geometry %
  130. %%%%%%%%%%%%
  131. setlength{parindent}{0pt}% No paragraph indentation
  132. setlength{parskip}{.5baselineskip plus 0.1baselineskip minus 0.1baselineskip}
  133.  
  134. usepackage[margin=2cm]{geometry}
  135.  
  136. %%%%%%%%%%%%%%%%
  137. % Bibliography %
  138. %%%%%%%%%%%%%%%%
  139. begin{filecontents}{jobname.bib}
  140. @article{Doe2011,
  141. author = {Doe, John},
  142. journal = {Nucleic Acids Research},
  143. pages = {1--3},
  144. title = {{Title of paper}},
  145. volume = {39},
  146. year = {2011}
  147. }
  148. @article{Smith2013,
  149. author = {Smith, Josh},
  150. journal = {Nature},
  151. pages = {1--6},
  152. title = {{Overly complicated title}},
  153. volume = {85},
  154. year = {2013}
  155. }
  156. @article{Adams2016,
  157. author = {Adams, Brian},
  158. journal = {Science},
  159. pages = {10--15},
  160. title = {{Another absurd title}},
  161. volume = {2},
  162. year = {2016}
  163. }
  164. @thesis{Surname2012,
  165. author = {Surname, Name},
  166. location = {Some University},
  167. title = {{Some suitable thesis name}},
  168. url = {http://thesis},
  169. year = {2012}
  170. }
  171. @misc{Willis2013,
  172. location = {Some Uni},
  173. note = {Work In Progress report},
  174. author = {Willis, William},
  175. title = {{This is the same title always}},
  176. type = {TALK},
  177. month = {07},
  178. year = {2013}
  179. }
  180. @misc{Willis2014,
  181. location = {Another Uni},
  182. note = {Poster Symposium},
  183. author = {Willis, William},
  184. title = {{This is the same title always}},
  185. type = {POSTER},
  186. month = {09},
  187. year = {2014}
  188. }
  189. @misc{Willis2014b,
  190. location = {Yet Another Uni},
  191. author = {Willis, William},
  192. title = {{This is the same title always}},
  193. type = {TALK},
  194. month = {09},
  195. year = {2014}
  196. }
  197. @misc{Willis2015,
  198. location = {Research Center},
  199. author = {Willis, William},
  200. title = {{New title}},
  201. type = {TALK},
  202. month = {09},
  203. year = {2014}
  204. }
  205. end{filecontents}
  206. usepackage{xpatch}%
  207. usepackage[bibstyle=authortitle, defernumbers=true, sorting=tyn]{biblatex}%
  208. addbibresource{jobname.bib}
  209.  
  210. DeclareSortingScheme{tyn}{
  211. sort{
  212. field{presort}
  213. }
  214. sort[final]{
  215. field{sortkey}
  216. }
  217. sort{
  218. field{sorttitle}
  219. field{title}
  220. }
  221. sort{
  222. field{sortyear}
  223. field{year}
  224. }
  225. sort{
  226. field{sortname}
  227. field{author}
  228. field{editor}
  229. field{translator}
  230. field{sorttitle}
  231. field{title}
  232. }
  233. sort{
  234. field{volume}
  235. literal{0}
  236. }
  237. }
  238.  
  239. setlength{bibhang}{2em}
  240. renewcommand{newunitpunct}{\}
  241. DeclareFieldFormat{type}{char"25BAaddspaceaddthinspaceifbibstring{#1}{bibstring{#1}}{#1}}%
  242. DeclareFieldFormat
  243. [article,inbook,incollection,inproceedings,patent,thesis,unpublished, misc]
  244. {title}{mkbibbold{#1}}
  245. xpatchbibmacro{author}{%
  246. usebibmacro{bbx:dashcheck}
  247. {bibnamedash}}
  248. {}{}{}
  249.  
  250. begin{document}
  251.  
  252. lipsum[1]
  253.  
  254. nocite{*}
  255.  
  256. printbibheading
  257. printbibliography[type=article,heading=subbibliography,
  258. title={bfseries Articles}]
  259. printbibliography[type=thesis, heading=subbibliography,
  260. title={bfseries Thesis}]
  261. printbibliography[type=misc, heading=subbibliography,
  262. title={bfseries Other}]
  263.  
  264. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement