Skip to main content
46 votes
Accepted

How to use pdf-tools (pdf-view-mode) in emacs?

Switching from docview to pdf-tools happens 'automatically' when you install pdf-tools. Once you've done this, any time Emacs tries to open a pdf in Emacs, it will use pdf-tools. However, some ...
Tyler's user avatar
  • 22.4k
18 votes

Is there a way to resize margins when exporting PDF in org-mode?

Another way to achieve the same effect more permanently is to modify org-latex-packages-alist to add the geometry package, as follows: (setq org-latex-packages-alist '(("margin=2cm" "geometry" nil)))
Andrzej Pronobis's user avatar
18 votes

How to change style of hyperlinks within PDF published from org-mode document?

While the previous answers are helpful, I'll add a bit more of an explicit recipe for Org mode. By default, Org mode adds a rather unhelpful hypersetup section. You can prevent this addition by ...
dpritch's user avatar
  • 445
18 votes
Accepted

How do I get rid of the red boxes around the links in the TOC?

Following the links given here, you can get rid of the ugly red boxes by adding the following line in the beginning of your org file: #+latex_header: \hypersetup{colorlinks=true} If red isn't your ...
xandfury's user avatar
  • 645
16 votes
Accepted

How to have wrapped text when exporting from org to Latex?

From a LaTeX point of view, these are different cases. In the first case, LaTeX isn't going to wrap -- and it shouldn't! A "verbatim" environment, which is what source-code is set in, respects lines ...
Paul Stanley's user avatar
16 votes
Accepted

Changing default font size in Org LaTeX export

I think you can do this with: #+latex_class_options: [10pt] and #+latex_header: \usepackage{setspace} #+latex_header: \onehalfspacing
John Kitchin's user avatar
  • 11.9k
14 votes

Install Pdf-Tools on Emacs MacOSX

For me, as of April 13, 2017, a reliable way to install pdf-tools on OS X (Mavericks/Sierra) is to use the following pdf-tools config and directions (in the comments): ;;; Install epdfinfo via 'brew ...
Joe's user avatar
  • 571
14 votes
Accepted

How do I limit the width of a table or columns in org-mode PDF export?

You may try something like this: #+ATTR_LATEX: :environment longtable :align |l|p{10cm}|l| | | <30> | | | Column | Wide ...
theldoria's user avatar
  • 1,845
12 votes
Accepted

Exporting Org in Landscape

What about putting the following in the export options: #+LATEX_CLASS: article #+LATEX_CLASS_OPTIONS: [landscape] #+LATEX_HEADER: \usepackage[a4paper]{anysize}
Niclas Börlin's user avatar
11 votes
Accepted

How to add annotation in PDF src block like in this screenshot?

This answer is focused on what I'm interested in, therefore it uses minted for source code listings with Org, and tikzmark as the package that can "mark" a place in your listing so that you can later ...
VanLaser's user avatar
  • 576
10 votes

read e-books in Emacs

Try nov (installable via melpa). It is a reasonable start for reading ePUBs in Emacs.
halloleo's user avatar
  • 1,345
9 votes
Accepted

Add cell background colors to org-mode table in pdf export

Getting inspiration from this answer, the following works. You must install the xcolor package as instructed there. #+LATEX_HEADER: \usepackage[table]{xcolor} * table test | hi | there ...
Juancho's user avatar
  • 5,465
7 votes
Accepted

Org-mode file hyperlinks always use doc-view, can't force it to use external pdf viewer

I fixed the problem by using M-x customize-variable org-file-apps and adding a cons-cell with Extension: \.pdf\' and Command: evince %s at the top. Oddly enough, links starting with file+sys: still ...
Zacatexas's user avatar
  • 313
7 votes
Accepted

org-mode Beamer export: can't change format of title page and TOC

Instead of #+LaTeX: you should try #+BEAMER_HEADER: for all beamer specific configuration lines. For example: #+BEAMER_HEADER: \setbeamertemplate{navigation symbols}{} removes navigation symbols in ...
Lgen's user avatar
  • 1,420
7 votes
Accepted

Recolouring PDFs

Yes, there's a dark ("midnight") theme with pdf-tools. Right-click somewhere within the displayed pdf, go to "Render Options" in the menu (about half-way down) and select "Midnight mode". ...
aplaice's user avatar
  • 2,206
6 votes

convert a text buffer to a pdf file?

This does not address the specific issue of bookmarks in the PDF, but does address the general problem of converting buffers to PDF. If you want to get a PDF "screenshot" of the buffer as you ...
Joe Corneli's user avatar
  • 1,808
6 votes

Printing/exporting to PDF from text-mode

Printing I'm not sure what you've tried, but the best start would probably be ps-print-buffer-with-faces. This answer provides a convenient wrapper for generating a pdf file (copied below): You ...
aplaice's user avatar
  • 2,206
6 votes
Accepted

Org Mode. Set separation length between elements of a list

PDF export is done by exporting the org mode document to LaTeX and then processing the LaTeX document to PDF. There is nothing on the org mode side to control that spacing but org mode does provide ...
NickD's user avatar
  • 31k
6 votes
Accepted

How can I reliably create latex classes in org mode?

Your init file defines a notes class that can be used by org when exporting to LaTeX: #+LATEX_CLASS: notes It works fine, in the sense that it produces a latex output that starts out like this: \...
NickD's user avatar
  • 31k
5 votes

Org-mode file hyperlinks always use doc-view, can't force it to use external pdf viewer

I added (add-to-list 'org-file-apps '("pdf" . "evince %s")) to my init-file. Now C-c C-o opens any PDF in evince and C-u C-u C-c C-o opens them in doc-view.
Dieter.Wilhelm's user avatar
5 votes

convert a text buffer to a pdf file?

You can do C-u M-x ps-print-buffer to print current buffer to a PS file and then pipe it through ps2pdf.
Arne's user avatar
  • 409
5 votes
Accepted

How to jump to a page in `DocView` mode when a pdf contains a roman numeral numbered introduction?

In pdf-tools you can type M-g l (pdf-view-goto-label), which asks for a page-label, which is usually equal to the displayed page-number.
politza's user avatar
  • 3,346
5 votes
Accepted

how to enable pdflatex --shell-escape switch in org-export dispatcher interface

Something like this in your init file should do the trick. (setq org-latex-pdf-process '("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f" "bibtex %b" "pdflatex -...
John Kitchin's user avatar
  • 11.9k
5 votes
Accepted

Select a word in a PDF by double-clicking on it (with pdf-tools)

At first, note that pdf-sync binds mouse-double-1 in the minor mode pdf-sync-minor-mode to pdf-sync-backward-search-mouse. So one should probably only bind it in a minor mode that can be deactivated ...
Tobias's user avatar
  • 33.3k
4 votes

How to change style of hyperlinks within PDF published from org-mode document?

I know this is old and the existing answers are already great. But in case anyone is searching for this and needed a bit more control, here's how to change the hyperref template. (customize-set-value '...
Naheel's user avatar
  • 201
4 votes

Working with LaTeX in Spacemacs: can PDFs be seen in a buffer, rather than via external PDF reader?

It's been ages since I set this up for myself, but here's the code I use. Essentially, it's just registering Emacs itself (or, rather, emacsclient) as an external viewer. (add-to-list 'TeX-view-...
Aaron Harris's user avatar
  • 2,684
4 votes

Working with LaTeX in Spacemacs: can PDFs be seen in a buffer, rather than via external PDF reader?

Here is how I ended up solving the problem: (setq TeX-view-program-selection '((output-pdf "PDF Tools")) TeX-view-program-list '(("PDF Tools" TeX-pdf-tools-sync-view)) TeX-source-correlate-start-...
Louis15's user avatar
  • 263
4 votes

Export to PDF with index bookmarks and unnumbered sections

Here is how I got it working. This produces the PDF index, no table of contents in the document, and no section numbering. #+OPTIONS: toc:nil #+LATEX: \setcounter{secnumdepth}{0} Note that I am ...
a06e's user avatar
  • 181
4 votes
Accepted

How to change formatting TODO in Org-mode's Latex PDF output

A similar question was answered here, but I will write a slightly improved version here, namely one that uses the 'todo-type' argument (as was suggested in the comments of the linked answer). The ...
dalanicolai's user avatar
  • 7,880
3 votes
Accepted

Copy and Paste From PDF to Emacs as Plain Text

You're looking for M-q (which runs the command fill-paragraph) : it will refill the paragraph according to the current value of fill-column by removing/adding hard newlines at the right spots for you. ...
YoungFrog's user avatar
  • 3,526

Only top scored, non community-wiki answers of a minimum length are eligible