From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Underline ONLY the first character of a word? Date: Wed, 24 Aug 2011 19:28:19 -0400 Message-ID: <7670.1314228499@alphaville.americas.hpqcorp.net> References: <1314217012.11609.YahooMailNeo@web161910.mail.bf1.yahoo.com> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([140.186.70.92]:37129) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwMrv-0004AZ-8W for emacs-orgmode@gnu.org; Wed, 24 Aug 2011 19:28:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QwMru-0006ls-3s for emacs-orgmode@gnu.org; Wed, 24 Aug 2011 19:28:23 -0400 Received: from g5t0009.atlanta.hp.com ([15.192.0.46]:9734) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwMrt-0006li-Pd for emacs-orgmode@gnu.org; Wed, 24 Aug 2011 19:28:22 -0400 In-Reply-To: Message from Michael Hannon of "Wed, 24 Aug 2011 13:16:52 PDT." <1314217012.11609.YahooMailNeo@web161910.mail.bf1.yahoo.com> 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: Michael Hannon Cc: nicholas.dokos@hp.com, Org-Mode List Michael Hannon wrote: > Greetings. I've "inherited" an HTML document that uses the construct: > > event > > for instance, to underline the initial 'e' in the word. The context is > something like: > > e event > > to show that the choice of option 'e' corresponds to choosing an "event". > > In preparation for a revision of the document, I'm trying to create a *.org > file that will duplicate as much of the original style of the HTML document as > possible (i.e., when exported to HTML). > > I haven't been able to find a way to underline just the first character of a > word. For instance, > > _e_vent > > doesn't produce what I want. I tried: > > _e_ vent > > and that underlined the 'e' but, of course, left an unwanted space. > > Is there some way to do this? A better way? > Not without some code I think. I can *almost* do it with babel, but there is some manual work involved. For example, in the following file: --8<---------------cut here---------------start------------->8--- * Table :noexport: #+TBLNAME: actions | abbrev | action | |--------+-----------------| | a | actionable | | b | bibulous | | c | califragilistic | #+begin_src python :results output :exports none :var table=actions print "* Results" print "#+begin_html" for row in table: print "%s %s%s
" % (row[0], row[1][0:1], row[1][1:]) print "#+end_html" #+end_src --8<---------------cut here---------------end--------------->8--- I can evaluate the source block with C-c C-c and get a results block like this[fn:1]: --8<---------------cut here---------------start------------->8--- #+results: #+begin_example * Results #+begin_html a actionable
b bibulous
c califragilistic
#+end_html #+end_example --8<---------------cut here---------------end--------------->8--- then manually delete the #+{begin,end}_example lines and *then* export the resulting file. You might also be able to do something with radio tables or dynamic blocks but I have not gone down that path. Nick Footnotes: [fn:1] You might have to do something like this (setq org-babel-min-lines-for-block-output 1) to convince babel to produce an example block rather than colon-preceded literals.