From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Burt Subject: Re: fullpage.sty replacement [WAS: Problem with LaTeX snippets preview] Date: Mon, 28 Sep 2009 19:46:43 -0400 Message-ID: <19137.19171.840016.96455@nitrogen.burtket> References: <19133.64718.952772.302330@nitrogen.burtket> Reply-To: tcburt@rochester.rr.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MsPvp-0004Qv-5W for emacs-orgmode@gnu.org; Mon, 28 Sep 2009 19:47:01 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MsPvi-0004QB-Tn for emacs-orgmode@gnu.org; Mon, 28 Sep 2009 19:46:59 -0400 Received: from [199.232.76.173] (port=42425 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MsPvi-0004Q6-On for emacs-orgmode@gnu.org; Mon, 28 Sep 2009 19:46:54 -0400 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.125]:44858) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MsPvh-0000fy-4I for emacs-orgmode@gnu.org; Mon, 28 Sep 2009 19:46:54 -0400 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Carsten Dominik Cc: emacs-orgmode Carsten --- Ah, I see. I had not become one with the thread to see that this was not used for documents. Now I get to learn something new. It's a good day. Good evening, Tim Carsten Dominik writes: > Hi Tim, > > I have applied your patch, thanks. > > The header for the LaTeX files used to produce PDF export independent > from this. The stuff here is only used to create small images that > will be displayed in Emacs or used in HTML export. > > - Carsten > > On Sep 26, 2009, at 12:36 PM, Tim Burt wrote: > > > > > In another thread there was a discussion about replacing the > > use of fullpage.sty with its functionality. > > NickD> Looks like the culprit is fullpage.sty - seems to be required > > NickD> by the LaTeX code that org-preview-latex-fragment generates. > > > > CarstenD> I believe the reason that this is used it to make sure that > > CarstenD> wide formulas can still be formatted reasonably well, > > CarstenD> without additional line breaks. I guess we could inline > > CarstenD> the content of this small package. > > CarstenD> > > CarstenD> Would somebody like to try to replace this with just the > > CarstenD> margin setting commands of fullpage.sty? > > With continued thanks to Patrick Daly, the author of fullpage.sty and > > my favorite LaTeX book "A Guide to LaTeX2e", I put the margin and text > > size settings accomplished by fullpage.sty in org-format-latex-header > > of org.el. > > Org-mode version 6.30trans (release_6.30d.882.gdbd63.dirty) > > The diff below is offered as a step towards inlining the > > functionality. > > > > The caveats: > > 1. This is untested > > - When I execute org-export-as-pdf some other header appears in > > the .tex file, and I have not yet discovered the source of this > > other header. > > 2. This is the first time I've done a git diff. > > > > If there are troubles in testing I will be happy to help resolve. > > > > Good morning, > > Tim > > > > Output of git diff org.el: > > diff --git a/lisp/org.el b/lisp/org.el > > index 89d3bc8..8772968 100644 > > --- a/lisp/org.el > > +++ b/lisp/org.el > > @@ -2678,13 +2678,24 @@ This is a property list with the following > > properties: > > :type 'plist) > > > > (defcustom org-format-latex-header "\\documentclass{article} > > -\\usepackage{fullpage} % do not remove > > \\usepackage{amssymb} > > \\usepackage[usenames]{color} > > \\usepackage{amsmath} > > \\usepackage{latexsym} > > \\usepackage[mathscr]{eucal} > > -\\pagestyle{empty} % do not remove" > > +\\pagestyle{empty} % do not remove > > +\\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}" > > "The document header used for processing LaTeX fragments." > > :group 'org-latex > > :type 'string) > > > > > > _______________________________________________ > > Emacs-orgmode mailing list > > Remember: use `Reply All' to send replies to the list. > > Emacs-orgmode@gnu.org > > http://lists.gnu.org/mailman/listinfo/emacs-orgmode >