Hot answers tagged

51 votes
Accepted

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

The simplest way to tweak the formatting of a LaTeX export is by using the geometry package. Try something like this: #+LATEX_HEADER: \usepackage[margin=0.5in]{geometry}
user avatar
  • 2,753
45 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 ...
user avatar
  • 20.3k
40 votes
Accepted

How to use an external program as the default way to open PDFs from Emacs?

Try openwith. The following code will enable it, and allow you to open PDFs with evince (change to your favorite PDF viewer): (require 'openwith) (openwith-mode t) (setq openwith-associations '(("\\....
user avatar
  • 31.1k
28 votes

Hide \author, \date, and \title when exporting to pdf with org-latex-export-to-pdf

OK, thanks to @wvxvw putting me on the right track I figured it out. You can get rid of the author and date with: #+OPTIONS: author:nil date:nil The Org Manual says that you can also toggle title ...
user avatar
  • 4,535
22 votes

How to view and edit pdf files in emacs?

You can give a try to pdf-tools, which provides most of the requested functionality
user avatar
  • 995
21 votes

How to use an external program as the default way to open PDFs from Emacs?

If you want to view PDF with many features (highlighting search, highlighting selection, annotate, content tree), use pdf-tools. As you can see in the demo, I can using Isearch with highlighting. ...
user avatar
  • 6,672
18 votes

How to view and edit pdf files in emacs?

Since Emacs 23, you can view PDF files as images just by opening them like normal files as long as you have Emacs running in X rather than a terminal. You can also see and edit the PDF directly, which ...
user avatar
18 votes
Accepted

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

Hyperlinks in pdfs exported from org documents are generated by the LaTeX hyperref package. This package is included by default, and options can be set in the customize interface for org-latex-default-...
user avatar
  • 20.3k
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 ...
user avatar
  • 635
17 votes
Accepted

Display PDF images in org-mode

NOTE: You need to have ImageMagick installed on your system (convert executable) for this solution to work. How this solution is implemented The function org-include-img-from-pdf is the workhorse ...
user avatar
  • 24.3k
17 votes

convert a text buffer to a pdf file?

You can put the below in your init.el and bind the function to a binding of your choice. The function prints the file in current buffer as a PDF in the same folder by default. Here the function ...
user avatar
  • 24.3k
16 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)))
user avatar
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 ...
user avatar
15 votes
Accepted

Emacs got frozen when open pdf file

You should disable linum-mode when opening a PDF file. Otherwise it will hang your Emacs. i.e. only add it to prog-mode for editing text: (add-hook 'prog-mode-hook 'linum-on) To install pdf-tools: ...
user avatar
  • 6,672
13 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 ...
user avatar
  • 385
13 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 ...
user avatar
  • 481
13 votes

Hide \author, \date, and \title when exporting to pdf with org-latex-export-to-pdf

You can also redefine LaTeX's \maketitle to do nothing: #+Title: Test title #+Author: Test Author #+Date: [2016-03-28 Mon] #+LATEX_HEADER: \renewcommand\maketitle{} * hello test text
user avatar
  • 6,681
13 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 ...
user avatar
  • 1,775
12 votes

How to use an external program as the default way to open PDFs from Emacs?

You asked about find-file. In addition to what others (e.g., Dan) say about that, it is worthwhile to also know about opening files using an application associated with the file type (e.g. extension) ...
user avatar
  • 69.7k
12 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
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 ...
user avatar
  • 566
10 votes
Accepted

mark text with keyboard in PDFView (pdf-tools) mode

That would require some notion of a cursor, which is currently not implemented. So marking by keyboard is not available (except the whole page).
user avatar
  • 3,276
9 votes

read e-books in Emacs

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

Make doc-view use mupdf for pdf files

The default resolution is probably around 90 dpi. (require 'doc-view) (setq doc-view-resolution 144) (Or set higher as you need.) You may need to run doc-view-clear-cache first for the change to be ...
user avatar
  • 223
9 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}
user avatar
7 votes
Accepted

improve doc-view display quality

If by "render larger" you mean that the dimensions of the rendered png image are larger, then you could use some of the doc-view functions to fit the image to your window: doc-view-fit-page-to-window, ...
user avatar
  • 31.1k
7 votes
Accepted

Can I configure eww to use pdf-view-mode (from pdf-tools) for PDFs instead of DocView?

Warning: dirty work-around ahead Since you "greatly prefer [pdf-tools] to DocView", is it safe to assume that using it to view all pdfs is acceptable? The following code snippet will switch the ...
user avatar
  • 4,113
7 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 ...
user avatar
  • 5,005
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 ...
user avatar
  • 1,340
6 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". ...
user avatar
  • 1,901

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