Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Formatting broken for pre tags on OS X (and a fix)  (Read 1924 times)

danielnixon

  • Escaped Lunatic
    • View Profile
Formatting broken for pre tags on OS X (and a fix)
« on: March 13, 2011, 02:04:54 am »

The layout of diagrams/schematics/etc (anything in a pre tag) in the wiki is broken on OS X.

Here's a user script that replaces all pre tags' fonts with "Andale Mono". It works in Firefox with Greasemonkey, Opera & Chrome out-of-the-box and probably anything else that supports user scripts (though I didn't test Safari).

Before:
Spoiler (click to show/hide)

After:
Spoiler (click to show/hide)

The script (save as whatever.user.js and install as per your browser's instructions):
http://pastebin.com/LDMgTV5w
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Formatting broken for pre tags on OS X (and a fix)
« Reply #1 on: March 15, 2011, 09:17:54 pm »

Unfortunately, not everybody has that font - despite being bundled with MacOS X, modern versions of Windows (i.e. those released after 1999) use Lucida Console instead.

http://en.wikipedia.org/wiki/Andal%C3%A9_Mono
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

danielnixon

  • Escaped Lunatic
    • View Profile
Re: Formatting broken for pre tags on OS X (and a fix)
« Reply #2 on: March 17, 2011, 03:37:04 am »

Which isn't an issue because the alignment of the characters within pre tags is fine for Windows users. Only OS X users should install this user script.
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Formatting broken for pre tags on OS X (and a fix)
« Reply #3 on: March 17, 2011, 08:51:31 am »

The issue was that Briess had installed this directly into the wiki's CSS (i.e. for everybody) and broken the PRE tag for all Windows users; fortunately, fixing it was as simple as adding a ", monospace".
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

danielnixon

  • Escaped Lunatic
    • View Profile
Re: Formatting broken for pre tags on OS X (and a fix)
« Reply #4 on: March 17, 2011, 03:42:59 pm »

Oh right. Damn, sorry to have misled. Thanks Briess and Quietust.
« Last Edit: March 17, 2011, 06:59:09 pm by danielnixon »
Logged

Locriani

  • Bay Watcher
  • Locriani == Briess
    • View Profile
    • dwarf fortress wiki
Re: Formatting broken for pre tags on OS X (and a fix)
« Reply #5 on: March 21, 2011, 11:09:38 pm »

Thank Quietust, he fixes things.  I just break them :V
Logged
I am one of many administrators of the wiki.  Please use my user page (http://dwarffortresswiki.org/index.php/User_talk:Briess) on the wiki to contact me, as I check that more often than these forums.