From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Arntson Subject: Re: latex markup in org? Date: Sun, 01 Jun 2014 17:09:55 -0700 Message-ID: <87mwdwkw8c.fsf@stevenarntson.com> References: <87vbslkth3.fsf@stevenarntson.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40569) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WrFpR-000895-3D for emacs-orgmode@gnu.org; Sun, 01 Jun 2014 20:10:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WrFpK-0006n5-Mf for emacs-orgmode@gnu.org; Sun, 01 Jun 2014 20:10:16 -0400 Received: from plane.gmane.org ([80.91.229.3]:59218) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WrFpK-0006n1-HE for emacs-orgmode@gnu.org; Sun, 01 Jun 2014 20:10:10 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WrFpH-0005PA-BF for emacs-orgmode@gnu.org; Mon, 02 Jun 2014 02:10:07 +0200 Received: from 97-113-52-109.tukw.qwest.net ([97.113.52.109]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 02 Jun 2014 02:10:07 +0200 Received: from steven by 97-113-52-109.tukw.qwest.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 02 Jun 2014 02:10:07 +0200 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org John Kitchin writes: > Maybe you can include the sty file as a code block that will be > tangled before export. You should put that block in a section tagged > no-export. Depending on your setup, you may need to make a code block > to build your latex file and/or pdf to make sure the tangling happens. > > at the top keep this > #+LATEX_HEADER: \usepackage{filestyle} > > and in the last section do this > * build :noexport: > > #+begin_src text :tangle filestyle.sty > latex code for style > #+end_src > > #+begin_src emacs-lisp > (org-babel-tangle) > (save-buffer) > (org-latex-export-to-pdf) > #+end_src > > and finally put your cursor in the last block, and type C-c C-c. that > should do what you want. > > John > > ----------------------------------- > John Kitchin > Associate Professor > Doherty Hall A207F > Department of Chemical Engineering > Carnegie Mellon University > Pittsburgh, PA 15213 > 412-268-7803 > http://kitchingroup.cheme.cmu.edu > > On Sun, Jun 1, 2014 at 2:57 AM, Steven Arntson > wrote: > > I've been learning to export from org to latex (to pdf), and have > had > great success. There's a simplification to the process I'd like to > make, > though, if it's possible. > > Right now I use files: file.org and filestyle.sty. The .sty gives > the latex-specific instruction, and I point to it from file.org > with a > line of #+LATEX_HEADER: \usepackage{filestyle}. This works great, > but > I'd love to have just one file, not two, to keep things simple. > > So I tried putting the contents of filestyle.sty near the top of > file.org > inside of #+BEGIN_latex and #+END_latex, but it doesn't quite > work. It > incompletely works, which is perplexing... > > I'd appreciate any ideas about this--can it be done? > > Thank you! > Steven > > Thanks for this--great idea. I'll give it a try. -steven