[pmwiki-users] Alternative markup resolution within "code" sections for PDF printing
Nigel Thomas
nigel.thomas at preferisco.com
Wed Dec 17 09:27:40 CST 2008
Greetings everyone, and here is my first question.
I have a wiki in which I am showing a large number of BNF syntax diagrams.
That works fine, with markup looking like this:
>>syntax<<
(:linebreaks:) CALL
''<[[qualified-procedure-name->#qualified-procedure-name]]>'' ( [
<[[value-expression->Expressions#value-expression]]> {,
<[[value-expression->Expressions#value-expression]]>} ] )
<qualified-procedure-name> ::= [[#qualified_procedure_name]] [
''catalog-name''.[''schema-name''.[''procedure-name''[=]]]=]
(:nolinebreaks:)
>><<
which renders as:
CALL *<qualified-procedure-name<http://www.preferisco.com/docwiki/pmwiki.php?n=EIP.CallProcedure#qualified-procedure-name>
>* ( [ <value-expression<http://www.preferisco.com/docwiki/pmwiki.php/EIP/Expressions?action=edit>>
{, <value-expression<http://www.preferisco.com/docwiki/pmwiki.php/EIP/Expressions?action=edit>>}
] )
<qualified-procedure-name> ::= [ *catalog-name*.[*schema-name*.[*
procedure-name*]]]
So BNF elements can be referenced, on the current or other pages, using
normal wiki links. The syntax style just puts the whole thing into a box for
emphasis, and sets to monotype.
When I print this using PublishPDF and WikiPublisher, it looks pretty awful.
The hyperlinks ("on page ??" and <1>) hide the names of the items being
linked to, so are very confusing for the reader.
CALL *<*qualified-procedure-name *on page ??> *( [ <1> {, <1>} ] )
<qualified-procedure-name> ::= [ *catalog-name*.[*schema-name*.[*
procedurename*]]]
So I would like to be able to choose, when printing, to process wiki links
differently within these syntax sections - in fact to throw away the links
and just keep the text - when I am publishing to PDF (most PDF users will
print it as hard copy - so who needs links). How should I go about this?
Obviously I need to make modified versions of the various links markup - but
how do I get them to operate only within my syntax section (and how best to
mark out this section)?
Of course I can put in conditional markup and do the right thing - but that
means maintaining the syntax twice, which is not a great idea especially as
there's a lot of it done already. (it's a large portion of the SQL:2003
standard...)
All suggestions gratefully received
Regards
Nigel Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20081217/40425c47/attachment.html
More information about the pmwiki-users
mailing list