Hot answers tagged


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}


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 packages will call out to the operating system, or use different config within Emacs, to decide if they should use Emacs or another program to open a pdf. So there is ...


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 '(("\\.pdf\\'" "evince" (file))))


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 with title:nil (org-export-with-title). However, this option didn't get rid of the title, and I couldn't find a variable or command org-export-with-title. ...


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. Emacs is now my favourite PDF reader. You can also bookmark specific PDF page by using Bookmark(+). EDIT: If you use helm and want to use external program, helm ...


You can give a try to pdf-tools, which provides most of the requested functionality


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-packages-alist. For example, adding the option colorlinks=true to the entry for hyperref will switch from boxed links to coloured links. There are quite a few ...


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 will display the contents of the binary file as text (with lots of unprintable characters!). You can edit this text directly, but unless you can encode and ...


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 that does the PDF to Image format conversion using convert. If the org file contains # ()convertfrompdf:t, it will be assumed that the user has a pdf file that ...


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)))


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 requires the binary ps2pdf for converting .ps to .pdf. But you can replace that with any available pdf generator on your system. (require 'ps-print) (when (...


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 color, then add the following line: #+latex_header: \hypersetup{colorlinks=true,linkcolor=blue} for a blue color.


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 precisely and doesn't break paragraphs, because LaTeX simply can't know where to break them. If you want to wrap the lines, you have to wrap them in the source-...


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: You have to clone the repository: git clone cd pdf-tools Run make. Then, it will produce a pdf-tools-${VERSION}.tar ...


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 install pdf-tools --HEAD' and then install the ;;; pdf-tools elisp via the use-package below. To upgrade the epdfinfo ;;; server, just do 'brew upgrade pdf-tools'...


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


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) in option dired-guess-shell-alist-user. And if you use Emacs on MS Windows, then it is worthwhile knowing how to open a file using Windows file associations. ...


You may try something like this: #+ATTR_LATEX: :environment longtable :align |l|p{10cm}|l| | | <30> | | | Column | Wide Column | Column | |------------+----------------------------------------------------+--------| | Some stuff | Lots and lots of ...


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 refer to it from a Tikz picture. Here's a simple example (UPDATED): #+LATEX_HEADER: \usepackage{tikz} #+LATEX_HEADER: \usepackage{minted} #+LATEX_HEADER: \...


That would require some notion of a cursor, which is currently not implemented. So marking by keyboard is not available (except the whole page).


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 adding the following line to your .emacs file: (customize-set-value 'org-latex-with-hyperref nil) In addition, if you want to pass any options to hyperref or url ...


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 respected.


I think you can do this with: #+latex_class_options: [10pt] and #+latex_header: \usepackage{setspace} #+latex_header: \onehalfspacing


What about putting the following in the export options: #+LATEX_CLASS: article #+LATEX_CLASS_OPTIONS: [landscape] #+LATEX_HEADER: \usepackage[a4paper]{anysize}


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, doc-view-fit-width-to-window, and doc-view-fit-height-to-window. In other words, increase the resolution of the rendered image as you did, and then fit (...


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 document to pdf-view-mode anytime doc-viewis entered with a pdf document. (defvar tv/prefer-pdf-tools (fboundp 'pdf-view-mode)) (defun tv/start-pdf-tools-if-pdf ()...


Try nov (installable via melpa). It is a reasonable start for reading ePUBs in Emacs.


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 | |------+------------------------------------| | this | @@latex:\cellcolor{blue!25}@@ that | | one | two |


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 all slides including title page and toc.


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". Alternatively, do M-x pdf-view-midnight-minor-mode RET. The colours used by the "midnight mode" are specified by the variable pdf-view-midnight-colors (see the docstring ...

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