Introducing central MATHJAX_CODEFILE

Currently the needed extra definitions for MathJax usage (i.e. `\newcommand` and `\def` commaonds) are distributed over the header file and in a number of source code files.
Doxygen has the possibility for a centralize this by means of the MATHJAX_CODEFILE configuration setting, this has been implemented.
This commit is contained in:
albert-github 2020-04-13 12:37:57 +02:00
parent 2167d4ffef
commit e5177aa014
21 changed files with 101 additions and 232 deletions

View File

@ -1595,7 +1595,7 @@ MATHJAX_EXTENSIONS = TeX/AMSmath \
# example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES.
MATHJAX_CODEFILE =
MATHJAX_CODEFILE = ${CGAL_DOC_RESOURCE_DIR}/CGAL_mathjax.js
# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
# the HTML output. The underlying search engine uses javascript and DHTML and

View File

@ -0,0 +1,32 @@
//<![CDATA[
MathJax.Hub.Config(
{
TeX: {
Macros: {
qprel: [ "\( {\\gtreqless} \)", 0],
qpx: [ "\( {\\mathbf{x}} \)", 0],
qpl: [ "\( {\\mathbf{l}} \)", 0],
qpu: [ "\( {\\mathbf{u}} \)", 0],
qpc: [ "\( {\\mathbf{c}} \)", 0],
qpb: [ "\( {\\mathbf{b}} \)", 0],
qpy: [ "\( {\\mathbf{y}} \)", 0],
qpw: [ "\( {\\mathbf{w}} \)", 0],
qplambda: [ "\( {\\mathbf{\\lambda}} \)", 0],
ssWpoint: [ "\( {\\bf #1} \)", 1],
ssWeight: [ "\( {w_{#1}} \)", 1],
dabs: [ "\( {\\parallel\\! #1 \\!\\parallel} \)", 1],
E: [ "\( {\\mathrm{E}} \)", 0],
A: [ "\( {\\mathrm{A}} \)", 0],
R: [ "\( {\\mathrm{R}} \)", 0],
N: [ "\( {\\mathrm{N}} \)", 0],
Q: [ "\( {\\mathrm{Q}} \)", 0],
Z: [ "\( {\\mathrm{Z}} \)", 0],
ccSum: [ "\( {\\sum_{#1}^{#2}{#3}} \)", 3],
ccProd: [ "\( {\\prod_{#1}^{#2}{#3}} \)", 3],
pyr: [ "\( {\\operatorname{Pyr}} \)", 0],
aff: [ "\( {\\operatorname{aff}} \)", 0],
}
}
}
);
//]]>

View File

@ -22,19 +22,6 @@ $mathjax
$extrastylesheet
</head>
<body>
<!-- Custom mathjax -->
<!-- TODO: Remove this with MATHJAX_CODEFILE -->
<span style="display:none">\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \)
\( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \)
\(
\def\ccSum #1#2#3{
\sum_{#1}^{#2}{#3}
}
\def\ccProd #1#2#3{
\sum_{#1}^{#2}{#3}
}\)
</span>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="back-nav">
<ul>

View File

@ -46,19 +46,6 @@ $mathjax
$extrastylesheet
</head>
<body>
<!-- Custom mathjax -->
<!-- TODO: Remove this with MATHJAX_CODEFILE -->
<span style="display:none">\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \)
\( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \)
\(
\def\ccSum #1#2#3{
\sum_{#1}^{#2}{#3}
}
\def\ccProd #1#2#3{
\sum_{#1}^{#2}{#3}
}\)
</span>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="back-nav">
<ul>

View File

@ -1587,7 +1587,7 @@ MATHJAX_EXTENSIONS = TeX/AMSmath \
# example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES.
MATHJAX_CODEFILE =
MATHJAX_CODEFILE = ${CGAL_DOC_RESOURCE_DIR}/CGAL_mathjax.js
# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
# the HTML output. The underlying search engine uses javascript and DHTML and

View File

