Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. documentclass[12pt]{article}
  2. usepackage[round]{natbib}
  3. usepackage{xstring}
  4. makeatletter
  5. defNAT@@citetp[#1]{%
  6. StrSubstitute{#1}{-}{--}[newdash]%
  7. % original code: @ifnextchar[{@citex[#1]}{@citex[][#1]}
  8. @ifnextchar[{@citex[newdash]}{@citex[][newdash]}}
  9. makeatother
  10. begin{document}
  11.  
  12. noindent Changing\
  13. Lamport (1994, 12-30) into\
  14. citet[12-30]{lamport94}
  15.  
  16. begin{thebibliography}{1}
  17. providecommand{natexlab}[1]{#1}
  18. providecommand{url}[1]{texttt{#1}}
  19. expandafterifxcsname urlstyleendcsnamerelax
  20. providecommand{doi}[1]{doi: #1}else
  21. providecommand{doi}{doi: begingroup urlstyle{rm}Url}fi
  22.  
  23. bibitem[Lamport(1994)]{lamport94}
  24. Leslie Lamport,
  25. emph{LaTeX: A Document Preparation System}.
  26. Addison Wesley, Massachusetts,
  27. 2nd Edition,
  28. 1994.
  29. end{thebibliography}
  30. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement