Skip to content

Commit 530ffcc

Browse files
committed
fix pdf doc build
1 parent c7feb8e commit 530ffcc

File tree

10 files changed

+55
-29
lines changed

10 files changed

+55
-29
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,3 +162,4 @@ cython_debug/
162162
poetry.lock
163163
.vscode
164164
django_typer/tests/dj_params.json
165+
**/.DS_Store

doc/source/_static/commands.css

Lines changed: 0 additions & 4 deletions
This file was deleted.
182 KB
Loading
23.2 KB
Binary file not shown.

doc/source/_static/style.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.big {
2+
font-size: 24px; /* Or any size you prefer */
3+
font-weight: bold; /* If you want it bold */
4+
}
5+
.extrabig {
6+
font-size: 36px; /* Or any size you prefer */
7+
font-weight: bold; /* If you want it bold */
8+
}

doc/source/changelog.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
Change Log
33
==========
44

5-
.. v1.0.0
6-
.. ======
5+
v1.0.0
6+
======
77

8-
.. * Initial production/stable release.
8+
* Initial production/stable release.
99

1010
v0.6.1b
1111
=======

doc/source/conf.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,11 @@
7878

7979
todo_include_todos = True
8080

81-
def add_page_class(app, pagename, templatename, context, doctree):
82-
from sphinx.builders.html._assets import _CascadingStyleSheet
83-
context['css_files'] += [_CascadingStyleSheet(f'_static/{pagename}.css')]
81+
latex_engine = "xelatex"
82+
83+
# def add_page_class(app, pagename, templatename, context, doctree):
84+
# from sphinx.builders.html._assets import _CascadingStyleSheet
85+
# context['css_files'] += [_CascadingStyleSheet(f'_static/{pagename}.css')]
8486

8587
def setup(app):
8688
# Register a sphinx.ext.autodoc.between listener to ignore everything
@@ -89,5 +91,5 @@ def setup(app):
8991
'autodoc-process-docstring',
9092
between('^.*[*]{79}.*$', exclude=True)
9193
)
92-
app.connect('html-page-context', add_page_class)
94+
# app.connect('html-page-context', add_page_class)
9395
return app

doc/source/index.rst

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
.. include:: ./refs.rst
2+
.. role:: big
3+
.. role:: extrabig
4+
5+
.. we use big role instead of index because a TOC on this page screws up the latex page generation
6+
7+
:extrabig:`Django Typer`
28

3-
============
4-
Django Typer
5-
============
69

710
Use Typer_ to define the CLI for your Django_ management commands. Provides a TyperCommand class
811
that inherits from BaseCommand_ and allows typer-style annotated parameter types. All of the
@@ -22,9 +25,7 @@ BaseCommand functionality is preserved, so that TyperCommand can be a drop in re
2225
* Refactor existing management commands into TyperCommands because TyperCommand is interface
2326
compatible with BaseCommand.
2427

25-
26-
Installation
27-
------------
28+
:big:`Installation`
2829

2930
1. Clone django-typer from GitHub_ or install a release off PyPI_ :
3031

@@ -50,8 +51,7 @@ Installation
5051
]
5152
5253
53-
Basic Example
54-
-------------
54+
:big:`Basic Example`
5555

5656
For example TyperCommands can be a very simple drop in replacement for BaseCommands. All of the
5757
documented features of BaseCommand_ work!
@@ -70,8 +70,7 @@ documented features of BaseCommand_ work!
7070

7171
|
7272
73-
Multiple Subcommands Example
74-
----------------------------
73+
:big:`Multiple Subcommands Example`
7574

7675
Or commands with multiple subcommands can be defined:
7776

@@ -90,8 +89,7 @@ Or commands with multiple subcommands can be defined:
9089
|
9190
9291

93-
Grouping and Hierarchies Example
94-
--------------------------------
92+
:big:`Grouping and Hierarchies Example`
9593

9694
Or more complex groups and subcommand hierarchies can be defined. For example this command
9795
defines a group of commands called math, with subcommands divide and multiply. The group

doc/source/shell_completion.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,15 @@
66
Shell Tab-Completions
77
=====================
88

9-
.. image:: /_static/img/closepoll_example.gif
10-
:align: center
9+
.. only:: html
10+
11+
.. image:: /_static/img/closepoll_example.gif
12+
:align: center
13+
14+
.. only:: latex
15+
16+
.. image:: /_static/img/closepoll_example.png
17+
:align: center
1118

1219
|
1320

doc/source/tutorial.rst

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,15 @@ to define the command's command line interface instead of argparse_ as BaseComma
1111
Upstream Libraries
1212
------------------
1313

14-
.. image:: /_static/img/django_typer_upstream.svg
15-
:align: right
14+
.. only:: html
15+
16+
.. image:: /_static/img/django_typer_upstream.svg
17+
:align: right
18+
19+
.. only:: latex
20+
21+
.. image:: /_static/img/django_typer_upstream.pdf
22+
:align: right
1623

1724
django-typer_ merges the Django_ BaseCommand_ interface with the Typer_ interface and Typer_ itself
1825
is built on top of click_. This means when using django-typer_ you will encounter interfaces and
@@ -410,5 +417,12 @@ closepoll command looks like:
410417
poll.delete()
411418
412419
413-
.. image:: /_static/img/closepoll_example.gif
414-
:align: center
420+
.. only:: html
421+
422+
.. image:: /_static/img/closepoll_example.gif
423+
:align: center
424+
425+
.. only:: latex
426+
427+
.. image:: /_static/img/closepoll_example.png
428+
:align: center

0 commit comments

Comments
 (0)