Extend PDF export filter

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
zwenny
Posts: 2
Joined: Sat Feb 16, 2008 9:26 pm

Extend PDF export filter

Post by zwenny »

Hello there,

I do have a simple problem, but no solution yet... For a thesis, citations of books with more than one author have to be named [author1 et. al.]. So far no problem. ;-) But within that citation 'et. al.' has to be italic! :shock: It is clear that my OpenOffice 2.3 isn't capable of doing this.

What I tried:
1.) Use other citation managers (like zotero) - seems to be possible, but takes lots of time to reimport the books and adjust the citation style
2.) Use perl to change the text format afterwards within the pdf to italic - as well, very complex and no solution yet.

My last shot is to edit OOo's pdf export filter. What I want is to 'attach' to the filter and replace all 'et. al.' strings with italic ones. Could somebody please get me started with that?

Thanks so much in advance
Sven
User avatar
Bhikkhu Pesala
Posts: 1253
Joined: Mon Oct 08, 2007 1:27 am

Re: Extend PDF export filter

Post by Bhikkhu Pesala »

Another possible route would be to Find and Replace "et.al." with an unused code-point in the font, (such as ™) and edit the font to add et.al. in italics to that code-point. That way you could get a nice looking PDF relatively easily, but et.al. will be replaced with ™ if copied as text.
Last edited by Bhikkhu Pesala on Sun Feb 17, 2008 4:57 pm, edited 2 times in total.
Idiot Compassion
LibreOffice 6.0.4 on Windows 10
zwenny
Posts: 2
Joined: Sat Feb 16, 2008 9:26 pm

Re: Extend PDF export filter

Post by zwenny »

Hi Bhikkhu,

thanks for your interesting hint. I haven't done any programming with OOo - how do I tell the export filter to replace that special character?

Sven
User avatar
Bhikkhu Pesala
Posts: 1253
Joined: Mon Oct 08, 2007 1:27 am

Re: Extend PDF export filter

Post by Bhikkhu Pesala »

You don't have to do anything with the PDF export. You use Find and Replace in Open Office to change et.al. with ™ and you edit the font to replace ™ with italic et.al.

In this test I replaced ¬ (logical not: a pretty useless character), with et.al. in Guru Regular from the italic typestyle in my Guru font.
et al test.png
Idiot Compassion
LibreOffice 6.0.4 on Windows 10
Post Reply