From 8e01047cd8da2275a76c91cb248d16369c6ad7c7 Mon Sep 17 00:00:00 2001 From: albert-github Date: Tue, 24 May 2022 10:02:01 +0200 Subject: 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 --- src/Doxyfile.in | 4 ++-- src/cmake/modules/GUDHI_doxygen_target.cmake | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'src') 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 -- cgit v1.2.3