Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use BibTeX citations in Doxygen #3304

Merged
merged 15 commits into from
Nov 15, 2019
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -472,9 +472,9 @@ run_tutorials:
run_doxygen:
<<: *global_job_definition
stage: additional_checks
image: gitlab.icp.uni-stuttgart.de:4567/espressomd/docker/ubuntu-python3:cuda-9.0
image: gitlab.icp.uni-stuttgart.de:4567/espressomd/docker/ubuntu-python3:cuda-10.1
needs:
- cuda9-maxset
- cuda10-maxset
when: on_success
only:
- python
Expand Down
12 changes: 12 additions & 0 deletions doc/doxygen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ if(DOXYGEN_FOUND)
DEPENDS EspressoConfig
)

# transform BibTeX DOI fields into URL fields (bibliographic
# styles available to Doxygen do not process the DOI field)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/bibliography.bib
COMMAND sed -r
"'s_^ *doi *= *([^0-9]+)(10\\.[0-9]+)_url=\\1https://dx.doi.org/\\2_'"
${CMAKE_CURRENT_SOURCE_DIR}/bibliography.bib >
${CMAKE_CURRENT_BINARY_DIR}/bibliography.bib
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bibliography.bib
)

set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in)
set(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)

Expand All @@ -17,6 +28,7 @@ if(DOXYGEN_FOUND)
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen"
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/doxy-features
${CMAKE_CURRENT_BINARY_DIR}/bibliography.bib
VERBATIM
)

Expand Down
7 changes: 4 additions & 3 deletions doc/doxygen/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ LAYOUT_FILE =
# of the bibliography can be controlled using LATEX_BIB_STYLE. To use this
# feature you need bibtex and perl available in the search path.

CITE_BIB_FILES =
CITE_BIB_FILES = bibliography.bib

#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
Expand Down Expand Up @@ -700,7 +700,8 @@ EXCLUDE_SYMLINKS = NO
# against the file with absolute path, so to exclude all test directories
# for example use the pattern */test/*

EXCLUDE_PATTERNS =
EXCLUDE_PATTERNS = @CMAKE_SOURCE_DIR@/*/unit_tests/* \
@CMAKE_SOURCE_DIR@/*/tests/*

# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
# (namespaces, classes, functions, etc.) that should be excluded from the
Expand Down Expand Up @@ -1315,7 +1316,7 @@ LATEX_SOURCE_CODE = NO
# bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See
# http://en.wikipedia.org/wiki/BibTeX for more info.

LATEX_BIB_STYLE = plain
LATEX_BIB_STYLE = plainnat

#---------------------------------------------------------------------------
# configuration options related to the RTF output
Expand Down
Loading