emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Where does CDATA come from?
@ 2021-11-22  4:57 Diego Rodriguez
  0 siblings, 0 replies; only message in thread
From: Diego Rodriguez @ 2021-11-22  4:57 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2358 bytes --]


I am customizing my org-mode installation but there is something that I
don't understand.

When I execute the following statement:

(setq org-html-mathjax-template

<script type=\"text/x-mathjax-config\">
        displayAlign: \"%ALIGN\",
        displayIndent: \"%INDENT\",
        \"HTML-CSS\": { scale: %SCALE,
                        linebreaks: { automatic: \"%LINEBREAKS\" },
                        webFont: \"%FONT\"
        SVG: {scale: %SCALE,
              linebreaks: { automatic: \"%LINEBREAKS\" },
              font: \"%FONT\"},
        NativeMML: {scale: %SCALE},
        TeX: { equationNumbers: {autoNumber: \"%AUTONUMBER\"},
               MultLineWidth: \"%MULTLINEWIDTH\",
               TagSide: \"%TAGSIDE\",
               TagIndent: \"%TAGINDENT\"
<script src=\"%PATH\"></script>

A `CDATA` tag gets appended in my HTML export as shown below:

  <script type="text/x-mathjax-config">
        displayalign: "center",
        displayindent: "0em",
        "html-css": { scale: 100,
                        linebreaks: { automatic: "false" },
                        webfont: "TeX"
        svg: {scale: 100,
              linebreaks: { automatic: "false" },
              font: "TeX"},
        nativemml: {scale: 100},
        tex: { equationnumbers: {autonumber: "AMS"},
               multlinewidth: "85%",
               tagside: "right",
               tagindent: ".8em"
  <script src=

As you can see above, when I set the variable I have no CDATA tag on it.
Where does this tag come from? The problem is that the CDATA tag messes up
with the MathJax configuration parser, as it expects a JavaScript script
inside. But, instead, it finds a CDATA tag that, while it might be valid
according to W3, the MathJax parser throws an `eval` error in the console
since it tries to parse the body of that HTML node.

Where does this CDATA tag gets added automatically and how can I modify
this behavior?

Diego Rodriguez
M.S. Candidate in Connective Media
Jacobs Technion-Cornell Institute at Cornell Tech

[-- Attachment #2: Type: text/html, Size: 3975 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-22  5:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-22  4:57 Where does CDATA come from? Diego Rodriguez

Code repositories for project(s) associated with this inbox:


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).