Math & Science ⇒ chemstyle | Inkscape EPS and TMP Captions
-
- Posts: 60
- Joined: Wed Nov 18, 2009 4:18 pm
chemstyle | Inkscape EPS and TMP Captions
Hi,
I work with chemstyle to finish my thesis. And up till now it worked great. I export my files form chemdraw to eps and use TMP captions, which in turn change with Chemstyle in the latex file to the correct numbering.
But no I changed a file a litte in Inkscape and saved it as eps again but nog the TMP captions will not be replaced by chemstyle, what ever saving mode I use.
Is there a way to over come this problem??
\BoudewijnD
p.s. a minimal working file with the eps is added as zip
I work with chemstyle to finish my thesis. And up till now it worked great. I export my files form chemdraw to eps and use TMP captions, which in turn change with Chemstyle in the latex file to the correct numbering.
But no I changed a file a litte in Inkscape and saved it as eps again but nog the TMP captions will not be replaced by chemstyle, what ever saving mode I use.
Is there a way to over come this problem??
\BoudewijnD
p.s. a minimal working file with the eps is added as zip
- Attachments
-
- Temp.zip
- Minimal work file + EPS
- (186.74 KiB) Downloaded 288 times
Last edited by BoudewijnD on Fri Aug 05, 2011 11:21 am, edited 1 time in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.
chemstyle | Inkscape EPS and TMP Captions
This is because the text string isn't stored as a text string by inkscape (or -- to be more precise -- cairo) but as some ascii hexadecimal characters, it seems.
This is a known Inkscape problem or rather a cairo problem. If you scroll down on the website linked above you see that you either have to wait for cairo 1.11.x and an inkscape that uses it or need to downgrade inkscape to 0.46.
Or you can fix the problem in the eps file directly.
This is a known Inkscape problem or rather a cairo problem. If you scroll down on the website linked above you see that you either have to wait for cairo 1.11.x and an inkscape that uses it or need to downgrade inkscape to 0.46.
Or you can fix the problem in the eps file directly.
site moderator & package author
-
- Posts: 60
- Joined: Wed Nov 18, 2009 4:18 pm
Re: chemstyle | Inkscape EPS and TMP Captions
Hey cgnieder,
Thanx!
I thought that is was someting like that. But now I would like to fix the problem. But as far is I know I can not run to versions of Inkscape in Ubuntu. And I looked at your direct fix but thats like abracadabra for me, so would you be so kind to point me in the right direction.
\BoudewijnD
Thanx!
I thought that is was someting like that. But now I would like to fix the problem. But as far is I know I can not run to versions of Inkscape in Ubuntu. And I looked at your direct fix but thats like abracadabra for me, so would you be so kind to point me in the right direction.
\BoudewijnD
chemstyle | Inkscape EPS and TMP Captions
As a matter of fact I can. I had the same problem a while ago 
If you open your file "1.eps" with a text editor, you will find parts of about 4 lines long that begin with a line "BT" and end with a line "ET", for example lines 521 to 527
The lines "[ something ]TJ" are containing the text. Now comes the tricky part: you have to identify the ones corresponding to TMP1, TMP2, etc. I found the first ones: line 642
needs to be replaced with
and line 691
needs to be replaced with
and so on
EDIT: I was playing with your eps file a bit: TMP12 to TMP15 are not saved as text but as image, it seems. Their text strings are missing, but they disappear when you remove the image part after line 1456. You should insert these label markers as text first.
Regards

If you open your file "1.eps" with a text editor, you will find parts of about 4 lines long that begin with a line "BT" and end with a line "ET", for example lines 521 to 527
Code: Select all
BT
6 0 0 6 52.55954 220.200324 Tm
/f-0-0 1 Tf
[<01>-2<02>]TJ
-2.860001 0.959991 Td
[<03>12<02>]TJ
ET
Code: Select all
[<04>5<05>25<06>10<07>]TJ
Code: Select all
(TMP1)Tj
Code: Select all
[<04>5<05>25<06>10<08>]TJ
Code: Select all
(TMP2)Tj
EDIT: I was playing with your eps file a bit: TMP12 to TMP15 are not saved as text but as image, it seems. Their text strings are missing, but they disappear when you remove the image part after line 1456. You should insert these label markers as text first.
Regards
site moderator & package author
-
- Posts: 60
- Joined: Wed Nov 18, 2009 4:18 pm
chemstyle | Inkscape EPS and TMP Captions
Hey cgnieder,
Now I see but is see to me as a lot of work. I have over a hunder schemes with a minimum of 10 compound a scheme. So when I need it I will go back to 0.46 Inkscape.
A other small question how can you check which Cairo version you have. And can you update it becuase I read on http://cairographics.org/download/#development that there is a snapshot version of 1.11.02.
Thanx for the help again.
\BoudewijnD
Now I see but is see to me as a lot of work. I have over a hunder schemes with a minimum of 10 compound a scheme. So when I need it I will go back to 0.46 Inkscape.
A other small question how can you check which Cairo version you have. And can you update it becuase I read on http://cairographics.org/download/#development that there is a snapshot version of 1.11.02.
Thanx for the help again.
\BoudewijnD
chemstyle | Inkscape EPS and TMP Captions
Probably the easier wayBoudewijnD wrote: Now I see but is see to me as a lot of work. I have over a hunder schemes with a minimum of 10 compound a scheme. So when I need it I will go back to 0.46 Inkscape.

In the package manager, I would guess...BoudewijnD wrote: A other small question how can you check which Cairo version you have.
I don't know. I haven't tried it and can't say anything. I create all my schemes with chemfig, so for me the problem wasn't too big.BoudewijnD wrote: And can you update it becuase I read on http://cairographics.org/download/#development that there is a snapshot version of 1.11.02.
Regards
site moderator & package author
-
- Posts: 60
- Joined: Wed Nov 18, 2009 4:18 pm
Re: chemstyle | Inkscape EPS and TMP Captions
Creating all my schem's with chemfig is way to much work for me.
Thanx again for the help.
\BoudewijnD
Thanx again for the help.
\BoudewijnD