Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass[12pt]{article}
- usepackage[round]{natbib}
- usepackage{xstring}
- makeatletter
- defNAT@@citetp[#1]{%
- StrSubstitute{#1}{-}{--}[newdash]%
- % original code: @ifnextchar[{@citex[#1]}{@citex[][#1]}
- @ifnextchar[{@citex[newdash]}{@citex[][newdash]}}
- makeatother
- begin{document}
- noindent Changing\
- Lamport (1994, 12-30) into\
- citet[12-30]{lamport94}
- begin{thebibliography}{1}
- providecommand{natexlab}[1]{#1}
- providecommand{url}[1]{texttt{#1}}
- expandafterifxcsname urlstyleendcsnamerelax
- providecommand{doi}[1]{doi: #1}else
- providecommand{doi}{doi: begingroup urlstyle{rm}Url}fi
- bibitem[Lamport(1994)]{lamport94}
- Leslie Lamport,
- emph{LaTeX: A Document Preparation System}.
- Addison Wesley, Massachusetts,
- 2nd Edition,
- 1994.
- end{thebibliography}
- end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement