User Guide: Formatting, link updates

- Add `sphinx.ext.extlinks` extension, and use for repetetive links
- Conditionally enable `sphinx_copybutton` if found
- Wrap inline literals with double \` pairs, to format monospaced
- Turn developer page OS note into a Warning box, and replace the
  outdated PDF install instructions link with links to the Windows
  and Mac build instructions in the libopenshot project wiki
- Wrap paragraphs at periods or commas (sentence-per-line) instead of
  arbitrarily fitting to a certain width
- Use shorter sentences where possible
This commit is contained in:
FeRD (Frank Dana)
2019-12-25 09:16:31 -05:00
parent 4c0a42be51
commit 5925707a1b
5 changed files with 123 additions and 66 deletions
+37 -15
View File
@@ -19,8 +19,9 @@
#
import os
import sys
sys.path.insert(0, os.path.dirname(os.path.abspath('.')))
from src.classes import info
sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath('.')), "src"))
from classes import info
# -- General configuration ------------------------------------------------
@@ -31,7 +32,28 @@ from src.classes import info
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = []
extensions = [
'sphinx.ext.extlinks'
]
try:
# Add Copy button to code cells, if extension is available
import sphinx_copybutton
extensions.append('sphinx_copybutton')
except ImportError:
pass
# External links mappings for extlinks
# see: http://www.sphinx-doc.org/en/master/usage/extensions/extlinks.html
extlinks = {
# alias: (url_template, prefix)
'openshot-github':
('https://github.com/OpenShot/%s', ''),
'libopenshot-wiki':
('https://github.com/OpenShot/libopenshot/wiki/%s', ''),
'openshot-issue':
('https://github.com/OpenShot/openshot-qt/issues/%s', 'issue ')
}
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
@@ -240,21 +262,21 @@ htmlhelp_basename = 'OpenShotVideoEditordoc'
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',
# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',
# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',
# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}
# Grouping the document tree into LaTeX files. List of tuples