[Top][All Lists]

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

[Orgmode] Re: GTD & LaTeX export

From: Christian Egli
Subject: [Orgmode] Re: GTD & LaTeX export
Date: Tue, 11 Dec 2007 00:43:08 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Bastien <address@hidden> writes:

> I'm attaching the code from Christian Egli here again.  
> I don't know if it is distributed somewhere : Christian, would you be
> okay to distribute it?

I would love to distribute it, that's the whole point.

> If you don't have a web server at your disposal,

I don't really.

> I can put the code somewhere on my org-mode page, or maybe Carsten can
> put it on http://orgmode.org

It would be great if Carsten could host it. I don't want to impose any
burden on him if I need to upload a new version.

Here's an updated version which includes a few comments and feedback
from the list.

# org2pocketMod - a small utility to generate pocketMod style printouts from 
org mode 
# Copyright (C) 2007  Christian Egli
# Version: 0.3
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
# Commentary:
# set cal-tex-diary to true so that diary entries show up in the calendar 
# the pdf* commands are part of the pdfjam package which can be found
# at http://www.warwick.ac.uk/go/pdfjam

EMACS = emacs -batch -l ~/.emacs
LATEX = latex

hipsterFiles =  weekCalendar.pdf yearCalendar.pdf monthCalendar3.pdf 
monthCalendar2.pdf monthCalendar1.pdf
pocketModFiles =  weekCalendar.pdf yearCalendar-rotated.pdf \
        monthCalendar3-rotated.pdf monthCalendar2-rotated.pdf 

all: pocketMod.pdf hipsterPDA.pdf

%.dvi: %.tex
        # Quick hack to massage the LaTeX produced by cal-tex
        # quote '@', then increase font size of week calendars and 
        # finaly increase font of diary entries in moth calendar
        sed     -e 's/\\verb|@|/\@/g' \
                -e 's/documentclass\[11pt\]/documentclass[12pt]/g' \
                -e 's/{\\tiny \\raggedright #3}/{\\small \\raggedright #3}/g' \
                < $< > /tmp/temp-org-file.$$$$; mv /tmp/temp-org-file.$$$$ $<
        $(LATEX) $^

%.pdf: %.dvi
        dvipdf $^

%-rotated.pdf: %.pdf
        cp $^ $@
        for n in 1 2 3; do \
                pdf90 --outfile tmp.pdf $@; mv tmp.pdf $@; \

weekCalendar.tex: ~/diary
        $(EMACS) -eval "(progn (calendar) (cal-tex-cursor-week-iso 4) 
(with-current-buffer cal-tex-buffer (write-file \"address@hidden")))"

monthCalendar1.tex: ~/diary
         $(EMACS) -eval "(progn (calendar) (cal-tex-cursor-month-landscape 1) 
(with-current-buffer cal-tex-buffer (write-file \"address@hidden")))"

monthCalendar2.tex: ~/diary
         $(EMACS) -eval "(progn (calendar) (calendar-forward-month 1) 
(cal-tex-cursor-month-landscape 1) (with-current-buffer cal-tex-buffer 
(write-file \"address@hidden")))"

monthCalendar3.tex: ~/diary
         $(EMACS) -eval "(progn (calendar) (calendar-forward-month 2) 
(cal-tex-cursor-month-landscape 1) (with-current-buffer cal-tex-buffer 
(write-file \"address@hidden")))"

yearCalendar.tex: ~/diary
         $(EMACS) -eval "(progn (calendar) (calendar-forward-month 2) 
(cal-tex-cursor-year-landscape 1) (with-current-buffer cal-tex-buffer 
(write-file \"address@hidden")))"

pocketMod.pdf: $(pocketModFiles)
        pdfjoin --outfile tmp.pdf $^
        pdfnup tmp.pdf --outfile $@ --nup 4x2 --frame true

hipsterPDA.pdf: $(hipsterFiles)
        pdfnup weekCalendar.pdf --outfile page1.pdf --nup 2x2 --frame true
        pdfjoin --outfile tmp.pdf monthCalendar[1-3]-rotated.pdf 
        pdfnup tmp.pdf --outfile page2.pdf --nup 2x2 --frame true
        pdfjoin --outfile $@ page1.pdf page2.pdf

        rm -rf *.aux *.dvi *.tex *.log *.pdf


reply via email to

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