From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: latex markup in org? Date: Sun, 1 Jun 2014 15:26:05 -0400 Message-ID: References: <87vbslkth3.fsf@stevenarntson.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=e89a8ff25378fa7d4604facb3f1a Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59125) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WrBOT-00013u-DW for emacs-orgmode@gnu.org; Sun, 01 Jun 2014 15:26:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WrBOR-0008GN-HZ for emacs-orgmode@gnu.org; Sun, 01 Jun 2014 15:26:09 -0400 Received: from mail-pb0-x22d.google.com ([2607:f8b0:400e:c01::22d]:48966) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WrBOR-0008Fk-76 for emacs-orgmode@gnu.org; Sun, 01 Jun 2014 15:26:07 -0400 Received: by mail-pb0-f45.google.com with SMTP id um1so3469930pbc.18 for ; Sun, 01 Jun 2014 12:26:05 -0700 (PDT) In-Reply-To: <87vbslkth3.fsf@stevenarntson.com> 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: Steven Arntson Cc: "emacs-orgmode@gnu.org" --e89a8ff25378fa7d4604facb3f1a Content-Type: text/plain; charset=UTF-8 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 > > > --e89a8ff25378fa7d4604facb3f1a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Maybe you can= include the sty file as a code block that will be tangled before export. Y= ou should put that block in a section tagged no-export. Depending on your s= etup, 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{filestyl= e}

and in the last section do this
* build :noexport:

#+begin_src text :tangle filestyle.sty<= br>
latex code for style
#+end_src

#+begin_src emac= s-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 w= ant.

John

-------= ----------------------------
John Kitchin
Associate Professor
Dohe= rty Hall A207F
Department of Chemical Engineering
Carnegie Mellon Uni= versity
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu

<= /div>

On Sun, Jun 1, 2014 at 2:57 AM, Steven A= rntson <steven@stevenarntson.com> 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.o= rg 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<= br> incompletely works, which is perplexing...

I'd appreciate any ideas about this--can it be done?

Thank you!
Steven



--e89a8ff25378fa7d4604facb3f1a--