From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Klein Subject: Re: small caps Date: Thu, 29 Oct 2015 22:18:04 +0100 (CET) Message-ID: <20151029.221804.1689546353470974848.roklein@roklein.de> References: Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52138) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZruaR-0005Bq-Rs for emacs-orgmode@gnu.org; Thu, 29 Oct 2015 17:18:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZruaM-0001rT-Pm for emacs-orgmode@gnu.org; Thu, 29 Oct 2015 17:18:19 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:62541) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZruaM-0001qx-JU for emacs-orgmode@gnu.org; Thu, 29 Oct 2015 17:18:14 -0400 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: moptop99@gmail.com Cc: emacs-orgmode@gnu.org 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 "%s" desc)) ((equal path "it") (format "%s" desc)) ((equal path "bf") (format "%s" desc)) ((equal path "tt") (format "%s" desc)) (t (format "%s" desc)))) ;; "" ))) ((eq format 'latex) (format "\\text%s{%s}" path desc)) ((eq format 'odt) (cond ((equal path "sc") (format "hello" 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