summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2022-05-24 10:02:01 +0200
committeralbert-github <albert.tests@gmail.com>2022-05-24 10:02:01 +0200
commit8e01047cd8da2275a76c91cb248d16369c6ad7c7 (patch)
tree06979695da05006d3453f65c4257ad611a30f8dc
parentfc28a5b76e47518e616a186f5db5be2a251c4b91 (diff)
Documentation: Render formulas by means of MathJax 3
Based on review, made a switch between MathJax 2 and MathJax 3 based on the doxygen version
-rw-r--r--src/Doxyfile.in4
-rw-r--r--src/cmake/modules/GUDHI_doxygen_target.cmake7
2 files changed, 9 insertions, 2 deletions
diff --git a/src/Doxyfile.in b/src/Doxyfile.in
index 834fcfc1..51a97952 100644
--- a/src/Doxyfile.in
+++ b/src/Doxyfile.in
@@ -1482,7 +1482,7 @@ USE_MATHJAX = YES
# The default value is: MathJax_2.
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_VERSION = MathJax_3
+@GUDHI_DOXYGEN_MATHJAX_VERSION@
# When MathJax is enabled you can set the default output format to be used for
# the MathJax output. See the MathJax site (see:
@@ -1512,7 +1512,7 @@ MATHJAX_RELPATH =
# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_EXTENSIONS = ams
+MATHJAX_EXTENSIONS = @GUDHI_DOXYGEN_MATHJAX_EXTENSIONS@
# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
# of code that will be used on startup of the MathJax code. See the MathJax site
diff --git a/src/cmake/modules/GUDHI_doxygen_target.cmake b/src/cmake/modules/GUDHI_doxygen_target.cmake
index 0f80b187..77fa02b5 100644
--- a/src/cmake/modules/GUDHI_doxygen_target.cmake
+++ b/src/cmake/modules/GUDHI_doxygen_target.cmake
@@ -44,6 +44,13 @@ if(DOXYGEN_FOUND)
set(GUDHI_DOXYGEN_UTILS_PATH "utilities/*")
endif()
+ if (DOXYGEN_VERSION VERSION_LESS 1.9.7)
+ set(GUDHI_DOXYGEN_MATHJAX_VERSION "MATHJAX_VERSION = MathJax_2")
+ set(GUDHI_DOXYGEN_MATHJAX_EXTENSIONS "TeX/AMSmath TeX/AMSsymbols")
+ else()
+ set(GUDHI_DOXYGEN_MATHJAX_VERSION "MATHJAX_VERSION = MathJax_3")
+ set(GUDHI_DOXYGEN_MATHJAX_EXTENSIONS "ams")
+ endif()
configure_file(${GUDHI_DOXYGEN_SOURCE_PREFIX}/Doxyfile.in "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile" @ONLY)
add_custom_target(doxygen ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile