This project is read-only.

Problem with hyperlink

Apr 11, 2009 at 7:42 PM
Edited Apr 12, 2009 at 2:36 AM
Hello again!

I've noticed something weird about the style I'm writing: if I choose to display URL, I need to set it to show up as a link, otherwise it won't work. Is there a way to solve this?

This is my code:

<format>{%Author|Editor:3|Title%.}{ &lt;b&gt;%Title|ShortTitle%&lt;/b&gt;.}.{ %City%{ (%StateProvince%)}{: %Publisher%{, %Year%}}}{. Disponível em: &lt;%URL:l%&gt;.{ Acesso em: %DayAccessed%{ %MonthAccessed:s%}{ %YearAccessed%}}}.</format>

I needed it to be URL, with no addtional parameter, between these (< >) guys.

Sorry for bothering again!
Apr 11, 2009 at 11:49 PM
Edited Apr 12, 2009 at 12:00 AM

You can use the following workaround: replace



    &lt;&lt;span style="display:none;"&gt; &lt;/span&gt;%URL%&gt;

The issue is because you are placing the url between < and >. The stylesheet generates HTML and passes it to Word. Due to the way BibWord works, <> gets seen as a HTML tag. As it is an unprocessable tag, it is ignored by Word (this is correct behaviour from Word). I'm going to look into it, but I doubt this can be fixed as it would imply a totally different treatment of strings for formatting.


Apr 12, 2009 at 2:26 AM
Aah, that worked! Thank you very much again, Yves! I guessed it wouldn't work when I wrote &gt; and &lt;. I thought "Hmm, if Word renders that as HTML code when I'm trying to get bold, I don't think this is gonna work. ... And it didn't, heh. Still, I can't understand how it works when you add the l parameter...

Again, thanks!
Apr 12, 2009 at 10:43 AM

It works with the 'l' parameter because you created a valid tag inside. Basically, you get something looking like this:

    <<a href=""></a>>

Tags are defined by < followed by a character. As in this case, < is followed by another instance of <, the HTML parser is smart enough to not see the first < as the beginning of a tag.

Thinking along those lines, my original workaround can even be bettered by just using an empty, meaningless tag rather than a hidden portion:


which, would result in HTML looking like this: