- case '\\': return fputs ("\", out);
- case '"': return fputs (""", out);
- case '[': return fputs ("[", out);
- case ']': return fputs ("]", out);
- case '~': return fputs ("˜", out);
+ /* map to entities, fall-through to raw if !full */
+ case '$': if (full) return fputs ("$", out);
+ case '_': if (full) return fputs ("_", out);
+ case '%': if (full) return fputs ("%", out);
+ case '\\': if (full) return fputs ("\", out);
+ case '"': if (full) return fputs (""", out);
+ case '[': if (full) return fputs ("[", out);
+ case ']': if (full) return fputs ("]", out);
+ case '~': if (full) return fputs ("˜", out);
+ case '|': if (full) return fputs ("|", out);
+ case '^': if (full) return fputs ("ˆ", out);