File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -472,7 +472,9 @@ def generated_cache_abspath(self) -> Path:
472472 return self ._project .generated_cache_abspath ()
473473
474474 def _read_publication_file_subset (self ) -> PublicationSubset :
475- p_bytes = self .publication_abspath ().read_bytes ()
475+ p_et = ET .parse (self .publication_abspath ())
476+ p_et .xinclude ()
477+ p_bytes = ET .tostring (p_et )
476478 return PublicationSubset .from_xml (p_bytes )
477479
478480 def external_dir (self ) -> Path :
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" utf-8" ?>
2+ <project ptx-version =" 2" >
3+ <targets >
4+ <target name =" web" format =" html" />
5+ <target name =" print" format =" pdf" />
6+ </targets >
7+ </project >
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <html >
3+ <baseurl href =" https://pretextbook.org" />
4+ </html >
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <publication xmlns : xi =" http://www.w3.org/2001/XInclude" >
3+ <xi : include href =" ./source.ptx" />
4+ <xi : include href =" ./html.ptx" />
5+ </publication >
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <source >
3+ <directories external =" ../assets" generated =" ../generated-assets" />
4+ </source >
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" utf-8" ?>
2+ <frontmatter >
3+ <bibinfo >
4+ <author >
5+ <personname >Author X. Lastname</personname >
6+ </author >
7+ </bibinfo >
8+
9+ <abstract >
10+ <p >
11+ This is the abstract.
12+ </p >
13+ </abstract >
14+ </frontmatter >
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" utf-8" ?>
2+ <introduction xml : id =" intro" xmlns : xi =" http://www.w3.org/2001/XInclude" >
3+ <p >Some words before the first section of the paper</p >
4+ <p >Some more words.</p >
5+ </introduction >
Original file line number Diff line number Diff line change 1+ <?xml version =' 1.0' encoding =' utf-8' ?>
2+ <pretext xml : lang =" en-US" xmlns : xi =" http://www.w3.org/2001/XInclude" >
3+
4+ <docinfo >
5+
6+ <document-id >authorslastnamelowercase-ShortTitleCamelCase</document-id >
7+
8+ <macros >\newcommand{\foo}{b^{ar}}</macros >
9+ <latex-image-preamble >\usepackage{tikz}</latex-image-preamble >
10+ </docinfo >
11+
12+ <article xml : id =" shorttitlelowercase" >
13+ <title >The title of my groundbreaking paper</title >
14+
15+ <xi : include href =" ./frontmatter.ptx" />
16+
17+ <xi : include href =" ./introduction.ptx" />
18+ <xi : include href =" ./section-1.ptx" />
19+ <xi : include href =" ./section-2.ptx" />
20+ </article >
21+
22+ </pretext >
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" utf-8" ?>
2+ <section xml : id =" section-1" xmlns : xi =" http://www.w3.org/2001/XInclude" >
3+ <title >My First Section</title >
4+ <introduction >
5+ <p >Some words</p >
6+ </introduction >
7+ <subsection xml : id =" subsection-1" >
8+ <title >My First Subsection</title >
9+ <p >Some more words</p >
10+ <p >foo</p >
11+ <figure >
12+ <caption >A frog</caption >
13+ <image source =" frog.jpg" width =" 50%" >
14+ <description >A nice-looking frog with a longish description.</description >
15+ </image >
16+ </figure >
17+ <p >Bar: <m >\foo</m ></p >
18+ </subsection >
19+ </section >
You can’t perform that action at this time.
0 commit comments