Sumatra PDF Forward and Inverse search emacs
up vote
1
down vote
favorite
I have spent so much time trying to find a way to do both forward and inverse search on Emacs-Sumatra on a windows 10 computer.
Whenever I do C-c C-c, I would like to be sent to the part of the PDF that corresponds to where I have the cursor at that time. Likewise, I'd like to be able to "Shift+click" on Sumatra ad be sent to that line of code on Emacs.
On the init.el I have:
;;==================== LaTeX ====================
;; =============== Basic Settings =================
(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)
(setq TeX-parse-self t) ; Enable parse on load
(setq TeX-auto-save t) ; Enable parse on save
(setq TeX-auto-local ".emacs.c/auto/") ; Directory for autosaves
(setq TeX-save-query nil) ;; autosave before compiling
(setq TeX-electric-sub-and-superscript t) ;; Automatic script braces
(setq TeX-electric-math (cons "$" "$")) ;; Automatic dollars
(setq latex-run-command "pdflatex")
(setq TeX-PDF-mode t) ;; set default to PDF-LaTeX
(setq-default TeX-master nil) ;; ask everytime for default master-file
(add-hook 'LaTeX-mode-hook 'visual-line-mode)
;;---------------- Interactive Sumatra ---------------
(setq TeX-source-correlate-mode t)
(setq TeX-source-correlate-method 'synctex)
(setq TeX-view-program-list
'(("Sumatra PDF" (""C:/Program Files/SumatraPDF/SumatraPDF.exe" -reuse-instance"
(mode-io-correlate " -forward-search %b %n ") " %o"))))
(eval-after-load 'tex
'(progn
(assq-delete-all 'output-pdf TeX-view-program-selection)
(add-to-list 'TeX-view-program-selection '(output-pdf "Sumatra PDF"))))
(server-start)
And in Sumatra I have:
CheckForUpdates = true
RememberOpenedFiles = true
InverseSearchCmdLine = "C:Emacsbinemacsclientw.exe" -n +%l "%f"
EnableTeXEnhancements = true
DefaultDisplayMode = automatic
Can anybody tell me what am I doing wrong? I am about to write a very long document and being able to do this kind of search seems rather crucial.
Thanks!
compiling emacs sumatrapdf
New contributor
Leopoldo Cuspinera is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
up vote
1
down vote
favorite
I have spent so much time trying to find a way to do both forward and inverse search on Emacs-Sumatra on a windows 10 computer.
Whenever I do C-c C-c, I would like to be sent to the part of the PDF that corresponds to where I have the cursor at that time. Likewise, I'd like to be able to "Shift+click" on Sumatra ad be sent to that line of code on Emacs.
On the init.el I have:
;;==================== LaTeX ====================
;; =============== Basic Settings =================
(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)
(setq TeX-parse-self t) ; Enable parse on load
(setq TeX-auto-save t) ; Enable parse on save
(setq TeX-auto-local ".emacs.c/auto/") ; Directory for autosaves
(setq TeX-save-query nil) ;; autosave before compiling
(setq TeX-electric-sub-and-superscript t) ;; Automatic script braces
(setq TeX-electric-math (cons "$" "$")) ;; Automatic dollars
(setq latex-run-command "pdflatex")
(setq TeX-PDF-mode t) ;; set default to PDF-LaTeX
(setq-default TeX-master nil) ;; ask everytime for default master-file
(add-hook 'LaTeX-mode-hook 'visual-line-mode)
;;---------------- Interactive Sumatra ---------------
(setq TeX-source-correlate-mode t)
(setq TeX-source-correlate-method 'synctex)
(setq TeX-view-program-list
'(("Sumatra PDF" (""C:/Program Files/SumatraPDF/SumatraPDF.exe" -reuse-instance"
(mode-io-correlate " -forward-search %b %n ") " %o"))))
(eval-after-load 'tex
'(progn
(assq-delete-all 'output-pdf TeX-view-program-selection)
(add-to-list 'TeX-view-program-selection '(output-pdf "Sumatra PDF"))))
(server-start)
And in Sumatra I have:
CheckForUpdates = true
RememberOpenedFiles = true
InverseSearchCmdLine = "C:Emacsbinemacsclientw.exe" -n +%l "%f"
EnableTeXEnhancements = true
DefaultDisplayMode = automatic
Can anybody tell me what am I doing wrong? I am about to write a very long document and being able to do this kind of search seems rather crucial.
Thanks!
compiling emacs sumatrapdf
New contributor
Leopoldo Cuspinera is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I don't know if sumatra does what you need but I think that you can view pdf docment and do inverse search with emacs with no need of sumatra
– Hafid Boukhoulda
12 hours ago
Which version of AUCTeX are you using? And what happens if you hitC-c C-v
afterC-c C-c
?
– Arash Esbati
12 hours ago
In your Sumatra advanced settings ReuseInstance should be set true thus no need to complicate the forward search with -reuse-instance just remove it also in SumatraPDF I think use tabs needs to be true certainly set HighlightPermanent = true then you can see the results more easily Important the command I use to go to PDF is C-c C-v And to jump back to line in buffer it is Double click not control
– KJO
11 hours ago
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I have spent so much time trying to find a way to do both forward and inverse search on Emacs-Sumatra on a windows 10 computer.
Whenever I do C-c C-c, I would like to be sent to the part of the PDF that corresponds to where I have the cursor at that time. Likewise, I'd like to be able to "Shift+click" on Sumatra ad be sent to that line of code on Emacs.
On the init.el I have:
;;==================== LaTeX ====================
;; =============== Basic Settings =================
(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)
(setq TeX-parse-self t) ; Enable parse on load
(setq TeX-auto-save t) ; Enable parse on save
(setq TeX-auto-local ".emacs.c/auto/") ; Directory for autosaves
(setq TeX-save-query nil) ;; autosave before compiling
(setq TeX-electric-sub-and-superscript t) ;; Automatic script braces
(setq TeX-electric-math (cons "$" "$")) ;; Automatic dollars
(setq latex-run-command "pdflatex")
(setq TeX-PDF-mode t) ;; set default to PDF-LaTeX
(setq-default TeX-master nil) ;; ask everytime for default master-file
(add-hook 'LaTeX-mode-hook 'visual-line-mode)
;;---------------- Interactive Sumatra ---------------
(setq TeX-source-correlate-mode t)
(setq TeX-source-correlate-method 'synctex)
(setq TeX-view-program-list
'(("Sumatra PDF" (""C:/Program Files/SumatraPDF/SumatraPDF.exe" -reuse-instance"
(mode-io-correlate " -forward-search %b %n ") " %o"))))
(eval-after-load 'tex
'(progn
(assq-delete-all 'output-pdf TeX-view-program-selection)
(add-to-list 'TeX-view-program-selection '(output-pdf "Sumatra PDF"))))
(server-start)
And in Sumatra I have:
CheckForUpdates = true
RememberOpenedFiles = true
InverseSearchCmdLine = "C:Emacsbinemacsclientw.exe" -n +%l "%f"
EnableTeXEnhancements = true
DefaultDisplayMode = automatic
Can anybody tell me what am I doing wrong? I am about to write a very long document and being able to do this kind of search seems rather crucial.
Thanks!
compiling emacs sumatrapdf
New contributor
Leopoldo Cuspinera is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I have spent so much time trying to find a way to do both forward and inverse search on Emacs-Sumatra on a windows 10 computer.
Whenever I do C-c C-c, I would like to be sent to the part of the PDF that corresponds to where I have the cursor at that time. Likewise, I'd like to be able to "Shift+click" on Sumatra ad be sent to that line of code on Emacs.
On the init.el I have:
;;==================== LaTeX ====================
;; =============== Basic Settings =================
(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)
(setq TeX-parse-self t) ; Enable parse on load
(setq TeX-auto-save t) ; Enable parse on save
(setq TeX-auto-local ".emacs.c/auto/") ; Directory for autosaves
(setq TeX-save-query nil) ;; autosave before compiling
(setq TeX-electric-sub-and-superscript t) ;; Automatic script braces
(setq TeX-electric-math (cons "$" "$")) ;; Automatic dollars
(setq latex-run-command "pdflatex")
(setq TeX-PDF-mode t) ;; set default to PDF-LaTeX
(setq-default TeX-master nil) ;; ask everytime for default master-file
(add-hook 'LaTeX-mode-hook 'visual-line-mode)
;;---------------- Interactive Sumatra ---------------
(setq TeX-source-correlate-mode t)
(setq TeX-source-correlate-method 'synctex)
(setq TeX-view-program-list
'(("Sumatra PDF" (""C:/Program Files/SumatraPDF/SumatraPDF.exe" -reuse-instance"
(mode-io-correlate " -forward-search %b %n ") " %o"))))
(eval-after-load 'tex
'(progn
(assq-delete-all 'output-pdf TeX-view-program-selection)
(add-to-list 'TeX-view-program-selection '(output-pdf "Sumatra PDF"))))
(server-start)
And in Sumatra I have:
CheckForUpdates = true
RememberOpenedFiles = true
InverseSearchCmdLine = "C:Emacsbinemacsclientw.exe" -n +%l "%f"
EnableTeXEnhancements = true
DefaultDisplayMode = automatic
Can anybody tell me what am I doing wrong? I am about to write a very long document and being able to do this kind of search seems rather crucial.
Thanks!
compiling emacs sumatrapdf
compiling emacs sumatrapdf
New contributor
Leopoldo Cuspinera is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Leopoldo Cuspinera is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited 12 hours ago
Arash Esbati
5,1581823
5,1581823
New contributor
Leopoldo Cuspinera is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 13 hours ago


