SourceXtractorPlusPlus  0.16
Please provide a description of the project.
conf.py
Go to the documentation of this file.
1 # -*- coding: utf-8 -*-
2 #
3 # SourceXtractor++ documentation build configuration file, created by
4 # sphinx-quickstart on Thu Jan 31 13:34:56 2019.
5 #
6 # This file is execfile()d with the current directory set to its
7 # containing dir.
8 #
9 # Note that not all possible configuration values are present in this
10 # autogenerated file.
11 #
12 # All configuration values have a default; values that are commented out
13 # serve to show the default.
14 
15 # If extensions (or modules to document with autodoc) are in another directory,
16 # add these directories to sys.path here. If the directory is relative to the
17 # documentation root, use os.path.abspath to make it absolute, like shown here.
18 #
19 # import os
20 # import sys
21 # sys.path.insert(0, os.path.abspath('.'))
22 
23 import sphinx_rtd_theme
24 
25 
26 # -- General configuration ------------------------------------------------
27 
28 # If your documentation needs a minimal Sphinx version, state it here.
29 #
30 # needs_sphinx = '1.0'
31 
32 # Add any Sphinx extension module names here, as strings. They can be
33 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
34 # ones.
35 extensions = [
36 # 'sphinx.ext.intersphinx',
37 # 'sphinx.ext.todo',
38  'sphinx.ext.mathjax',
39 # 'sphinx.ext.ifconfig',
40 # 'sphinx.ext.viewcode',
41  'sphinxcontrib.bibtex',
42  'sphinx.ext.githubpages'
43 ]
44 
45 # Add any paths that contain templates here, relative to this directory.
46 templates_path = ['_templates']
47 
48 # The suffix(es) of source filenames.
49 # You can specify multiple suffix as a list of string:
50 #
51 # source_suffix = ['.rst', '.md']
52 source_suffix = '.rst'
53 
54 # The encoding of source files.
55 #
56 # source_encoding = 'utf-8-sig'
57 
58 # The master toctree document.
59 master_doc = 'index'
60 
61 # General information about the project.
62 project = u'SourceXtractor++'
63 filename = 'sourcextractor'
64 copyright = u'2019, GenevaU/LMU/CNRS/SorbonneU'
65 author = u'SourceXtractor++ team'
66 
67 # The version info for the project you're documenting, acts as replacement for
68 # |version| and |release|, also used in various other places throughout the
69 # built documents.
70 #
71 # The short X.Y version.
72 version = '1.0.0'
73 # The full version, including alpha/beta/rc tags.
74 release = '1.0.0'
75 
76 # The language for content autogenerated by Sphinx. Refer to documentation
77 # for a list of supported languages.
78 #
79 # This is also used if you do content translation via gettext catalogs.
80 # Usually you set "language" from the command line for these cases.
81 language = None
82 
83 # There are two options for replacing |today|: either, you set today to some
84 # non-false value, then it is used:
85 #
86 today = 'Thu Jan 31 2019'
87 #
88 # Else, today_fmt is used as the format for a strftime call.
89 #
90 # today_fmt = '%B %d, %Y'
91 
92 # List of patterns, relative to source directory, that match files and
93 # directories to ignore when looking for source files.
94 # This patterns also effect to html_static_path and html_extra_path
95 exclude_patterns = ['global.rst','keys.rst','roles.rst']
96 
97 # The reST default role (used for this markup: `text`) to use for all
98 # documents.
99 #
100 # default_role = None
101 
102 # If true, '()' will be appended to :func: etc. cross-reference text.
103 #
104 # add_function_parentheses = True
105 
106 # If true, the current module name will be prepended to all description
107 # unit titles (such as .. function::).
108 #
109 # add_module_names = True
110 
111 # If true, sectionauthor and moduleauthor directives will be shown in the
112 # output. They are ignored by default.
113 #
114 # show_authors = False
115 
116 # The name of the Pygments (syntax highlighting) style to use.
117 pygments_style = 'sphinx'
118 
119 # A list of ignored prefixes for module index sorting.
120 # modindex_common_prefix = []
121 
122 # If true, keep warnings as "system message" paragraphs in the built documents.
123 # keep_warnings = False
124 
125 # If true, `todo` and `todoList` produce output, else they produce nothing.
126 todo_include_todos = True
127 
128 numfig = True
129 
130 # -- Options for HTML output ----------------------------------------------
131 
132 # The theme to use for HTML and HTML Help pages. See the documentation for
133 # a list of builtin themes.
134 #
135 html_theme = 'sphinx_rtd_theme'
136 
137 # Theme options are theme-specific and customize the look and feel of a theme
138 # further. For a list of options available for each theme, see the
139 # documentation.
140 #
141 # html_theme_options = {}
142 
143 # Add any paths that contain custom themes here, relative to this directory.
144 html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
145 
146 # The name for this set of Sphinx documents.
147 # "<project> v<release> documentation" by default.
148 #
149 # html_title = u'SourceXtractor++ v1.0.0'
150 
151 # A shorter title for the navigation bar. Default is the same as html_title.
152 #
153 # html_short_title = None
154 
155 # The name of an image file (relative to this directory) to place at the top
156 # of the sidebar.
157 #
158 # html_logo = None
159 
160 # The name of an image file (relative to this directory) to use as a favicon of
161 # the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
162 # pixels large.
163 #
164 # html_favicon = None
165 
166 # Add any paths that contain custom static files (such as style sheets) here,
167 # relative to this directory. They are copied after the builtin static files,
168 # so a file named "default.css" will overwrite the builtin "default.css".
169 html_static_path = ['../theme']
170 
171 # Trick for having ReadTheDocs read custom theme changes
172 def setup(app):
173  app.add_stylesheet("css/custom.css")
174 
175 # Add any extra paths that contain custom files (such as robots.txt or
176 # .htaccess) here, relative to this directory. These files are copied
177 # directly to the root of the documentation.
178 #
179 # html_extra_path = []
180 
181 # Custom sidebar templates, must be a dictionary that maps document names
182 # to template names.
183 #
184 # This is required for the alabaster theme
185 # refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
186 html_sidebars = {
187  '**': [
188  'relations.html', # needs 'show_related': True theme option to display
189  'searchbox.html',
190  ]
191 }
192 
193 # If not None, a 'Last updated on:' timestamp is inserted at every page
194 # bottom, using the given strftime format.
195 # The empty string is equivalent to '%b %d, %Y'.
196 #
197 # html_last_updated_fmt = None
198 
199 # If true, SmartyPants will be used to convert quotes and dashes to
200 # typographically correct entities.
201 #
202 # html_use_smartypants = True
203 
204 # Custom sidebar templates, maps document names to template names.
205 #
206 # html_sidebars = {}
207 
208 # Additional templates that should be rendered to pages, maps page names to
209 # template names.
210 #
211 # html_additional_pages = {}
212 
213 # If false, no module index is generated.
214 #
215 # html_domain_indices = True
216 
217 # If false, no index is generated.
218 #
219 # html_use_index = True
220 
221 # If true, the index is split into individual pages for each letter.
222 #
223 # html_split_index = False
224 
225 # If true, links to the reST sources are added to the pages.
226 #
227 html_show_sourcelink = False
228 
229 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
230 #
231 html_show_sphinx = False
232 
233 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
234 #
235 # html_show_copyright = True
236 
237 # If true, an OpenSearch description file will be output, and all pages will
238 # contain a <link> tag referring to it. The value of this option must be the
239 # base URL from which the finished HTML is served.
240 #
241 # html_use_opensearch = ''
242 
243 # This is the file name suffix for HTML files (e.g. ".xhtml").
244 # html_file_suffix = None
245 
246 # Language to be used for generating the HTML full-text search index.
247 # Sphinx supports the following languages:
248 # 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
249 # 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr', 'zh'
250 #
251 # html_search_language = 'en'
252 
253 # A dictionary with options for the search language support, empty by default.
254 # 'ja' uses this config value.
255 # 'zh' user can custom change `jieba` dictionary path.
256 #
257 # html_search_options = {'type': 'default'}
258 
259 # The name of a javascript file (relative to the configuration directory) that
260 # implements a search results scorer. If empty, the default will be used.
261 #
262 # html_search_scorer = 'scorer.js'
263 
264 # Output file base name for HTML help builder.
265 htmlhelp_basename = filename + 'doc'
266 
267 # -- Options for LaTeX output ---------------------------------------------
268 
269 latex_elements = {
270  # The paper size ('letterpaper' or 'a4paper').
271  #
272 'papersize': 'a4paper',
273 
274  # The font size ('10pt', '11pt' or '12pt').
275  #
276  # 'pointsize': '10pt',
277 
278  # Additional stuff for the LaTeX preamble.
279  #
280 'preamble': '\usepackage{amssymb}',
281 
282  # Latex figure (float) alignment
283  #
284  # 'figure_align': 'htbp',
285 }
286 
287 # Grouping the document tree into LaTeX files. List of tuples
288 # (source start file, target name, title,
289 # author, documentclass [howto, manual, or own class]).
290 latex_documents = [
291  (master_doc, filename + '.tex', project + u' Documentation',
292  author, 'manual'),
293 ]
294 
295 # The name of an image file (relative to this directory) to place at the top of
296 # the title page.
297 #
298 # latex_logo = None
299 
300 # For "manual" documents, if this is true, then toplevel headings are parts,
301 # not chapters.
302 #
303 # latex_use_parts = False
304 
305 # If true, show page references after internal links.
306 #
307 # latex_show_pagerefs = False
308 
309 # If true, show URL addresses after external links.
310 #
311 latex_show_urls = 'footnote'
312 
313 # Documents to append as an appendix to all manuals.
314 #
315 # latex_appendices = []
316 
317 # It false, will not define \strong, \code, itleref, \crossref ... but only
318 # \sphinxstrong, ..., \sphinxtitleref, ... To help avoid clash with user added
319 # packages.
320 #
321 # latex_keep_old_macro_names = True
322 
323 # If false, no module index is generated.
324 #
325 # latex_domain_indices = True
326 
327 
328 # -- Options for manual page output ---------------------------------------
329 
330 # One entry per manual page. List of tuples
331 # (source start file, name, description, authors, manual section).
332 man_pages = [
333  (master_doc, filename, project + u' Documentation',
334  author, 1)
335 ]
336 
337 # If true, show URL addresses after external links.
338 #
339 # man_show_urls = False
340 
341 
342 # -- Options for Texinfo output -------------------------------------------
343 
344 # Grouping the document tree into Texinfo files. List of tuples
345 # (source start file, target name, title, author,
346 # dir menu entry, description, category)
347 texinfo_documents = [
348  (master_doc, filename, project + u' Documentation',
349  author, project, 'One line description of project.',
350  'Miscellaneous'),
351 ]
352 
353 # Documents to append as an appendix to all manuals.
354 #
355 # texinfo_appendices = []
356 
357 # If false, no module index is generated.
358 #
359 # texinfo_domain_indices = True
360 
361 # How to display URL addresses: 'footnote', 'no', or 'inline'.
362 #
363 # texinfo_show_urls = 'footnote'
364 
365 # If true, do not generate a @detailmenu in the "Top" node's menu.
366 #
367 # texinfo_no_detailmenu = False
368 
369 
370 # -- Options for Epub output ----------------------------------------------
371 
372 # Bibliographic Dublin Core info.
373 epub_title = project
374 epub_author = author
375 epub_publisher = author
376 epub_copyright = copyright
377 
378 # The basename for the epub file. It defaults to the project name.
379 # epub_basename = project
380 
381 # The HTML theme for the epub output. Since the default themes are not
382 # optimized for small screen space, using the same theme for HTML and epub
383 # output is usually not wise. This defaults to 'epub', a theme designed to save
384 # visual space.
385 #
386 # epub_theme = 'epub'
387 
388 # The language of the text. It defaults to the language option
389 # or 'en' if the language is not set.
390 #
391 # epub_language = ''
392 
393 # The scheme of the identifier. Typical schemes are ISBN or URL.
394 # epub_scheme = ''
395 
396 # The unique identifier of the text. This can be a ISBN number
397 # or the project homepage.
398 #
399 # epub_identifier = ''
400 
401 # A unique identification for the text.
402 #
403 # epub_uid = ''
404 
405 # A tuple containing the cover image and cover page html template filenames.
406 #
407 # epub_cover = ()
408 
409 # A sequence of (type, uri, title) tuples for the guide element of content.opf.
410 #
411 # epub_guide = ()
412 
413 # HTML files that should be inserted before the pages created by sphinx.
414 # The format is a list of tuples containing the path and title.
415 #
416 # epub_pre_files = []
417 
418 # HTML files that should be inserted after the pages created by sphinx.
419 # The format is a list of tuples containing the path and title.
420 #
421 # epub_post_files = []
422 
423 # A list of files that should not be packed into the epub file.
424 epub_exclude_files = ['search.html']
425 
426 # The depth of the table of contents in toc.ncx.
427 #
428 # epub_tocdepth = 3
429 
430 # Allow duplicate toc entries.
431 #
432 # epub_tocdup = True
433 
434 # Choose between 'default' and 'includehidden'.
435 #
436 # epub_tocscope = 'default'
437 
438 # Fix unsupported image types using the Pillow.
439 #
440 # epub_fix_images = False
441 
442 # Scale large images.
443 #
444 # epub_max_image_width = 0
445 
446 # How to display URL addresses: 'footnote', 'no', or 'inline'.
447 #
448 # epub_show_urls = 'inline'
449 
450 # If false, no index is generated.
451 #
452 # epub_use_index = True
453 
454 
455 # Example configuration for intersphinx: refer to the Python standard library.
456 intersphinx_mapping = {'https://docs.python.org/': None}
457 
458 # -- Options for pybtex ----------------------------------------------
459 from pybtex.style.formatting.unsrt import Style as UnsrtStyle, date, pages, toplevel
460 from pybtex.style.template import * # ... and anything else needed
461 from pybtex.plugin import register_plugin
462 
463 class ADSArxivStyle(UnsrtStyle):
464 
465  def format_article(self, e):
466  volume_and_pages = first_of [
467  # volume and pages, with optional issue number
468  optional [
469  join [
470  field('volume'),
471  optional['(', field('number'),')'],
472  ':', pages
473  ],
474  ],
475  # pages only
476  words ['pages', pages],
477  ]
478  myurl = first_of [
479  optional_field('adsurl'),
480  join ['http://arxiv.org/abs/', optional_field('eprint')],
481  optional_field('url'),
482  optional [join ['http://dx.doi.org/', field('doi')]]
483  ]
484  template = toplevel [
485  self.format_names('author'),
486  href [myurl, self.format_title(e, 'title')] \
487  if len(myurl.format_data(e)) > 0 \
488  else tag('strong') [self.format_title(e, 'title')],
489  sentence(capfirst=False) [
490  tag('emph') [field('journal')],
491  optional[ volume_and_pages ],
492  field('year')],
493  sentence(capfirst=False) [ optional_field('note') ],
494  ]
495  return template.format_data(e)
496 
497  def format_inproceedings(self, e):
498  myurl = first_of [
499  optional_field('adsurl'),
500  optional [join ['http://arxiv.org/abs/', field('eprint')]],
501  optional_field('url'),
502  optional [join ['http://dx.doi.org/', field('doi')]]
503  ]
504  template = toplevel [
505  sentence [self.format_names('author')],
506  href [myurl, self.format_title(e, 'title')] \
507  if len(myurl.format_data(e)) > 0 \
508  else tag('strong') [self.format_title(e, 'title')],
509  words [
510  'In',
511  sentence(capfirst=False) [
512  optional[ self.format_editor(e, as_sentence=False) ],
513  self.format_btitle(e, 'booktitle', as_sentence=False),
514  self.format_volume_and_series(e, as_sentence=False),
515  optional[ pages ],
516  ],
517  self.format_address_organization_publisher_date(e),
518  ],
519  sentence(capfirst=False) [ optional_field('note') ],
520  ]
521  return template.format_data(e)
522 
523 register_plugin('pybtex.style.formatting', 'adsarxiv', ADSArxivStyle)
524 
def format_article(self, e)
Definition: conf.py:465
def format_inproceedings(self, e)
Definition: conf.py:497
def setup(app)
Definition: conf.py:172