From: Robert Klein <roklein@roklein.de>
To: moptop99@gmail.com
Cc: emacs-orgmode@gnu.org
Subject: Re: small caps
Date: Thu, 29 Oct 2015 22:18:04 +0100 (CET) [thread overview]
Message-ID: <20151029.221804.1689546353470974848.roklein@roklein.de> (raw)
In-Reply-To: <CAN_Dec92RNWQ743SvSUa0Nam1eCYns9raitRKmJnXmF+LWDjYQ@mail.gmail.com>
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
prev parent reply other threads:[~2015-10-29 21:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-29 16:39 small caps Matt Price
2015-10-29 16:47 ` Nicolas Goaziou
2015-10-29 16:55 ` Thomas S. Dye
2015-10-29 20:17 ` Matt Price
2015-10-29 20:42 ` Thomas S. Dye
2015-10-30 13:10 ` Christian Moe
2015-10-31 16:16 ` Matt Price
2015-10-29 17:25 ` Aaron Ecay
2015-10-29 17:39 ` Thomas S. Dye
2015-10-29 17:46 ` Nicolas Goaziou
2015-10-29 17:44 ` Nicolas Goaziou
2015-10-29 20:37 ` Rasmus
2015-10-29 21:18 ` Robert Klein [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151029.221804.1689546353470974848.roklein@roklein.de \
--to=roklein@roklein.de \
--cc=emacs-orgmode@gnu.org \
--cc=moptop99@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.