@ -0,0 +1,32 @@
//<![CDATA[
MathJax.Hub.Config(
{
TeX: {
Macros: {
qprel: [ "\( {\\gtreqless} \)", 0],
qpx: [ "\( {\\mathbf{x}} \)", 0],
qpl: [ "\( {\\mathbf{l}} \)", 0],
qpu: [ "\( {\\mathbf{u}} \)", 0],
qpc: [ "\( {\\mathbf{c}} \)", 0],
qpb: [ "\( {\\mathbf{b}} \)", 0],
qpy: [ "\( {\\mathbf{y}} \)", 0],
qpw: [ "\( {\\mathbf{w}} \)", 0],
qplambda: [ "\( {\\mathbf{\\lambda}} \)", 0],
ssWpoint: [ "\( {\\bf #1} \)", 1],
ssWeight: [ "\( {w_{#1}} \)", 1],
dabs: [ "\( {\\parallel\\! #1 \\!\\parallel} \)", 1],
E: [ "\( {\\mathrm{E}} \)", 0],
A: [ "\( {\\mathrm{A}} \)", 0],
R: [ "\( {\\mathrm{R}} \)", 0],
N: [ "\( {\\mathrm{N}} \)", 0],
Q: [ "\( {\\mathrm{Q}} \)", 0],
Z: [ "\( {\\mathrm{Z}} \)", 0],
ccSum: [ "\( {\\sum_{#1}^{#2}{#3}} \)", 3],
ccProd: [ "\( {\\prod_{#1}^{#2}{#3}} \)", 3],
pyr: [ "\( {\\operatorname{Pyr}} \)", 0],
aff: [ "\( {\\operatorname{aff}} \)", 0],
}
}
}
);
//]]>

View File

@ -22,19 +22,6 @@ $mathjax
$extrastylesheet
</head>
<body>
<!-- Custom mathjax -->
<!-- TODO: Remove this with MATHJAX_CODEFILE -->
<span style="display:none">\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \)
\( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \)
\(
\def\ccSum #1#2#3{
\sum_{#1}^{#2}{#3}
}
\def\ccProd #1#2#3{
\sum_{#1}^{#2}{#3}
}\)
</span>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="back-nav">
<ul>

View File

@ -46,19 +46,6 @@ $mathjax
$extrastylesheet
</head>
<body>
<!-- Custom mathjax -->
<!-- TODO: Remove this with MATHJAX_CODEFILE -->
<span style="display:none">\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \)
\( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \)
\(
\def\ccSum #1#2#3{
\sum_{#1}^{#2}{#3}
}
\def\ccProd #1#2#3{
\sum_{#1}^{#2}{#3}
}\)
</span>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="back-nav">
<ul>

View File

@ -1340,7 +1340,7 @@ 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.
MATHJAX_CODEFILE =
MATHJAX_CODEFILE = ${CGAL_DOC_RESOURCE_DIR}/CGAL_mathjax.js
# When the SEARCHENGINE tag is enabled doxygen will generate a search box
# for the HTML output. The underlying search engine uses javascript

View File

@ -0,0 +1,32 @@
//<![CDATA[
MathJax.Hub.Config(
{
TeX: {
Macros: {
qprel: [ "\( {\\gtreqless} \)", 0],
qpx: [ "\( {\\mathbf{x}} \)", 0],
qpl: [ "\( {\\mathbf{l}} \)", 0],
qpu: [ "\( {\\mathbf{u}} \)", 0],
qpc: [ "\( {\\mathbf{c}} \)", 0],
qpb: [ "\( {\\mathbf{b}} \)", 0],
qpy: [ "\( {\\mathbf{y}} \)", 0],
qpw: [ "\( {\\mathbf{w}} \)", 0],
qplambda: [ "\( {\\mathbf{\\lambda}} \)", 0],
ssWpoint: [ "\( {\\bf #1} \)", 1],
ssWeight: [ "\( {w_{#1}} \)", 1],
dabs: [ "\( {\\parallel\\! #1 \\!\\parallel} \)", 1],
E: [ "\( {\\mathrm{E}} \)", 0],
A: [ "\( {\\mathrm{A}} \)", 0],
R: [ "\( {\\mathrm{R}} \)", 0],
N: [ "\( {\\mathrm{N}} \)", 0],
Q: [ "\( {\\mathrm{Q}} \)", 0],
Z: [ "\( {\\mathrm{Z}} \)", 0],
ccSum: [ "\( {\\sum_{#1}^{#2}{#3}} \)", 3],
ccProd: [ "\( {\\prod_{#1}^{#2}{#3}} \)", 3],
pyr: [ "\( {\\operatorname{Pyr}} \)", 0],
aff: [ "\( {\\operatorname{aff}} \)", 0],
}
}
}
);
//]]>

