help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Exporting form emacs texinfo-mode to dvi, pdf, and html


From: lisa-asket
Subject: Exporting form emacs texinfo-mode to dvi, pdf, and html
Date: Sun, 27 Jun 2021 00:51:55 +0200 (CEST)

This is useless but I wrote



%.pdf:
    @echo Making $@ in $(docdir)
    @ texi2pdf '$<'



From: Emanuel Berg via Users list for the GNU Emacs text editor 
<help-gnu-emacs@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Exporting form emacs texinfo-mode to dvi, pdf, and html
Date: 27/06/2021 00:20:56 Europe/Paris

lisa-asket wrote:

> going through a makefile solution. Why should I be bothered
> with makefiles because I want to use emacs to generate my
> pdf file ?

Here is a Makefile [1] that is used to turn a text file into
a PDF. To do that there is first an in-between step, to turn
the text into PostScript, then one turns that into PDF.

Remember the general syntax

target: prerequisite
command

other than that some special syntax:
$< .. the left-most prerequisite
$@ .. the target 

>From a human point of view, there are just so many advantages
- try to figure them out as an exercise :) just kidding - but
from a computer point of view there is one advantage that is
maybe not obvious, namely, if there is a target already, and
none of prerequisite has changed since the last `compile'
command was issued, nothing happens! Nothing has changed since
it was last done, so why do it again?

Not that this, despite being slightly more advanced than your
use case, is still a very, very simple project/task, yet as
you see if you think and examine the file will realize there
are so many advantages already.

For a medium-sized project [2] or a BIG project, it is not
a matter of advantages anymore, it is IMPOSSIBLE to manage it
by issuing shell commands manually like you do!

Might as well get used to the right, which here is also the
good way, and you have a simple example to practice on ... but
even so, again, even really simple examples benefit from this.

[1] https://dataswamp.org/~incal/about/cv/cv.txt

[2] https://dataswamp.org/~incal/emacs-init/Makefile

-- 
underground experts united
https://dataswamp.org/~incal





reply via email to

[Prev in Thread] Current Thread [Next in Thread]