From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steve Downey Subject: Src blocks laid out side-by-side Date: Fri, 7 Feb 2020 17:59:39 -0500 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000e660cd059e04591a" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:57457) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j0Cbc-00022O-13 for emacs-orgmode@gnu.org; Fri, 07 Feb 2020 18:00:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j0Cba-0001mF-TL for emacs-orgmode@gnu.org; Fri, 07 Feb 2020 18:00:11 -0500 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]:37120) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j0Cba-0001l2-Na for emacs-orgmode@gnu.org; Fri, 07 Feb 2020 18:00:10 -0500 Received: by mail-pj1-x1034.google.com with SMTP id m13so1544252pjb.2 for ; Fri, 07 Feb 2020 15:00:10 -0800 (PST) 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-mx.org@gnu.org Sender: "Emacs-orgmode" To: org mode --000000000000e660cd059e04591a Content-Type: text/plain; charset="UTF-8" I have a need to lay out source blocks side by side, in order to present before and after changes to the source. If I could embed a block in a table, that would do it. Is there another obvious way that I'm missing? Hilight etc is important, but also actually compiling the code to maintain correctness. https://isocpp.org/files/papers/D1988R1.html Has an example at the top. That's done with pandoc markdown with a bunch of post processing. I'd like to go back to org. --000000000000e660cd059e04591a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I have a need to lay out source blocks side by side, in o= rder to present before and after changes to the source. If I could embed a = block in a table, that would do it.=C2=A0

Is there another obvious way that I'm missing?=C2=A0

Hilight etc is important, but also a= ctually compiling the code to maintain correctness.=C2=A0

