emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Charles C. Berry" <ccberry@ucsd.edu>
To: wero_sacero <mail2wero@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: macro expansion in #+begin_latex
Date: Sun, 14 Jun 2015 10:04:18 -0700	[thread overview]
Message-ID: <alpine.OSX.2.11.1506140953120.636@charles-berrys-macbook.local> (raw)
In-Reply-To: <CAMjgborT+_GdWa3qrShEkfX9UV8Ghkv=f7SSv=KbS7M_4tC4ZA@mail.gmail.com>

On Sun, 14 Jun 2015, wero_sacero wrote:

> Thank you for the reply.
>
> But I don't think it's a good idea. For example: what can I do if want
> to put a text like the title of my file in the latex header? is there
> an other way?


In addition to the suggestions you already have, you can construct the 
`#+TITLE:' line like this:

#+header: :var bfn=(buffer-file-name)
#+BEGIN_SRC emacs-lisp :exports results :results value raw
(concat "#+TITLE: FileName: " bfn)
#+END_SRC

The `(buffer-file-name)' can be altered to use any function that returns 
suitable text or be a call to another src block.

HTH,

Chuck

      parent reply	other threads:[~2015-06-14 17:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-13  9:00 macro expansion in #+begin_latex wero_sacero
2015-06-13 16:58 ` Nicolas Goaziou
2015-06-14  9:14   ` wero_sacero
2015-06-14  9:53     ` Robert Klein
2015-06-14 10:07     ` Rasmus
2015-06-14 17:04     ` Charles C. Berry [this message]

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=alpine.OSX.2.11.1506140953120.636@charles-berrys-macbook.local \
    --to=ccberry@ucsd.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail2wero@gmail.com \
    /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).