From: Francesco Pizzolante <fpz-djc/iPCCuDYQheJpep6IedvLeJWuRmrY@public.gmane.org>
To: mailing-list-org-mode <emacs-orgmode-mXXj517/zsQ@public.gmane.org>
Subject: [babel] References to variable block names
Date: Wed, 12 Jan 2011 12:40:23 +0100 [thread overview]
Message-ID: <87oc7mmjtk.fsf@mundaneum.com> (raw)
Hi,
I'm trying to maintain my employees CVs in a single Org file using Babel (see
example hereunder).
For this, I created several level-1 headings, one for each employee.
Then, I have my main CV block (cv source block, see last "Composed CV"
heading) containing the layout of the CVs. This block is "called" for each
employee, in order to tangle a LaTeX file with the correct information.
Though, currently, I'm not able to use variables *in noweb references* (see my
employee variable in <<cv(employee="XXX")>>.
Could someone tell me how to have a generic solution, in this way or another?
Any other ideas regarding this are welcome!
Thanks a lot,
Francesco
--8<---------------cut here---------------start------------->8---
* Alex
#+srcname: cv-alex
#+begin_src latex :noweb yes :tangle alex.tex
<<cv(v-firstname="Alex",v-familyname="Pizzo",v-jobtitle="Project Manager",employee="alex")>>
#+end_src
** Profile
#+srcname: profile-alex
#+begin_src latex
Software engineering expert.
#+end_src
** Experience
#+srcname: experience-alex
#+begin_src latex
\cventry{2007--2010}{Project Manager}{MyProject}{MyCompany}{}{}
\cventry{2005--2007}{Project Manager}{MyProject2}{MyCompany2}{}{}
#+end_src
* Albert
#+srcname: cv-albert
#+begin_src latex :noweb yes :tangle albert.tex
<<cv(v-firstname="Albert",v-familyname="Pizza",employee="albert")>>
#+end_src
** Profile
#+srcname: profile-albert
#+begin_src latex
Software engineering expert.
#+end_src
** Experience
#+srcname: experience-albert
#+begin_src latex
\cventry{2009--2010}{Developer}{MyProject}{MyCompany}{}{}
\cventry{2008--2009}{Developer}{MyProject2}{MyCompany2}{}{}
#+end_src
* Composed CV :noexport:
#+srcname: cv
#+begin_src latex :noweb yes :var v-jobtitle="Software Engineer"
\documentclass{mycvclass}
\usepackage[utf8x]{inputenc}
\firstname{v-firstname}
\familyname{v-familyname}
\jobtitle{v-jobtitle}
\begin{document}
\section{Profile}
<<profile-employee>>
\section{Experience}
<<experience-employee>>
\end{document}
#+end_src
--8<---------------cut here---------------end--------------->8---
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
next reply other threads:[~2011-01-12 11:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-12 11:40 Francesco Pizzolante [this message]
2011-01-12 16:32 ` [babel] References to variable block names Eric Schulte
[not found] ` <87y66qrsko.fsf-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-01-13 8:33 ` Francesco Pizzolante
2011-01-13 16:50 ` Eric Schulte
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=87oc7mmjtk.fsf@mundaneum.com \
--to=fpz-djc/ipccudyqhejpep6iedvlejwurmry@public.gmane.org \
--cc=emacs-orgmode-mXXj517/zsQ@public.gmane.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).