emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Sharon Kimble <boudiccas@skimble.plus.com>
To: org-mode-email <emacs-orgmode@gnu.org>
Subject: Re: 2-column mode for many cooking recipes
Date: Wed, 28 Feb 2018 15:16:08 +0000	[thread overview]
Message-ID: <87606hm9fr.fsf@skimble.plus.com> (raw)
In-Reply-To: <87inahcohd.fsf@gmail.com> (Eric S. Fraga's message of "Wed, 28 Feb 2018 12:01:18 +0000")

[-- Attachment #1: Type: text/plain, Size: 2775 bytes --]

Eric S Fraga <esflists@gmail.com> writes:

> On Wednesday, 28 Feb 2018 at 09:56, Sharon Kimble wrote:
>> I have this as a recipe -
>
> [...]
>
>> How can I have the ingredients in a left-most column and the method in a
>> right-most column please? So that everything below the index entries is
>> in 2-column mode which ends after the citation. And it can then be
>> renewed below the next index entries of the next entry, ad infinitum.
>>
>> This is for an org-mode document that is exported to latex and built
>> into a pdf file.
>
> You could use special blocks (section 12.10.10 of org manual).  See
> attached example for your recipe.  Does require LaTeX magic...

This is what Eric has suggested -

--8<---------------cut here---------------start------------->8---
* Recipes
#+begin_export latex
\definecolor{verypaleblue}{rgb}{0.95,0.95,1}
\makeatletter\newenvironment{ingredients}{\begin{lrbox}{\@tempboxa}\begin{minipage}{0.3\textwidth}}{\end{minipage}\end{lrbox}\colorbox{verypaleblue}{\usebox{\@tempboxa}}}\makeatother
\makeatletter\newenvironment{steps}{\begin{lrbox}{\@tempboxa}\begin{minipage}{0.6\textwidth}\centering}{\end{minipage}\end{lrbox}\usebox{\@tempboxa}}\makeatother
#+end_export

** Date Bread
#+begin_ingredients
/12 ounces stoned dates/\\
/1 teaspoonful bicarbonate of soda/\\
/1 cupful boiling water/\\
/4 ounces margarine/\\
/1 egg/\\
/2 cups flour/\\
/$\frac{1}{2}$ cup sugar/\\
/pinch of salt/
#+end_ingredients
#+begin_steps
- Cut dates into pieces, shake soda over the dates, and pour water over.
- Add margarine cut into small pieces and stir well.
- Break egg into mixture, then add sugar and flour.
- Divide into two loaf tins and bake 90 minutes in moderate oven, Regulo 4.
#+end_steps
--8<---------------cut here---------------end--------------->8---

And to use these two blocks I've written 2 new snippets -

--8<---------------cut here---------------start------------->8---
# -*- mode: snippet -*-
# name: 2 column, part 1, recipes
# key: xin
# --
#+begin_ingredients
$0
#+end_ingredients
--8<---------------cut here---------------end--------------->8---

and -

--8<---------------cut here---------------start------------->8---
# -*- mode: snippet -*-
# name: 2 column, part 2, recipes
# key: xst
# --
#+begin_steps
$0
#+end_steps
--8<---------------cut here---------------end--------------->8---

And its now all working very well, and greatly enhances the look of the
printed page.

Thanks very much Eric, its working perfectly.

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
DrugFacts = https://www.drugfacts.org.uk  
Debian 9.3, fluxbox 1.3.7, emacs 25.3.2, org-mode 9.1.6-10-g0c9329-elpaplus

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2018-02-28 15:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-28  9:56 2-column mode for many cooking recipes Sharon Kimble
2018-02-28 12:01 ` Eric S Fraga
2018-02-28 15:16   ` Sharon Kimble [this message]
2018-02-28 20:11     ` Eric S Fraga
2018-02-28 16:33   ` Sharon Kimble
2018-02-28 20:12     ` Eric S Fraga
2018-03-01 12:07 ` Sharon Kimble

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=87606hm9fr.fsf@skimble.plus.com \
    --to=boudiccas@skimble.plus.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).