Skip to content

Commit

Permalink
Add WIP README, update conf.py to Python3
Browse files Browse the repository at this point in the history
  • Loading branch information
AnHeuermann authored and AnHeuermann committed Dec 3, 2020
1 parent fc3279e commit 5d5caf4
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 14 deletions.
6 changes: 6 additions & 0 deletions doc/README.md
@@ -0,0 +1,6 @@
# OpenModelica Documentation

There are different documentations available for OpenModelica.

- The User's Guide, see [UsersGuide/README.md](https://github.com/OpenModelica/OpenModelica/blob/master/doc/UsersGuide/README.md)
- Doxygen documentation for parts of the C, C++ and OMSI documentation
15 changes: 11 additions & 4 deletions doc/UsersGuide/README.md
@@ -1,11 +1,13 @@
# Users Guide
OpenModelica users guide using Sphinx (Python Documentation Generator).

## Build instructions
## Dependencies
- Inkscape
- Sphinx
- Python3 and packages from [requirements.txt](https://raw.githubusercontent.com/OpenModelica/OpenModelica-doc/master/UsersGuide/source/requirements.txt)

### Unix

- Install the dependencies using `pip install -r source/requirements.txt`
- Install the Python dependencies using `pip3 install -r source/requirements.txt`

### Windows MinGW
- Install `Python 2.7`.
Expand All @@ -15,7 +17,12 @@ OpenModelica users guide using Sphinx (Python Documentation Generator).
- Install `sphinx` using `pip install sphinx`.
- Install `sphinxcontrib-bibtex` using `pip install sphinxcontrib-bibtex`.
- Install `sphinxcontrib-inlinesyntaxhighlight` using `pip install sphinxcontrib-inlinesyntaxhighlight`.
- Install `ompython`. See OpenModelica OMPython instructions on how to install OMPython.
- Install `ompython`. See [OpenModelica OMPython instructions](https://github.com/OpenModelica/OMPython#installation) on how to install OMPython.
- Install `pandoc` and make sure its in PATH.
- Install `gnuplot` and make sure its in PATH.
- Install `inkscape` and make sure its in PATH.

## Build instructions
```bash
make html
```
19 changes: 10 additions & 9 deletions doc/UsersGuide/source/conf.py
Expand Up @@ -34,7 +34,7 @@
# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
# needs_sphinx = '3.0'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
Expand Down Expand Up @@ -70,9 +70,9 @@
master_doc = 'index'

# General information about the project.
project = u'OpenModelica User\'s Guide'
copyright = u' %d, Open Source Modelica Consortium' % (date.today().year)
author = u'Open Source Modelica Consortium'
project = 'OpenModelica User\'s Guide'
copyright = ' %d, Open Source Modelica Consortium' % (date.today().year)
author = 'Open Source Modelica Consortium'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -283,8 +283,9 @@
#'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
'preamble': """
\usepackage{bookmark}
'preamble':
"""
\\usepackage{bookmark}
""",
'fontenc': r'\usepackage[LGR,T1]{fontenc}'

Expand All @@ -296,7 +297,7 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'OpenModelicaUsersGuide.tex', u'OpenModelica User\'s Guide', author, 'manual'),
(master_doc, 'OpenModelicaUsersGuide.tex', 'OpenModelica User\'s Guide', author, 'manual'),
]

# The name of an image file (relative to this directory) to place at the top of
Expand Down Expand Up @@ -325,7 +326,7 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'openmodelicausersguide', u'OpenModelica User\'s Guide Documentation',
(master_doc, 'openmodelicausersguide', 'OpenModelica User\'s Guide Documentation',
[author], 1)
]

Expand All @@ -339,7 +340,7 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'OpenModelicaUsersGuide', u'OpenModelica User\'s Guide Documentation',
(master_doc, 'OpenModelicaUsersGuide', 'OpenModelica User\'s Guide Documentation',
author, 'OpenModelicaUsersGuide', 'One line description of project.',
'Miscellaneous'),
]
Expand Down
2 changes: 1 addition & 1 deletion doc/UsersGuide/source/sphinxcontribopenmodelica.py
Expand Up @@ -65,7 +65,7 @@ def getErrorString(state):
else:
return [nodes.note(None, node)]

class ExecMosDirective(directives.CodeBlock):
class ExecMosDirective(directives.code.CodeBlock):
"""Execute the specified Modelica code and insert the output into the document using syntax highlighting"""
has_content = True
required_arguments = 0
Expand Down

0 comments on commit 5d5caf4

Please sign in to comment.