From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id yKwZMKtUoGLn2AAAbAwnHQ (envelope-from ) for ; Wed, 08 Jun 2022 09:50:03 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 2M0gL6tUoGIUIQAAG6o9tA (envelope-from ) for ; Wed, 08 Jun 2022 09:50:03 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 64D1F14187 for ; Wed, 8 Jun 2022 09:50:03 +0200 (CEST) Received: from localhost ([::1]:37442 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyqS2-0001mK-CN for larch@yhetil.org; Wed, 08 Jun 2022 03:50:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52614) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyqQv-0001jd-0T for emacs-orgmode@gnu.org; Wed, 08 Jun 2022 03:48:54 -0400 Received: from mout-p-103.mailbox.org ([80.241.56.161]:52774) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1nyqQs-00075B-4q for emacs-orgmode@gnu.org; Wed, 08 Jun 2022 03:48:52 -0400 Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4LHzqv6r1Cz9sPp for ; Wed, 8 Jun 2022 09:48:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1654674523; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KbBqo7WmNY5QCrFGinC8mNZb08qR9xkdr5jhJl4Gvyg=; b=JFJjSsmFtYveV86MFWyFa5CQyt7Dqq4/3HE4/Luv+LJTKEpZ55G0iZKqCzJPqVsn9CCB5L QlKZyEh8NAzOgIzwBxwLoq7ZNioVJHpBXS3ai/M+maFDu0cAXD0jIFhxXCaqOcGu9KBBWI 9cas2htnN0tnJllfaz02DfgOXDsWcv1OkpiO64EaWh26HfkKcW0kC7W8gwe3h6KgPbLd0V lyzQq9vxyqItflkoYHnMYdiZr87gi5q5HKrhgXNNp4Q0+hB3BMFgutItcmEt87GB5zsCpa a29lYtpRujK0hw3lctyzHFxUTiQOTwVrcX55LuCPkHFsS2i++ebzTQVYLXuZyg== Message-ID: <15d970ca-9ed4-9b07-c020-ef8e793f3473@mailbox.org> Date: Wed, 8 Jun 2022 09:48:44 +0200 MIME-Version: 1.0 Subject: Re: Include LaTeX source and compiled result From: Denis Maier To: Org Mode List References: <5bbc01ae-360e-2de6-5858-0b816d743b99@mailbox.org> In-Reply-To: <5bbc01ae-360e-2de6-5858-0b816d743b99@mailbox.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-MBO-RS-ID: 07607101c20b488dd89 X-MBO-RS-META: mh1p6344pat1p7tcytupap9dfsa8htbd X-Rspamd-Queue-Id: 4LHzqv6r1Cz9sPp Received-SPF: pass client-ip=80.241.56.161; envelope-from=denismaier@mailbox.org; helo=mout-p-103.mailbox.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1654674603; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=KbBqo7WmNY5QCrFGinC8mNZb08qR9xkdr5jhJl4Gvyg=; b=m6/72auuhSWyw+D7xfb9D9xAnCPa2aCXtgKgn8ugZnxDzhDoS8lA25HgwLRMRINL4j3d45 g2EM0z1gA5Ns4Hj/kEZBmiHjrxYtRNA8MetgCD/Iftkw1p3zYq9QwXPcawyz9cBuuXUWDL GvlATK31LhNqaS8UAZEm0VWt4T2tsuiJCORyfdq+uj46JsRE/XmDfcuoT/oJ8xtm6Utugn arUuI1HT4kD/iASMb/KLKXiDNYj5Lo/X9haS4piCmeUrgjentggB1Ga2P10c+CExjZ/BXG Zal+mSXMvqko+pTULjCAY6DDWJeT6xW2TvB+3Yv8QcxHVnmuzR6UAMBUKJvY6g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1654674603; a=rsa-sha256; cv=none; b=cMwmPCQ43Ys7Qha8IU80lx/p8KiUjWryccq+cZKaOSjLIRX1q2zV/AnIObZd63ig9BdHH0 Z6C6mvSVvL51na4VOLzBWnn8iAQRcvcHtlq/R6baC7fX4txDB90a7Vdv/zkPzjf4TR0Pb5 CC6ApR2jczDApDACMmh/fNpDRr4HZt1vfdGisWKlniOki2CSszg5Nueioj4+KIdTIbZhPu rOftVXWrd+BJujGKZA77XJNmFj3QpVqJAdVMIiYrI6gxaTyVtdAVVrw8Dj7BIjv1B0KdbG pq9jrVIFWqqQiMvSX+8wDslrTQJ+WPi48p3QJ/nByHMVorah+9CNRDzbWflLCg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=mailbox.org header.s=mail20150812 header.b=JFJjSsmF; dmarc=pass (policy=reject) header.from=mailbox.org; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -9.81 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=mailbox.org header.s=mail20150812 header.b=JFJjSsmF; dmarc=pass (policy=reject) header.from=mailbox.org; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 64D1F14187 X-Spam-Score: -9.81 X-Migadu-Scanner: scn0.migadu.com X-TUID: CG+4AO33QpVY Hmmm, even this tells me "Code block produced no output" #+begin_example Test #+begin_src latex :file asdf.pdf Blabla #+end_src #+RESULTS: #+begin_export latex #+end_export Test #+begin_example But I can compile the temporary tex file without problems. I'm probably missing something fundamental... Best, Denis Am 08.06.2022 um 09:43 schrieb Denis Maier: > Hi everyone, > > for the documentation of my LaTeX courses I use examples that show the > output next to the source code. I'm contemplating whether I should > convert the documentation and examples to org, and use org-babel to > include the examples. I think this should be possible with org-babel. > > However, I cannot manage to get this to work: > > #+begin_example > > Blabla > > #+begin_src latex :file test.pdf > \documentclass{article} > \begin{document} > This is a test > \end{document} > #+end_src > > Blabla > > #+end_example > > Looking at the temporary latex file (see below) the reason is clear: > Org babel exports this as a complete latex file although the example > itself is already complete. Can I tell org somehow that this is not a > fragment and should be compiled as is? > > Best, > Denis > > \documentclass{article} > \usepackage[usenames]{color} > \usepackage[utf8]{inputenc} > \usepackage[T1]{fontenc} > \usepackage{graphicx} > \usepackage{longtable} > \usepackage{wrapfig} > \usepackage{rotating} > \usepackage[normalem]{ulem} > \usepackage{amsmath} > \usepackage{amssymb} > \usepackage{capt-of} > \pagestyle{empty}             % do not remove > % The settings below are copied from fullpage.sty > \setlength{\textwidth}{\paperwidth} > \addtolength{\textwidth}{-3cm} > \setlength{\oddsidemargin}{1.5cm} > \addtolength{\oddsidemargin}{-2.54cm} > \setlength{\evensidemargin}{\oddsidemargin} > \setlength{\textheight}{\paperheight} > \addtolength{\textheight}{-\headheight} > \addtolength{\textheight}{-\headsep} > \addtolength{\textheight}{-\footskip} > \addtolength{\textheight}{-3cm} > \setlength{\topmargin}{1.5cm} > \addtolength{\topmargin}{-2.54cm} > \begin{document} > \documentclass{article} > \begin{document} > This is a test > \end{document} > \end{document} >