mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-18 21:23:02 +00:00
Improved rendering of equations in HTML documentation generated by Doxygen. Make use of MathJax 2.x if found
This commit is contained in:
parent
e241bbb0f3
commit
a95ca8c42b
@ -2565,6 +2565,14 @@ set_package_properties(LATEX PROPERTIES
|
||||
PURPOSE "Used to generate a PDF manual by doing '${CMAKE_MAKE_PROGRAM_PRETTY_NAME} pdfmanual'"
|
||||
TYPE OPTIONAL
|
||||
)
|
||||
find_package(MATHJAX2)
|
||||
set_package_properties(MATHJAX2 PROPERTIES
|
||||
URL "https://www.mathjax.org"
|
||||
DESCRIPTION "Beautiful and accessible math in all browsers"
|
||||
PURPOSE "Used to generate equations in HTML docs."
|
||||
TYPE OPTIONAL
|
||||
)
|
||||
|
||||
if(DOXYGEN_FOUND)
|
||||
message(STATUS "Doxygen found.")
|
||||
message(STATUS " You can build the documentation with '${CMAKE_MAKE_PROGRAM_PRETTY_NAME} doc'.")
|
||||
@ -2605,10 +2613,13 @@ if(DOXYGEN_FOUND)
|
||||
endif()
|
||||
if(PDFLATEX_COMPILER)
|
||||
set(GENERATE_PDF_DOCUMENTATION "YES")
|
||||
set(GNSSSDR_USE_MATHJAX "NO")
|
||||
else()
|
||||
set(GENERATE_PDF_DOCUMENTATION "NO")
|
||||
endif()
|
||||
if(MATHJAX2_FOUND)
|
||||
set(GNSSSDR_USE_MATHJAX "YES")
|
||||
else()
|
||||
set(GNSSSDR_USE_MATHJAX "NO")
|
||||
endif()
|
||||
configure_file(${CMAKE_SOURCE_DIR}/docs/doxygen/Doxyfile.in
|
||||
${CMAKE_BINARY_DIR}/docs/doxygen/Doxyfile
|
||||
|
60
cmake/Modules/FindMATHJAX2.cmake
Normal file
60
cmake/Modules/FindMATHJAX2.cmake
Normal file
@ -0,0 +1,60 @@
|
||||
# Copyright (C) 2011-2020 (see AUTHORS file for a list of contributors)
|
||||
#
|
||||
# GNSS-SDR is a software-defined Global Navigation Satellite Systems receiver
|
||||
#
|
||||
# This file is part of GNSS-SDR.
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
#
|
||||
#
|
||||
# Find MathJax package (version 2).
|
||||
#
|
||||
# A hint can be provided by defining MATHJAX2_ROOT
|
||||
# (will succeed if ${MATHJAX2_ROOT}/MathJax.js is found).
|
||||
#
|
||||
# Alternatively, a path can be provided in MATHJAX2_USE_ROOT
|
||||
# so that ${MATHJAX2_USE_ROOT}/MathJax.js is used without
|
||||
# checking its existence.
|
||||
# This path could be a URL, an absolute local path or
|
||||
# a path relative to the generated HTML folder.
|
||||
#
|
||||
# Note that version 2 and 3 are incompatible
|
||||
# and doxygen requires version 2.
|
||||
# See: https://github.com/doxygen/doxygen/issues/7346
|
||||
#
|
||||
# Defined variables:
|
||||
# - MATHJAX2_FOUND - True if MathJax found
|
||||
# - MATHJAX2_JS_PATH - Path to MathJax.js file
|
||||
# - MATHJAX2_PATH - Path to the MathJax root directory
|
||||
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS 3.11)
|
||||
if(__INCLUDED_MATHJAX2)
|
||||
return()
|
||||
endif()
|
||||
set(__INCLUDED_MATHJAX2 TRUE)
|
||||
else()
|
||||
include_guard()
|
||||
endif()
|
||||
|
||||
if(DEFINED MATHJAX2_USE_ROOT)
|
||||
set(MATHJAX2_FOUND TRUE)
|
||||
set(MATHJAX2_PATH "${MATHJAX2_USE_ROOT}/")
|
||||
set(MATHJAX2_JS_PATH "${MATHJAX2_USE_ROOT}/MathJax.js")
|
||||
else()
|
||||
find_file(MATHJAX2_JS_PATH
|
||||
NAMES
|
||||
MathJax.js
|
||||
PATHS
|
||||
"${MATHJAX2_ROOT}"
|
||||
/usr/share/mathjax2/
|
||||
/usr/share/javascript/mathjax/
|
||||
/usr/local/share/javascript/mathjax/
|
||||
)
|
||||
|
||||
get_filename_component(MATHJAX2_PATH ${MATHJAX2_JS_PATH} DIRECTORY)
|
||||
|
||||
find_package_handle_standard_args(MATHJAX2 DEFAULT_MSG MATHJAX2_JS_PATH)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(MATHJAX2_JS_PATH)
|
@ -64,6 +64,8 @@ SPDX-FileCopyrightText: 2011-2020 Carles Fernandez-Prades <carles.fernandez@cttc
|
||||
length sample types.
|
||||
- Fixed the `obsdiff` and `rinex2assist` utilities when installed if they were
|
||||
built with a locally downloaded version of GPSTk.
|
||||
- Improved rendering of equations in HTML documentation generated by Doxygen.
|
||||
Make use of MathJax 2.x if found.
|
||||
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user