Re: [O] latex export creates "auto" directory

2017-03-03 Thread Takeshi Teshima

Dear Colin,

Thank you for that detailed information!

I'll try them.

Best regards,

Takeshi

On 2017/03/04 1:37, Colin Baxter wrote:

Hello Takeshi,

On Sat, Mar 04 2017, Takeshi Teshima wrote:


I have a question regarding latex export.

When I export an org-mode to a latex file, a directory named "auto" is
created in the same folder as the tex file.

However, I couldn't find what line in the source code of org-mode
creates this directory.

Does anyone know what causes this, or what variables can be used to
control where the directory is created?

It allows AUCTeX to be aware of style files and multi-files. The default
is "auto/" in the working directory. However you set the directory
yourself. I have the settings:

(setq TeX-auto-local "/path/to/auto/dir") ;; Sets /auto/ directory.
(setq TeX-auto-save t) ;; Also sets lisp files to save in /auto/.

If you want to switch it off then try (setq TeX-auto-save nil). I have
never used that myself, so I don't know how successful it might be.

Best wishes

Colin.





Re: [O] latex export creates "auto" directory

2017-03-03 Thread Takeshi Teshima

Hi Tom,
Thank you for the immediate and useful answer!
You've saved me a lot of time. Thank you!
Best regards,
Takeshi

On 2017/03/04 1:06, Thomas S. Dye wrote:

Aloha Takeshi Teshima,

Takeshi Teshima writes:


I have a question regarding latex export.

When I export an org-mode to a latex file, a directory named "auto" is
created in the same folder as the tex file.

However, I couldn't find what line in the source code of org-mode
creates this directory.

Does anyone know what causes this, or what variables can be used to
control where the directory is created?

The "auto" directory contains files used by AucTeX, independently of Org
mode.  I don't know how to tell AucTeX where to put the directory.

All the best,
Tom

--
Thomas S. Dye
http://www.tsdye.com





[O] latex export creates "auto" directory

2017-03-03 Thread Takeshi Teshima

I have a question regarding latex export.

When I export an org-mode to a latex file, a directory named "auto" is  
created in the same folder as the tex file.


However, I couldn't find what line in the source code of org-mode  
creates this directory.


Does anyone know what causes this, or what variables can be used to  
control where the directory is created?




Re: [O] Latex export error: There's no line here to end, with an image with a caption

2017-01-18 Thread Takeshi Teshima

Hello Mr. Goaziou,
Thank you for the reply!

Wow, thank you. It worked. The problem seems to stem from my own config. 
It worked as I turned my personal settings off.


Best,
Takeshi

On 2017/01/19 7:38, Nicolas Goaziou wrote:

Hello,

Takeshi Teshima <takeshi.diadoc...@gmail.com> writes:


When I try to export an org-mode file **that contains a figure with
a caption** with `#+OPTIONS: \n:t`, (See minimal example files)

to a pdf via latex-export, the exported latex file doesn't compile and
I get the following error:

```

LaTeX Error: There's no line here to end.

```

in the `*Org PDF LaTeX Output*` buffer. Thus this is an error from the
command line.

## [2]

So I go to the line of the .tex file that's specified in the error,
and the line always says:

``` latex

\end{figure}\\

```

It is fixed. Could you confirm it behaves as expected in non-trivial
cases?

Regards,






[O] Latex export error: There's no line here to end, with an image with a caption

2017-01-09 Thread Takeshi Teshima

Hi all,

A happy new year!

I have a problem with org-export-to-latex.

# What happens

## [1]

When I try to export an org-mode file **that contains a figure with a  
caption** with `#+OPTIONS: \n:t`, (See minimal example files)


to a pdf via latex-export, the exported latex file doesn't compile and I  
get the following error:


```

LaTeX Error: There's no line here to end.

```

in the `*Org PDF LaTeX Output*` buffer. Thus this is an error from the  
command line.


## [2]

So I go to the line of the .tex file that's specified in the error, and  
the line always says:


