Opened 11 years ago

Last modified 11 years ago

#1919 new enhancement

I would like to have something like a TexInclude-Macro

Reported by: k9ert@… Owned by: chenca
Priority: normal Component: Trac2LatexPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10


I am using the Include-Makro to include other Wiki-Pages in an existing Page. These Pages are not layouted by Trac2Latex. In the PDF, I get something like this:

¡/p¿¡div class=”system-message”¿¡strong¿Error: Failed to load processor ¡code¿TexInclude¡/code¿¡/strong

Maybe, this Macro is simple to implement but it would be very useful for people who wants to generate PDFs from more than one Wiki-Page.

Attachments (0)

Change History (1)

comment:1 Changed 11 years ago by k9ert@…

I forgot to mention that this uses the Plugin WikiIncludeMacro

I tried to implement it with an awful hack (I have nearly no python Knowledge). Here is the core code of a new TexWikiIncludeMacro:

class TexWikiIncludeMacro(Component):

    def get_macros(self):
        yield 'TexWikiInclude'

    def get_macro_description(self, name):
        return inspect.getdoc(TexWikiIncludeMacro)

    def render_macro(self, req, name, txt):
        url = "http://localhost/cgi-bin/trac.cgi/wiki/%s?format=tex" % name
        opener = urllib.urlopen(url)

It works with an simple example but I have a problem with Umlauts (and it needs cleanup)?! Could anyone help me? I can send the source, if anyone is interested in this?

Modify Ticket

Change Properties
Set your email in Preferences
as new The owner will remain chenca.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.