emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* do you need a separate LaTeX installation to export org mode files to pdf?
@ 2018-01-22 14:56 Christopher W Ryan
  2018-01-22 15:21 ` Kaushal Modi
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Christopher W Ryan @ 2018-01-22 14:56 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 435 bytes --]

I'm a longtime LaTeX user and a more recent org mode user. So I've always
had LaTeX installed on any computer on which I was using org mode. I'd like
to introduce org mode to a co-worker unfamiliar with the whole concept of
plain text files, markup, and literate programming, etc.  Would they need
to install LaTeX too, or is org mode self-contained and able to export to
pdf without LaTeX an friends installed?

Thanks.

--Chris Ryan

[-- Attachment #2: Type: text/html, Size: 508 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: do you need a separate LaTeX installation to export org mode files to pdf?
  2018-01-22 14:56 do you need a separate LaTeX installation to export org mode files to pdf? Christopher W Ryan
@ 2018-01-22 15:21 ` Kaushal Modi
  2018-01-22 15:44   ` Martin Alsinet
  2018-01-22 15:48   ` Oleh Krehel
  2018-01-22 16:32 ` Rasmus
  2018-02-09 22:46 ` Adonay Felipe Nogueira
  2 siblings, 2 replies; 6+ messages in thread
From: Kaushal Modi @ 2018-01-22 15:21 UTC (permalink / raw)
  To: Christopher W Ryan; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 396 bytes --]

On Mon, Jan 22, 2018 at 9:57 AM Christopher W Ryan <cryan@binghamton.edu>
wrote:

> Would they need to install LaTeX too, or is org mode self-contained and
> able to export to pdf without LaTeX an friends installed?
>

Yes, they'd need to have a LaTeX distribution installed on their system. In
my experience, installing the full latest version of TexLive is the easiest
way.


-- 

Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 825 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: do you need a separate LaTeX installation to export org mode files to pdf?
  2018-01-22 15:21 ` Kaushal Modi
@ 2018-01-22 15:44   ` Martin Alsinet
  2018-01-22 15:48   ` Oleh Krehel
  1 sibling, 0 replies; 6+ messages in thread
From: Martin Alsinet @ 2018-01-22 15:44 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: emacs-orgmode, Christopher W Ryan

[-- Attachment #1: Type: text/plain, Size: 2475 bytes --]

Hello Christopher

I have a docker image with LaTeX installed in order not to "pollute" my
local filesystem with the 4GB of additional libraries a full LaTeX
installation requires.
If your co-worker is a software developer you could use that approach.

Here is mi Dockerfile for LaTeX:

FROM ubuntu:xenial
MAINTAINER Martin Alsinet <martin@alsinet>

ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update -q
RUN apt-get install -y texlive-full gnuplot python-pygments
RUN apt-get clean
RUN rm -rf /var/lib/apt/lists/*

Save that in a file named *Dockerfile* in a blank folder and run *docker
build -t latex .*
This will create a docker image named latex with all the libraries and
executables neatly tucked away.
Then, in order to use it, you can save the following script in
~/bin/pdflatex

#!/bin/sh
export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
docker run --rm \
           -v $(pwd):$(pwd) \
           -v ~/.ssh:/root/.ssh \
           -w $(pwd) \
           latex \
           pdflatex $@
rm *.log *.aux
rm -f *.ent
rm -Rf _minted-*

With that you can use the *pdflatex* command as usual, and docker creates a
temporary container (docker run --rm ...) from the image, runs the pdflatex
command and removes the container after execution.

bash-3.2$ pdflatex --version
pdfTeX 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian)
kpathsea version 6.2.1
Copyright 2015 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Compiled with libpng 1.6.17; using libpng 1.6.17
Compiled with zlib 1.2.8; using zlib 1.2.8
Compiled with poppler version 0.41.0
rm: *.log: No such file or directory
rm: *.aux: No such file or directory



Martin


On Mon, Jan 22, 2018 at 10:23 AM Kaushal Modi <kaushal.modi@gmail.com>
wrote:

> On Mon, Jan 22, 2018 at 9:57 AM Christopher W Ryan <cryan@binghamton.edu>
> wrote:
>
>> Would they need to install LaTeX too, or is org mode self-contained and
>> able to export to pdf without LaTeX an friends installed?
>>
>
> Yes, they'd need to have a LaTeX distribution installed on their system.
> In my experience, installing the full latest version of TexLive is the
> easiest way.
>
>
> --
>
> Kaushal Modi
>

[-- Attachment #2: Type: text/html, Size: 5416 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: do you need a separate LaTeX installation to export org mode files to pdf?
  2018-01-22 15:21 ` Kaushal Modi
  2018-01-22 15:44   ` Martin Alsinet
@ 2018-01-22 15:48   ` Oleh Krehel
  1 sibling, 0 replies; 6+ messages in thread
From: Oleh Krehel @ 2018-01-22 15:48 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: org mode, Christopher W Ryan

Hi all,

>> Would they need to install LaTeX too, or is org mode self-contained and
>> able to export to pdf without LaTeX an friends installed?
>
>
> Yes, they'd need to have a LaTeX distribution installed on their system. In
> my experience, installing the full latest version of TexLive is the easiest
> way.

For years, my approach was to install texlive-full. But that meant
blocking me for around 2 hours.