``` latex

\end{figure}\\

```


## [3]

If I remove the double backslashes by hand, and compile the generated  
.tex file from the command line, it produces a pdf correctly.



# My environment

I've checked this with:

[1] Org-mode version 8.3.6 (8.3.6-7-g4d7d52-elpa @ ~~~)

[2] Org-mode version 8.2.10 (release_8.2.10 @ ~~~)

[3] Org-mode version 9.0.3 (9.0.3-elpa @ ~~~)

, but the same errors occur.

(I normally use version 8. I know this is an old version. However, v9  
has another problem with #+TITLE: lines. See  
https://github.com/syl20bnr/spacemacs/issues/3246 for more details)



# Reproducing the error

## Files

Attached, please find the files for a minimum example.

- test.org

- test-2017-01-06-17-05-09.jpeg


## Procedure to reproduce:

1. Place the files in the same directory

2. $ emacs -q test.org

3. M-x org-latex-export-to-pdf

(Or instead of 2., your own emacs config will do)


# What I already found

- The caption is necessary to reproduce the error.

- The problem occurs with a single image.

- If I remove the double backslashes by hand, and compile the generated  
.tex file, it compiles correctly.


- The problem doesn't occur with `#+OPTIONS: \n:nil` (which is kind of  
trivial)



# Reference

A relevant thread can be found here:

https://lists.gnu.org/archive/html/emacs-orgmode/2016-09/msg2.html

but I couldn't find a solution there.


Anyone has any ideas? Any idea to bypass this problem may be a lifesaver  
for me.


#+OPTIONS: \n:t

#+CAPTION: test
[[./test-2017-01-06-17-05-09.jpeg]]


[O] Error with inline image resizing

2016-08-05 Thread Takeshi Teshima
Hi all,

When I try to show inline images automatically resized in an org-mode
buffer, the thumbnail doesn't show (a big blank box shows where the resized
image should be) and the following errors are echoed in the "*Messages*"
buffer.

```
ImageMagick error: no decode delegate for this image format `JPEG' @
error/constitute.c/ReadImage/504
```

The image types I have tried are JPG and PNG.
When tried with a PNG file, the error message changes to
```
ImageMagick error: no decode delegate for this image format `PNG' @
error/constitute.c/ReadImage/504
```

* [Related settings]:

** init.el

`(setq org-image-actual-width nil)`

** the org-mode file

```

#+ATTR_LATEX: :width 300pt

[[file:20160802-142357_2016-08-02_13.35.28-1.jpg]]

```

I tried this with Emacs running in the safe mode, i.e. running with "-q"
option.

The inline image shows correctly (with the original size) until I set
`org-image-actual-width` to `nil`, after which I don't see the image in the
buffer

 (A big blank box appears where the image should be. I also see the errors
mentioned above in the "*Messages*" buffer.).

* [Current workaround I use]:
It doesn't occur when I use the snippet in this SO answer.
http://stackoverflow.com/questions/17637685/configuring-emacs-for-showing-fixed-width-inline-images
It basically rewrites org-display-inline-images function.

* [Environmental information]:
** (i) I built my Emacs using the following tool:
https://github.com/renard/emacs-build-macosx
by running `./build-emacs emacs-24.5`.
It was built with ImageMagick, and I can correctly export LaTeX formula
with it.
Also it works fine when I don't use the resize feature, i.e.
`org-image-actual-width` is set to `t`.

** (ii) Versions
*** Emacs:  emacs-24.5.50.1
*** Mac OS X: El Capitan 10.11.6(15G31).

*** $ convert --version

Version: ImageMagick 6.9.5-1 Q16 x86_64 2016-07-15
http://www.imagemagick.org

Copyright: Copyright (C) 1999-2016 ImageMagick Studio LLC

License: http://www.imagemagick.org/script/license.php

Features: Cipher DPC Modules

Delegates (built-in): bzlib freetype jng jpeg ltdl lzma png tiff webp xml
zlib


Thank you very much in advance.

diadochos