[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-AUCTeX] 2014-04-16; (extraopts) difficulties
From: |
Benjamin Slade |
Subject: |
Re: [Bug-AUCTeX] 2014-04-16; (extraopts) difficulties |
Date: |
Thu, 24 Apr 2014 13:05:09 -0600 |
User-agent: |
mu4e 0.9.9.6pre2; emacs 24.3.1 |
(possibly relevant things) from my .emacs:
'(TeX-expand-list (quote (("%(dir)" (lambda nil default-directory))
("%p" TeX-printer-query) ("%q" (lambda nil (TeX-printer-query t)))
("%V" (lambda nil (TeX-source-correlate-start-server-maybe)
(TeX-view-command-raw))) ("%vv" (lambda nil
(TeX-source-correlate-start-server-maybe) (TeX-output-style-check
TeX-output-view-style))) ("%v" (lambda nil
(TeX-source-correlate-start-server-maybe) (TeX-style-check
TeX-view-style))) ("%r" (lambda nil (TeX-style-check TeX-print-style)))
("%l" (lambda nil (TeX-style-check LaTeX-command-style))) ("%(PDF)"
(lambda nil (if (and (eq TeX-engine (quote default)) (or TeX-PDF-mode
TeX-DVI-via-PDFTeX)) "pdf" ""))) ("%(PDFout)" (lambda nil (cond ((and
(eq TeX-engine (quote xetex)) (not TeX-PDF-mode)) " -no-pdf") ((and (eq
TeX-engine (quote luatex)) (not TeX-PDF-mode)) " --output-format=dvi")
((and (eq TeX-engine (quote default)) (not TeX-PDF-mode)
TeX-DVI-via-PDFTeX) " \"\\pdfoutput=0 \"") (t "")))) ("%(mode)" (lambda
nil (if TeX-interactive-mode "" " -interaction=nonstopmode"))) ("%(o?)"
(lambda nil (if (eq TeX-engine (quote omega)) "o" ""))) ("%(tex)"
(lambda nil (eval (nth 2 (assq TeX-engine (TeX-engine-alist))))))
("%(latex)" (lambda nil (eval (nth 3 (assq TeX-engine
(TeX-engine-alist)))))) ("%(execopts)" ConTeXt-expand-options) ("%S"
TeX-source-correlate-expand-options) ("%dS"
TeX-source-specials-view-expand-options) ("%cS"
TeX-source-specials-view-expand-client) ("%(outpage)" (lambda nil (or
(when TeX-source-correlate-output-page-function (funcall
TeX-source-correlate-output-page-function)) "1"))) ("%s" file nil t)
("%t" file t t) ("%`" (lambda nil (setq TeX-command-pos t
TeX-command-text ""))) (" \"\\" (lambda nil (if (eq TeX-command-pos t)
(setq TeX-command-pos pos pos (+ 3 pos)) (setq pos (1+ pos))))) ("\""
(lambda nil (if (numberp TeX-command-pos) (setq TeX-command-text
(concat TeX-command-text (substring command TeX-command-pos (1+ pos)))
command (concat (substring command 0 TeX-command-pos) (substring
command (1+ pos))) pos TeX-command-pos TeX-command-pos t) (setq pos (1+
pos))))) ("%'" (lambda nil (prog1 (if (stringp TeX-command-text) (progn
(setq pos (+ (length TeX-command-text) 9) TeX-command-pos (and
(string-match " " (funcall file t t)) "\"")) (concat TeX-command-text "
\"\\input\"")) (setq TeX-command-pos nil) "") (setq TeX-command-text
nil)))) ("%n" TeX-current-line) ("%d" file "dvi" t) ("%f" file "ps" t)
("%o" (lambda nil (funcall file (TeX-output-extension) t))) ("%b"
TeX-current-file-name-master-relative) ("%m"
preview-create-subdirectory))))
....
(add-hook 'LaTeX-mode-hook '(lambda ()
(add-to-list 'TeX-expand-list
'("%u" Okular-make-url))))
(defun Okular-make-url () (concat
"file://"
(expand-file-name (funcall file (TeX-output-extension) t)
(file-name-directory (TeX-master-file)))
"#src:"
(TeX-current-line)
(expand-file-name (TeX-master-directory))
"./"
(TeX-current-file-name-master-relative)))
.....
(eval-after-load "tex"
'(progn
(add-to-list 'TeX-expand-list
'("%(-PDF)"
(lambda ()
(cond ((string-match "TeX-engine: pdftex"
(buffer-string)) "-pdf")
((string-match "TeX-engine: luatex"
(buffer-string)) "-pdflatex=lualatex -pdf")
((string-match "TeX-engine: xetex" (buffer-string))
"-pdflatex=xelatex -pdf")
(t "-dvi -pdfps")))))
(add-to-list 'TeX-command-list
'("Latexmk" "latexmk %(-PDF) -synctex=1 %s"
TeX-run-TeX nil t
:help "Run Latexmk on file to build everything."))
(setq TeX-command-default "Latexmk")
)
)
.....
On Fri, 31 Dec 1999, Mosè Giordano <address@hidden> wrote:
> 2014-04-23 22:02 GMT+02:00 Benjamin Slade <address@hidden>:
>> (setq
>> [...]
>> TeX-command-list '(("Latexmk" "latexmk %(-PDF) -synctex=1 %s" TeX-run-TeX
>> nil t :help
>> "Run Latexmk on file to build everything.")
>> ("Make" "Makefile" TeX-run-command nil t)
>> ("TeX" "%(PDF)%(tex) %`%S%(PDFout)%(mode)%' %t"
>> TeX-run-TeX nil
>> (plain-tex-mode texinfo-mode ams-tex-mode) :help "Run
>> plain TeX")
>> ("LaTeX" "%`%l%(mode)%' %t" TeX-run-TeX nil (latex-mode
>> doctex-mode) :help
>> "Run LaTeX")
>> ("Makeinfo" "makeinfo %t" TeX-run-compile nil
>> (texinfo-mode) :help
>> "Run Makeinfo with Info output")
>> ("Makeinfo HTML" "makeinfo --html %t" TeX-run-compile
>> nil (texinfo-mode) :help
>> "Run Makeinfo with HTML output")
>> ("AmSTeX" "%(PDF)amstex %`%S%(PDFout)%(mode)%' %t"
>> TeX-run-TeX nil
>> (ams-tex-mode) :help "Run AMSTeX")
>> ("ConTeXt" "texexec --once --texutil %(execopts)%t"
>> TeX-run-TeX nil
>> (context-mode) :help "Run ConTeXt once")
>> ("ConTeXt Full" "texexec %(execopts)%t" TeX-run-TeX nil
>> (context-mode) :help
>> "Run ConTeXt until completion")
>> ("BibTeX" "bibtex %s" TeX-run-BibTeX nil t :help "Run
>> BibTeX")
>> ("View" "%V" TeX-run-discard-or-function t t :help "Run
>> Viewer")
>> ("Print" "%p" TeX-run-command t t :help "Print the file")
>> ("Queue" "%q" TeX-run-background nil t :help "View the
>> printer queue" :visible
>> TeX-queue-command)
>> ("File" "%(o?)dvips %d -o %f " TeX-run-command t t :help
>> "Generate PostScript file")
>> ("Index" "makeindex %s" TeX-run-command nil t :help
>> "Create index file")
>> ("Check" "lacheck %s" TeX-run-compile nil (latex-mode)
>> :help
>> "Check LaTeX file for correctness")
>> ("Spell" "(TeX-ispell-document \"\")" TeX-run-function
>> nil t :help
>> "Spell-check the document")
>> ("Clean" "TeX-clean" TeX-run-function nil t :help
>> "Delete generated intermediate files")
>> ("Clean All" "(TeX-clean t)" TeX-run-function nil t :help
>> "Delete generated intermediate and output files")
>> ("Other" "" TeX-run-command t t :help "Run an arbitrary
>> command"))
>> )
>
> That's strange: the default "TeX" command string is
> "%(PDF)%(tex) %(extraopts) %`%S%(PDFout)%(mode)%' %t"
> instead you have
> "%(PDF)%(tex) %`%S%(PDFout)%(mode)%' %t"
> How come the "%(extraopts)" appears in your command? Did Tassilo
> guess right saying you fiddled with `TeX-expand-list'?
>
> Bye,
> Mosè
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dr Benjamin Slade
pgp fingerprint: 21BA 2AE1 28F6 DF36 110A 0E9C A320 BBE8 2B52 EE19
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
{sent by mu4e on Emacs running under GNU/Linux}
(Choose Linux, Choose Freedom)