From: "William Henney" <whenney@gmail.com>
To: Daniel Clemente <n142857@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: XHTML export - etc.
Date: Sat, 3 Nov 2007 00:10:57 -0600 [thread overview]
Message-ID: <41c818190711022310x147f5376r1f6c8184fe7f4b36@mail.gmail.com> (raw)
In-Reply-To: <ae9590aa0711021320i7d22fc12ieb93e3039f5d2f8d@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 544 bytes --]
On 11/2/07, Daniel Clemente <n142857@gmail.com> wrote:
> > Shouldn't they be `&endash;' and `&emdash;' in HTML?
> >
> > http://www.w3.org/TR/xhtml1/dtds.html#a_dtd_Symbols
> >
>
> You mean – and —
Yes. Thanks for the correction.
Personally, I tend to just use the unicode characters directly in my
org file. This works quite well om the whole (see attached example).
Cheers
Will
--
Dr William Henney, Centro de Radioastronomía y Astrofísica,
Universidad Nacional Autónoma de México, Campus Morelia
[-- Attachment #2: unicode.org --]
[-- Type: application/octet-stream, Size: 6646 bytes --]
#+TITLE: Unicode and org mode
#+AUTHOR: William Henney
#+EMAIL: w.henney@astrosmo.unam.mx
#+LANGUAGE: en
#+OPTIONS: H:3 num:nil toc:t \n:nil @:t ::t |:t ^:t f:t *:t TeX:t LaTeX:t skip:t p:nil
* Notes on using unicode characters in org mode
** How to enter the unicode characters
Use either the SGML or TeX input method.
*** Using the TeX input method
+ Type =C-u C-\ tex= to activate
+ Type things like =\alpha= or =x^2= and they will be translated
into the unicode glyph. Use tab for completion help.
+ Pro: "Intuitive" to use.
+ Con: Gets in the way of typing a "real" backslash
*** Using the SGML input method
+ Type =C-u C-\ sgml= to activate
+ Type things like =α= or =°= to get α and °.
+ Pro: Access to more glyphs than with TeX it seems
+ Con: No access to sub/superscripts
** Punctuation
We can use the em and en dashes—this clause is bounded by em
dashes—directly in the org file. However, they aren't very easily
distinguishable in some fonts, especially fixed width ones at small
sizes. Here is a range of numbers separated by an en dash: 223–999.
In this sentence – following British typographic convention –
the en dash is used like the em dash is used in American
typography. Here are some minus signs:— binary (223 − 999) and
unary (−0.2). Finally, here is a hyphen for comparison: a-b. They
look good in proportional fonts, such as Times, Futura and
Optima. Baskerville is the font where they look most like their
Computer Modern versions. In fact, Baskerville looks quite a lot
like CMR in other ways too… Oh, and that was an ellipsis.
: Test in fixed-width font:— range 666–999
| symbol | examples |
|---------+----------|
| hyphen | 1-2 a-b |
| en dash | 1–2 a–b |
| em dash | 1—2 a—b |
| minus | 1−2 a−b |
|---------+----------|
It seems that the glyphs for the non-ascii characters are always
taken from those of the font family of the =default= face, even
where the font-lock face is specifically set to another font
family.
** Dealing with pre-formatted text
:This uses the org-code face, so we can easily make
:it fixed-width
Even if we are using a proportional font family for the =default=
face, by customizing the =org-code= face, we can use a fixed-width
font (such as Monaco) for pre-formatted material (lines starting
with ":" and words delimited with "="). We can do the same with the
=org-table= face, so that the alignment of table lines still
works. In the case of the pairing of Monaco and Times, it is also
necessary to set the height of the fixed-width faces to 0.85, so
that the character sizes match up.
*** Bugs
1. Table alignment still won't be quite right if there are unicode
characters in the table cells, since the glyphs for these have
variable widths, even in a /supposedly/ fixed-width font like
Monaco.
2. It doesn't work for sections with the QUOTE keyword, since
these do not use any special face.
** Other typographical symbols (e.g., §)
It would be nice if we could use ∗, • and ⋆ as list markers. Maybe
even ♥and ♠, although they look a bit heavy.
** Greek letters and math symbols: /α = x² − y²/
Examples: ½∫ Ξ₀ dz = ℏc/λ ⇒ ϑ ⊂ {⊼, ⋓, ∡} □
*** Variations between fonts (Mac OS X 10.4/Aquamacs 1.2)
As far as I can see, only a few fonts have their own set of
glyphs for the Greek letters. Times has a nice set of glyphs,
although it does have the problem that italic nu and italic v
look /very/ similar. Spot the difference: /νv/ ! Most font
families use a common set of glyphs that have a Sans Serif feel
to them, as though they were designed to go with Helvetica
(although Helvetica actually uses a slightly different
set). These glyphs have the problem that the "gamma" looks too
much like a "y" and the "tau" looks like a "t". When used with
Monaco, they look too small.
*** Super- and sub-scripts
These don't exist for all letters.
*** Example alphabets
αβγδεζηθικλμνξοπρστυφχψω\\
/αβγδεζηθικλμνξοπρστυφχψω/\\
abcdefghijklmnopqrstuvwxyz\\
/abcdefghijklmnopqrstuvwxyz/ \\
ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ\\
/ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ/ \\
ABCDEFGHIJKLMNOPQRSTUVWXYZ\\
/ABCDEFGHIJKLMNOPQRSTUVWXYZ/ \\
: αβγδεζηθικλμνξοπρστυφχψω
: /αβγδεζηθικλμνξοπρστυφχψω/
: abcdefghijklmnopqrstuvwxyz
: /abcdefghijklmnopqrstuvwxyz/
: ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ
: /ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ/
: ABCDEFGHIJKLMNOPQRSTUVWXYZ
: /ABCDEFGHIJKLMNOPQRSTUVWXYZ/
** Export to HTML
This should work since the charset is declared as utf-8. However,
support in browsers is variable.
+ Safari and Opera work the best—everything looks pretty nice in
both.
+ Firefox does OK, but the minus signs come out as hyphen. The bold
math looks funny too with greek letters being *very* bold.
** Export to LaTeX
Presumably, this won't work out of the box. I haven't tried it
yet. However, see this [[http://iamleeg.blogspot.com/2007/10/nice-looking-latex-unicode.html][blog post by Graham Lee]] for a possible
solution:
:\usepackage{ucs} % Unicode support
:\usepackage[utf8x]{inputenc} % UCS' UTF-8 driver is better than the LaTeX kernel's
:\usepackage[T1]{fontenc} % The default font encoding only contains Latin characters
:\usepackage{ae,aecompl} % Almost European fonts/hyphenation do a better job than Computer Modern
*** Update [2007-11-02 Fri]
Best to use the option =\usepackage[mathletters]{ucs}=, since
otherwise it tries to use commands like =\textalpha= and I have no
idea where these are defined (and Google wasn't much help). With
=mathletters= it uses the standard math symbol greek alphabet,
whether you are in math mode or not. I guess a better solution
would be to use =\ifmmode= to test if we are in math mode and use
=\upalpha= if we are not.
**** Problems encountered with =org-export-latex=
+ Backslashes in quoted text are not properly escaped.
** Integration with calc
Calc does not understand unicode as afar as I can see (e.g., it
doesn't recognise 2.3 ± 0.4 as an error form). Presumably, this
could be fixed rather easily since calc already has the concept of
display styles.
[-- Attachment #3: Type: text/plain, Size: 204 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
next prev parent reply other threads:[~2007-11-03 6:11 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-02 12:13 XHTML export - customizing via local variables Adam Spiers
2007-11-02 12:20 ` XHTML export - etc Adam Spiers
2007-11-02 15:26 ` Bastien
2007-11-02 15:19 ` Adam Spiers
2007-11-02 15:33 ` Daniel Clemente
2007-11-02 15:34 ` Daniel Clemente
2007-11-02 19:21 ` Bastien
2007-11-02 18:50 ` William Henney
2007-11-02 20:20 ` Daniel Clemente
2007-11-03 0:06 ` Bastien
2007-11-04 0:00 ` Daniel Clemente
2007-11-04 12:45 ` Bastien
2007-11-07 16:09 ` Daniel Clemente
2007-11-07 17:39 ` Bastien
2007-11-07 18:04 ` Daniel Clemente
2007-11-08 0:48 ` Bastien
2007-11-09 19:51 ` Daniel Clemente
2007-11-09 19:59 ` Daniel Clemente
2007-11-09 22:37 ` Eddward DeVilla
2007-11-09 23:40 ` Xiao-Yong Jin
2007-11-12 5:07 ` Bastien
2007-11-12 5:22 ` Bastien
2007-11-03 6:10 ` William Henney [this message]
2007-11-03 13:51 ` Bastien
2007-11-03 14:23 ` William Henney
2007-11-03 15:51 ` Bastien
2007-11-03 16:46 ` William Henney
2007-11-03 0:04 ` Bastien
2007-11-02 18:46 ` Bastien
2007-11-02 15:45 ` XHTML export - customizing via local variables Bastien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41c818190711022310x147f5376r1f6c8184fe7f4b36@mail.gmail.com \
--to=whenney@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=n142857@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).