configure_example

View page source

Example Using TOML Configure File

include_all

rst_prolog

      This line is indented using |tab| which is defined in the rst_prolog for this documentation.

latex_macro

\(f : \B{R}^n \rightarrow \B{R}^m\) This line uses \B which is defined as a latex_macro.

Example TOML File

# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: Bradley M. Bell <bradbell@seanet.com>
# SPDX-FileContributor: 2020-24 Bradley M. Bell
# -----------------------------------------------------------------------------
# BEGIN_PROJECT_NAME
[project_name]
data = 'xrst'
# END_PROJECT_NAME
# -----------------------------------------------------------------------------
# BEGIN_DIRECTORY
[directory]
# This is same as the default and only used as an example
project_directory = '.'
rst_directory     = 'build/rst'
html_directory    = 'build/html'
tex_directory     = 'build/tex'
# END_DIRECTORY
# -----------------------------------------------------------------------------
# BEGIN_ROOT_FILE
[root_file]
default = 'example/example.xrst'
user    = 'user/user.xrst'
dev     = 'xrst/__init__.py'
# END_ROOT_FILE
# -----------------------------------------------------------------------------
# BEGIN_HEADING
# If running an old verison of xrst that does not support heading,
# comment out the lines from [heading] to overline =.
[heading]
#   level         0,     1,     2,     3,     4,
character = [   '#',   '*',   '=',   '-',   '.',  ]
overline  = [ false, false, false, false, false,  ]
# END_HEADING
# -----------------------------------------------------------------------------
# BEGIN_SPELL_PACKAGE
# [spell_package]
# This is commented out because pyenchant is harder to set up on some systems:
# data = 'pyenchant'
# END_SPELL_PACKAGE
# -----------------------------------------------------------------------------
# BEGIN_INPUT_FILES
[input_files]
data = [
   [ 'bin/input_files.sh' ] ,
]
# END_INPUT_FILES
# -----------------------------------------------------------------------------
# BEGIN_HTML_THEME_OPTIONS
# This is same as the default and only used as an example
[html_theme_options.sphinx_book_theme]
show_toc_level = 4

[html_theme_options.sphinx_rtd_theme]
navigation_depth = -1
titles_only      = true
# END_HTML_THEME_OPTIONS
#
# BEGIN_INCLUDE_ALL
[include_all]
rst_epilog = ''
rst_prolog = '''
.. |space| unicode:: 0xA0
.. |tab| replace:: |space| |space| |space|
'''
latex_macro = [
   '\newcommand{\B}[1]{ {\bf #1} }' ,
   '\newcommand{\R}[1]{ {\rm #1} }' ,
]
# END_INCLUDE_ALL
# -----------------------------------------------------------------------------
# BEGIN_PROJECT_DICTIONARY
[project_dictionary]
data = [
   # keywords in souce code languages
   '''
   bool
   def
   dict
   int
   str
   ''',
   # file extensions
   '''
   py
   rst
   toml
   ''',
   # abbreviations
   # dir:   used for directory (as part of a variable name)
   # obj:   used for object (as appossed to the corresponding class)
   # tmp:   is used for temparary values
   # toc:   used for table of contents or table of children
   # dd-mm: used for day and month as two decimal characters
   '''
   dir
   obj
   tmp
   toc
   dd
   mm
   ''',
   # special words
   '''
   boolean
   meta
   newline
   newlines
   overline
   pyspellchecker
   xrst
   ''',
]
# END_PROJECT_DICTIONARY
# -----------------------------------------------------------------------------
# BEGIN_NOT_IN_INDEX
[not_in_index]
data = [
  # articles, prepositions, and common verbs
  '''
      a
      an
      and
      been
      by
      for
      has
      of
      that
      the
      this
      to
  ''',
  # words that are use in many different pages of the documentation
  '''
    command
    example
    file
    purpose
    syntax
  ''',
  # python regular expression for month-day used in release notes
  '[0-9]{2}-[0-9]{2}',
  # python regular expression for year.month.day used in version number
  '[0-9]{4}[.][0-9]{1,2}[.][0-9]{1,2}',
]
# END_NOT_IN_INDEX

This Example File

# vim:nofixeol
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: Bradley M. Bell <bradbell@seanet.com>
# SPDX-FileContributor: 2020-24 Bradley M. Bell
# ----------------------------------------------------------------------------
{xrst_begin configure_example}

Example Using TOML Configure File
#################################

include_all
***********

rst_prolog
==========
|tab| This line is indented using ``|tab|``
which is defined in the rst_prolog for this documentation.

latex_macro
===========
:math:`f : \B{R}^n \rightarrow \B{R}^m`
This line uses ``\B`` which is defined as a latex_macro.


Example TOML File
*****************
{xrst_literal
   xrst.toml
}

This Example File
*****************
{xrst_literal}

{xrst_end configure_example}