[racket] Scribble document with accented characters

From: J. Ian Johnson (ianj at ccs.neu.edu)
Date: Sun Jun 22 11:39:12 EDT 2014

Scribble has a huge but incomplete unicode to latex translation that I extended a lot for my own purposes, with the ability to handle a few compose characters like tilde and hat. (Oh, I see scribble does that now too)
https://github.com/ianj/scribble-latex-utils/blob/master/unmap.rkt

Big case expression adapted from
scribble-pkgs/scribble-lib/scribble/latex-render.rkt

You want to add a case [(#\u04D3) "\\\"a"] or simply [(#\ä) "\\\"a"].
The E from Matthias's blob is handled by the #\u301 combiner. It probably isn't getting the \" case because the string is already normalized to use \u04D3 instead of u\308u\097.

-Ian

----- Original Message -----
From: "Matthias Felleisen" <matthias at ccs.neu.edu>
To: "Shriram Krishnamurthi" <sk at cs.brown.edu>
Cc: users at racket-lang.org
Sent: Sunday, June 22, 2014 11:24:48 AM GMT -05:00 US/Canada Eastern
Subject: Re: [racket] Scribble document with accented characters


Here is a tiny snippet from HtDP/2e (front matter) that uses accents: 

#lang scribble/manual

@bold{Acknowledgments}: We thank 
 Prof. Robert Ordóñez,
 Éric Tanter, 
 and Roelof Wobben
for comments on previous drafts of this second edition. 


If you load this in DrRacket and run scribble/pdf and scribble/html, you get the correct output. My commandline set up also renders things correctly. 




On Jun 22, 2014, at 10:58 AM, Shriram Krishnamurthi wrote:

> What's the proper way to use accented characters in a Scribble
> document? For instance, if I want a ä? Simply writing that character
> results in the error
> 
>  Package inputenc Error: Unicode char \u8: not set up for use with LaTeX.
> 
> on OS X using the default latex (/usr/texbin/latex).
> 
> Thanks,
> Shriram
> 
> ____________________
>  Racket Users list:
>  http://lists.racket-lang.org/users


____________________
  Racket Users list:
  http://lists.racket-lang.org/users


Posted on the users mailing list.