emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [new exporter] Windows / LaTeX export
@ 2012-10-22 17:40 Achim Gratz
  2012-10-22 19:01 ` Nicolas Goaziou
  0 siblings, 1 reply; 8+ messages in thread
From: Achim Gratz @ 2012-10-22 17:40 UTC (permalink / raw)
  To: emacs-orgmode


The new exporter fires off LaTeX with an absolute path for the file to
export.  If you happen to use a native Emacs, but the LaTeX from Cygwin
that will fail because it expects a POSIX path.  Would it be possible to
change things so that a relative path is used as in the old exporter (or
better yet, start LaTeX in the correct working directory and don't use a
path component at all)?


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf microQ V2.22R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

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

* Re: [new exporter] Windows / LaTeX export
  2012-10-22 17:40 [new exporter] Windows / LaTeX export Achim Gratz
@ 2012-10-22 19:01 ` Nicolas Goaziou
  2012-10-22 19:13   ` Achim Gratz
                     ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Nicolas Goaziou @ 2012-10-22 19:01 UTC (permalink / raw)
  To: Achim Gratz; +Cc: emacs-orgmode

Hello,

Achim Gratz <Stromeko@nexgo.de> writes:

> The new exporter fires off LaTeX with an absolute path for the file to
> export.  If you happen to use a native Emacs, but the LaTeX from Cygwin
> that will fail because it expects a POSIX path.  Would it be possible to
> change things so that a relative path is used as in the old exporter

It should be so in the latest commit. Does it fix the problem?


Regards,

-- 
Nicolas Goaziou

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

* Re: [new exporter] Windows / LaTeX export
  2012-10-22 19:01 ` Nicolas Goaziou
@ 2012-10-22 19:13   ` Achim Gratz
  2012-10-22 20:29   ` Sebastien Vauban
  2012-10-23 15:36   ` Achim Gratz
  2 siblings, 0 replies; 8+ messages in thread
From: Achim Gratz @ 2012-10-22 19:13 UTC (permalink / raw)
  To: emacs-orgmode

Nicolas Goaziou writes:
>> The new exporter fires off LaTeX with an absolute path for the file to
>> export.  If you happen to use a native Emacs, but the LaTeX from Cygwin
>> that will fail because it expects a POSIX path.  Would it be possible to
>> change things so that a relative path is used as in the old exporter
>
> It should be so in the latest commit. Does it fix the problem?

Thank you.  I'll be able to tell you tomorrow.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptations for KORG EX-800 and Poly-800MkII V0.9:
http://Synth.Stromeko.net/Downloads.html#KorgSDada

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

* Re: [new exporter] Windows / LaTeX export
  2012-10-22 19:01 ` Nicolas Goaziou
  2012-10-22 19:13   ` Achim Gratz
@ 2012-10-22 20:29   ` Sebastien Vauban
  2012-10-25 13:17     ` Nicolas Goaziou
  2012-10-23 15:36   ` Achim Gratz
  2 siblings, 1 reply; 8+ messages in thread
From: Sebastien Vauban @ 2012-10-22 20:29 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Nicolas,

Nicolas Goaziou wrote:
> Achim Gratz <Stromeko-i47jiTeKxPI@public.gmane.org> writes:
>
>> The new exporter fires off LaTeX with an absolute path for the file to
>> export. If you happen to use a native Emacs, but the LaTeX from Cygwin that
>> will fail because it expects a POSIX path. Would it be possible to change
>> things so that a relative path is used as in the old exporter
>
> It should be so in the latest commit. Does it fix the problem?

The same type of problem exists for `org-latex-to-pdf-process': contrarily to
what I'd thought from reading the doc, the argument %b is NOT (only) the base
name, but the full name without the file extension; hence, the problem under
Cygwin Emacs with /cygdrive/c type of paths which are sent (via LaTeXMK or
directly) to PDFLaTeX.

Hence, my current (ugly) workaround to support PDFLaTeX and XeTeX in both
Windows and Cygwin versions of Emacs:

--8<---------------cut here---------------start------------->8---
  ;; running a Cygwin version of Emacs
  (if (eq system-type 'cygwin)

      (progn
        ;; default (in Cygwin Emacs)
        (setq org-latex-to-pdf-process
              ;; use latexmk (if installed with LaTeX)
              (if (executable-find "latexmk")
                  '("latexmk -pdf $(cygpath -m %f) && rm -f %b.fdb_latexmk %b.fls %b.ilg %b.ind")
                '("pdflatex -interaction=nonstopmode -output-directory=%o $(cygpath -m %f)"
                  "pdflatex -interaction=nonstopmode -output-directory=%o $(cygpath -m %f)"
                  "pdflatex -interaction=nonstopmode -output-directory=%o $(cygpath -m %f)")))

        (when (string-match "^#\\+LATEX_CMD: xelatex" (buffer-string))
          (setq org-latex-to-pdf-process
                (if (executable-find "latexmk")
                    '("latexmk -pdf -pdflatex=xelatex $(cygpath -m %f) && rm -f %b.fdb_latexmk %b.fls %b.ilg %b.ind")
                  '("xelatex -interaction=nonstopmode -output-directory=%o $(cygpath -m %f)"
                    "xelatex -interaction=nonstopmode -output-directory=%o $(cygpath -m %f)"
                    "xelatex -interaction=nonstopmode -output-directory=%o $(cygpath -m %f)")))))

    ;; default (in Windows binary)
    (setq org-latex-to-pdf-process
          (if (executable-find "latexmk")
              '("latexmk -pdf %f && rm -f %b.fdb_latexmk %b.fls %b.ilg %b.ind")
            '("pdflatex -interaction=nonstopmode -output-directory=%o %f"
              "pdflatex -interaction=nonstopmode -output-directory=%o %f"
              "pdflatex -interaction=nonstopmode -output-directory=%o %f")))

    (when (string-match "^#\\+LATEX_CMD: xelatex" (buffer-string))
      (setq org-latex-to-pdf-process
            (if (executable-find "latexmk")
                '("latexmk -pdf -pdflatex=xelatex %f && rm -f %b.fdb_latexmk %b.fls %b.ilg %b.ind")
              '("xelatex -interaction=nonstopmode -output-directory=%o %f"
                "xelatex -interaction=nonstopmode -output-directory=%o %f"
                "xelatex -interaction=nonstopmode -output-directory=%o %f")))))
--8<---------------cut here---------------end--------------->8---

where I convert Cygwin paths to mixed Windows paths (mixed meaning: use
slashes instead of backslashes -- otherwise, the backslashes should be
escaped, which isn't the case).

Best regards,
  Seb

-- 
Sebastien Vauban

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

* Re: [new exporter] Windows / LaTeX export
  2012-10-22 19:01 ` Nicolas Goaziou
  2012-10-22 19:13   ` Achim Gratz
  2012-10-22 20:29   ` Sebastien Vauban
