Browse Source

reduce links to their destination
i.e. change '[[http://foo][bar]]' to 'bar'

Christian Egli 17 years ago
parent
commit
9c692c42f1
2 changed files with 7 additions and 2 deletions
  1. 2 0
      contrib/ChangeLog
  2. 5 2
      contrib/scripts/org2hpda

+ 2 - 0
contrib/ChangeLog

@@ -2,6 +2,8 @@
 
 	* 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>
 

+ 5 - 2
contrib/scripts/org2hpda

@@ -35,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) $^