From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scot Becker Subject: Re: pretty export of tags Date: Mon, 31 May 2010 17:28:56 +0100 Message-ID: References: <87mxvgdsrp.fsf@convex-new.cs.unb.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from [140.186.70.92] (port=40262 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OJ7sg-00041R-Qp for emacs-orgmode@gnu.org; Mon, 31 May 2010 12:30:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OJ7sZ-0000dF-0G for emacs-orgmode@gnu.org; Mon, 31 May 2010 12:30:20 -0400 Received: from mail-px0-f169.google.com ([209.85.212.169]:54507) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OJ7sY-0000Qf-Pv for emacs-orgmode@gnu.org; Mon, 31 May 2010 12:30:18 -0400 Received: by pxi12 with SMTP id 12so4416231pxi.0 for ; Mon, 31 May 2010 09:29:16 -0700 (PDT) In-Reply-To: <87mxvgdsrp.fsf@convex-new.cs.unb.ca> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: David Bremner Cc: emacs-orgmode@gnu.org On Mon, May 31, 2010 at 3:56 PM, David Bremner wrote: > > I would like some more control over how tags are exported to PDF. I > tried both latex and docbook based methods, and as far as I can tell, in > both cases the treatment is hard-coded (at least in the docbook case it > does mark them as being different from the headline). Is there some > existing trick I should know about? I'd like the tags e.g. right > justified, or on the next line in a box. The HTML treatment is almost > OK. David, I could have sworn I was looking at the relevant variable this morning, but I can't find it. (I was looking at org-export-latex-todo-keyword-markup, but that's of course for TODO words). It looks to me like tag markup is hard-coded for LaTeX export, as a simple substitution in the function 'org-export-latex-keywords-maybe. I, too, would be glad to do some tricks on tags for LaTeX output. Would it add to the complexity too much to expand the capabilities of org-export-latex-classes, so that in the lines where you define the header markup for each class, you can also define tag markup? So in the following, %s is just the text of the header and %t is a (comma-separated, for possible use as LaTeX arguements?) tag list: '(("mynewclass" "\\documentclass[11pt, a4paper]{article}" ("\\section{%s}\n\taglist{%t}" . "\\section*{%s}\n\taglist{%t}") ("\\subsection{%s}\n\taglist{%t}" . "\\subsection*{%s}\n\taglist{%t}") ... and so on. The above example would produce LaTeX code like this: \section{This is a Title Here} \taglist{tag1,tag2,tag3} Section text goes here. I would then define \taglist{} in my header as a custom latex command which does the formatting I want on the tags. Presumably I could also add whatever formatting I want around %t ---at least whatever formatting LaTeX supports. David, you might want to assure yourself that LaTeX is capable of producing the results you want. I'm weak on the specifics, but there is some trouble putting certain kinds of commands in LaTeX header lines. It may be that in time, org-export-generic will grow into a tool that can be made to produce a decent LaTeX exporter, (and might now for certain well-structured and not-too-demanding kinds of documents), but I suspect that time quite yet. I'd be glad to hear of any other solutions or hacks. Scot