mirror of https://github.com/Nonannet/pyladoc.git
tests updated for linked HTML references
This commit is contained in:
parent
0d5c5c727c
commit
d2193c2526
|
@ -23,7 +23,7 @@ def test_latex_embedding2():
|
||||||
<latex>j</latex> on the transport properties of component <latex>i</latex>.
|
<latex>j</latex> on the transport properties of component <latex>i</latex>.
|
||||||
|
|
||||||
The interaction parameter <latex>\Phi_{ij}</latex> is given by the relation shown in @eq:ExampleFormula2.
|
The interaction parameter <latex>\Phi_{ij}</latex> is given by the relation shown in @eq:ExampleFormula2.
|
||||||
<latex type="block" ref_type="eq" ref_id="ExampleFormula2" caption="(1)">\Phi_{ij} = \frac{1}{\sqrt{8}} \left(1 + \frac{M_i}{M_j} \right)^{-1/2} \left[ 1 + \left( \frac{\lambda_i}{\lambda_j} \right)^{1/2} \left( \frac{M_j}{M_i} \right)^{1/4} \right]^2</latex>
|
<latex type="block" reference="eq:ExampleFormula2" caption="(1)">\Phi_{ij} = \frac{1}{\sqrt{8}} \left(1 + \frac{M_i}{M_j} \right)^{-1/2} \left[ 1 + \left( \frac{\lambda_i}{\lambda_j} \right)^{1/2} \left( \frac{M_j}{M_i} \right)^{1/4} \right]^2</latex>
|
||||||
""")
|
""")
|
||||||
|
|
||||||
dummy = pyladoc.DocumentWriter()
|
dummy = pyladoc.DocumentWriter()
|
||||||
|
@ -45,7 +45,7 @@ def test_latex_embedding():
|
||||||
|
|
||||||
expected_output = pyladoc._normalize_text_indent(r"""
|
expected_output = pyladoc._normalize_text_indent(r"""
|
||||||
# Test
|
# Test
|
||||||
<latex type="block" ref_type="eq" ref_id="ExampleFormula2" caption="(1)">\Phi_{ij} = \frac{1}{\sqrt{8}}</latex>
|
<latex type="block" reference="eq:ExampleFormula2" caption="(1)">\Phi_{ij} = \frac{1}{\sqrt{8}}</latex>
|
||||||
This <latex>i</latex> is inline LaTeX.
|
This <latex>i</latex> is inline LaTeX.
|
||||||
""")
|
""")
|
||||||
|
|
||||||
|
|
|
@ -98,7 +98,9 @@ def test_html_render():
|
||||||
def test_latex_render():
|
def test_latex_render():
|
||||||
doc = make_document()
|
doc = make_document()
|
||||||
|
|
||||||
# print(doc.to_latex())
|
if WRITE_RESULT_FILES:
|
||||||
|
with open('tests/out/test_html_render2.tex', 'w', encoding='utf-8') as f:
|
||||||
|
f.write(doc.to_latex())
|
||||||
|
|
||||||
assert doc.to_pdf('tests/out/test_latex_render2.pdf', font_family='serif')
|
assert doc.to_pdf('tests/out/test_latex_render2.pdf', font_family='serif')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue