Hi,

Matt Price wrote:
> do we have a syntax for the "small caps" text attribute in Org? If not,
> should we? It is available in odt, html, and latex, and is used in some
> bibliographic styles. 


You can add a link type, e.g.:

#+begin_src emacs-lisp
  (org-add-link-type
   "fm" nil
   (lambda (path desc format)
     (cond
      ((eq format 'html)
       (cond
        ((equal path "sc")
         (format "<span style=\"font-variant:small-caps;\">%s</span>"
                 desc))
        ((equal path "it")
         (format "<em>%s</em>" desc))
        ((equal path "bf")
         (format "<strong>%s</strong>" desc))
        ((equal path "tt")
         (format "<kbd>%s</kbd>" desc))
        (t (format "%s" desc))))
      ;; "</span>" )))
      ((eq format 'latex)
       (format "\\text%s{%s}" path desc))
      ((eq format 'odt)
       (cond
        ((equal path "sc")
         (format "<span style=\"font-variant:small-caps;\">hello</span>" desc))
        ;; more code for it, bf, tt etc.
        ))
      (t Y))))
#+end_src

The odt stuff I typed right into this mail, so it probably doesn't
word out of the box. (don't ask me about the "(t Y)" at the end; don't
know...)

Anyway, now you can use small capitals as [[fm:sc][ad]] and you get
"ad" in small caps.

For my documents I set the following macros for small capitals and
teletype:

#+Macro: sc [[fm:sc][$1]]
#+Macro: tt [[fm:tt][$1]]

Now you can use the macros like {{{sc(ad)}}} or {{{sc(Text in Small
Caps)}}}. Note, the uppercase letters will remain uppercase.

Best regards
Robert

Reply via email to