Skip to content

Commit

Permalink
ENH: Doxygen use svg and mathjax
Browse files Browse the repository at this point in the history
Replace the Doxygen PNG object hierarchy figures with SVG files. Also
replace rendered math latex with mathjax javascript.

The size of the HTML Doxygen is reduced from 2.7GB to 884MB a 67%
reduction in size.
  • Loading branch information
blowekamp authored and hjmjohnson committed Jan 5, 2022
1 parent 94b80ea commit a3a87b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
5 changes: 1 addition & 4 deletions Utilities/Doxygen/CMakeLists.txt
Expand Up @@ -140,11 +140,8 @@ if (ITK_BUILD_DOCUMENTATION)
file(COPY workbox-cli-config.js serviceWorker.js.in
DESTINATION ${ITK_BINARY_DIR}/Utilities/Doxygen/)

find_package( LATEX )

if( NOT LATEX_COMPILER )
message( "Warning: LaTeX not found. Formulas will not be generated in documentation." )
endif()
find_package( LATEX )

# Custom command to generate a examples page which include all ITK examples
add_custom_command( OUTPUT "${ITK_BINARY_DIR}/Documentation/Doxygen/Examples.dox"
Expand Down
6 changes: 3 additions & 3 deletions Utilities/Doxygen/doxygen.config.in
Expand Up @@ -1533,7 +1533,7 @@ FORMULA_TRANSPARENT = YES
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.

USE_MATHJAX = NO
USE_MATHJAX = YES

# When MathJax is enabled you can set the default output format to be used for
# the MathJax output. See the MathJax site (see:
Expand All @@ -1556,7 +1556,7 @@ MATHJAX_FORMAT = HTML-CSS
# The default value is: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/.
# This tag requires that the tag USE_MATHJAX is set to YES.

MATHJAX_RELPATH = http://www.mathjax.org/mathjax
MATHJAX_RELPATH = https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/

# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
# extension names that should be enabled during MathJax rendering. For example
Expand Down Expand Up @@ -2476,7 +2476,7 @@ DIRECTORY_GRAPH = @ITK_DOXYGEN_DIAGRAMS@
# The default value is: png.
# This tag requires that the tag HAVE_DOT is set to YES.

DOT_IMAGE_FORMAT = png
DOT_IMAGE_FORMAT = svg

# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
# enable generation of interactive SVG images that allow zooming and panning.
Expand Down

0 comments on commit a3a87b7

Please sign in to comment.