- Timestamp:
- Sep 21, 2017 3:12:37 PM (7 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 12d3e0e
- Parents:
- ce81f70 (diff), d76c43a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Location:
- docs/sphinx-docs
- Files:
-
- 4 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
docs/sphinx-docs/Makefile
r1d5f5c2 r3194371 16 16 PAPEROPT_a4 = -D latex_paper_size=a4 17 17 PAPEROPT_letter = -D latex_paper_size=letter 18 ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source 18 ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source-temp 19 19 # the i18n builder cannot share the environment and doctrees with the others 20 20 I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source … … 53 53 rm -rf source/dev/api 54 54 sphinx-apidoc -o source/dev/api -d 8 ../../src 55 55 56 56 html: stubs 57 57 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html -
docs/sphinx-docs/build_sphinx.py
r4abc05d8 r6e546f8 18 18 from distutils.dir_util import copy_tree 19 19 from distutils.util import get_platform 20 from distutils.spawn import find_executable 21 20 22 from shutil import copy 21 23 from os import listdir … … 324 326 print("!!!!NO MODEL DOCS WILL BE BUILT!!!!") 325 327 326 327 328 def retrieve_bumps_docs(): 328 329 """ … … 360 361 SASVIEW_BUILD]) 361 362 363 def build_pdf(): 364 """ 365 Runs sphinx-build for pdf. Reads in all .rst files and spits out the final html. 366 """ 367 print("=== Build PDF Docs from ReST Files ===") 368 subprocess.call(["sphinx-build", 369 "-b", "latex", # Builder name. TODO: accept as arg to setup.py. 370 "-d", os.path.join(SPHINX_BUILD, "doctrees"), 371 SPHINX_SOURCE, 372 os.path.join(SPHINX_BUILD, "latex")]) 373 374 LATEXDIR = os.path.join(SPHINX_BUILD, "latex") 375 #TODO: Does it need to be done so many time? 376 def pdflatex(): 377 subprocess.call(["pdflatex", "SasView.tex"], cwd=LATEXDIR) 378 pdflatex() 379 pdflatex() 380 pdflatex() 381 subprocess.call(["makeindex", "-s", "python.ist", "SasView.idx"], cwd=LATEXDIR) 382 pdflatex() 383 pdflatex() 384 385 print("=== Copy PDF to HTML Directory ===") 386 source = os.path.join(LATEXDIR, "SasView.pdf") 387 target = os.path.join(SASVIEW_DOCS, "SasView.pdf") 388 shutil.copyfile(source, target) 389 362 390 def build(): 363 391 """ 364 392 Runs sphinx-build. Reads in all .rst files and spits out the final html. 365 393 """ 366 print("=== Build HTML Docs from Re stFiles ===")394 print("=== Build HTML Docs from ReST Files ===") 367 395 subprocess.call(["sphinx-build", 368 396 "-b", "html", # Builder name. TODO: accept as arg to setup.py. … … 375 403 copy_tree(html, SASVIEW_DOCS) 376 404 405 def fetch_katex(version, destination="_static"): 406 from zipfile import ZipFile 407 import urllib2 408 url = "https://github.com/Khan/KaTeX/releases/download/%s/katex.zip" % version 409 cache_path = "katex_%s.zip" % version 410 if not os.path.exists(cache_path): 411 try: 412 fd_in = urllib2.urlopen(url) 413 with open(cache_path, "wb") as fd_out: 414 fd_out.write(fd_in.read()) 415 finally: 416 fd_in.close() 417 with ZipFile(cache_path) as zip: 418 zip.extractall(destination) 419 420 def convert_katex(): 421 print("=== Preprocess HTML, converting latex to html ===") 422 subprocess.call(["node", "convertKaTex.js", SASVIEW_DOCS]) 423 424 def convert_mathjax(): 425 print("=== Preprocess HTML, converting latex to html ===") 426 subprocess.call(["node", "convertMathJax.js", SASVIEW_DOCS]) 427 428 def fetch_mathjax(): 429 subprocess.call(["npm", "install", "mathjax-node-page"]) 430 # TODO: copy fonts from node_modules/mathjax/fonts/HTML-CSS/Tex into static 431 377 432 def rebuild(): 378 433 clean() … … 380 435 retrieve_user_docs() 381 436 retrieve_bumps_docs() 437 #fetch_katex(version=KATEX_VERSION, destination=KATEX_PARENT) 438 #fetch_mathjax() 382 439 apidoc() 383 440 build() 441 if find_executable('latex'): 442 build_pdf() 443 #convert_katex() 444 #convert_mathjax() 384 445 385 446 print("=== Done ===") -
docs/sphinx-docs/source/conf.py
r959eb01 rf80b416e 36 36 'sphinx.ext.coverage', 37 37 'sphinx.ext.mathjax', 38 #'mathjax', # replacement mathjax that allows a list of paths 38 39 'dollarmath', 39 40 'sphinx.ext.viewcode'] 41 42 mathjax_path = ( 43 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?' 44 'config=TeX-MML-AM_CHTML') 45 46 # For katex uncomment the following 47 """ 48 #STATIC_PATH = '../../_static/' 49 STATIC_PATH = '' 50 mathjax_path = [ 51 STATIC_PATH + 'katex/katex.min.js', 52 STATIC_PATH + 'katex/contrib/auto-render.min.js', 53 STATIC_PATH + 'rendermath.js' 54 ] 55 mathjax_css = STATIC_PATH + 'katex/katex.min.css' 56 """ 57 40 58 41 59 # Add any paths that contain templates here, relative to this directory. … … 62 80 version = '4.1' 63 81 # The full version, including alpha/beta/rc tags. 64 release = '4.1. 0'82 release = '4.1.2' 65 83 66 84 # The language for content autogenerated by Sphinx. Refer to documentation … … 201 219 # -- Options for LaTeX output -------------------------------------------------- 202 220 221 # TODO: seems like angstroms is defined twice. 203 222 LATEX_PREAMBLE=r""" 223 \usepackage[utf8]{inputenc} % Allow unicode symbols in text 224 \newcommand{\lt}{<} % HTML needs \lt rather than < 225 \newcommand{\gt}{>} % HTML needs \gt rather than > 204 226 \renewcommand{\AA}{\text{\r{A}}} % Allow \AA in math mode 205 \ usepackage[utf8]{inputenc} % Allow unicode symbols in text227 \DeclareUnicodeCharacter {212B} {\AA} % Angstrom 206 228 \DeclareUnicodeCharacter {00B7} {\ensuremath{\cdot}} % cdot 207 229 \DeclareUnicodeCharacter {00B0} {\ensuremath{^\circ}} % degrees 208 \DeclareUnicodeCharacter {212B} {\AA} % Angstrom209 230 """ 210 231 latex_elements = { -
docs/sphinx-docs/source/rst_prolog
ra45185c r1659f54 1 1 .. Set up some substitutions to make life easier... 2 .. Remove |biggamma|, etc. when they are no longer needed.3 2 4 5 .. |alpha| unicode:: U+03B16 .. |beta| unicode:: U+03B27 .. |gamma| unicode:: U+03B38 .. |delta| unicode:: U+03B49 .. |epsilon| unicode:: U+03B510 .. |zeta| unicode:: U+03B611 .. |eta| unicode:: U+03B712 .. |theta| unicode:: U+03B813 .. |iota| unicode:: U+03B914 .. |kappa| unicode:: U+03BA15 .. |lambda| unicode:: U+03BB16 .. |mu| unicode:: U+03BC17 .. |nu| unicode:: U+03BD18 .. |xi| unicode:: U+03BE19 .. |omicron| unicode:: U+03BF20 .. |pi| unicode:: U+03C021 .. |rho| unicode:: U+03C122 .. |sigma| unicode:: U+03C323 .. |tau| unicode:: U+03C424 .. |upsilon| unicode:: U+03C525 .. |phi| unicode:: U+03C626 .. |chi| unicode:: U+03C727 .. |psi| unicode:: U+03C828 .. |omega| unicode:: U+03C929 30 31 .. |biggamma| unicode:: U+039332 .. |bigdelta| unicode:: U+039433 .. |bigzeta| unicode:: U+039E34 .. |bigpsi| unicode:: U+03A835 .. |bigphi| unicode:: U+03A636 .. |bigsigma| unicode:: U+03A337 .. |Gamma| unicode:: U+039338 .. |Delta| unicode:: U+039439 .. |Zeta| unicode:: U+039E40 .. |Psi| unicode:: U+03A841 42 43 .. |drho| replace:: |Delta|\ |rho|44 3 .. |Ang| unicode:: U+212B 45 4 .. |Ang^-1| replace:: |Ang|\ :sup:`-1` … … 57 16 .. |cm^-3| replace:: cm\ :sup:`-3` 58 17 .. |sr^-1| replace:: sr\ :sup:`-1` 59 .. |P0| replace:: P\ :sub:`0`\60 .. |A2| replace:: A\ :sub:`2`\61 62 63 .. |equiv| unicode:: U+226164 .. |noteql| unicode:: U+226065 .. |TM| unicode:: U+212266 67 18 68 19 .. |cdot| unicode:: U+00B7 -
docs/sphinx-docs/source/user/tutorial.rst
r461a917 r2f6d340 8 8 .. note:: In Windows use [Alt]-[Cursor left] to return to the previous page 9 9 10 :download:`Getting Started with Sasview <../../../../s asview/media/getting_started_with_sasview.pdf>`10 :download:`Getting Started with Sasview <../../../../src/sas/sasview/media/getting_started_with_sasview.pdf>` 11 11 12 :download:`Old Tutorial <../../../../s asview/media/Tutorial.pdf>`12 :download:`Old Tutorial <../../../../src/sas/sasview/media/Tutorial.pdf>`
Note: See TracChangeset
for help on using the changeset viewer.