Guest User

Untitled

a guest
Jan 23rd, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.86 KB | None | 0 0
  1. documentclass{article}
  2. usepackage[authoryear]{natbib}
  3.  
  4. begin{document}
  5. Over twenty years ago, cite{McAfee1992Dominant} introduced the first
  6. double auction mechanism.
  7.  
  8. bibliographystyle{plainnat}
  9. bibliography{mwe}
  10. end{document}
  11.  
  12. @article{McAfee1992Dominant,
  13. author = {McAfee, R. Preston},
  14. title = {{A dominant strategy double auction}},
  15. year = {1992}
  16. }
  17.  
  18. Over twenty years ago, McAfee<ref>{{Cite journal|author=R. Preston McAfee|title=A dominant strategy double auction|year=1992}}</ref> introduced the first double auction mechanism.
  19.  
  20. pandoc -f latex -t mediawiki mwe.tex > mwe.wiki
  21.  
  22. Over twenty years ago, introduced the first double auction mechanism.
  23.  
  24. documentclass{article}
  25. usepackage[style=authoryear]{biblatex}
  26. usepackage[utf8]{inputenc}
  27. usepackage[T1]{fontenc}
  28. addbibresource{mwe.bib}
  29.  
  30. begin{document}
  31.  
  32. section{Hello world}
  33.  
  34. subsection{Hello, hello}
  35.  
  36. Over textit{twenty years} ago, cite{McAfee1992Dominant} textbf{introduced} the first
  37. double auction mechanism.
  38.  
  39. end{document}
  40.  
  41. Preamble{xhtml}
  42.  
  43. % remove html structure
  44. Configure{HTML}{}{}
  45. Configure{@HEAD}{}
  46. Configure{BODY}{}{}
  47. Configure{DOCTYPE}{}
  48. Configure{HEAD}{}{}
  49. Configure{TITLE}{}{}
  50. Configure{VERSION}{}
  51.  
  52. newcommandstarttag[1]{NoFontsHCode{#1}}
  53. newcommandstoptag[1]{NoFontsHCode{#1}}
  54. newcommandConfigureInlinetag[2]{%
  55. Configure{#1}{starttag{#2}}{stoptag{#2}}%
  56. }
  57.  
  58. ConfigureInlinetag{textit}{''}
  59. ConfigureInlinetag{textbf}{'''}
  60.  
  61. newcommandConfigureSection[2]{%
  62. Configure{#1}{}{}{starttag{#2}}{stoptag{#2Hnewline}}%
  63. }
  64.  
  65. ConfigureSection{section}{==}
  66. ConfigureSection{likesection}{==}
  67. ConfigureSection{subsection}{===}
  68. ConfigureSection{likesubsection}{===}
  69.  
  70. % remove section id
  71. defgobbleone#1#2{}
  72. Configure{toTocLink}{gobbleone}{}
  73.  
  74. % remove <p> elements
  75. Configure{HtmlPar}{}{}{HCode{Hnewline}}{HCode{Hnewline}}
  76.  
  77. DeclareFieldFormat[article]{entrytype}{Cite journal}
  78. DeclareFieldFormat*{titlecite}{{title=#1}}%
  79. DeclareFieldFormat*{yearcite}{{year={#1}}}%
  80. DeclareNameFormat*{labelname}{ifthenelse{value{listcount}=1}{#1}{}}
  81. DeclareCiteCommand{cite}%
  82. {printnames{labelname}HCode{<ref>}{{}%
  83. {%
  84. printfield{entrytype}
  85. setunit{|}%
  86. printtext{author=}%
  87. printnames{author}%
  88. setunit{|}%
  89. printfield[titlecite]{title}%
  90. setunit{|}%
  91. printfield[yearcite]{year}%
  92. }%
  93. {}%
  94. {}}HCode{</ref>}}%
  95.  
  96. begin{document}
  97.  
  98. EndPreamble
  99.  
  100. % remove html structure
  101. Configure{HTML}{}{}
  102. Configure{@HEAD}{}
  103. Configure{BODY}{}{}
  104. Configure{DOCTYPE}{}
  105. Configure{HEAD}{}{}
  106. Configure{TITLE}{}{}
  107. Configure{VERSION}{}
  108.  
  109. newcommandstarttag[1]{NoFontsHCode{#1}}
  110. newcommandstoptag[1]{NoFontsHCode{#1}}
  111. newcommandConfigureInlinetag[2]{%
  112. Configure{#1}{starttag{#2}}{stoptag{#2}}%
  113. }
  114.  
  115. ConfigureInlinetag{textit}{''}
  116. ConfigureInlinetag{textbf}{'''}
  117.  
  118. newcommandConfigureSection[2]{%
  119. Configure{#1}{}{}{starttag{#2}}{stoptag{#2Hnewline}}%
  120. }
  121.  
  122. ConfigureSection{section}{==}
  123. ConfigureSection{likesection}{==}
  124. ConfigureSection{subsection}{===}
  125. ConfigureSection{likesubsection}{===}
  126.  
  127. DeclareFieldFormat[article]{entrytype}{Cite journal}
  128. DeclareFieldFormat*{titlecite}{{title=#1}}%
  129. DeclareFieldFormat*{yearcite}{{year={#1}}}%
  130. DeclareNameFormat*{labelname}{ifthenelse{value{listcount}=1}{#1}{}}
  131. DeclareCiteCommand{cite}%
  132. {printnames{labelname}HCode{<ref>}{{}%
  133. {%
  134. printfield{entrytype}
  135. setunit{|}%
  136. printtext{author=}%
  137. printnames{author}%
  138. setunit{|}%
  139. printfield[titlecite]{title}%
  140. setunit{|}%
  141. printfield[yearcite]{year}%
  142. }%
  143. {}%
  144. {}}HCode{</ref>}}%
  145.  
  146. DeclareFieldFormat[publication type]{entrytype}{publication info}
  147.  
  148. make4ht -um draft -c hello.cfg filename
  149. biber filename
  150. make4ht -um draft -c hello.cfg filename
  151.  
  152. ==Hello world==
  153.  
  154.  
  155.  
  156. ===Hello, hello===
  157.  
  158. Over ''twenty years'' ago, McAfee<ref>{{Cite journal |author=McAfee, R. Preston|title=A dominant strategy double auction|year=1992}}</ref> '''introduced''' the first double auction mechanism.
  159.  
  160. pandoc -f latex -t mediawiki --bibliography=mediawiki.bib mediawiki.tex -o mediawiki.wiki
Add Comment
Please, Sign In to add comment