emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG, LaTeX] LATEX_CLASS_OPTIONS don't always work
@ 2013-02-19 22:14 Michael Strey
  2013-02-20 19:27 ` Nicolas Goaziou
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Strey @ 2013-02-19 22:14 UTC (permalink / raw)
  To: emacs-orgmode

This is a minor issue.

The replacement of LaTeX class options by

#+LATEX_CLASS_OPTIONS: [ngerman]

doesn't work if the documentclass definition in org-latex-classes
consists of more than one line.

I used such a definition in my Koma-script letters:

\documentclass[%
fontsize=11pt,%
strey_consult,%
c4envelope,  % optional
]{scrlttr2}

For such a definition the replacement doesn't work.

If I reduce the LaTeX expression to one line, everything is fine.

I tracked down the issue to the regular expression in 

(if class-options
    (replace-regexp-in-string
     "^[ \t]*\\\\documentclass\\(\\[.*?\\]\\)"
     class-options header t nil 1)
 header)

Here I gave up for today.

Regards
-- 
Michael Strey 
www.strey.biz

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUG, LaTeX] LATEX_CLASS_OPTIONS don't always work
  2013-02-19 22:14 [BUG, LaTeX] LATEX_CLASS_OPTIONS don't always work Michael Strey
@ 2013-02-20 19:27 ` Nicolas Goaziou
  2013-02-25  9:25   ` Michael Strey
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Goaziou @ 2013-02-20 19:27 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

Michael Strey <mstrey@strey.biz> writes:

> This is a minor issue.
>
> The replacement of LaTeX class options by
>
> #+LATEX_CLASS_OPTIONS: [ngerman]
>
> doesn't work if the documentclass definition in org-latex-classes
> consists of more than one line.
>
> I used such a definition in my Koma-script letters:
>
> \documentclass[%
> fontsize=11pt,%
> strey_consult,%
> c4envelope,  % optional
> ]{scrlttr2}
>
> For such a definition the replacement doesn't work.
>
> If I reduce the LaTeX expression to one line, everything is fine.
>
> I tracked down the issue to the regular expression in 
>
> (if class-options
>     (replace-regexp-in-string
>      "^[ \t]*\\\\documentclass\\(\\[.*?\\]\\)"
>      class-options header t nil 1)
>  header)
>
> Here I gave up for today.

Thank you for the detailed report. It should be fixed.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUG, LaTeX] LATEX_CLASS_OPTIONS don't always work
  2013-02-20 19:27 ` Nicolas Goaziou
@ 2013-02-25  9:25   ` Michael Strey
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Strey @ 2013-02-25  9:25 UTC (permalink / raw)
  To: emacs-orgmode

Hi Nicolas,

On Wed, Feb 20, 2013 at 08:27:31PM +0100, Nicolas Goaziou wrote:

[...]

> Thank you for the detailed report. It should be fixed.

I confirm, it works.  Thank you!  And thanks as well for the lesson in
regular expressions.  After one hour I finally understand your
expression :-) .

Regards
-- 
Michael Strey 
www.strey.biz

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-02-25  9:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-19 22:14 [BUG, LaTeX] LATEX_CLASS_OPTIONS don't always work Michael Strey
2013-02-20 19:27 ` Nicolas Goaziou
2013-02-25  9:25   ` Michael Strey

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).