How can I achieve this by adding something to ~/.emacs

This is my .emacs

OS: Ubuntu20.04LTS (WSL)

Emacs: 26.3

XeLaTeX: 6.3.2

1 Answer 1


This is covered in the AucTeX manual, specifically the section (auctex) Starting Viewers.

The command to launch a viewer is:

-- Command: TeX-view
('C-c C-v') Start a viewer without confirmation. The viewer is
started either on a region or the master file, depending on the
last command issued. This is especially useful for jumping to the
location corresponding to point in the viewer when using

If you want to customize the program used to view pdfs, the variable to start with is TeX-view-program-selection:

The association between the tests for the conditions mentioned above and the viewers is made in the variable 'TeX-view-program-selection'. Therefore this variable is the starting point for customization if you want to use other viewers than the ones suggested by default.

-- User Option: TeX-view-program-selection
This is a list of predicates and viewers which is evaluated from
front to back in order to find out which viewer to call under the
given conditions. In the first element of each list item you can
reference one or more predicates defined in
'TeX-view-predicate-list' or 'TeX-view-predicate-list-builtin'. In
the second element you can reference a viewer defined in
'TeX-view-program-list' or 'TeX-view-program-list-builtin'. The
viewer of the first item with a positively evaluated predicate is

Check the manual for further details. If you still have specific questions after that, please come back and ask again!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.