Skip to content

Commit 4c231ad

Browse files
committed
doc: Add latex to generate pdf
Add latex to generate pdf. Signed-off-by: divya pillai <divya.pillai@nordicsemi.no>
1 parent 4dfd28e commit 4c231ad

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

.github/workflows/doc-build.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ jobs:
5757
sudo tar xf doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz -C /opt
5858
echo "/opt/doxygen-${DOXYGEN_VERSION}/bin" >> $GITHUB_PATH
5959
60+
- name: Install LaTeX
61+
run: |
62+
sudo apt-get install -y texlive-full
63+
sudo apt-get install -y inkscape
64+
6065
- name: Set up Python
6166
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
6267
with:
@@ -66,11 +71,15 @@ jobs:
6671
pip-install: |
6772
-r doc/requirements.txt
6873
74+
- name: Install Python deps
75+
run: pip install sphinx sphinxcontrib-svg2pdfconverter
76+
6977
- name: Build
7078
working-directory: doc
7179
run: |
7280
doxygen
7381
sphinx-build -M html . build
82+
make latexpdf
7483
7584
- name: Check version
7685
run: |

doc/conf.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
'sphinx_togglebutton',
3030
"sphinxcontrib.jquery",
3131
"sphinx_copybutton",
32+
'sphinx.ext.imgconverter',
3233
]
3334

3435
templates_path = ['_templates']
@@ -54,3 +55,19 @@
5455
.. include:: /links.txt
5556
.. include:: /shortcuts.txt
5657
"""
58+
59+
# -- Options for LaTeX output -------------------------------------------------
60+
61+
latex_engine = 'xelatex'
62+
63+
latex_elements = {
64+
'papersize': 'a4paper',
65+
'pointsize': '11pt',
66+
}
67+
68+
latex_documents = [
69+
('index', 'ncs-serial-modem.tex', f'{project} Documentation',
70+
author, 'manual'),
71+
]
72+
73+
figure_align = 'H'

0 commit comments

Comments
 (0)