mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-17 05:55:43 +02:00
Version19.147
This commit is contained in:
parent
78016d202f
commit
adbad19129
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
|
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
|
||||||
|
|
||||||
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-36325941080838130" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-35785511966438130" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||||
|
|
||||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||||
|
|
||||||
|
|
25
js/mathjax-config.js
Normal file
25
js/mathjax-config.js
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
MathJax = {
|
||||||
|
/* Bug fix for 3.0.1 version.
|
||||||
|
Test and delete if a new version works.
|
||||||
|
https://www.bountysource.com/issues/88419745-processescapes-set-to-true-doesn-t-work */
|
||||||
|
startup: {
|
||||||
|
pageReady() {
|
||||||
|
const options = MathJax.startup.document.options;
|
||||||
|
const BaseMathItem = options.MathItem;
|
||||||
|
options.MathItem = class FixedMathItem extends BaseMathItem {
|
||||||
|
assistiveMml(document) {
|
||||||
|
if (this.display !== null) super.assistiveMml(document);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return MathJax.startup.defaultPageReady();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/* end of bug fix */
|
||||||
|
tex: {
|
||||||
|
/* inlineMath: [['$', '$'], ['\\(', '\\)']] // Uncomment to use $...$ for inline math */
|
||||||
|
inlineMath: [['\\(', '\\)']]
|
||||||
|
},
|
||||||
|
svg: {
|
||||||
|
fontCache: 'global'
|
||||||
|
}
|
||||||
|
};
|
|
@ -497,7 +497,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
|
||||||
En OpenSWAD:
|
En OpenSWAD:
|
||||||
ps2pdf source.ps destination.pdf
|
ps2pdf source.ps destination.pdf
|
||||||
*/
|
*/
|
||||||
#define Log_PLATFORM_VERSION "SWAD 19.146 (2020-03-12)"
|
#define Log_PLATFORM_VERSION "SWAD 19.147 (2020-03-14)"
|
||||||
#define CSS_FILE "swad19.146.css"
|
#define CSS_FILE "swad19.146.css"
|
||||||
#define JS_FILE "swad19.91.1.js"
|
#define JS_FILE "swad19.91.1.js"
|
||||||
/*
|
/*
|
||||||
|
@ -523,7 +523,10 @@ Param
|
||||||
// TODO: Miguel Damas: al principio de los exámenes tendría que poner cuánto resta cada pregunta
|
// TODO: Miguel Damas: al principio de los exámenes tendría que poner cuánto resta cada pregunta
|
||||||
// TODO: Si el alumno ha marcado "Permitir que los profesores...", entonces pedir confirmación al pulsar el botón azul, para evitar que se envíe por error antes de tiempo
|
// TODO: Si el alumno ha marcado "Permitir que los profesores...", entonces pedir confirmación al pulsar el botón azul, para evitar que se envíe por error antes de tiempo
|
||||||
// TODO: Oresti Baños: cambiar ojos por candados en descriptores para prohibir/permitir y dejar los ojos para poder elegir descriptores
|
// TODO: Oresti Baños: cambiar ojos por candados en descriptores para prohibir/permitir y dejar los ojos para poder elegir descriptores
|
||||||
// TODO: Instalar la última versión de MathJax de https://www.jsdelivr.com/package/npm/mathjax y comprobar que funciona bien con pandoc
|
|
||||||
|
Version 19.147: Mar 14, 2020 Change MathJax to version 3.0.1. (282550 lines)
|
||||||
|
Copy the following JavaScript file to public directory:
|
||||||
|
sudo cp js/mathjax-config.js /var/www/html/swad/
|
||||||
|
|
||||||
Version 19.146: Mar 12, 2020 Background and changes in layout of matches. (282484 lines)
|
Version 19.146: Mar 12, 2020 Background and changes in layout of matches. (282484 lines)
|
||||||
Copy the following background image to icon public directory:
|
Copy the following background image to icon public directory:
|
||||||
|
|
14
swad_info.c
14
swad_info.c
|
@ -1791,6 +1791,7 @@ static bool Inf_CheckAndShowRichTxt (void)
|
||||||
fclose (FileMD);
|
fclose (FileMD);
|
||||||
|
|
||||||
/***** Convert from Markdown to HTML *****/
|
/***** Convert from Markdown to HTML *****/
|
||||||
|
/* MathJax 2.5.1
|
||||||
#ifdef Cfg_MATHJAX_LOCAL
|
#ifdef Cfg_MATHJAX_LOCAL
|
||||||
// Use the local copy of MathJax
|
// Use the local copy of MathJax
|
||||||
snprintf (MathJaxURL,sizeof (MathJaxURL),
|
snprintf (MathJaxURL,sizeof (MathJaxURL),
|
||||||
|
@ -1799,6 +1800,17 @@ static bool Inf_CheckAndShowRichTxt (void)
|
||||||
#else
|
#else
|
||||||
// Use the MathJax Content Delivery Network (CDN)
|
// Use the MathJax Content Delivery Network (CDN)
|
||||||
MathJaxURL[0] = '\0';
|
MathJaxURL[0] = '\0';
|
||||||
|
#endif
|
||||||
|
*/
|
||||||
|
/* MathJax 3.0.1 */
|
||||||
|
#ifdef Cfg_MATHJAX_LOCAL
|
||||||
|
// Use the local copy of MathJax
|
||||||
|
snprintf (MathJaxURL,sizeof (MathJaxURL),
|
||||||
|
"=%s/mathjax/tex-chtml.js",
|
||||||
|
Cfg_URL_SWAD_PUBLIC);
|
||||||
|
#else
|
||||||
|
// Use the MathJax Content Delivery Network (CDN)
|
||||||
|
MathJaxURL[0] = '\0';
|
||||||
#endif
|
#endif
|
||||||
// --ascii uses only ascii characters in output
|
// --ascii uses only ascii characters in output
|
||||||
// (uses numerical entities instead of UTF-8)
|
// (uses numerical entities instead of UTF-8)
|
||||||
|
@ -1806,7 +1818,7 @@ static bool Inf_CheckAndShowRichTxt (void)
|
||||||
snprintf (Command,sizeof (Command),
|
snprintf (Command,sizeof (Command),
|
||||||
"iconv -f WINDOWS-1252 -t UTF-8 %s"
|
"iconv -f WINDOWS-1252 -t UTF-8 %s"
|
||||||
" | "
|
" | "
|
||||||
"pandoc --ascii --mathjax%s -f markdown -t html5"
|
"pandoc --ascii --mathjax%s -f markdown_github+tex_math_dollars -t html5"
|
||||||
" | "
|
" | "
|
||||||
"iconv -f UTF-8 -t WINDOWS-1252 -o %s",
|
"iconv -f UTF-8 -t WINDOWS-1252 -o %s",
|
||||||
PathFileMD,
|
PathFileMD,
|
||||||
|
|
|
@ -646,17 +646,8 @@ static void Lay_WriteScripts (void)
|
||||||
|
|
||||||
static void Lay_WriteScriptMathJax (void)
|
static void Lay_WriteScriptMathJax (void)
|
||||||
{
|
{
|
||||||
// MathJax configuration
|
/* MathJax 2.5.1 (obsolete) */
|
||||||
/*
|
/*
|
||||||
HTM_SCRIPT_Begin (NULL,NULL);
|
|
||||||
fprintf (Gbl.F.Out," window.MathJax = {"
|
|
||||||
" tex2jax: {"
|
|
||||||
" inlineMath: [ ['$','$'], [\"\\\\(\",\"\\\\)\"] ],"
|
|
||||||
" processEscapes: true"
|
|
||||||
" }"
|
|
||||||
" };");
|
|
||||||
HTM_SCRIPT_End ();
|
|
||||||
*/
|
|
||||||
#ifdef Cfg_MATHJAX_LOCAL
|
#ifdef Cfg_MATHJAX_LOCAL
|
||||||
// Use the local copy of MathJax
|
// Use the local copy of MathJax
|
||||||
HTM_SCRIPT_Begin (Cfg_URL_SWAD_PUBLIC "/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML",NULL);
|
HTM_SCRIPT_Begin (Cfg_URL_SWAD_PUBLIC "/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML",NULL);
|
||||||
|
@ -665,6 +656,78 @@ static void Lay_WriteScriptMathJax (void)
|
||||||
HTM_SCRIPT_Begin ("//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML",NULL);
|
HTM_SCRIPT_Begin ("//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML",NULL);
|
||||||
#endif
|
#endif
|
||||||
HTM_SCRIPT_End ();
|
HTM_SCRIPT_End ();
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* MathJax 3.0.1 (march 2020)
|
||||||
|
Source:
|
||||||
|
http://docs.mathjax.org/en/latest/web/configuration.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Configuration Using an In-Line Script */
|
||||||
|
/*
|
||||||
|
HTM_Txt ("<script type=\"text/x-mathjax-config\">\n"
|
||||||
|
"MathJax = {\n"
|
||||||
|
" tex: {\n"
|
||||||
|
" inlineMath: [['$','$'], ['\\\\(','\\\\)']]\n"
|
||||||
|
" }\n"
|
||||||
|
"};\n"
|
||||||
|
"</script>");
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Using a Local File for Configuration
|
||||||
|
|
||||||
|
Using a Local File for Configuration
|
||||||
|
|
||||||
|
If you are using the same MathJax configuration over multiple pages,
|
||||||
|
you may find it convenient to store your configuration
|
||||||
|
in a separate JavaScript file that you load into the page.
|
||||||
|
For example, you could create a file called mathjax-config.js that contains
|
||||||
|
|
||||||
|
window.MathJax = {
|
||||||
|
tex: {
|
||||||
|
inlineMath: [['$', '$'], ['\\(', '\\)']],
|
||||||
|
},
|
||||||
|
svg: {
|
||||||
|
fontCache: 'global'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
and then use
|
||||||
|
|
||||||
|
<script src="mathjax-config.js" defer></script>
|
||||||
|
<script type="text/javascript" id="MathJax-script" defer
|
||||||
|
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js">
|
||||||
|
</script>
|
||||||
|
|
||||||
|
to first load your configuration file,
|
||||||
|
and then load the tex-svg component from the jsdelivr CDN.
|
||||||
|
|
||||||
|
Note that here we use the defer attribute on both scripts
|
||||||
|
so that they will execute in order,
|
||||||
|
but still not block the rest of the page
|
||||||
|
while the files are being downloaded to the browser.
|
||||||
|
If the async attribute were used,
|
||||||
|
there is no guarantee that the configuration would run first,
|
||||||
|
and so you could get instances
|
||||||
|
where MathJax doesn't get properly configured,
|
||||||
|
and they would seem to occur randomly.
|
||||||
|
*/
|
||||||
|
HTM_TxtF ("<script src=\"%s/mathjax-config.js\" defer>\n"
|
||||||
|
"</script>\n",
|
||||||
|
Cfg_URL_SWAD_PUBLIC);
|
||||||
|
|
||||||
|
#ifdef Cfg_MATHJAX_LOCAL
|
||||||
|
// Use the local copy of MathJax
|
||||||
|
HTM_TxtF ("<script type=\"text/javascript\" id=\"MathJax-script\" defer"
|
||||||
|
" src=\"%s/mathjax/tex-chtml.js\">\n"
|
||||||
|
"</script>\n",
|
||||||
|
Cfg_URL_SWAD_PUBLIC);
|
||||||
|
#else
|
||||||
|
// Use the MathJax Content Delivery Network (CDN)
|
||||||
|
HTM_TxtF ("<script type=\"text/javascript\" id=\"MathJax-script\" defer"
|
||||||
|
" src=\"https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js\">\n"
|
||||||
|
"</script>\n");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -1041,6 +1041,7 @@ void Tst_WriteQstStem (const char *Stem,const char *ClassStem,bool Visible)
|
||||||
Lay_NotEnoughMemoryExit ();
|
Lay_NotEnoughMemoryExit ();
|
||||||
Str_Copy (StemRigorousHTML,Stem,
|
Str_Copy (StemRigorousHTML,Stem,
|
||||||
StemLength);
|
StemLength);
|
||||||
|
|
||||||
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
||||||
StemRigorousHTML,StemLength,false);
|
StemRigorousHTML,StemLength,false);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user