Code :

#+OPTIONS: num:nil 
#+OPTIONS: toc:nil 
#+LATEX_HEADER: \pagenumbering{}
#+LATEX_HEADER: \usepackage[right=1.5cm]{geometry} 


DOB: XX XX 1987 

PH 123456789



* Past, Medical and Personal History  Patient complained of constipation since 2 months.  Patient is getting infrequent stools with frequency of * . Type of stool according to Bristol scale:  II  . Patient is getting pain during defecation. Patient noticed bleeding seperate from the stool .  Patient gets abdominal discomfort when constipated and feel better after defecation .
* History mnnmnm   Mucosal breaks more than 5 mm long, none of which extends between the tops of two mucosal folds suggested grade B reflux esophagitis by LA classification. 
* Examination 
- jhj 
- hjhj 
- jkjk  
* Investigations    hjhjComplete blood count, s creatinine, Serum sodium and pottasi

* Rx

1. abc  20 mg 1 tab  20 minutes before breakfast once daily 

2. cde  20 mg  20 minutes before breakfast once daily (1-0-0-0)  x


    Debugger entered--Lisp error: (void-variable Pas)
  eval(Pas nil)
  call-interactively(eval-last-sexp nil nil)

Intermittently it exports to pdf through latex correctly, but mostly fails.

Details Windows 7 Emacs GNU Emacs 24.5.1 (i686-pc-mingw32) Org Org-mode version 8.2.10 (release_8.2.10 Kindly help

migrated from tex.stackexchange.com Nov 29 '17 at 8:15

This question came from our site for users of TeX, LaTeX, ConTeXt, and related typesetting systems.

  • Well, before it exports to PDF, it must create a TeX source. Can you also post that? It's really strange that it calls eval even though you have no Babel code blocks here... Maybe it's related somehow to {{{date}}}, though I wouldn't know. – wvxvw Nov 29 '17 at 12:12
  • The screen does not proceed to usual export option. No question of tex source – Vaibhav Nov 29 '17 at 12:39
  • @wvxvw Removing {{{date}}} does not help – Vaibhav Nov 29 '17 at 12:42
  • Are you sure you are pressing C-c C-e and not C-x C-e? First is normally bound to org-export-dispatch while second is bound to eval-last-sexp (which the exception seem to be coming from). – wvxvw Nov 29 '17 at 12:44
  • Will check and let you know. Thanks for feedback – Vaibhav Nov 29 '17 at 12:53

Strange, if I use lower case it works.



DOB: XX XX 1987

PH 123456789




Your observation is right, in lower case it works.

You can read Special-blocks-in-LaTeX-export to understand why.

In few words, your org-mode code

  ...some text...

was exported as the following LaTeX code:

  ...some text...

However, LaTeX expects a lower case environment name:

  ...some text...

hence the right org-mode code is:

  ...some text...

Another example that uses the quoting package and forwards an option value to the exported LaTeX environment is:

#+LATEX_HEADER: \usepackage{quoting}


#+ATTR_LATEX: :options [font=itshape]
   ...some text...

It is exported as the following LaTeX code:

   ...some text...

Its effect is to use italic fonts for quoted text.

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.