[pmwiki-users] Alternative markup resolution within "code" sections for PDF printing (Nigel Thomas)

John Rankin john.rankin at affinity.co.nz
Fri Dec 19 00:07:02 CST 2008


On Thursday, 18 December 2008 5:14 AM, pmwiki-users-request at pmichaud.com wrote:
>   6. Alternative markup resolution within "code" sections	for PDF
>      printing (Nigel Thomas)
>Date: Wed, 17 Dec 2008 15:27:40 +0000
>From: "Nigel Thomas" <nigel.thomas at preferisco.com>
>
>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

Could you create a very simple example page in the Examples group on
www.wikipublisher.org, so I can see exactly what is happening?

You may be able to fix the problem by setting 
    $AnchorLinkFmt = '$LinkText';
after you load the wikipublisher extensions.

As far as I can see from the example given, the problem is restricted to
links that reference anchors. The above change will only affect these and
has no effect on other types of link.

Hope this helps
JR

-- 
John Rankin
Affinity Limited
T 64 4 495 3737
F 64 4 473 7991
021 RANKIN
john.rankin at affinity.co.nz
www.affinity.co.nz





More information about the pmwiki-users mailing list