diff -ur xdvik-22.74.2-RC1.orig/texk/xdvik/dvi-draw.c xdvik-22.74.2-RC1/texk/xdvik/dvi-draw.c
--- xdvik-22.74.2-RC1.orig/texk/xdvik/dvi-draw.c	2003-05-29 16:15:50.000000000 +0800
+++ xdvik-22.74.2-RC1/texk/xdvik/dvi-draw.c	2003-05-29 16:20:49.000000000 +0800
@@ -2711,6 +2711,10 @@
     if (*p == ' ')
 	++p;
 
+    /* strip possible 'ctextemp_' prefix */
+    if (memcmp(p, "ctextemp_", 9) == 0)
+	p += 9;
+
     if (*p != '\0') {
 	size_t len = strlen(p) + 1;
 
@@ -2913,7 +2917,18 @@
     }
 
     /* now try to open the file; find_file allocates space for expanded_filename */
-    if ((expanded_filename = find_file(parsed->filename, &buf, kpse_tex_format)) == NULL) {
+    i = strlen(parsed->filename);
+    if (i >= 4 && !memcmp(parsed->filename + i - 4, ".tex", 4)) {
+       /* first try .ctx file */
+       char *tmp = strdup(parsed->filename);
+       memcpy(tmp + i - 3, "ctx", 3);
+       expanded_filename = find_file(tmp, &buf, kpse_tex_format);
+       free(tmp);
+    }
+    else
+       expanded_filename = NULL;
+    if (expanded_filename == NULL && (expanded_filename = 
+	find_file(parsed->filename, &buf, kpse_tex_format)) == NULL) {
 	do_popup_message(MSG_ERR, NULL,
 			 "File \"%s\" not found, couldn't jump to special\n\"%s:%d\"\n",
 			 parsed->filename, parsed->filename, parsed->line);
diff -ur xdvik-22.74.2-RC1.orig/texk/xdvik/string-utils.c xdvik-22.74.2-RC1/texk/xdvik/string-utils.c
--- xdvik-22.74.2-RC1.orig/texk/xdvik/string-utils.c	2003-05-28 16:31:29.000000000 +0800
+++ xdvik-22.74.2-RC1/texk/xdvik/string-utils.c	2003-05-29 16:16:15.000000000 +0800
@@ -405,19 +405,26 @@
     if (*src == '/') { 
 	dvi_path = NULL;
     }
+    else if (memcmp(src, "ctextemp_", 9) == 0)
+	src += 9;	/* Strip 'ctextemp_' prefix. We don't need to worry
+			   about the case "{path}/ctextemp_" because the
+			   ctextemp_* files in src specials cannot have a
+			   path component */
     
-    /* skip `.tex' suffix in strings if present */
+    /* skip `.tex', '.ctx' suffix in strings if present */
     i = strlen(src);
     MYTRACE((stderr, "len of |%s| %d", src, i));
-    if (i >= 4 && strcmp(src + (i - 4), ".tex") == 0) {
-	MYTRACE((stderr, "src |%s| has .tex suffix!", src));
+    if (i >= 4 && (strcmp(src + (i - 4), ".tex") == 0
+		|| strcmp(src + (i - 4), ".ctx") == 0)) {
+	MYTRACE((stderr, "src |%s| has .tex or .ctx suffix!", src));
 	i -= 4;
     }
 
     j = strlen(target);
     MYTRACE((stderr, "len of |%s| %d", target, j));
-    if (j >= 4 && strcmp(target + (j - 4), ".tex") == 0) {
-	MYTRACE((stderr, "target |%s| has .tex suffix!", target));
+    if (j >= 4 && (strcmp(target + (j - 4), ".tex") == 0
+		|| strcmp(target + (j - 4), ".ctx") == 0)) {
+	MYTRACE((stderr, "target |%s| has .tex or .ctx suffix!", target));
 	j -= 4;
     }
 
