Long time ago, I was working for a project based on e-book conversion. The main pain area of the project was bookmark or we can say cross reference linking. It was very time consuming and almost 30-40% time consuming out of 100% so I have tried to writing an source code in epsilon extension language "eel" and I succeed on writing this code and it reduces almost 20-30% of our production time. I did not get any thing from my company for writing this source code but and letting them use it but it makes me feel happy. Couple days ago one of my friend want me to write a source code for cross reference linking so I decided not to writing exact source code but I will share this source code which is similar to his requirement so here we go.
Dedicated to Vignesh Kumar, please use this source code for your requirement, if you don't understand anything please let me know I will write exact code you need.
command internalbib1()
{
int a, b, c, d, e, f;
char dest[1000], src[1000], *pet=".+<min>", linkendvalue[1000];
while(search(1, "<link linkend=\"\">"))
{
search(-1, "<link linkend=\"\">");
search(1, "<link linkend=\"\">");
point=point-17;
set_mark();
search(1, "</link>");
narrow_to_region();
search(1, ">");
a=point;
search(1, ",");
b=point-1;
grab(a,b, src);
strcat(src, pet);
re_search(1, "([0-9][0-9][0-9][0-9])");
c=point;
d=point-4;
grab(c,d, dest);
strcat(src, dest);
widen_buffer();
next_window();
goto_beginning();
if(re_search(1, src)==1)
{
re_search(-1, src);
search(-1, "xml:id=\"");
e=point+8;
search(1, "\">");
f=point-2;
grab(e,f, linkendvalue);
previous_window();
search(-1, "<link");
search(1, "linkend=\"");
stuff(linkendvalue);
search(-1, "linkend=\"\"");
}
else
{
previous_window();
}
}
}
This source code belongs to me and everyone can use it freely, there is no issue to use this source code.