Advertisement
Guest User

Untitled

a guest
Jun 30th, 2015
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | None | 0 0
  1. documentclass{article}
  2. usepackage[version=3]{mhchem}
  3.  
  4. newcounter{rxnum}
  5.  
  6. newenvironment{reaction}{
  7. refstepcounter{rxnum}
  8. noindent
  9. %???
  10. }{
  11. %???
  12. parnoindent
  13. }
  14.  
  15. begin{document}
  16.  
  17. begin{reaction}
  18. ce{X + Y -> XY}
  19. end{reaction}
  20.  
  21. begin{reaction}
  22. ce{XX + YY -> X2Y2} \%<- newline just like in equation
  23. ce{A + B -> C}
  24. end{reaction}
  25.  
  26.  
  27. end{document}
  28.  
  29. begin{reaction}
  30. ce{X + Y ->XY}descriptionforlist{XY formation reaction}\
  31. ce{A +B -> C}
  32. ce{G + H -> J}nonumber
  33. end{reaction}
  34.  
  35. R 1: XY formation reaction 6
  36.  
  37. R 2: 6
  38.  
  39. documentclass{article}
  40. usepackage{chemmacros}
  41.  
  42. begin{document}
  43.  
  44. listofreactions
  45.  
  46. begin{reaction}[bla]
  47. $A$ ->[ H2O ] $B$
  48. end{reaction}
  49.  
  50. begin{reaction}
  51. SO4^2- + Ba^2+ -> BaSO4 v
  52. end{reaction}
  53.  
  54. end{document}
  55.  
  56. documentclass{article}
  57. usepackage{amsmath,mhchem}
  58. newenvironment{reaction}{begin{equation}}{end{equation}}
  59. newenvironment{reaction*}{begin{equation*}}{end{equation*}}
  60. begin{document}
  61. begin{reaction}
  62. ce{$A$ ->[ce{+H2O}] $B$}
  63. end{reaction}
  64. begin{reaction}
  65. ce{SO4^2- + Ba^2+ -> BaSO4 v}
  66. end{reaction}
  67. end{document}
  68.  
  69. documentclass{article}
  70. usepackage{amsmath,mhchem}
  71. usepackage{tocloft}
  72. newcommand{reactionlistname}{List of reactions}
  73. newlistof{reactions}{rxs}{reactionlistname}
  74.  
  75. newcounter{reaction}
  76. newcounter{tmp}
  77. newenvironment{reaction}[1][relax]{%
  78. setcounter{tmp}{value{equation}}
  79. setcounter{equation}{value{reaction}}
  80. renewcommand{theequation}{arabic{equation}}
  81. begin{equation}
  82. addcontentsline{rxs}{reactions}{protectnumberline{thereaction}#1}
  83. }{%
  84. end{equation}
  85. setcounter{reaction}{value{equation}}
  86. setcounter{equation}{value{tmp}}
  87. }
  88.  
  89.  
  90. begin{document}
  91.  
  92.  
  93. listofreactions
  94.  
  95. begin{reaction}[bla]
  96. ce{$A$ ->[ce{+H2O}] $B$}
  97. end{reaction}
  98.  
  99. begin{reaction}
  100. ce{SO4^2- + Ba^2+ -> BaSO4 v}
  101. end{reaction}
  102.  
  103. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement