Skip to content

Commit

Permalink
fixed ukrainian tikz issue that was causing us to need an older versi…
Browse files Browse the repository at this point in the history
…on of sphinx-tikz
  • Loading branch information
777arc committed Jul 15, 2024
1 parent b7babeb commit 4640ed9
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
uses: actions/[email protected]

- name: apt installs
run: sudo apt update && sudo apt install -y texlive-latex-extra pdf2svg
run: sudo apt update && sudo apt install -y texlive-latex-extra texlive-lang-cyrillic ghostscript

- uses: actions/[email protected]
with:
Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ html:
@echo changing search button text
sed -i 's/value="Go"/value="Search"/g' $(BUILDDIR)/*/*.html

#make sure you install sphinxcontrib-tikz python module and pdf2svg application
.PHONY: html-es
html-es:
$(SPHINXBUILD) -b html -D project="PySDR: Guia de uso para SDR/DSP con Python" -D exclude_patterns=_build,index.rst,content/*,index-nl.rst,content-nl/*,index-fr.rst,content-fr/*,index-ukraine.rst,content-ukraine/*,index-zh.rst,content-zh/* -D master_doc=index-es $(EXTENSIONS) . $(BUILDDIR)/es/
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ For testing changes to the textbook locally, you can build using the following s

### Ubuntu/Debian

Look at `.github/workflows/build-and-deploy.yml` and run the apt/pip installs, then:

```bash
sudo apt update
sudo apt install -y texlive-latex-extra pdf2svg
pip install -r requirements.txt
make html
make html-fr
make html-nl
Expand Down
30 changes: 10 additions & 20 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,30 +329,17 @@ def setup(app):
# Output file base name for HTML help builder.
htmlhelp_basename = 'textbookdoc'

# -- Options for LaTeX output ---------------------------------------------
tikz_latex_preamble = r'\usepackage{circuitikz}'
# -- Options for LaTeX output, russian is needed for the ukrainian version to work
tikz_latex_preamble = r'''
\usepackage{circuitikz}
\usepackage[russian]{babel}
'''
#imgmath_latex_preamble = r'\usepackage{siunitx}'


latex_elements = {
# 'extrapackages': r'\usepackage{siunitx}',
# 'passoptionstopackages': r'\PassOptionsToPackage{svgnames}{xcolor}',
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#'preamble': '',
latex_elements = {}

# Latex figure (float) alignment
#'figure_align': 'htbp',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
# Grouping the document tree into LaTeX files. List of tuples (source start file, target name, title, author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'textbook.tex', u'textbook Documentation',
u'Marc Lichtman', 'manual'),
Expand Down Expand Up @@ -421,3 +408,6 @@ def setup(app):
.. default-role::
"""

# Normally tikz uses pdf2svg but this was needed to get ukraining characters to work
tikz_proc_suite = 'GhostScript'
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
sphinx==7.3.7
sphinxcontrib-tikz==0.4.16
sphinxcontrib-tikz==0.4.20
sphinxcontrib-spelling==8.0.0
docutils==0.21.2
patreon==0.5.0
Expand Down

0 comments on commit 4640ed9

Please sign in to comment.