View File

@ -11,7 +11,6 @@
<link href="$relpath$../Manual/cgal_stylesheet.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="$relpath$../Manual/jquery.js"></script>
<script type="text/javascript" src="$relpath$../Manual/dynsections.js"></script>
<script src="@CGAL_DOC_MATHJAX_LOCATION@/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script>
<script src="$relpath$../Manual/hacks.js" type="text/javascript"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
@ -26,19 +25,9 @@
$(document).ready(initResizable);
</script>
$search
$mathjax
</head>
<body>
<span style="display:none">\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \)
\( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \)
\(
\def\ccSum #1#2#3{
\sum_{#1}^{#2}{#3}
}
\def\ccProd #1#2#3{
\sum_{#1}^{#2}{#3}
}\)
</span>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="back-nav">
<ul>

View File

@ -40,22 +40,11 @@ MathJax.Hub.Config({
TeX: { equationNumbers: { autoNumber: "AMS" } }
});
</script>
<script src="@CGAL_DOC_MATHJAX_LOCATION@/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script>
$mathjax
<script src="$relpath$../Manual/hacks.js" type="text/javascript"></script>
<script src="$relpath$modules.js" type="text/javascript"></script>
</head>
<body>
<span style="display:none">\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \)
\( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \)
\(
\def\ccSum #1#2#3{
\sum_{#1}^{#2}{#3}
}
\def\ccProd #1#2#3{
\sum_{#1}^{#2}{#3}
}\)
</span>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="back-nav">
<ul>

View File

