File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change @@ -133,3 +133,46 @@ To preview the changes:
133133cd mynewt-documentation/versions/vX_Y_Z/mynewt-documentation
134134make clean && make docs && (cd _build/html && python -m SimpleHTTPServer 8080)
135135```
136+
137+ ## Generating PDF File
138+
139+ ### Apply the Workaround
140+
141+ Due to a potential issue with Sphinx's PDF builder, there is an additional step
142+ that needs to be performed on each dependent repository before building the documentation.
143+ The issue is related to Sphinx's ` .. toctree:: ` directive.
144+ The output (PDF only) renders some sections in incorrect order when there is content in ` index.rst `
145+ files used to chain source ` RST ` files together.
146+
147+ The workaround is to manually alter the affected files, so that there is no content but the
148+ toctree directive in those ` index.rst ` files.
149+
150+ First, fetch the ` sphinx-workaround ` branch for each of the repos:
151+ ``` bash
152+ git fetch https://github.com/wpiet/mynewt-core sphinx-workaround
153+ git checkout -b sphinx-workaround FETCH_HEAD
154+ ```
155+
156+ Then, rebase onto this branch:
157+
158+ ``` bash
159+ git checkout master
160+ git rebase sphinx-workaround
161+ ```
162+
163+ Repeat the above steps for all dependent repositories.
164+
165+
166+ ### Build the Docs
167+
168+ In the ` mynewt-site ` directory run:
169+
170+ ``` shell
171+ ./build.py
172+ ```
173+
174+ In the ` mynewt-documentation ` run:
175+
176+ ``` shell
177+ make latexpdf
178+ ```
You can’t perform that action at this time.
0 commit comments