From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Moe Subject: Re: HTML Export, CSS Styling Date: Sat, 22 Aug 2015 09:50:12 +0200 Message-ID: References: <55D7F6D9.1040505@dagertech.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56271) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZT3yD-00080b-4Z for emacs-orgmode@gnu.org; Sat, 22 Aug 2015 04:16:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZT3y9-000272-P9 for emacs-orgmode@gnu.org; Sat, 22 Aug 2015 04:16:08 -0400 Received: from mail2.b1.hitrost.net ([91.185.211.205]:40825) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZT3y9-00026s-FN for emacs-orgmode@gnu.org; Sat, 22 Aug 2015 04:16:05 -0400 In-reply-to: <55D7F6D9.1040505@dagertech.net> 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: "David A. Gershman" Cc: emacs-orgmode@gnu.org Hi, See the first paragraph of the section "Quoting HTML tags" in the manual. In your example, you could do: This is the paragraph body that will allow *bold* or /italic/ or even _underline_, but what if I want only @@html:@@THIS@@html:@@ word to have styling? Such as making it red to indicate importance? For repeat use and/or export of special styling to other backends than ODT, you may want to simplify things a bit with macros. Use e.g. this in the document head: #+MACRO: red @@html:@@$1@@html:@@ (reload the document or do C-c C-c on the above line to make Org notice you've added it). Then you can do I want not only {{{red(THIS)}}} word to have styling, but {{{red(THESE\, TOO)}}}. Note that commas separate arguments to macros, so you need to backslash-escape any commas appearing in the styled text, as in the above example. Going further, you can use a macro with two arguments to have a choice of colors: #+MACRO: color @@html:@@$2@@html:@@ I want {{{color(red, THIS)}}} word to be colored red, but {{{color(green, THIS ONE)}}}? to be green. where the first argument (before the unescaped comma) is a color keyword or code CSS can recognize. (As an alternative to macros, some people define their own link types with concomitant export functions just for styling text and hiding all the necessary brackets out of sight. Requires elisp, offends purist views of what links should mean, and is bad for document portability. Originally my idea, I'm afraid.) Hope this helps, Christian David A. Gershman writes: > I've been reading all evening about HTML exporting, style sheets, etc. > Maybe I've been inundated with information, but I haven't been able to > determine an answer to my question: can text in the middle of a > paragraph by styled? For example: > > * Heading 1 > This is the paragraph body that will allow *bold* > or /italic/ or even _underline_, but what if I want > only THIS word to have styling? Such as making it > red to indicate importance? > > > I'm working on lecture notes and I was planning on a tag > so I can set the color and, ultimately, a 'title' attribute for a > definition when hovered. However, I'm only finding the "#+HTML" feature > within org which seems to need to be on a line of its own. Howver, the > export would convert: > > This is the paragraph body that will allow *bold* > or /italic/ or even _underline_, but what if I want > only > #+HTML: THIS > word to have... > > to 3 different paragraphs: > > This is the paragraph body that will allow *bold* > or /italic/ or even _underline_, but what if I want > only > THIS > word to have... > > Am I missing something or is "in-line styling" just not a feature within > Org (yet?)? > > Thanks! > > --David