Skip to content

Commit

Permalink
Single quotes in typewriter mode (#1975)
Browse files Browse the repository at this point in the history
Avoid the mysterious CSS and apply
https://stackoverflow.com/a/78829349/16462950
  • Loading branch information
HeikoTheissen authored Aug 5, 2024
1 parent b0de947 commit 1e86835
Show file tree
Hide file tree
Showing 17 changed files with 82 additions and 56 deletions.
9 changes: 9 additions & 0 deletions docs/odata-csdl-json/odata-csdl-json.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,15 @@
</style>
<link rel="stylesheet" href="styles/markdown-styles-v1.7.3b.css" />
<link rel="stylesheet" href="styles/odata.css" />
<script type="text/javascript">
MathJax = {startup: {
ready() {
MathJax.startup.defaultReady();
MathJax.startup.document.outputJax.font.variant.monospace.chars
[0x2019] = [.611, -.287, .525, {f: "T", c: "'"}];
}
}};
</script>
<script src="https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js?features=es6"></script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js" type="text/javascript"></script>
</head>
Expand Down
7 changes: 0 additions & 7 deletions docs/odata-csdl-json/styles/odata.css
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,6 @@ mjx-container[display="true"] {
margin-left: 40px !important;
}

/* The following rule enables typewriter single quotes in maths, like $\hbox{\tt{'$Q$'}}$ */
mjx-c.mjx-c2019::before {
content: "\27" !important;
padding-right: 0.525em !important;
font-family: MJXZERO, MJXTEX-T;
}

code .er {
color: unset !important;
font-weight: unset !important;
Expand Down
9 changes: 9 additions & 0 deletions docs/odata-csdl-xml/odata-csdl-xml.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,15 @@
</style>
<link rel="stylesheet" href="styles/markdown-styles-v1.7.3b.css" />
<link rel="stylesheet" href="styles/odata.css" />
<script type="text/javascript">
MathJax = {startup: {
ready() {
MathJax.startup.defaultReady();
MathJax.startup.document.outputJax.font.variant.monospace.chars
[0x2019] = [.611, -.287, .525, {f: "T", c: "'"}];
}
}};
</script>
<script src="https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js?features=es6"></script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js" type="text/javascript"></script>
</head>
Expand Down
7 changes: 0 additions & 7 deletions docs/odata-csdl-xml/styles/odata.css
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,6 @@ mjx-container[display="true"] {
margin-left: 40px !important;
}

/* The following rule enables typewriter single quotes in maths, like $\hbox{\tt{'$Q$'}}$ */
mjx-c.mjx-c2019::before {
content: "\27" !important;
padding-right: 0.525em !important;
font-family: MJXZERO, MJXTEX-T;
}

code .er {
color: unset !important;
font-weight: unset !important;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,15 @@
</style>
<link rel="stylesheet" href="styles/markdown-styles-v1.7.3b.css" />
<link rel="stylesheet" href="styles/odata.css" />
<script type="text/javascript">
MathJax = {startup: {
ready() {
MathJax.startup.defaultReady();
MathJax.startup.document.outputJax.font.variant.monospace.chars
[0x2019] = [.611, -.287, .525, {f: "T", c: "'"}];
}
}};
</script>
<script src="https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js?features=es6"></script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js" type="text/javascript"></script>
</head>
Expand Down
7 changes: 0 additions & 7 deletions docs/odata-data-aggregation-ext/styles/odata.css
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,6 @@ mjx-container[display="true"] {
margin-left: 40px !important;
}

/* The following rule enables typewriter single quotes in maths, like $\hbox{\tt{'$Q$'}}$ */
mjx-c.mjx-c2019::before {
content: "\27" !important;
padding-right: 0.525em !important;
font-family: MJXZERO, MJXTEX-T;
}

code .er {
color: unset !important;
font-weight: unset !important;
Expand Down
9 changes: 9 additions & 0 deletions docs/odata-json-format/odata-json-format.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,15 @@
</style>
<link rel="stylesheet" href="styles/markdown-styles-v1.7.3b.css" />
<link rel="stylesheet" href="styles/odata.css" />
<script type="text/javascript">
MathJax = {startup: {
ready() {
MathJax.startup.defaultReady();
MathJax.startup.document.outputJax.font.variant.monospace.chars
[0x2019] = [.611, -.287, .525, {f: "T", c: "'"}];
}
}};
</script>
<script src="https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js?features=es6"></script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js" type="text/javascript"></script>
</head>
Expand Down
7 changes: 0 additions & 7 deletions docs/odata-json-format/styles/odata.css
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,6 @@ mjx-container[display="true"] {
margin-left: 40px !important;
}

/* The following rule enables typewriter single quotes in maths, like $\hbox{\tt{'$Q$'}}$ */
mjx-c.mjx-c2019::before {
content: "\27" !important;
padding-right: 0.525em !important;
font-family: MJXZERO, MJXTEX-T;
}

code .er {
color: unset !important;
font-weight: unset !important;
Expand Down
9 changes: 9 additions & 0 deletions docs/odata-protocol/odata-protocol.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,15 @@
</style>
<link rel="stylesheet" href="styles/markdown-styles-v1.7.3b.css" />
<link rel="stylesheet" href="styles/odata.css" />
<script type="text/javascript">
MathJax = {startup: {
ready() {
MathJax.startup.defaultReady();
MathJax.startup.document.outputJax.font.variant.monospace.chars
[0x2019] = [.611, -.287, .525, {f: "T", c: "'"}];
}
}};
</script>
<script src="https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js?features=es6"></script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js" type="text/javascript"></script>
</head>
Expand Down
7 changes: 0 additions & 7 deletions docs/odata-protocol/styles/odata.css
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,6 @@ mjx-container[display="true"] {
margin-left: 40px !important;
}

/* The following rule enables typewriter single quotes in maths, like $\hbox{\tt{'$Q$'}}$ */
mjx-c.mjx-c2019::before {
content: "\27" !important;
padding-right: 0.525em !important;
font-family: MJXZERO, MJXTEX-T;
}

code .er {
color: unset !important;
font-weight: unset !important;
Expand Down
9 changes: 9 additions & 0 deletions docs/odata-temporal-ext/odata-temporal-ext.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,15 @@
</style>
<link rel="stylesheet" href="styles/markdown-styles-v1.7.3b.css" />
<link rel="stylesheet" href="styles/odata.css" />
<script type="text/javascript">
MathJax = {startup: {
ready() {
MathJax.startup.defaultReady();
MathJax.startup.document.outputJax.font.variant.monospace.chars
[0x2019] = [.611, -.287, .525, {f: "T", c: "'"}];
}
}};
</script>
<script src="https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js?features=es6"></script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js" type="text/javascript"></script>
</head>
Expand Down
7 changes: 0 additions & 7 deletions docs/odata-temporal-ext/styles/odata.css
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,6 @@ mjx-container[display="true"] {
margin-left: 40px !important;
}

/* The following rule enables typewriter single quotes in maths, like $\hbox{\tt{'$Q$'}}$ */
mjx-c.mjx-c2019::before {
content: "\27" !important;
padding-right: 0.525em !important;
font-family: MJXZERO, MJXTEX-T;
}

code .er {
color: unset !important;
font-weight: unset !important;
Expand Down
9 changes: 9 additions & 0 deletions docs/odata-url-conventions/odata-url-conventions.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,15 @@
</style>
<link rel="stylesheet" href="styles/markdown-styles-v1.7.3b.css" />
<link rel="stylesheet" href="styles/odata.css" />
<script type="text/javascript">
MathJax = {startup: {
ready() {
MathJax.startup.defaultReady();
MathJax.startup.document.outputJax.font.variant.monospace.chars
[0x2019] = [.611, -.287, .525, {f: "T", c: "'"}];
}
}};
</script>
<script src="https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js?features=es6"></script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js" type="text/javascript"></script>
</head>
Expand Down
7 changes: 0 additions & 7 deletions docs/odata-url-conventions/styles/odata.css
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,6 @@ mjx-container[display="true"] {
margin-left: 40px !important;
}

/* The following rule enables typewriter single quotes in maths, like $\hbox{\tt{'$Q$'}}$ */
mjx-c.mjx-c2019::before {
content: "\27" !important;
padding-right: 0.525em !important;
font-family: MJXZERO, MJXTEX-T;
}

code .er {
color: unset !important;
font-weight: unset !important;
Expand Down
10 changes: 10 additions & 0 deletions lib/pandoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ module.exports = function (options) {
"-s",
"--eol=lf",
"--wrap=none",
"-V",
`header-includes=<script type="text/javascript">
MathJax = {startup: {
ready() {
MathJax.startup.defaultReady();
MathJax.startup.document.outputJax.font.variant.monospace.chars
[0x2019] = [.611, -.287, .525, {f: "T", c: "'"}];
}
}};
</script>`,
"-F",
"lib/md2html.js",
];
Expand Down
7 changes: 0 additions & 7 deletions styles/odata.css
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,6 @@ mjx-container[display="true"] {
margin-left: 40px !important;
}

/* The following rule enables typewriter single quotes in maths, like $\hbox{\tt{'$Q$'}}$ */
mjx-c.mjx-c2019::before {
content: "\27" !important;
padding-right: 0.525em !important;
font-family: MJXZERO, MJXTEX-T;
}

code .er {
color: unset !important;
font-weight: unset !important;
Expand Down
9 changes: 9 additions & 0 deletions test/test-data/test.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,15 @@
</style>
<link rel="stylesheet" href="styles/markdown-styles-v1.7.3b.css" />
<link rel="stylesheet" href="styles/odata.css" />
<script type="text/javascript">
MathJax = {startup: {
ready() {
MathJax.startup.defaultReady();
MathJax.startup.document.outputJax.font.variant.monospace.chars
[0x2019] = [.611, -.287, .525, {f: "T", c: "'"}];
}
}};
</script>
<script src="https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js?features=es6"></script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js" type="text/javascript"></script>
</head>
Expand Down

0 comments on commit 1e86835

Please sign in to comment.