Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

conf.py 1.3 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
  1. # -*- coding: utf-8 -*-
  2. import pybtex.plugin
  3. from pybtex.style.sorting import BaseSortingStyle
  4. from pybtex.style.formatting import plain
  5. project = 'Book Data Tools'
  6. copyright = '2020–2021 Boise State University'
  7. author = 'Michael D. Ekstrand'
  8. extensions = [
  9. 'myst_parser',
  10. 'sphinxcontrib.bibtex'
  11. ]
  12. myst_enable_extensions = [
  13. 'deflist',
  14. 'colon_fence'
  15. ]
  16. bibtex_bibfiles = [
  17. 'papers.bib'
  18. ]
  19. html_theme = 'furo'
  20. html_theme_options = {
  21. 'light_css_variables': {
  22. 'font-stack': 'Lato, sans-serif',
  23. 'font-stack--monospace': 'Source Code Pro, monospace'
  24. }
  25. }
  26. html_baseurl = 'https://bookdata.piret.info'
  27. templates_path = ['_templates']
  28. html_extra_path = [
  29. '_extra'
  30. ]
  31. class ChronoSort(BaseSortingStyle):
  32. def sorting_key(self, entry):
  33. year = entry.fields.get('year', '')
  34. month = entry.fields.get('month', '')
  35. title = entry.fields.get('title', '')
  36. return year, month, title
  37. def sort(self, entries):
  38. sorted = super().sort(entries)
  39. sorted.reverse()
  40. return sorted
  41. class ChronoStyle(plain.Style):
  42. default_sorting_style = 'chrono'
  43. pybtex.plugin.register_plugin('pybtex.style.sorting', 'chrono', ChronoSort)
  44. pybtex.plugin.register_plugin('pybtex.style.formatting', 'chrono', ChronoStyle)
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...