1

I'm typing up some notes in Org-mode (emacs). When I try to export the *.org file as *.tex file and then get a pdf, I see the EVEN page numbers don't appear on the outside of the page as I want them to. I thought may be it was because I had forgotten to include the \documentclass option twoside. I still can't get the correct page numbering (see picture below). I'm using fancyhdr package, and \fancyhf[...]{...}command. Can someone please help me figure out the problem?

PREAMBLE of org file

#+STARTUP: nolatexpreview
#+OPTIONS: toc:t
#+LATEX_CLASS: article
#+LATEX_CLASSOPTIONS: [10pt, twoside, a4paper]
#+LATEX_HEADER: \usepackage{esdiff}
#+LATEX_HEADER: \usepackage[version=4]{mhchem}
#+LATEX_HEADER: \usepackage{siunitx}
#+LATEX_HEADER: \setcounter{secnumdepth}{0}
#+LATEX_HEADER: \usepackage[margin=1in]{geometry}
#+LATEX_HEADER: \usepackage{fancyhdr}
#+LATEX_HEADER: \pagestyle{fancy} % choose page-style
#+LATEX_HEADER: \fancyhf{}  % erase and clean up
#+LATEX_HEADER: \fancyhf[HLE,HRO]{\thepage} % H or F=Header or Footer, LCR=Left, Centre, Right

PREAMBLE of tex file

\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fixltx2e}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{textcomp}
\usepackage{marvosym}
\usepackage{wasysym}
\usepackage{amssymb}
\usepackage{hyperref}
\tolerance=1000
\usepackage{esdiff}
\usepackage[version=4]{mhchem}
\usepackage{siunitx}
\setcounter{secnumdepth}{0}
\usepackage[margin=1in]{geometry}
\usepackage{fancyhdr}
\pagestyle{fancy} % choose page-style
\fancyhf{}  % erase and clean up
\fancyhf[HLE,HRO]{\thepage} % H or F=Header or Footer, LCR=Left, Centre, Right
\author{WW}
\date{}
\title{URM}
\hypersetup{
  pdfkeywords={},
  pdfsubject={},
  pdfcreator={Emacs 24.4.1 (Org mode 8.2.10)}}

SCREENSHOT

I'd like the even page number to be on the outside of the page. The inside is the long edge along which the page rotates. See the red arrow's indication. page numbering not correct

  • I'm noticing now that the *.tex file isn't taking the documentclass options I'm telling him to take...May be some emacs/org-mode experts can help me out here? – WobblyWindows Jan 7 '16 at 15:45
3

A quick reference to the Org-handbook online made me realize a typing mistake.

WRONG: #+LATEX_CLASSOPTIONS: [10pt,twoside,a4paper]

CORRECT: #+LATEX_CLASS_OPTIONS: [10pt,twoside,a4paper]

What a difference an underscore sign makes!

|improve this answer|||||
  • 1
    Did this solve your problem entirely? – Alenanno Jan 7 '16 at 16:04
  • Remember it as a good example how stupid software still is in the year 2016. – Keks Dose Jan 7 '16 at 18:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.