emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Julian Gehring <julian.gehring@gmail.com>
To: Gabe Becker <becker.gabe@gene.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Custom formatting during export
Date: Wed, 03 Sep 2014 09:26:07 -0700	[thread overview]
Message-ID: <5407411F.8060702@gmail.com> (raw)
In-Reply-To: <CAMFmJsknK8MoQz6FYYh8NCE6g72QmGWEDT4E8gMhBry5zHmrRQ@mail.gmail.com>

Hi Gabe,

Macro replacements [[http://orgmode.org/manual/Macro-replacement.html]] 
should be what you are looking for.

For example, the macro

     #+MACRO: pkg  $1

would be called by

     {{{pkg(PkgName)}}}

You can also use this to format your input for one or multiple backends

     #+MACRO: M @@latex:\$1{@@$2@@latex:}@@

Let me know if this helps.

Best
Julian


On 03.09.2014 06:36, Gabe Becker wrote:
> orgmode developers and power-users,
>
> I'd like to be able to declare custom entities (apologies if I'm using
> that term incorrectly) within the text of an orgmode document which I
> can specify custom formatting for when my .org is exported, e.g. to PDF
> or HTML.
>
> I have a background in Docbook, so the analogue there would be defining
> a custom xml tag and then extending the XSL files to handle it as
> desired. Please see the following snippet:
>
>
> * section title
> Here is some text, but I want [specialthing: this bit here] to be
> formatted differently than [newanddifferent: this other big over here].
>
>
> Where I would have defined specific custom formatting rules for
> "specialthing" and "newanddifferent" type entities.
>
> Is there a way to do this in orgmode? If not, it seems like it would be
> a very useful feature (at least to me:) ). Note: I don't care about the
> syntax as long as the result is the same.
>
> Thanks for your help,
> ~G
> --
> Computational Biologist
> Genentech Research

  parent reply	other threads:[~2014-09-03 16:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-03 13:36 Custom formatting during export Gabe Becker
2014-09-03 15:41 ` Thorsten Jolitz
2014-09-03 16:22 ` Richard Lawrence
2014-09-03 16:26 ` Julian Gehring [this message]
2014-09-03 16:44 ` Thomas S. Dye

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5407411F.8060702@gmail.com \
    --to=julian.gehring@gmail.com \
    --cc=becker.gabe@gene.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).