Leopoldo Cuspinera
61
61
New contributor
Leopoldo Cuspinera is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Leopoldo Cuspinera is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Leopoldo Cuspinera is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I don't know if sumatra does what you need but I think that you can view pdf docment and do inverse search with emacs with no need of sumatra
– Hafid Boukhoulda
12 hours ago
Which version of AUCTeX are you using? And what happens if you hitC-c C-v
afterC-c C-c
?
– Arash Esbati
12 hours ago
In your Sumatra advanced settings ReuseInstance should be set true thus no need to complicate the forward search with -reuse-instance just remove it also in SumatraPDF I think use tabs needs to be true certainly set HighlightPermanent = true then you can see the results more easily Important the command I use to go to PDF is C-c C-v And to jump back to line in buffer it is Double click not control
– KJO
11 hours ago
add a comment |
I don't know if sumatra does what you need but I think that you can view pdf docment and do inverse search with emacs with no need of sumatra
– Hafid Boukhoulda
12 hours ago
Which version of AUCTeX are you using? And what happens if you hitC-c C-v
afterC-c C-c
?
– Arash Esbati
12 hours ago
In your Sumatra advanced settings ReuseInstance should be set true thus no need to complicate the forward search with -reuse-instance just remove it also in SumatraPDF I think use tabs needs to be true certainly set HighlightPermanent = true then you can see the results more easily Important the command I use to go to PDF is C-c C-v And to jump back to line in buffer it is Double click not control
– KJO
11 hours ago
I don't know if sumatra does what you need but I think that you can view pdf docment and do inverse search with emacs with no need of sumatra
– Hafid Boukhoulda
12 hours ago
I don't know if sumatra does what you need but I think that you can view pdf docment and do inverse search with emacs with no need of sumatra
– Hafid Boukhoulda
12 hours ago
Which version of AUCTeX are you using? And what happens if you hit
C-c C-v
after C-c C-c
?– Arash Esbati
12 hours ago
Which version of AUCTeX are you using? And what happens if you hit
C-c C-v
after C-c C-c
?– Arash Esbati
12 hours ago
In your Sumatra advanced settings ReuseInstance should be set true thus no need to complicate the forward search with -reuse-instance just remove it also in SumatraPDF I think use tabs needs to be true certainly set HighlightPermanent = true then you can see the results more easily Important the command I use to go to PDF is C-c C-v And to jump back to line in buffer it is Double click not control
– KJO
11 hours ago
In your Sumatra advanced settings ReuseInstance should be set true thus no need to complicate the forward search with -reuse-instance just remove it also in SumatraPDF I think use tabs needs to be true certainly set HighlightPermanent = true then you can see the results more easily Important the command I use to go to PDF is C-c C-v And to jump back to line in buffer it is Double click not control
– KJO
11 hours ago
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Leopoldo Cuspinera is a new contributor. Be nice, and check out our Code of Conduct.
Leopoldo Cuspinera is a new contributor. Be nice, and check out our Code of Conduct.
Leopoldo Cuspinera is a new contributor. Be nice, and check out our Code of Conduct.
Leopoldo Cuspinera is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f461851%2fsumatra-pdf-forward-and-inverse-search-emacs%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I don't know if sumatra does what you need but I think that you can view pdf docment and do inverse search with emacs with no need of sumatra
– Hafid Boukhoulda
12 hours ago
Which version of AUCTeX are you using? And what happens if you hit
C-c C-v
afterC-c C-c
?– Arash Esbati
12 hours ago
In your Sumatra advanced settings ReuseInstance should be set true thus no need to complicate the forward search with -reuse-instance just remove it also in SumatraPDF I think use tabs needs to be true certainly set HighlightPermanent = true then you can see the results more easily Important the command I use to go to PDF is C-c C-v And to jump back to line in buffer it is Double click not control
– KJO
11 hours ago