diff --git a/rem2pdf/bin/rem2pdf.in b/rem2pdf/bin/rem2pdf.in index 4fcddffe..f6828faf 100644 --- a/rem2pdf/bin/rem2pdf.in +++ b/rem2pdf/bin/rem2pdf.in @@ -86,7 +86,7 @@ Options: --media=MEDIA, -mMEDIA Size for specified media --width=W, -wW Specify media width in 1/72nds of an inch --height=H, -hH Specify media height in 1/72nds of an inch ---wrap, -x Make calendar fit in at most 5 rows +--wrap, -y Make calendar fit in at most 5 rows --title-font=FONT Specify font for calendar title --header-font=FONT Specify font for weekday names --daynum-font=FONT Specify font for day numbers @@ -115,7 +115,7 @@ my $ret = GetOptions('landscape|l' => \$settings->{landscape}, 'fill-page|e' => \$settings->{fill_entire_page}, 'media|m=s' => \$settings->{media}, 'width|w=i' => \$settings->{width}, - 'wrap|x' => \$settings->{wrap_calendar}, + 'wrap|y' => \$settings->{wrap_calendar}, 'height|h=i' => \$settings->{height}, 'title-font=s' => \$settings->{title_font}, 'header-font=s' => \$settings->{header_font}, @@ -433,7 +433,7 @@ The default is 36. The size of the margin at the right of the page in 1/72ths of an inch. The default is 36. -=item --wrap, -x +=item --wrap, -y Modify the calendar so that if it would normally require 6 rows to print, then the last day (or last two days, as needed) are moved to the diff --git a/scripts/tkremind b/scripts/tkremind index 5c412ffb..72099b11 100755 --- a/scripts/tkremind +++ b/scripts/tkremind @@ -240,6 +240,9 @@ set Option(PrintOrient) landscape set OptDescr(PrintFill) "(0/1) If 1, fill entire page when printing" set Option(PrintFill) 1 +set OptDescr(WrapCal) "(0/1) If 1, make printed calendars occupy at most 5 rows" +set Option(WrapCal) 0 + set OptDescr(PrintDaysRight) "(0/1) If 1, put day numbers in the top-right of each calendar box" set Option(PrintDaysRight) 1 @@ -1290,6 +1293,7 @@ proc DoPrint {} { radiobutton .p.portrait -text "Portrait" -variable Option(PrintOrient) -value portrait checkbutton .p.fill -text "Fill page" -variable Option(PrintFill) + checkbutton .p.wrap -text "Use at most 5 rows (PDF only)" -variable Option(WrapCal) checkbutton .p.right -text "Day numbers at top-right" -variable Option(PrintDaysRight) checkbutton .p.encoding -text "ISO 8859-1 PostScript encoding" -variable Option(PrintEncoding) checkbutton .p.calendars -text "Print small calendars" -variable Option(PrintSmallCalendars) @@ -1300,12 +1304,14 @@ proc DoPrint {} { if {$HaveRem2PDF} { pack .p.f1 .p.ff .p.f2 .p.f2a .p.f3 .p.f3a \ -side top -fill both -expand 1 -anchor w + pack .p.fill .p.wrap .p.right .p.encoding .p.calendars -in .p.f3a \ + -side top -anchor w -fill none -expand 0 } else { pack .p.f1 .p.f2 .p.f2a .p.f3 .p.f3a \ -side top -fill both -expand 1 -anchor w - } - pack .p.fill .p.right .p.encoding .p.calendars -in .p.f3a \ + pack .p.fill .p.right .p.encoding .p.calendars -in .p.f3a \ -side top -anchor w -fill none -expand 0 + } pack .p.f4 -side top -fill both -expand 1 -anchor w pack .p.f11 .p.f12 -in .p.f1 -side top -fill none -expand 0 -anchor w pack .p.tofile .p.filename .p.browse -in .p.f11 -side left -fill none -expand 0 -anchor w @@ -1398,6 +1404,11 @@ proc DoPrint {} { } } + if {$Option(WrapCal)} { + if {$Option(PrintFormat) == "pdf"} { + append cmd " --wrap" + } + } if {$Option(PrintOrient) == "landscape"} { append cmd " -l" }