I am writing a research paper using orgmode. The org file contains the text of the paper and R source code for generating a graph and some tables. The paper is still incomplete. When I try to export the file to pdf via latex, I face a strange problem. When I export the file first time after opening it, the graph does not appear. When I do it again, the graph appears fine but Section numbers are messed up. The main sections are now numbered 0.1, 0.2 etc while the sub-sections are not numbered at all. In my header, I have: #+OPTIONS: H:3 toc:nil I have changed the value of H but it has no effect. Can somebody please explain what might be wrong. I am using org-version 7.9.1. Vikas
Hi Vikas,
Vikas Rawal <vikaslists@agrarianresearch.org> writes:
> When I try to export the file to pdf via latex, I face a strange
> problem. When I export the file first time after opening it, the
> graph does not appear. When I do it again, the graph appears fine but
> Section numbers are messed up. The main sections are now numbered 0.1,
> 0.2 etc while the sub-sections are not numbered at all.
Wild guess: you may need to configure `org-latex-to-pdf-process'.
But without more information on the original file it's hard to debug.
Can you provide a minimal reproducible example?
--
Bastien
On Thu, Sep 27, 2012 at 09:36:15AM +0200, Bastien wrote: > Hi Vikas, > > Vikas Rawal <vikaslists@agrarianresearch.org> writes: > > > When I try to export the file to pdf via latex, I face a strange > > problem. When I export the file first time after opening it, the > > graph does not appear. When I do it again, the graph appears fine but > > Section numbers are messed up. The main sections are now numbered 0.1, > > 0.2 etc while the sub-sections are not numbered at all. > > Wild guess: you may need to configure `org-latex-to-pdf-process'. > > But without more information on the original file it's hard to debug. > > Can you provide a minimal reproducible example? I worked on my file further and by elimination identified the problem to the following. I am using xelatex. There are following two lines in my org file #+LATEX_CMD: xelatex #+LATEX_HEADER: \setmainfont{Adobe Garamond Pro} Where LATEX_CMD is defined as in http://orgmode.org/worg/org-faq.html#using-xelatex-for-pdf-export If I remove the above two lines, everything works fine (except the fonts, of course). Vikas
[-- Attachment #1: Type: text/plain, Size: 127 bytes --] > > Can you provide a minimal reproducible example? Here is a sample file. If I export it twice, I have the problem. Vikas [-- Attachment #2: temp.org --] [-- Type: text/plain, Size: 1252 bytes --] #+STARTUP: hidestars #+TITLE: Title of my paper #+DATE: #+AUTHOR: Vikas Rawal #+COLUMNS: %25ITEM %TAGS %PRIORITY %T #+OPTIONS: H:3 toc:nil #+LATEX_CMD: xelatex #+LATEX_HEADER: \usepackage{comment,multirow,tabulary,fontspec} #+LATEX_HEADER: \setmainfont{Adobe Garamond Pro} * Introduction Economic conditions in contemporary Indian countryside have been repeatedly characterised as one of an "agrarian crisis". In this context, a study of economics of farming -- of cost of production and profitability -- assumes critical value. Despite this, such studies have not been conducted in adequate detail. * Issues related to macro-level statistics ** Major problems with CCPC data *** On concepts and methodology The most important limitation of CCPC is that it provides no data on overall incomes of farming households from cultivation. Data collection under CCPC is narrowly designed to estimate profitability of individual crops. However, analysis of profitability at the level of individual crops has several limitations. *** On presentation of data **** Disaggregated, unit-level data are not available *** Decentralisation of implementation has resulted in dis-uniform quality of data collection and management *** ** Problem of prices
Hi Vikas,
Vikas Rawal <vikaslists@agrarianresearch.org> writes:
> I am using xelatex. There are following two lines in my org file
>
> #+LATEX_CMD: xelatex
> #+LATEX_HEADER: \setmainfont{Adobe Garamond Pro}
I'm not using xelatex so I hope someone else can help.
--
Bastien
Hello Vikas,
On Fri, Sep 28, 2012 at 03:59:11AM +0530, Vikas Rawal wrote:
> #+STARTUP: hidestars
> #+TITLE: Title of my paper
> #+DATE:
> #+AUTHOR: Vikas Rawal
> #+COLUMNS: %25ITEM %TAGS %PRIORITY %T
> #+OPTIONS: H:3 toc:nil
> #+LATEX_CMD: xelatex
> #+LATEX_HEADER: \usepackage{comment,multirow,tabulary,fontspec}
> #+LATEX_HEADER: \setmainfont{Adobe Garamond Pro}
>
I use XeLaTeX and tried your example file (with the font changed to
something I have). It seems to work for both the old and new exporter.
There is one difference though, I use XeLaTeX differently. Instead of
using #+LATEX_CMD I actually set org-latex-to-pdf-process in my emacs
init file.
;; org to latex customisations, -shell-escape needed for minted
(setq org-latex-to-pdf-process ; for regular export
'("xelatex -shell-escape -interaction nonstopmode -output-directory %o %f"
"xelatex -shell-escape -interaction nonstopmode -output-directory %o %f"
"xelatex -shell-escape -interaction nonstopmode -output-directory %o %f")
org-e-latex-pdf-process ; for experimental org-export
'("xelatex -shell-escape -interaction nonstopmode -output-directory %o %f"
"xelatex -shell-escape -interaction nonstopmode -output-directory %o %f"
"xelatex -shell-escape -interaction nonstopmode -output-directory %o %f"))
I hope this helps.
--
Suvayu
Open source is the future. It sets us free.