Skip to content

Commit 1d49308

Browse files
committed
add macros both to the latex preamble and an "only:: html" include file
1 parent 143b03f commit 1d49308

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

doc/conf.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,13 @@
141141
# Additional stuff for the LaTeX preamble.
142142
#
143143
# 'preamble': '',
144-
'preamble': '\setcounter{secnumdepth}{3}',
144+
'preamble': r'''
145+
\setcounter{secnumdepth}{3}
146+
\newcommand{\p}[1]{\frac{\partial }{\partial #1}}
147+
\newcommand{\pp}[2]{\frac{\partial #1}{\partial #2}}
148+
\newcommand{\dd}[2]{\frac{d #1}{d #2}}
149+
\newcommand{\h}{\frac{1}{2}}
150+
''',
145151

146152
# Latex figure (float) alignment
147153
#

doc/defs.hrst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.. only:: html
2+
3+
:math:`\newcommand{\p}[1]{\frac{\partial }{\partial #1}}`
4+
:math:`\newcommand{\pp}[2]{\frac{\partial #1}{\partial #2}}`
5+
:math:`\newcommand{\dd}[2]{\frac{d #1}{d #2}}`
6+
:math:`\newcommand{\h}{\frac{1}{2}}`

doc/phys_pkgs/fizhi.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. include:: ../defs.hrst
2+
13
.. _sub_phys_pkg_fizhi:
24

35
Fizhi: High-end Atmospheric Physics

0 commit comments

Comments
 (0)