From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: Incomplete syntax highlight for C++ code Date: Sat, 18 Feb 2012 08:21:20 -0700 Message-ID: <8762f4tarv.fsf@gmx.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:34877) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RymJv-0004pp-8O for emacs-orgmode@gnu.org; Sat, 18 Feb 2012 10:35:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RymJq-0002Xn-1G for emacs-orgmode@gnu.org; Sat, 18 Feb 2012 10:35:30 -0500 Received: from mailout-us.gmx.com ([74.208.5.67]:56792) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1RymJp-0002XQ-8W for emacs-orgmode@gnu.org; Sat, 18 Feb 2012 10:35:25 -0500 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: Zhiqiu Kong Cc: emacs-orgmode@gnu.org Hi Zhiqiu, First, I would look at the actual text of the exported html code example. It likely contains css code specifying how to fontify many elements of the code block (e.g., on my system your example exports to the following html [1]). You can then add css to your org-mode file specifying what colors to use for each code class. Also, see the `org-export-htmlize-output-type' variable. Best, Zhiqiu Kong writes: > Hi, > > I am a new org-mode user and am trying to take notes with it. As I put > source code into my codes a lot, I love the integration with htmlize pretty > much. However, I found the syntax highlight on exported html file is not > as what I see in Emacs. To be more specific, only comments and string > literals are colored, which is shown in http://img.ly/dXTK. And here is > what is looks like in Emacs: http://img.ly/dXU6. > > Actually, what I expected is the keywords such as int, return should at > least be colored, which is as introduced by emacs-fu ( > http://emacs-fu.blogspot.com/2009/05/writing-and-blogging-with-org-mode.html > ). > > I checked out the latest org-mode (Org-mode version 7.8.03 > (release_7.8.03.336.gdf0a9) ) and htmlize (for git repository), but the > problem remains. Moreover, here is my project setting: > > (setq org-publish-project-alist > '(("note-org" > :base-directory "~/Docs/notes/org/" > :publishing-directory "~/Docs/notes/html/" > :htmlized-source t > :base-extension "org" > :sub-superscript nil > :recursive t > :publishing-function org-publish-org-to-html > ;; :org-export-htmlize-output-type "css" > :html-extension "html" > :auto-index t > :index-filename "index.org" > :index-title "My Notes" > :link-home "index.html" > ;; :section-numbers nil > :style " href=\"css/worg.css\" > type=\"text/css\"/>") > ("note-static" > :base-directory "~/Docs/notes/org/" > :publishing-directory "~/Docs/notes/html/" > :recursive t > :base-extension > "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|swf\\|zip\\|gz\\|txt\\|el" > :publishing-function org-publish-attachment) > ("My Notes" > :components ("note-org" "note-static") > :auto-sitemap t > :auto-index t > ))) > > Any suggestion on how to debug and fix this problem? Or this is normal? > Thanks a lot!! > > > Thanks, > -Zhiqiu Footnotes: [1]
int main(){
  std::cout << "hello" << std::endl;
}
-- Eric Schulte http://cs.unm.edu/~eschulte/