@ 2012-10-23 15:36   ` Achim Gratz
  2012-10-25 13:19     ` Nicolas Goaziou
  2 siblings, 1 reply; 8+ messages in thread
From: Achim Gratz @ 2012-10-23 15:36 UTC (permalink / raw)
  To: emacs-orgmode

Nicolas Goaziou <n.goaziou <at> gmail.com> writes:
> > The new exporter fires off LaTeX with an absolute path for the file to
> > export.  If you happen to use a native Emacs, but the LaTeX from Cygwin
> > that will fail because it expects a POSIX path.  Would it be possible to
> > change things so that a relative path is used as in the old exporter
> 
> It should be so in the latest commit. Does it fix the problem?

Sadly not.  Somewhere in org-e-latex (I think) the path is made absolute again.
 I'll have a look at it later unless you find it earlier.


Regards,
Achim.

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

* Re: [new exporter] Windows / LaTeX export
  2012-10-22 20:29   ` Sebastien Vauban
@ 2012-10-25 13:17     ` Nicolas Goaziou
  0 siblings, 0 replies; 8+ messages in thread
From: Nicolas Goaziou @ 2012-10-25 13:17 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: public-emacs-orgmode-mXXj517/zsQ



Hello,

"Sebastien Vauban"
<wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:

> The same type of problem exists for `org-latex-to-pdf-process': contrarily to
> what I'd thought from reading the doc, the argument %b is NOT (only) the base
> name, but the full name without the file extension; hence, the problem under
> Cygwin Emacs with /cygdrive/c type of paths which are sent (via LaTeXMK or
> directly) to PDFLaTeX.

Since a very recent patch, "%b" means real base name in
`org-e-latex-pdf-process'.


Regards,

-- 
Nicolas Goaziou

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

* Re: [new exporter] Windows / LaTeX export
  2012-10-23 15:36   ` Achim Gratz
@ 2012-10-25 13:19     ` Nicolas Goaziou
  2012-10-25 13:52       ` Achim Gratz
  0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Goaziou @ 2012-10-25 13:19 UTC (permalink / raw)
  To: Achim Gratz; +Cc: emacs-orgmode

Hello,

Achim Gratz <Stromeko@NexGo.DE> writes:

> Sadly not.  Somewhere in org-e-latex (I think) the path is made absolute again.
>  I'll have a look at it later unless you find it earlier.

By default, commands from `org-e-latex-pdf-process' use "%f" place
holder, which is the absolute file name. You may want to use "%b" (and
a recent Org pull) instead.


Regards,

-- 
Nicolas Goaziou

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

* Re: [new exporter] Windows / LaTeX export
  2012-10-25 13:19     ` Nicolas Goaziou
@ 2012-10-25 13:52       ` Achim Gratz
  0 siblings, 0 replies; 8+ messages in thread
From: Achim Gratz @ 2012-10-25 13:52 UTC (permalink / raw)
  To: emacs-orgmode

Nicolas Goaziou <n.goaziou <at> gmail.com> writes:
> By default, commands from `org-e-latex-pdf-process' use "%f" place
> holder, which is the absolute file name. You may want to use "%b" (and
> a recent Org pull) instead.

I've pulled again and used "texi2dvi" from the value menu and all is well now. 
Thanks.


Regards,
Achim.

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

end of thread, other threads:[~2012-10-25 13:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-22 17:40 [new exporter] Windows / LaTeX export Achim Gratz
2012-10-22 19:01 ` Nicolas Goaziou
2012-10-22 19:13   ` Achim Gratz
2012-10-22 20:29   ` Sebastien Vauban
2012-10-25 13:17     ` Nicolas Goaziou
2012-10-23 15:36   ` Achim Gratz
2012-10-25 13:19     ` Nicolas Goaziou
2012-10-25 13:52       ` Achim Gratz

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