Recently, I threw together a minimal Dockerfile to enable org-to-pdf
export. Here's the gist of it:

    FROM ubuntu:xenial
    RUN apt update && apt install -y software-properties-common
    RUN apt install -y texlive-latex-extra cm-super

I also install Emacs and some project specific stuff on top of it. In
the end, the built Docker image is only 2.19GB.
If you don't care for Docker, you can just install the above minimal
packages with sudo.

regards,
Oleh

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: do you need a separate LaTeX installation to export org mode files to pdf?
  2018-01-22 14:56 do you need a separate LaTeX installation to export org mode files to pdf? Christopher W Ryan
  2018-01-22 15:21 ` Kaushal Modi
@ 2018-01-22 16:32 ` Rasmus
  2018-02-09 22:46 ` Adonay Felipe Nogueira
  2 siblings, 0 replies; 6+ messages in thread
From: Rasmus @ 2018-01-22 16:32 UTC (permalink / raw)
  To: emacs-orgmode

Christopher W Ryan <cryan@binghamton.edu> writes:

> I'm a longtime LaTeX user and a more recent org mode user. So I've always
> had LaTeX installed on any computer on which I was using org mode. I'd like
> to introduce org mode to a co-worker unfamiliar with the whole concept of
> plain text files, markup, and literate programming, etc.  Would they need
> to install LaTeX too, or is org mode self-contained and able to export to
> pdf without LaTeX an friends installed?

You /could/ use latexonline.  I think it even supports bibtex.

    https://github.com/aslushnikov/latex-online

Here’s a minimal example.

    * TODO headline
     *bf* /emph/ etc.

     | a |


     #+begin_src emacs-lisp
       (let ((str (mapconcat 'identity
                 '("tar -cj %f" "|"
                   "curl -L --post301 --post302 --post303 -F file=@-"
                   "\"https://latexonline.cc/data?command=%latex&target=%f\""
                   "> %b.pdf")
                 '" ")))
         (setq org-latex-pdf-process (list str)))
     #+end_src

How to include all document dependencies (e.g. images) in the tar file is
left as an exercise for the motivated reader.  One could probably make a
"dumb" but effective solution by finding all instances of certain file
types in the project folder.

Needless to say, if you use this with real-life documents, you will
probably want to set up your own instance of latexonline.

Rasmus

-- 
There are known knowns; there are things we know that we know

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: do you need a separate LaTeX installation to export org mode files to pdf?
  2018-01-22 14:56 do you need a separate LaTeX installation to export org mode files to pdf? Christopher W Ryan
  2018-01-22 15:21 ` Kaushal Modi
  2018-01-22 16:32 ` Rasmus
@ 2018-02-09 22:46 ` Adonay Felipe Nogueira
  2 siblings, 0 replies; 6+ messages in thread
From: Adonay Felipe Nogueira @ 2018-02-09 22:46 UTC (permalink / raw)
  To: emacs-orgmode

> LaTeX installed on any computer on which I was using org mode. I'd like to
> introduce org mode to a co-worker unfamiliar with the whole concept of plain
> text files, markup, and literate programming, etc. Would they need to install

Good to know people are more and more moving away from document writers
that tie them to speciific graphical user interfaces and going more
towards formats which are easy to read and edit even in plain text. ;)

> text files, markup, and literate programming, etc. Would they need to install
> LaTeX too, or is org mode self-contained and able to export to pdf without
> LaTeX an friends installed?

Well, you only need LaTeX for exporting. But if you do want to go
immediately to teach him how to export to LaTeX or to PDF in the first
lesson, then: yes, you need LaTeX to export to PDF.

I have also been writing a guide for Org mode and LaTeX for researchers
and writers, it's currently in Brazilian Portuguese and isn't as broad
as the info page in GNU Emacs itself, see [1]. Also, [2] has a more
advanced example of a work being done using (mostly) Org mode but also
LaTeX, BibTeX, TikZ and abnTeX2.

[1] <https://notabug.org/adfeno/Org_LaTeX_intro>.

[2] <https://notabug.org/adfeno/Trabalho_sobre_gestao_universitaria>.

-- 
- https://libreplanet.org/wiki/User:Adfeno
- Palestrante e consultor sobre /software/ livre (não confundir com
  gratis).
- "WhatsApp"? Ele não é livre. Por favor, veja formas de se comunicar
  instantaneamente comigo no endereço abaixo.
- Contato: https://libreplanet.org/wiki/User:Adfeno#vCard
- Arquivos comuns aceitos (apenas sem DRM): Corel Draw, Microsoft
  Office, MP3, MP4, WMA, WMV.
- Arquivos comuns aceitos e enviados: CSV, GNU Dia, GNU Emacs Org, GNU
  GIMP, Inkscape SVG, JPG, LibreOffice (padrão ODF), OGG, OPUS, PDF
  (apenas sem DRM), PNG, TXT, WEBM.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-02-09 22:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-22 14:56 do you need a separate LaTeX installation to export org mode files to pdf? Christopher W Ryan
2018-01-22 15:21 ` Kaushal Modi
2018-01-22 15:44   ` Martin Alsinet
2018-01-22 15:48   ` Oleh Krehel
2018-01-22 16:32 ` Rasmus
2018-02-09 22:46 ` Adonay Felipe Nogueira

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).