Search code examples
syntax-highlightingmediawikigeshi

Changing the font size of code formatted by SyntaxHighlight GeSHi in MediaWiki


The font size of my code snippets are too small relative to the default font size of the Wiki, which makes them hard to read (see below for an example). Is there anything I can do to change it?

Example:

enter image description here

The code that generates the above is:

==== Histograms ====
This is the code to compute the histogram:
<source lang="matlab">
nEls = numel(unique_vals);
edges = zeros(nEls+2,1);
</source>

Solution

  • Edit the MediaWiki:Geshi.css.

    Example:

    div.mw-geshi div,pre {
     font-family: monospace, "Courier New" !important;
     font-size:13px;
    }