@ -5,13 +5,6 @@ namespace CGAL {
\anchor Chapter_3D_Boolean_Operations_on_Nef_Polyhedra
\anchor chapterNef3
<span style="display:none">
\f$
\newcommand{\pyr}{\operatorname{Pyr}}
\newcommand{\aff}{\operatorname{aff}}
\f$
</span>
\cgalAutoToc
\authors Peter Hachenberger and Lutz Kettner

View File

@ -6,18 +6,6 @@ namespace CGAL {
An object of class `Linear_program_from_iterators` describes a linear program of the form
\f$
\newcommand{\qprel}{\gtreqless}
\newcommand{\qpx}{\mathbf{x}}
\newcommand{\qpl}{\mathbf{l}}
\newcommand{\qpu}{\mathbf{u}}
\newcommand{\qpc}{\mathbf{c}}
\newcommand{\qpb}{\mathbf{b}}
\newcommand{\qpy}{\mathbf{y}}
\newcommand{\qpw}{\mathbf{w}}
\newcommand{\qplambda}{\mathbf{\lambda}}
\f$
\f{eqnarray*}{
\mbox{(QP)}& \mbox{minimize}
& \qpc^{T}\qpx+c_0 \\
@ -277,18 +265,6 @@ make_quadratic_program_from_iterators (
An object of class `Nonnegative_linear_program_from_iterators` describes a linear program of the form
\f$
\newcommand{\qprel}{\gtreqless}
\newcommand{\qpx}{\mathbf{x}}
\newcommand{\qpl}{\mathbf{l}}
\newcommand{\qpu}{\mathbf{u}}
\newcommand{\qpc}{\mathbf{c}}
\newcommand{\qpb}{\mathbf{b}}
\newcommand{\qpy}{\mathbf{y}}
\newcommand{\qpw}{\mathbf{w}}
\newcommand{\qplambda}{\mathbf{\lambda}}
\f$
\f{eqnarray*}{
\mbox{(QP)}& \mbox{minimize}
&\qpc^{T}\qpx+c_0 \\
@ -368,17 +344,6 @@ public:
An object of class `Nonnegative_quadratic_program_from_iterators` describes a convex quadratic program of the form
\f$
\newcommand{\qprel}{\gtreqless}
\newcommand{\qpx}{\mathbf{x}}
\newcommand{\qpl}{\mathbf{l}}
\newcommand{\qpu}{\mathbf{u}}
\newcommand{\qpc}{\mathbf{c}}
\newcommand{\qpb}{\mathbf{b}}
\newcommand{\qpy}{\mathbf{y}}
\newcommand{\qpw}{\mathbf{w}}
\newcommand{\qplambda}{\mathbf{\lambda}}
\f$
\f{eqnarray*}{
\mbox{(QP)}& \mbox{minimize}
& \qpx^{T}D\qpx+\qpc^{T}\qpx+c_0 \\
@ -463,17 +428,6 @@ public:
An object of class `Quadratic_program_from_iterators` describes a convex quadratic program of the form
\f$
\newcommand{\qprel}{\gtreqless}
\newcommand{\qpx}{\mathbf{x}}
\newcommand{\qpl}{\mathbf{l}}
\newcommand{\qpu}{\mathbf{u}}
\newcommand{\qpc}{\mathbf{c}}
\newcommand{\qpb}{\mathbf{b}}
\newcommand{\qpy}{\mathbf{y}}
\newcommand{\qpw}{\mathbf{w}}
\newcommand{\qplambda}{\mathbf{\lambda}}
\f$
\f{eqnarray*}{
\mbox{(QP)}& \mbox{minimize}
& \qpx^{T}D\qpx+\qpc^{T}\qpx+c_0 \\
@ -567,17 +521,6 @@ public:
An object of class `Quadratic_program_from_mps` describes a convex quadratic program of the
general form
\f$
\newcommand{\qprel}{\gtreqless}
\newcommand{\qpx}{\mathbf{x}}
\newcommand{\qpl}{\mathbf{l}}
\newcommand{\qpu}{\mathbf{u}}
\newcommand{\qpc}{\mathbf{c}}
\newcommand{\qpb}{\mathbf{b}}
\newcommand{\qpy}{\mathbf{y}}
\newcommand{\qpw}{\mathbf{w}}
\newcommand{\qplambda}{\mathbf{\lambda}}
\f$
\f{eqnarray*}{
\mbox{(QP)}& \mbox{minimize}
& \qpx^{T}D\qpx+\qpc^{T}\qpx+c_0 \\
@ -781,18 +724,6 @@ namespace CGAL {
/*!
\ingroup PkgQPSolverClasses
\f$
\newcommand{\qprel}{\gtreqless}
\newcommand{\qpx}{\mathbf{x}}
\newcommand{\qpl}{\mathbf{l}}
\newcommand{\qpu}{\mathbf{u}}
\newcommand{\qpc}{\mathbf{c}}
\newcommand{\qpb}{\mathbf{b}}
\newcommand{\qpy}{\mathbf{y}}
\newcommand{\qpw}{\mathbf{w}}
\newcommand{\qplambda}{\mathbf{\lambda}}
\f$
An object of class `Quadratic_program` describes a convex quadratic program of the form
\f{eqnarray*}{
\mbox{(QP)}& \mbox{minimize}

View File

@ -7,19 +7,6 @@ namespace CGAL {
An object of class `Quadratic_program_solution` represents the solution of a linear or
convex quadratic program of the general form
\f$
\newcommand{\qprel}{\gtreqless}
\newcommand{\qpx}{\mathbf{x}}
\newcommand{\qpl}{\mathbf{l}}
\newcommand{\qpu}{\mathbf{u}}
\newcommand{\qpc}{\mathbf{c}}
\newcommand{\qpb}{\mathbf{b}}
\newcommand{\qpy}{\mathbf{y}}
\newcommand{\qpw}{\mathbf{w}}
\newcommand{\qplambda}{\mathbf{\lambda}}
\f$
\f{eqnarray*}{
\mbox{(QP)}& \mbox{minimize}
& \qpx^{T}D\qpx+\qpc^{T}\qpx+c_0 \\

View File

@ -5,18 +5,6 @@
A model of `LinearProgram` describes a linear program of the form
\f$
\newcommand{\qprel}{\gtreqless}
\newcommand{\qpx}{\mathbf{x}}
\newcommand{\qpl}{\mathbf{l}}
\newcommand{\qpu}{\mathbf{u}}
\newcommand{\qpc}{\mathbf{c}}
\newcommand{\qpb}{\mathbf{b}}
\newcommand{\qpy}{\mathbf{y}}
\newcommand{\qpw}{\mathbf{w}}
\newcommand{\qplambda}{\mathbf{\lambda}}
\f$
\f{eqnarray*}{
\mbox{(QP)}& \mbox{minimize}
& \qpc^{T}\qpx+c_0 \\

View File

@ -5,18 +5,6 @@
A model of `NonnegativeLinearProgram` describes a linear program of the form
\f$
\newcommand{\qprel}{\gtreqless}
\newcommand{\qpx}{\mathbf{x}}
\newcommand{\qpl}{\mathbf{l}}
\newcommand{\qpu}{\mathbf{u}}
\newcommand{\qpc}{\mathbf{c}}
\newcommand{\qpb}{\mathbf{b}}
\newcommand{\qpy}{\mathbf{y}}
\newcommand{\qpw}{\mathbf{w}}
\newcommand{\qplambda}{\mathbf{\lambda}}
\f$
\f{eqnarray*}{
\mbox{(QP)}& \mbox{minimize}
&\qpc^{T}\qpx+c_0 \\

View File

@ -5,17 +5,6 @@
A model of `NonnegativeQuadraticProgram` describes a convex quadratic program of the form
\f$
\newcommand{\qprel}{\gtreqless}
\newcommand{\qpx}{\mathbf{x}}
\newcommand{\qpl}{\mathbf{l}}
\newcommand{\qpu}{\mathbf{u}}
\newcommand{\qpc}{\mathbf{c}}
\newcommand{\qpb}{\mathbf{b}}
\newcommand{\qpy}{\mathbf{y}}
\newcommand{\qpw}{\mathbf{w}}
\newcommand{\qplambda}{\mathbf{\lambda}}
\f$
\f{eqnarray*}{
\mbox{(QP)}& \mbox{minimize}
& \qpx^{T}D\qpx+\qpc^{T}\qpx+c_0 \\

View File

@ -5,18 +5,6 @@
A model of `QuadraticProgram` describes a convex quadratic program of the form
\f$
\newcommand{\qprel}{\gtreqless}
\newcommand{\qpx}{\mathbf{x}}
\newcommand{\qpl}{\mathbf{l}}
\newcommand{\qpu}{\mathbf{u}}
\newcommand{\qpc}{\mathbf{c}}
\newcommand{\qpb}{\mathbf{b}}
\newcommand{\qpy}{\mathbf{y}}
\newcommand{\qpw}{\mathbf{w}}
\newcommand{\qplambda}{\mathbf{\lambda}}
\f$
\f{eqnarray*}{
\mbox{(QP)}& \mbox{minimize}
& \qpx^{T}D\qpx+\qpc^{T}\qpx+c_0 \\

View File

@ -8,18 +8,6 @@ namespace CGAL {
\authors Kaspar Fischer, Bernd G&auml;rtner, Sven Sch&ouml;nherr, and Frans Wessendorp
\f$
\newcommand{\qprel}{\gtreqless}
\newcommand{\qpx}{\mathbf{x}}
\newcommand{\qpl}{\mathbf{l}}
\newcommand{\qpu}{\mathbf{u}}
\newcommand{\qpc}{\mathbf{c}}
\newcommand{\qpb}{\mathbf{b}}
\newcommand{\qpy}{\mathbf{y}}
\newcommand{\qpw}{\mathbf{w}}
\newcommand{\qplambda}{\mathbf{\lambda}}
\f$
\section secQPdef Which Programs can be Solved?
This package lets you solve <I>convex quadratic programs</I> of the

View File

@ -5,11 +5,6 @@ namespace CGAL {
\mainpage User Manual
\anchor Chapter_3D_Skin_Surface_Meshing
\anchor chapterSkinSurface
\htmlonly
\( \newcommand\ssWpoint[1]{{\bf #1}} \)
\( \newcommand\ssWeight[1]{w_{#1}} \)
\( \newcommand{\dabs}[1]{{\parallel\! #1 \!\parallel}} \)
\endhtmlonly
\cgalAutoToc
\author Nico Kruithof