<= div dir=3D"auto">
Has an example at the top. Tha= t's done with pandoc markdown with a bunch of post processing. I'd = like to go back to org.=C2=A0
--000000000000e660cd059e04591a-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Fraga, Eric" Subject: Re: Src blocks laid out side-by-side Date: Sat, 8 Feb 2020 10:13:34 +0000 Message-ID: <87v9ohl73m.fsf@ucl.ac.uk> References: Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:40478) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j0N7L-0004j3-AT for emacs-orgmode@gnu.org; Sat, 08 Feb 2020 05:13:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j0N7K-0001YJ-F4 for emacs-orgmode@gnu.org; Sat, 08 Feb 2020 05:13:39 -0500 Received: from mail-eopbgr60106.outbound.protection.outlook.com ([40.107.6.106]:42638 helo=EUR04-DB3-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j0N7K-0001Xq-8r for emacs-orgmode@gnu.org; Sat, 08 Feb 2020 05:13:38 -0500 In-Reply-To: (Steve Downey's message of "Fri, 7 Feb 2020 17:59:39 -0500") Content-Language: en-US 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-mx.org@gnu.org Sender: "Emacs-orgmode" To: Steve Downey Cc: org mode On Friday, 7 Feb 2020 at 17:59, Steve Downey wrote: > I have a need to lay out source blocks side by side, in order to present > before and after changes to the source. If I could embed a block in a > table, that would do it. Do you need this layout in org file itself or only in an exported document from the org file? For the latter, you can use inline directives to achieve this. E.g. if you were exporting to PDF via LaTeX, you could start/end minipages around each src block. --=20 : Eric S Fraga via Emacs 28.0.50, Org release_9.3.2-233-gc2bc48 From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Berry, Charles" via "General discussions about Org-mode." Subject: Re: Src blocks laid out side-by-side Date: Sat, 8 Feb 2020 18:14:00 +0000 Message-ID: <3438DCB3-E658-439D-83B2-4758C846C8AA@ucsd.edu> References: <87v9ohl73m.fsf@ucl.ac.uk> Reply-To: "Berry, Charles" Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:39241) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j0UcZ-0008I1-8x for emacs-orgmode@gnu.org; Sat, 08 Feb 2020 13:14:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j0UcY-0004e3-2X for emacs-orgmode@gnu.org; Sat, 08 Feb 2020 13:14:23 -0500 Received: from mx0b-00395d01.pphosted.com ([148.163.137.170]:59294) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j0UcX-0004cH-Ey for emacs-orgmode@gnu.org; Sat, 08 Feb 2020 13:14:21 -0500 In-Reply-To: <87v9ohl73m.fsf@ucl.ac.uk> Content-Language: en-US Content-ID: <0E2DC9C9E11E4A419ABE44265E958FD4@AD.UCSD.EDU> 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-mx.org@gnu.org Sender: "Emacs-orgmode" To: "Fraga, Eric" Cc: org mode , Steve Downey > On Feb 8, 2020, at 2:13 AM, Fraga, Eric wrote: >=20 > On Friday, 7 Feb 2020 at 17:59, Steve Downey wrote: >> I have a need to lay out source blocks side by side, in order to present >> before and after changes to the source. If I could embed a block in a >> table, that would do it. >=20 > Do you need this layout in org file itself or only in an exported > document from the org file? >=20 > For the latter, you can use inline directives to achieve this. E.g. if > you were exporting to PDF via LaTeX, you could start/end minipages > around each src block. >=20 Right. And the side-by-side issue for markdown is handled with inline html = like this: https://stackoverflow.com/questions/43232279/how-can-one-display-tables-sid= e-by-side-in-github-markdown The trick is that 'md snippets fall back to html. So @@html: @@ etc= are needed. HTH, Chuck=20 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steve Downey Subject: Re: Src blocks laid out side-by-side Date: Sat, 8 Feb 2020 14:02:45 -0500 Message-ID: References: <87v9ohl73m.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000771161059e152704" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:47887) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j0VNb-0005xT-PX for emacs-orgmode@gnu.org; Sat, 08 Feb 2020 14:03:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j0VNa-0003pz-N0 for emacs-orgmode@gnu.org; Sat, 08 Feb 2020 14:02:59 -0500 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]:39638) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j0VNa-0003pg-HD for emacs-orgmode@gnu.org; Sat, 08 Feb 2020 14:02:58 -0500 Received: by mail-pf1-x429.google.com with SMTP id 84so1518478pfy.6 for ; Sat, 08 Feb 2020 11:02:58 -0800 (PST) In-Reply-To: <87v9ohl73m.fsf@ucl.ac.uk> 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-mx.org@gnu.org Sender: "Emacs-orgmode" To: "Fraga, Eric" Cc: org mode --000000000000771161059e152704 Content-Type: text/plain; charset="UTF-8" Only needs to be in the exported document, and doesn't necessarily need to render that way within org. However, I'd like to avoid having to choose the export form with custom markup in the org document. I often have documents, or parts of docs, that are exported to both HTML and latex. The equivalent that I'm doing in markdown are custom fenced blocks that pandoc post-processes. I suppose I could write some markup that on export gets processed to the appropriate html or latex. On Sat, Feb 8, 2020, 05:13 Fraga, Eric wrote: > On Friday, 7 Feb 2020 at 17:59, Steve Downey wrote: > > I have a need to lay out source blocks side by side, in order to present > > before and after changes to the source. If I could embed a block in a > > table, that would do it. > > Do you need this layout in org file itself or only in an exported > document from the org file? > > For the latter, you can use inline directives to achieve this. E.g. if > you were exporting to PDF via LaTeX, you could start/end minipages > around each src block. > > -- > : Eric S Fraga via Emacs 28.0.50, Org release_9.3.2-233-gc2bc48 > --000000000000771161059e152704 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Only needs to be in the exported document, and doesn't neces= sarily need to render that way within org. However, I'd like to avoid h= aving to choose the export form with custom markup in the org document. I o= ften have documents, or parts of docs, that are exported to both HTML and l= atex.=C2=A0=C2=A0

The equivalent that I'm doing in markdown are custom= fenced blocks that pandoc post-processes.=C2=A0

I suppose I could write s= ome markup that on export gets processed to the appropriate html or latex.= =C2=A0

On Sat, Feb 8, 2020, 05:13 Fraga, Eric <e.fraga@ucl.ac.uk> wrote:
On Friday,=C2=A0 7 Feb 2020 at 17:59, Steve Downey wrote: > I have a need to lay out source blocks side by side, in order to prese= nt
> before and after changes to the source. If I could embed a block in a<= br> > table, that would do it.

Do you need this layout in org file itself or only in an exported
document from the org file?

For the latter, you can use inline directives to achieve this.=C2=A0 E.g. i= f
you were exporting to PDF via LaTeX, you could start/end minipages
around each src block.

--
: Eric S Fraga via Emacs 28.0.50, Org release_9.3.2-233-gc2bc48
--000000000000771161059e152704--