From: Tim Burt <tcburt@rochester.rr.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: fullpage.sty replacement [WAS: Problem with LaTeX snippets preview]
Date: Sat, 26 Sep 2009 07:36:46 -0400 [thread overview]
Message-ID: <19133.64718.952772.302330@nitrogen.burtket> (raw)
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)
next reply other threads:[~2009-09-26 11:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-26 11:36 Tim Burt [this message]
2009-09-28 20:10 ` fullpage.sty replacement [WAS: Problem with LaTeX snippets preview] Carsten Dominik
2009-09-28 23:46 ` Tim Burt
2009-09-29 6:48 ` Nick Dokos
2009-09-29 7:38 ` Carsten Dominik
2009-09-29 17:03 ` Nick Dokos
2009-09-30 8:27 ` Carsten Dominik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=19133.64718.952772.302330@nitrogen.burtket \
--to=tcburt@rochester.rr.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).