我的代码片段的字体大小相对于 Wiki 的默认字体大小太小,这使得它们难以阅读(参见下面的示例)。我能做些什么来改变它吗?
例子:
生成上面的代码是:
==== Histograms ====
This is the code to compute the histogram:
<source lang="matlab">
nEls = numel(unique_vals);
edges = zeros(nEls+2,1);
</source>
我的代码片段的字体大小相对于 Wiki 的默认字体大小太小,这使得它们难以阅读(参见下面的示例)。我能做些什么来改变它吗?
例子:
生成上面的代码是:
==== Histograms ====
This is the code to compute the histogram:
<source lang="matlab">
nEls = numel(unique_vals);
edges = zeros(nEls+2,1);
</source>
例子:
div.mw-geshi div,pre {
font-family: monospace, "Courier New" !important;
font-size:13px;
}
编辑您的 SyntaxHighlight_GeSHi.class.php
将字体大小添加到以下行
$css[] = ".source-$lang {line-height: normal; font-size: 12px;}";
原来这是 MediaWiki 扩展中的一个错误。它在https://bugzilla.wikimedia.org/show_bug.cgi?id=26204的错误跟踪器中被引用
我们可以对其进行永久修复,将戳其他一些人以使其正确修复。
MediaWiki v1.19.23/24 与 geshi 1.0.8.11/12:
将文件编辑Mediawiki:Geshi.css
为:
/* CSS placed here will be applied to GeSHi syntax highlighting */
div.mw-geshi div,pre {
font-family: monospace, "Courier New" !important;
font-size:13px;
border: 1px dashed blue;
}
span.mw-geshi {
font-family: monospace, "Courier New" !important;
font-size:13px;
这适用于内联( <source lang="XXX" console="none">CODE</source>
) 和普通div ( <source lang="XXX">CODE</source>
)。现在source
首选替换为syntaxhighlight
。