Compare commits
2 Commits
eaddcf1c46
...
fddf6dfb6b
Author | SHA1 | Date |
---|---|---|
Jeff Moe | fddf6dfb6b | |
Jeff Moe | ca5038c8db |
16
Makefile
16
Makefile
|
@ -13,7 +13,7 @@ PO_FILES = $(wildcard docs/source/locale/*/LC_MESSAGES/*.po)
|
|||
MSGATTRIB = msgattrib
|
||||
LANGUAGES = am ar bn de el en eo es eu fil fr he hi id it ja ko lkt mr ms nl pl pt ru ta te th tr ur vi zh
|
||||
|
||||
.PHONY: check help html livehtml clean_sphinx clean gettext_build update_locale build_html all copy clean_po
|
||||
.PHONY: check help html livehtml clean_sphinx clean gettext_build update_locale build_html all copy clean_po latex latexpdf
|
||||
|
||||
help:
|
||||
@echo "Please use \`make <target>' where <target> is one of"
|
||||
|
@ -21,6 +21,8 @@ help:
|
|||
@echo " all Clean and make all targets"
|
||||
@echo " html Build the HTML documentation for all languages"
|
||||
@echo " html_<lang> Build HTML documentation for <lang>"
|
||||
@echo " latex Build the documentation using LaTeX"
|
||||
@echo " latexpdf Build the PDFS documentation using LaTeX"
|
||||
@echo " update_locale Update localisation"
|
||||
@echo " update_locale_<lang> Update localisation for <lang>"
|
||||
@echo " gettext_build Build localisation strings for translation"
|
||||
|
@ -66,5 +68,17 @@ html:
|
|||
$(SPHINXBUILD) -b html -d $(BUILDDIR)/doctrees -D language=$$lang $(SOURCEDIR) $(BUILDDIR)/html/$$lang; \
|
||||
done
|
||||
|
||||
latex:
|
||||
@for lang in $(LANGUAGES); do \
|
||||
echo "Building LaTeX documentation for $$lang..."; \
|
||||
$(SPHINXBUILD) -b latex -d $(BUILDDIR)/doctrees -D language=$$lang -Dlatex_engine=xelatex $(SOURCEDIR) $(BUILDDIR)/latex/$$lang; \
|
||||
done
|
||||
|
||||
latexpdf:
|
||||
@for lang in $(LANGUAGES); do \
|
||||
echo "Building PDF documentation for $$lang..."; \
|
||||
$(MAKE) -C $(BUILDDIR)/latex/$$lang ; \
|
||||
done
|
||||
|
||||
html_%: gettext_build
|
||||
$(SPHINXBUILD) -b html -d $(BUILDDIR)/doctrees -D language=$* -c $(SOURCEDIR) $(SOURCEDIR) $(BUILDDIR)/html/$*/
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
{% extends 'article.tpl' %}
|
||||
|
||||
{% block packages %}
|
||||
\usepackage{fontspec}
|
||||
{{ super() }}
|
||||
{% endblock packages %}
|
|
@ -38,6 +38,9 @@ Setup Instructions
|
|||
|
||||
sudo apt update
|
||||
sudo apt install docutils gettext python3-pip python3-venv
|
||||
# To build PDFs with LaTeX
|
||||
sudo apt install texlive-full xindy
|
||||
|
||||
|
||||
4. **Set up a virtual environment (venv):** Navigate to your project's root directory and run:
|
||||
|
||||
|
|
|
@ -55,3 +55,17 @@ sys.path.insert(0, os.path.abspath('models'))
|
|||
sys.path.insert(0, os.path.abspath('ide'))
|
||||
sys.path.insert(0, os.path.abspath('extension'))
|
||||
|
||||
latex_engine = 'xelatex'
|
||||
latex_elements = {
|
||||
'extraclassoptions': 'openany,oneside',
|
||||
'sphinxsetup': 'hmargin={1in,1in}, vmargin={1in,1in}',
|
||||
'inputenc': '',
|
||||
'utf8extra': '',
|
||||
'preamble': r'''
|
||||
\usepackage{xcolor}
|
||||
\usepackage{polyglossia}
|
||||
''',
|
||||
}
|
||||
|
||||
ifconfig = [(os.path.splitext(os.path.basename(env.docname))[1] == '/ja/', {'latex_engine': 'platex'})]
|
||||
|
||||
|
|
Loading…
Reference in New Issue