diff --git a/scripts/tkremind b/scripts/tkremind index 88c2be79..00f6976d 100755 --- a/scripts/tkremind +++ b/scripts/tkremind @@ -757,7 +757,7 @@ proc FillCalWindow {} { set stuff [string trimleft $stuff] set stuff [string trimright $stuff] set label [expr $firstWkday + $day - 1] - .cal.l$label configure -text "$day (W$stuff)" + .cal.l$label configure -text "$day $stuff" continue } "SHADE" { diff --git a/src/rem2ps.c b/src/rem2ps.c index 4524fa0b..5a98831d 100644 --- a/src/rem2ps.c +++ b/src/rem2ps.c @@ -891,6 +891,7 @@ int DoQueuedPs(void) int fnoff; char buffer[512]; char const *size, *extra; + char const *s; int num, r, g, b, phase, fontsize, moonsize; unsigned char c; @@ -959,12 +960,21 @@ int DoQueuedPs(void) break; case SPECIAL_WEEK: /* Week number */ - num = sscanf(e->entry+fnoff, "%d", &phase); - if (num == 1) { - printf("gsave Border Border moveto /EntryFont findfont EntrySize 1.2 div scalefont setfont ( (W %d)) show grestore\n", - phase); + printf("gsave Border Border moveto /EntryFont findfont EntrySize 1.2 div scalefont setfont ("); + s = e->entry+fnoff; + while(*s && isspace(*s)) { + s++; } + while(*s) { + if (*s == '\\' || *s == '(' || *s == ')') { + PutChar('\\'); + } + PutChar(*s); + s++; + } + printf(") show grestore\n"); break; + case SPECIAL_MOON: /* Moon phase */ num = sscanf(e->entry+fnoff, "%d %d %d", &phase, &moonsize, &fontsize); diff --git a/www/rem2html b/www/rem2html index c186b695..e205f118 100755 --- a/www/rem2html +++ b/www/rem2html @@ -483,7 +483,7 @@ sub draw_day_cell my $shade = $shades->[$day]; my $week = ''; if (exists($weeks->{$day})) { - $week = ' (W' . $weeks->{$day} . ')'; + $week = ' ' . $weeks->{$day}; } my $class; if ($Options{'nostyle'}) {