emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Include LaTeX source and compiled result
@ 2022-06-08  7:43 Denis Maier
  2022-06-08  7:48 ` Denis Maier
  2022-06-08  8:28 ` Fraga, Eric
  0 siblings, 2 replies; 8+ messages in thread
From: Denis Maier @ 2022-06-08  7:43 UTC (permalink / raw)
  To: Org Mode List

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}



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-06-11  8:38 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-08  7:43 Include LaTeX source and compiled result Denis Maier
2022-06-08  7:48 ` Denis Maier
2022-06-08  8:28 ` Fraga, Eric
2022-06-08 19:01   ` Denis Maier
2022-06-09  7:47     ` Fraga, Eric
2022-06-09  7:58       ` Denis Maier
2022-06-09 11:49         ` Fraga, Eric
2022-06-11  8:38     ` Ihor Radchenko

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).