# Start a new discussion

## Not signed in

Want to take part in these discussions? Sign in if you have an account, or apply for one below

## Site Tag Cloud

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

• CommentRowNumber1.
• CommentAuthorAndrew Stacey
• CommentTimeMay 4th 2010

I know that one or two others also use Emacs for composing nLab (and other?) articles. Possibly those that do already know this, but I just learnt about “Input Methods”. For those that don’t know, these are ways of inserting non-standard characters into an Emacs document, usually by composing keys. Emacs defines lots of different ways of doing this (example: in one method, typing e’ gets é whilst in another you type ’e).

So far, so good. The reason I feel the need to broadcast this to the world is that when scanning through the list of possible input methods, I found one called ’TeX’. Sure enough, when I turned it on, I found that typing "o gave me ö! So I don’t have to learn a whole new set of commands to enter accented characters any more!

(I don’t know if it would recognise mathematical symbols like \infty … quick check … hmm, it ought to but something must be wrong with my character encoding)

• CommentRowNumber2.
• CommentAuthorMike Shulman
• CommentTimeMay 4th 2010

I’ve been using this for a while – it’s the only way I have to enter non-ascii characters, short of digging through the Character Map, since I still haven’t managed to figure out how to use SCIM. It does \infty fine for me. Perhaps it should go in the FAQ or HowTo.

• CommentRowNumber3.
• CommentAuthorTobyBartels
• CommentTimeMay 4th 2010

Although for some reason the characters aren’t showing up in your post!

• CommentRowNumber4.
• CommentAuthorAndrew Stacey
• CommentTimeMay 4th 2010

That is really bizarre. Something is stripping out entities. It’s fine with numerical ones, though: &#x00e9; produces é but &eacute; produces nothing. Ah, well. Another happy evening hunting bugs.

Mike, I figured out that the reason \infty wasn’t working for me was because my font isn’t a full unicode one. What font are you using for Emacs - I remember a while back going through loads of them to try to find one that looked good and had lots of characters but obviously the one I picked then isn’t quite good enough; any recommendations?

• CommentRowNumber5.
• CommentAuthorMike Shulman
• CommentTimeMay 5th 2010

My .emacs contains

(custom-set-faces
'(default ((t (:inherit nil :stipple nil :background "black" :foreground "white" :inverse-video nil
:box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 98
:width normal :foundry "bitstream" :family "Bitstream Vera Sans Mono"))))
...

• CommentRowNumber6.
• CommentAuthorAndrew Stacey
• CommentTimeMay 5th 2010

Found the bug. The sanitiser was skipping “text” nodes since its aim is to sanitise the XHTML, not the actual text. I thought that entities would simply be part of the enveloping text node, but that’s not true: they are their own special type of node. The sanitiser didn’t recognise that and so stripped them out. Adding an exception was simple.

What was harder was getting them to work properly in preview mode! I hadn’t noticed this, but the previewer doesn’t like entities either. It now silently converts then to utf-8 before sending them over the wire (that’s just in preview).

So I can now type ∞ ∫ and the like with aplomb.

(Hmm, but if I put in an entity that doesn’t exist, it complains; perhaps I should put in a safeguard for that)