Thanks for the help Christiaan.
On Thu, Sep 23, 2010 at 11:38, Christiaan Hofman <[email protected]> wrote:
>> Ok. An I guess DeTeXifying means removing those commands without
>> affecting the output while TeXifying is converting those commands into
>> their RTF equivalent. i.e.:
>> {\'e} -- DeTeX --> e
>> {\'e} -- TeX --> é
>> Is that right?
>
> That's correct.
>
>> If it is, what is the difference between DeTeX and stringByRevingTeX?
>
> I assume you mean stringByRemovingTeX. That's very different, it removes tex
> commands.
Indeed that was a spelling mistake on my end. However, I don't see how
stringByRemovingTeX is different from stringByDeTeXifying. For the
simple example above it seems to do the same:
{\'e} ----> e
Could you give me an example of where they are different, so that I
can use the correct one.
>>> It's converted to rich text (NSAttributedString), and rich text support for
>>> html is limited wrt the webview.
>>
>> OK, so I am actually better off doing everything in RTF directly then.
>
> I think so.
I actually went ahead on the HTML end and I think I got pretty good
results. I'll try to keep the HTML and RTF versions on par once I
understand the odds and ends of both.
>> My only big remaining issue is that BibDesk template values are not
>> expanded within links. For example if I have an RTF file with a only a
>> link to the DOI:
>>
>> {\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf320
>> {\fonttbl\f0\froman\fcharset0 Palatino-Roman;}
>> {\colortbl;\red255\green255\blue255;}
>> {\info
>> {\author
>> Foo}}\paperw11900\paperh16840\margl1440\margr1440\vieww9000\viewh8400\viewkind0
>> \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural
>> {\field{\*\fldinst{HYPERLINK
>> "http://dx.doi.org/%3C$string.Doi/%3E"}}{\fldrslt
>> \f0\fs22 \cf0 <$string.Doi/>}}}
>>
>> The "<$string.Doi/>" element of the link is converted by TextEdit in
>> HTML entities: "%3C$string.Doi/%3E". Even if I replace the %3*
>> commands by < and > with a plain text editor, the link still points to
>> http://dx.doi.org/<$string.Doi/> and not to the expanded form (i.e.,
>> not the actual value of the DOI).
>
> I am not sure what your'e doing here, but you're not doing something you're
> supposed to do. Don't mess with the RTF data directly, that won't be
> interpreted as the template, the rich text you see in a rich text editor will
> be.
>
> Also, I don't know what <$string.Doi/> should stand for? I think you want
> something like <$urls.Doi/>.
>
>> Is there any way that BibDesk can
>> expand template values in links.
>
> Use the "linkedText" key, e.g. <$urls.Doi.linkedText/>.
Sorry, this was not very clear. I want the value of the DOI (which was
<$fields.Doi/>, not <$string.Doi/> that was another mistake from me)
to be a link to http://dx.doi.org/<$fields.Doi/> so that clicking on
the DOI resolves the DOI on doi.org servers and reroutes the user to
the page of the publication, online.
<$urls.Doi.linkedText/> does that but instead of displaying only the
DOI number it displays the full http:// url, which takes a little more
room.
Similarly, I want to make the a link that searches for the current
paper on Google Scholar. In HTML I can do this:
<a
href="http://scholar.google.com/scholar?&as_q=<$fields.Title.stringByRemovingTeX.htmlString/>&as_sauthors=<$authors.lastna...@firstobject/>">Foo</a>
and "Foo" is a link to a Google Scholar search which has the first
author and the title as arguments. This works well but I am not sure
if/how I can do this in RTF.
Finally, in RTFD I can easily include images. In HTML I can easily
link to online images. However, adding an image in the templates
folder and using a relative link does not work. I would prefer to use
a local image rather than an online one so that it works offline too.
How can I include local images in HTML?
FYI, the point of all this is to display a magnifying glass as the
link to the Scholar search for example.
Thanks in advance,
JiHO
---
http://maururu.net
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Bibdesk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users