[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why does a `standalone` document set `TeX-PDF-from-DVI`?
From: |
Maximilian Wuttke |
Subject: |
Re: Why does a `standalone` document set `TeX-PDF-from-DVI`? |
Date: |
Sat, 16 Jan 2021 13:57:24 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 |
Hi,
On 16/01/2021 00:24, Arash Esbati wrote:
> Actually, it doesn't run the style hook, it only loads the style file.
> You can check this by eval'ing (TeX-style-list) once you load that .tex
> file and/or try to get completion for tikzpicture with `C-c C-e'.
For me, the simple test file actually calls the following hook (in
style/tikz.el):
(TeX-add-style-hook
"tikz"
(lambda ()
(TeX-add-symbols
'("draw" (TeX-TikZ-draw-arg))
'("coordinate" (TeX-TikZ-coordinate-arg))
'("node" (TeX-TikZ-node-arg)))
(LaTeX-add-environments
'("tikzpicture"))))
Thus, I already get completion for tikzpicture. As I wrote before, the
hook was called when processing the `tikz` class option of the
declaration `\documentclass[tikz,border=5pt]{standalone}` (I found this
out using the elisp debugger).
----
> A style file standalone.el which runs the style hooks based on given
> class options can look like this:
[...]
> ,(or LaTeX-global-class-files
> (let ((TeX-file-extensions '("cls")))
> (prog2
> (message "Searching for LaTeX classes...")
> (TeX-search-files-by-type 'texinputs 'global t t)
> (message "Searching for LaTeX classes...done"))))
I am a bit surprised that there is no function for this already.
Otherwise, I think the code looks good. I am not familiar with all the
options, and honestly I've never used the standalone *package* (only the
document class to create a PDF).
Thanks
Maximilian
- Why does a `standalone` document set `TeX-PDF-from-DVI`?, Maximilian Wuttke, 2021/01/09
- Re: Why does a `standalone` document set `TeX-PDF-from-DVI`?, Ikumi Keita, 2021/01/10
- Re: Why does a `standalone` document set `TeX-PDF-from-DVI`?, Maximilian Wuttke, 2021/01/11
- Re: Why does a `standalone` document set `TeX-PDF-from-DVI`?, Arash Esbati, 2021/01/13
- Re: Why does a `standalone` document set `TeX-PDF-from-DVI`?, Maximilian Wuttke, 2021/01/13
- Re: Why does a `standalone` document set `TeX-PDF-from-DVI`?, Ikumi Keita, 2021/01/14
- Re: Why does a `standalone` document set `TeX-PDF-from-DVI`?, Maximilian Wuttke, 2021/01/14
- Re: Why does a `standalone` document set `TeX-PDF-from-DVI`?, Arash Esbati, 2021/01/15
- Re: Why does a `standalone` document set `TeX-PDF-from-DVI`?,
Maximilian Wuttke <=