From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sharon Kimble Subject: Re: 2-column mode for many cooking recipes Date: Wed, 28 Feb 2018 15:16:08 +0000 Message-ID: <87606hm9fr.fsf@skimble.plus.com> References: <87606ho2sa.fsf@skimble.plus.com> <87inahcohd.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49418) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1er3Sp-0000xa-Ou for emacs-orgmode@gnu.org; Wed, 28 Feb 2018 10:16:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1er3Sl-00051B-NY for emacs-orgmode@gnu.org; Wed, 28 Feb 2018 10:16:15 -0500 Received: from avasout04.plus.net ([212.159.14.19]:38138) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1er3Sl-0004yw-G3 for emacs-orgmode@gnu.org; Wed, 28 Feb 2018 10:16:11 -0500 In-Reply-To: <87inahcohd.fsf@gmail.com> (Eric S. Fraga's message of "Wed, 28 Feb 2018 12:01:18 +0000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: org-mode-email --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Eric S Fraga 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 - =2D-8<---------------cut here---------------start------------->8--- * Recipes #+begin_export latex \definecolor{verypaleblue}{rgb}{0.95,0.95,1} \makeatletter\newenvironment{ingredients}{\begin{lrbox}{\@tempboxa}\begin{m= inipage}{0.3\textwidth}}{\end{minipage}\end{lrbox}\colorbox{verypaleblue}{\= usebox{\@tempboxa}}}\makeatother \makeatletter\newenvironment{steps}{\begin{lrbox}{\@tempboxa}\begin{minipag= e}{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 =2D Cut dates into pieces, shake soda over the dates, and pour water over. =2D Add margarine cut into small pieces and stir well. =2D Break egg into mixture, then add sugar and flour. =2D Divide into two loaf tins and bake 90 minutes in moderate oven, Regulo = 4. #+end_steps =2D-8<---------------cut here---------------end--------------->8--- And to use these two blocks I've written 2 new snippets - =2D-8<---------------cut here---------------start------------->8--- # -*- mode: snippet -*- # name: 2 column, part 1, recipes # key: xin # -- #+begin_ingredients $0 #+end_ingredients =2D-8<---------------cut here---------------end--------------->8--- and - =2D-8<---------------cut here---------------start------------->8--- # -*- mode: snippet -*- # name: 2 column, part 2, recipes # key: xst # -- #+begin_steps $0 #+end_steps =2D-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. =2D-=20 A taste of linux =3D http://www.sharons.org.uk TGmeds =3D http://www.tgmeds.org.uk DrugFacts =3D https://www.drugfacts.org.uk=20=20 Debian 9.3, fluxbox 1.3.7, emacs 25.3.2, org-mode 9.1.6-10-g0c9329-elpaplus --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEELSc/6QwVBIYugJDbNoGAGQr4g1sFAlqWx7gACgkQNoGAGQr4 g1sf2xAAsxZ/s1jgObg0n8V+FlL948KKykXTwHTo4977zOxkGD455i61FahVUN5Z 1Pnzwg5WoCVV+4Cet6nqKRtjXAeZhtlvBglIvrrvRbSHRI8sM2IYh09ZM1z5GUbk xMfiN02NJsSUxOsfnNDBXfdiL8hwogRqb2us5U6JobS/9+/rxJIWXXNu3PZSSl69 u6vTiGFKk/xzSJWZ6qLHNgjBKN8Pe0gzT9u8EitAkSVYWhd1kBRCz2CRXMZPUS6p 6wyUcZvx1z7sQG6vyB4rc+ReuUXdqI5E3hI5NO88xT2MZDasIr+tCL+jYA+eqPhG o+XvOv9dI6nGw4Qyg038GmQYqUvuDUYdSuG6W1H+FghRw+Onq6iUaxpqy2VZHAAb RA58nuuFq+rIYLrMGUjuE2HQqN/TLVhvhwZsJNx1FgJRAgiFsyH0Pual3wc8D6kv f9vOUIXne8rSJU90KQVvTjFGfDN+V+W67ZwV4q8y956DwnmWv+m5V4LgYceLwuMz l55WzqzeUSRbgSCnVu3Bx3KBDqtjnu/kHDzwhBz/J3mrSaGbzSgjEqFuGHqozSEa Qkc0YzKL9XlviPUO5uT0HvFZHZVDd02P0ApysdkCgDyBezq8T8HZYbQJQ/liQeo6 ZYlMLAzh36lDYvIz9V+zh14A3eT0wS/9z6A3L4/96toPmkkC5fQ= =JvO+ -----END PGP SIGNATURE----- --=-=-=--