Skip to content

Commit

Permalink
Allow specification of bibtex bibfile
Browse files Browse the repository at this point in the history
  • Loading branch information
astonzhang committed Jul 7, 2022
1 parent 8f122b3 commit 89db4fe
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions d2lbook/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ def __init__(self, tab=None, config_fname='config.ini'):
self.set_tab(self.tab)
# Sanity checks.
self.sanity_check()

def _set_target(self):
# Some targets names.
# Some targets names.
self.tex_fname = os.path.join(self.pdf_dir, self.project['name']+'.tex')
self.pkg_fname = os.path.join(self.tgt_dir, self.project['name']+'.zip')

Expand Down
3 changes: 3 additions & 0 deletions d2lbook/config_default.ini
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ post_latex =
# The filename of the latex logo
latex_logo =

# Bibtext bibfile
bibfile =


[library]

Expand Down
1 change: 1 addition & 0 deletions d2lbook/sphinx.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def prepare_env(self):
'sphinx.ext.viewcode']
extensions.extend(self.config.build['sphinx_extensions'].split())
self._update_pyconf('extensions', ','.join('"'+ext+'"' for ext in extensions))
self._update_pyconf('bibfile', self.config.pdf['bibfile'])
for font in ['main_font', 'sans_font', 'mono_font']:
font_value = ''
if self.config.pdf[font]:
Expand Down
4 changes: 2 additions & 2 deletions d2lbook/sphinx_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
rsvg_converter_args = ['-z', '0.8']
bibtex_bibfiles = ['d2l.bib']
bibtex_bibfiles = ["BIBFILE"]
latex_engine = 'xelatex' # for utf-8 supports
latex_show_pagerefs = True
Expand Down Expand Up @@ -409,7 +409,7 @@ def setup(app):
}
.mdl-tabs__tab.is-active {
background: rgb(0,0,0,.09);
background: rgb(0,0,0,.09);
}
"""

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
'recommonmark',
'nbformat',
'nbconvert',
'sphinxcontrib-bibtex',
'sphinxcontrib-bibtex==2.4.2', # >=2.2 to enable citet and citep
'pybtex-apa-style',
'mu-notedown',
'mxtheme>=0.3.17',
Expand Down

0 comments on commit 89db4fe

Please sign in to comment.