Browse Source

Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode

Carsten Dominik 17 years ago
parent
commit
08022e9cf1
2 changed files with 18 additions and 7 deletions
  1. 7 0
      contrib/ChangeLog
  2. 11 7
      contrib/scripts/org2hpda

+ 7 - 0
contrib/ChangeLog

@@ -1,3 +1,10 @@
+2008-06-18  Christian Egli  <christian.egli@alumni.ethz.ch>
+
+	* scripts/org2hpda (DIARY): Make the location of the diary file
+	configurable.
+	(all): reduce links to their destination, i.e. change
+	'[[http://foo][bar]]' to 'bar'
+
 2008-05-28  Carsten Dominik  <dominik@science.uva.nl>
 
 	* lisp/org-mtags.el (org-mtags-replace)

+ 11 - 7
contrib/scripts/org2hpda

@@ -25,6 +25,7 @@
 
 EMACS = emacs -batch -l ~/.emacs
 LATEX = latex
+DIARY = ~/TODO/diary
 
 hipsterFiles =  weekCalendar.pdf yearCalendar.pdf monthCalendar3.pdf monthCalendar2.pdf monthCalendar1.pdf
 pocketModFiles =  weekCalendar.pdf yearCalendar-rotated.pdf \
@@ -34,11 +35,14 @@ 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
+	# quote '@', then increase font size of week calendars,
+	# increase font of diary entries in moth calendar and 
+	# finally reduce links to their destination, i.e. 
+	# change '[[http://foo][bar]]' to 'bar'
 	sed 	-e 's/\\verb|@|/\@/g' \
 		-e 's/documentclass\[11pt\]/documentclass[12pt]/g' \
 		-e 's/{\\tiny \\raggedright #3}/{\\small \\raggedright #3}/g' \
+		-e 's/\[\[[^]]\+\]\[\([^]]\+\)\]\]/\1/g' \
 		< $< > /tmp/temp-org-file.$$$$; mv /tmp/temp-org-file.$$$$ $<
 	$(LATEX) $^
 
@@ -51,19 +55,19 @@ all: pocketMod.pdf hipsterPDA.pdf
 		pdf90 --outfile tmp.pdf $@; mv tmp.pdf $@; \
 	done
 
-weekCalendar.tex: ~/diary
+weekCalendar.tex: $(DIARY)
 	$(EMACS) -eval "(progn (calendar) (cal-tex-cursor-week-iso 4) (with-current-buffer cal-tex-buffer (write-file \"$@\")))"
 
-monthCalendar1.tex: ~/diary
+monthCalendar1.tex: $(DIARY)
 	 $(EMACS) -eval "(progn (calendar) (cal-tex-cursor-month-landscape 1) (with-current-buffer cal-tex-buffer (write-file \"$@\")))"
 
-monthCalendar2.tex: ~/diary
+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 \"$@\")))"
 
-monthCalendar3.tex: ~/diary
+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 \"$@\")))"
 
-yearCalendar.tex: ~/diary
+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 \"$@\")))"
 
 pocketMod.pdf: $(pocketModFiles)