tijiao 合并food
This commit is contained in:
@@ -3,7 +3,25 @@ var commonSupColor = 'rgb(0,112,192)'//上角标颜色
|
||||
var commonTableTitleColor = 'rgb(210,90,90)'//上角标颜色
|
||||
var commonSupFontColor = 'color:rgb(0,112,192);'//上角标字体颜色
|
||||
|
||||
function loadMathJax(callback) {
|
||||
const script = document.createElement('script');
|
||||
|
||||
// 可选:配置 MathJax(必须在加载 script 前设置)
|
||||
window.MathJax = {
|
||||
tex: {
|
||||
inlineMath: [['$', '$'], ['\\(', '\\)']],
|
||||
displayMath: [['$$', '$$'], ['\\[', '\\]']]
|
||||
},
|
||||
startup: {
|
||||
typeset: false // 不自动 typeset,手动触发更灵活
|
||||
}
|
||||
};
|
||||
|
||||
script.src = 'https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js';
|
||||
script.onload = callback;
|
||||
document.head.appendChild(script);
|
||||
}
|
||||
loadMathJax()
|
||||
|
||||
// 列表
|
||||
function at_list() {
|
||||
@@ -8598,6 +8616,14 @@ function initArticleHtmlFun(arr, result, html_type) {
|
||||
|
||||
<img src="${picsrc}" onclick="${fun}" style="width: ${item.width ? `${item.width}px` : '80%'
|
||||
}" />
|
||||
<p class="font htmlImageTitle commonTableTitleColor" style="width: ${item.width ? `${item.width}px` : '100%'};
|
||||
|
||||
font-size: 14px;
|
||||
font-family: 'Charis SIL';
|
||||
font-weight:normal;
|
||||
line-height: 22px;
|
||||
text-align:center;" >${item.image.title ? item.image.title : ''
|
||||
}</p>
|
||||
<p class="font htmlImageNote" style="width: ${item.width ? `${item.width}px` : '100%'};
|
||||
|
||||
font-size: 14px;
|
||||
@@ -8658,13 +8684,12 @@ ${rowData
|
||||
})
|
||||
.join('')}
|
||||
</table>
|
||||
<p class="font" style="width: ${item.width ? `${item.width}px` : '100%'};
|
||||
|
||||
<p class="font" style="width: ${item.width ? `${item.width}px` : '100%'};
|
||||
font-size: 14px;
|
||||
font-family: 'Charis SIL';
|
||||
font-weight: 500 !important;
|
||||
line-height: 22px;
|
||||
text-align:center;color:#333;" >${item.table.note ? item.table.note : ''
|
||||
text-align:left;color:#333;" >${item.table.note ? item.table.note : ''
|
||||
}</p>
|
||||
</div>
|
||||
`;
|
||||
@@ -8726,7 +8751,13 @@ text-align:center;color:#333;" >${item.table.note ? item.table.note : ''
|
||||
initArticleHtml(arr, result.data.refers, html_type)
|
||||
}
|
||||
function initArticleHtml(htmlData, refs, type) {
|
||||
|
||||
document.querySelectorAll('wmath').forEach(el => {
|
||||
const latex = el.getAttribute('data-latex');
|
||||
if (latex) {
|
||||
el.innerHTML = latex;
|
||||
MathJax.typesetPromise([el]);
|
||||
}
|
||||
});
|
||||
$('.wen_rong .content-box .conthtmn .Ptitle').css({
|
||||
background: 'rgb(222, 235, 247)',
|
||||
'color': commonTableTitleColor, // No !important here
|
||||
@@ -8846,7 +8877,10 @@ function initArticleHtml(htmlData, refs, type) {
|
||||
this.style.setProperty('color', commonTableTitleColor, 'important');
|
||||
this.style.setProperty('text-align', 'center', 'important');
|
||||
});
|
||||
$('.wen_rong .content-box .conthtmn p b i').each(function () {
|
||||
$('.wen_rong .content-box .conthtmn .Ptitle b i').each(function () {
|
||||
this.style.setProperty('font-style', 'normal', 'important');
|
||||
});
|
||||
$('.wen_rong .content-box .conthtmn .Ptitle i b').each(function () {
|
||||
this.style.setProperty('font-style', 'normal', 'important');
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user