From mboxrd@z Thu Jan 1 00:00:00 1970 From: "David A. Gershman" Subject: Re: HTML Export, CSS Styling Date: Sat, 22 Aug 2015 13:12:30 -0700 Message-ID: <55D8D7AE.3020602@dagertech.net> References: <55D7F6D9.1040505@dagertech.net> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34854) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTF8x-0001xg-In for emacs-orgmode@gnu.org; Sat, 22 Aug 2015 16:12:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZTF8w-0000fH-G5 for emacs-orgmode@gnu.org; Sat, 22 Aug 2015 16:11:59 -0400 Received: from dagertech.net ([64.183.98.170]:38904 helo=mail.dagertech.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTF8w-0000fD-6S for emacs-orgmode@gnu.org; Sat, 22 Aug 2015 16:11:58 -0400 Received: from [192.168.233.104] (unknown [192.168.176.200]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.dagertech.net (Postfix) with ESMTPSA id 45806A00EA for ; Sat, 22 Aug 2015 13:11:57 -0700 (PDT) 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: emacs-orgmode@gnu.org Thank you (and to Nicolas Goaziou and Scott Randby as well)!!! After going through so many docs, blogs, articles, etc., I must have just skimmed over that first paragraph. And, although it was not something I've looked for, thanks for the quick intro to Macros! That's something new I'll now be reading up on until I have a headache. :) Thank again! On 08/22/2015 12:50 AM, Christian Moe wrote: > 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