2

I´ve just installed emacs 24.4 and tried to process my files, in this case, an org-File. When it comes to export (as pdf for example), the new emacs behaves completely different, it is not able to process my org-mode files anymore. The error-messages are unclear, like

"replace-regexp-in-string: Invalid use of `\' in replacement text". 

Since emacs and org-mode is my main editing tool, if i can´t process my "old" files, i have to go back to the old emacs (24.3).

Example Code:

#+TITLE:     Atmel atmega328p Register
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport 
#+LaTeX_CLASS_OPTIONS: [captions=tableheading]
#+LaTeX_CLASS_OPTIONS: [article,letterpaper,times,12pt,listings-bw,microtype]
#+LaTeX_CLASS_OPTIONS: [captions=tableheading]
#+LaTeX_CLASS_OPTIONS: \usepackage{hyperref}
#+LaTeX_HEADER:  \headheight=0pt
#+LaTeX_HEADER:  \oddsidemargin=-1cm
#+LaTeX_HEADER:  \topmargin=-1cm
#+LaTeX_HEADER: \usepackage{placeins}
#+STARTUP: showall

* ATMega328P Register

** TCCR0A – Timer/Counter Control Register A

#+CAPTION: TCCR0A – Timer/Counter Control Register A
#+NAME:   tab: TCCR0A 
#+attr_latex: align=|l|c|c|c|c|c|c|c|c|
|--------------+--------+--------+--------+--------+----+----+-------+-------|
| Bit          |      7 |      6 |      5 |      4 |  3 |  2 |     1 |     0 |
|--------------+--------+--------+--------+--------+----+----+-------+-------|
| 0x24 (0x44)  | COM0A1 | COM0A0 | COM0B1 | COM0B0 | -- | -- | WGM01 | WGM00 |
| Read/Write   |    R/W |    R/W |    R/W |    R/W |  R |  R |   R/W |   R/W |
| InitialValue |      0 |      0 |      0 |      0 |  0 |  0 |     0 |     0 |
|--------------+--------+--------+--------+--------+----+----+-------+-------|

*** Prescaler at 16 MHz 
#+CAPTION: Prescaler 16 MHz
#+NAME:   tab: Prescaler 16 MHz
#+attr_latex: align=|c|c|c|l|c|
#+tblname: delsee
|------+------+--------+---------------------------------+-----|
| CS02 | CS01 |   CS00 |                              16 | MHz |
|------+------+--------+---------------------------------+-----|
|      |      | Clock: |                        16000000 | Hz  |
|------+------+--------+---------------------------------+-----|
|    0 |    0 |      0 |           Timer/Counter stopped |     |
|    0 |    0 |      1 |                   No prescaling |     |
|    0 |    1 |      0 |                         2000000 | Hz  |
|    0 |    1 |      1 |                          250000 | Hz  |
|    1 |    0 |      0 |                           62500 | Hz  |
|    1 |    0 |      1 |                           15625 | Hz  |
|    1 |    1 |      0 | External clock source on T0 pin |     |
|      |      |        |          Clock on falling edge. |     |
|    1 |    1 |      1 | External clock source on T0 pin |     |
|      |      |        |           Clock on rising edge. |     |
|------+------+--------+---------------------------------+-----|
#+TBLFM: @5$4=@2$4/8::@6$4=@2$4/64::@7$4=@2$4/256::@8$4=@2$4/1024

regards


I´ve installed the "old" version, 24.3 and now i face the same problem, so it seems to be a configuration problem, but i can´t remember that i have done something special to process an org-file in emacs.

2
  • Your minimal working example could be a little more minimal! Can you reproduce the error without including the tables?
    – Tyler
    Mar 24, 2015 at 21:42
  • This is confusing. Your edit says that you get the same problem in Emacs 24.3, but your answer talks about something that changed in 24.4.
    – Malabarba
    Mar 25, 2015 at 13:33

1 Answer 1

1

Found the solution, the behavior of the new emacs versions seems to be slightly different from the old one, this code will compile (Latex directives seems no longer be defined as "Latex Options", rather it should be declared as "Latex" commands):

#+TITLE:     Atmel atmega328p Register
#+AUTHOR:    Coliban
#+EMAIL:     coliban
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
#+LaTeX_CLASS_OPTIONS: [captions=tableheading]
#+LaTeX_CLASS_OPTIONS: [article,letterpaper,times,12pt,listings-bw,microtype]
#+LaTeX_CLASS_OPTIONS: [captions=tableheading]


#+STARTUP: showall
#+LaTeX: \usepackage{hyperref}


* ATMega328P Register

** TCCR0A – Timer/Counter Control Register A

#+CAPTION: TCCR0A – Timer/Counter Control Register A
#+NAME:   tab: TCCR0A 
#+attr_latex: align=|l|c|c|c|c|c|c|c|c|
|--------------+--------+--------+--------+--------+----+----+-------+-------|
| Bit          |      7 |      6 |      5 |      4 |  3 |  2 |     1 |     0 |
|--------------+--------+--------+--------+--------+----+----+-------+-------|
| 0x24 (0x44)  | COM0A1 | COM0A0 | COM0B1 | COM0B0 | -- | -- | WGM01 | WGM00 |
| Read/Write   |    R/W |    R/W |    R/W |    R/W |  R |  R |   R/W |   R/W |
| InitialValue |      0 |      0 |      0 |      0 |  0 |  0 |     0 |     0 |
|--------------+--------+--------+--------+--------+----+----+-------+-------|

*** Prescaler at 16 MHz 
#+CAPTION: Prescaler 16 MHz
#+NAME:   tab: Prescaler 16 MHz
#+attr_latex: align=|c|c|c|l|c|
#+tblname: delsee
|------+------+--------+---------------------------------+-----|
| CS02 | CS01 |   CS00 |                              16 | MHz |
|------+------+--------+---------------------------------+-----|
|      |      | Clock: |                        16000000 | Hz  |
|------+------+--------+---------------------------------+-----|
|    0 |    0 |      0 |           Timer/Counter stopped |     |
|    0 |    0 |      1 |                   No prescaling |     |
|    0 |    1 |      0 |                         2000000 | Hz  |
|    0 |    1 |      1 |                          250000 | Hz  |
|    1 |    0 |      0 |                           62500 | Hz  |
|    1 |    0 |      1 |                           15625 | Hz  |
|    1 |    1 |      0 | External clock source on T0 pin |     |
|      |      |        |          Clock on falling edge. |     |
|    1 |    1 |      1 | External clock source on T0 pin |     |
|      |      |        |           Clock on rising edge. |     |
|------+------+--------+---------------------------------+-----|
#+TBLFM: @5$4=@2$4/8::@6$4=@2$4/64::@7$4=@2$4/256::@8$4=@2$4/1024
2
  • 2
    #+LaTeX_HEADER works here too. (Emacs 25.0.50). Ah, but #+LaTeX_CLASS_OPTIONS: adds an option to the document class (while you tried to add a package in that way).
    – wvxvw
    Feb 22, 2015 at 20:01
  • @wvxw, your are right, i changed it to LaTeX_HEADER: \usepackage{hyperref} and it is working. My working example above works of course, because there i didnt made the mistake i made in my first example. Thank you
    – Coliban
    Apr 19, 2016 at 13:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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