summaryrefslogtreecommitdiff
path: root/macros/context
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-04-19 03:03:47 +0000
committerNorbert Preining <norbert@preining.info>2023-04-19 03:03:47 +0000
commit10bb4d468226c290e5e87e3fa367dc6fd2dcb84b (patch)
tree0e3fae0643d2bed385e6b758a246aaa2edf61133 /macros/context
parent80e82c6cd5fb165fa720a1ce3a25f357ea11b9fc (diff)
CTAN sync 202304190303
Diffstat (limited to 'macros/context')
-rw-r--r--macros/context/contrib/context-calendar-examples/README.md16
-rw-r--r--macros/context/contrib/context-calendar-examples/VERSION2
-rw-r--r--macros/context/contrib/context-calendar-examples/doc/context/third/calendar-examples/calendar-examples.md4
-rw-r--r--macros/context/contrib/context-calendar-examples/doc/context/third/calendar-examples/t-intervalcalendar-module-doc.pdfbin103780 -> 0 bytes
-rw-r--r--macros/context/contrib/context-calendar-examples/tex/context/third/calendar-examples/A5-day_per_page.tex199
-rw-r--r--macros/context/contrib/context-calendar-examples/tex/context/third/calendar-examples/A6-1week_per_2pages.tex202
-rw-r--r--macros/context/contrib/context-calendar-examples/tex/context/third/calendar-examples/Menu-calendar.tex165
-rw-r--r--macros/context/contrib/context-calendar-examples/tex/context/third/calendar-examples/Photocalendar.tex71
-rw-r--r--macros/context/contrib/context-calendar-examples/tex/context/third/calendar-examples/Sundata-calendar.tex640
-rw-r--r--macros/context/contrib/context-collatingmarks/README.md17
-rw-r--r--macros/context/contrib/context-collatingmarks/VERSION2
-rw-r--r--macros/context/contrib/context-collatingmarks/doc/context/third/collating-marks/README.md26
-rw-r--r--macros/context/contrib/context-collatingmarks/doc/context/third/collating-marks/t-collatingmarks-module-doc.pdfbin140658 -> 140294 bytes
-rw-r--r--macros/context/contrib/context-collatingmarks/tex/context/third/collating-marks/t-collatingmarks.tex (renamed from macros/context/contrib/context-collatingmarks/tex/context/third/collationg-marks/t-collatingmarks.tex)23
-rw-r--r--macros/context/contrib/context-interval-calendar/README.md8
-rw-r--r--macros/context/contrib/context-interval-calendar/VERSION2
-rw-r--r--macros/context/contrib/context-interval-calendar/doc/context/third/interval-calendar/t-intervalcalendar-module-doc.pdfbin103780 -> 104207 bytes
-rw-r--r--macros/context/contrib/context-interval-calendar/tex/context/third/interval-calendar/Interval-calendar.tex61
-rw-r--r--macros/context/contrib/context-interval-calendar/tex/context/third/interval-calendar/t-intervalcalendar.tex4
-rw-r--r--macros/context/contrib/context-pocketdiary/README.md12
-rw-r--r--macros/context/contrib/context-pocketdiary/VERSION2
-rw-r--r--macros/context/contrib/context-pocketdiary/doc/context/third/pocketdiary/README.md20
-rw-r--r--macros/context/contrib/context-pocketdiary/doc/context/third/pocketdiary/t-pocketdiary-module-doc.pdfbin221337 -> 221130 bytes
-rw-r--r--macros/context/contrib/context-pocketdiary/tex/context/third/pocketdiary/Moonphase/moons-MP.tex13
-rw-r--r--macros/context/contrib/context-pocketdiary/tex/context/third/pocketdiary/Moonphase/t-moonphase.lua2
-rw-r--r--macros/context/contrib/context-pocketdiary/tex/context/third/pocketdiary/PocketDiary.tex102
-rw-r--r--macros/context/contrib/context-pocketdiary/tex/context/third/pocketdiary/Solar/sun-MP.tex13
-rw-r--r--macros/context/contrib/context-pocketdiary/tex/context/third/pocketdiary/Solar/t-solar.lua2
-rw-r--r--macros/context/contrib/context-pocketdiary/tex/context/third/pocketdiary/t-calendar.lua2
-rw-r--r--macros/context/contrib/context-pocketdiary/tex/context/third/pocketdiary/t-pocketdiary.lua4
-rw-r--r--macros/context/contrib/context-pocketdiary/tex/context/third/pocketdiary/t-pocketdiary.tex8
31 files changed, 901 insertions, 721 deletions
diff --git a/macros/context/contrib/context-calendar-examples/README.md b/macros/context/contrib/context-calendar-examples/README.md
new file mode 100644
index 0000000000..bd90a4df06
--- /dev/null
+++ b/macros/context/contrib/context-calendar-examples/README.md
@@ -0,0 +1,16 @@
+## A Collection of Calendars
+
+# Intro
+There is a module called t-pocektdiary which contains numerous calculations for day, week, month and year tables. The module also comes with the possibility to calculate sunrise and sunset data as well as moon-cycle data.
+
+This collection of calendars shows the the mechanisms implemented in the PocketDiary module can also be used outside of its structures.
+
+# The examples
+- Planner in the format A5 with 1 day per page
+- Planner in the format A5 or A6 with 1 week on two facing pages
+- Planner for menus
+- Photo calendar
+
+# Author
+Willi Egger
+License Public Domain \ No newline at end of file
diff --git a/macros/context/contrib/context-calendar-examples/VERSION b/macros/context/contrib/context-calendar-examples/VERSION
index 345ab1ba1e..faab976b2f 100644
--- a/macros/context/contrib/context-calendar-examples/VERSION
+++ b/macros/context/contrib/context-calendar-examples/VERSION
@@ -1 +1 @@
-2023.04.14 \ No newline at end of file
+2023.04.15
diff --git a/macros/context/contrib/context-calendar-examples/doc/context/third/calendar-examples/calendar-examples.md b/macros/context/contrib/context-calendar-examples/doc/context/third/calendar-examples/calendar-examples.md
index d250ea54c7..a14e407ad2 100644
--- a/macros/context/contrib/context-calendar-examples/doc/context/third/calendar-examples/calendar-examples.md
+++ b/macros/context/contrib/context-calendar-examples/doc/context/third/calendar-examples/calendar-examples.md
@@ -30,9 +30,9 @@ Each day shows the day-number and the name of the day. Christian holidays are ma
## Photocalendar.tex
-The Phorocalendar is made-up on A4 paper. It contains a title page with one picture, followed by 12 pages each reserved for one month. On each of those pages there is a picture and at the bottom a month-table is placed. Centered above the table the month's name and the year is typeset. This example is set-up such, that one can only put either landscape or portrait pictures.
+The Phoro calendar is made-up on A4 paper. It contains a title page with one picture, followed by 12 pages each reserved for one month. On each of those pages there is a picture and at the bottom a month-table is placed. Centered above the table the month's name and the year is typeset. This example is set-up such, that one can only put either landscape or portrait pictures.
## Sundata-calendar.tex
-This calendar puts the moon- and sun-data per day in a table. It is arranged as a A6-booklet consisting out of two sections. Sewn together and set into a cover this gives a handy brochure to keep track of moon-cycle and the dayly sunrise, sunset and day-light hours.
+This calendar puts the moon- and sun-data per day in a table. It is arranged as a A6-booklet consisting out of two sections. Sewn together and set into a cover this gives a handy brochure to keep track of moon-cycle and the daily sunrise, sunset and day-light hours.
diff --git a/macros/context/contrib/context-calendar-examples/doc/context/third/calendar-examples/t-intervalcalendar-module-doc.pdf b/macros/context/contrib/context-calendar-examples/doc/context/third/calendar-examples/t-intervalcalendar-module-doc.pdf
deleted file mode 100644
index a97245c510..0000000000
--- a/macros/context/contrib/context-calendar-examples/doc/context/third/calendar-examples/t-intervalcalendar-module-doc.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/context/contrib/context-calendar-examples/tex/context/third/calendar-examples/A5-day_per_page.tex b/macros/context/contrib/context-calendar-examples/tex/context/third/calendar-examples/A5-day_per_page.tex
index 6dd5c69843..44d48f6cf8 100644
--- a/macros/context/contrib/context-calendar-examples/tex/context/third/calendar-examples/A5-day_per_page.tex
+++ b/macros/context/contrib/context-calendar-examples/tex/context/third/calendar-examples/A5-day_per_page.tex
@@ -1,46 +1,42 @@
-% Context file
-% Filename: A5-day_per_page.tex
-%
-% 14-01-2023
-% Created by Willi Egger, w.egger@boede.nl
-% This document is in the Public Domain.
-
-% This is an example of how to use the PocketDiary-module outside the built-in
-% structure of a PocketDiary.
-% In order to use this example you need to have the PocketDiary-module
-% installed from:
-% https://modules.contextgarden.net/cgi-bin/module.cgi/action=view/id=132
-% If you want collating marks placed on the outermost sheet of a section,
-% then you need to install also the Collatingmarks-module from:
-% https://modules.contextgarden.net/cgi-bin/module.cgi/action=view/id=129
-% The used imposition scheme is contained in the \CONTEXT\ distro.
-
-% This is an example how to prepare a calendar, where each page contains one
-% day. On the left side there is a time-schedule starting at 06:00 ending
-% at 22:00. The header contains left the month and right the year. Below the
-% header there is a table showing left the day and the short dayname followed by
-% the week number and the day number of the year. If the day in question is a
-% Christian holiday, then the name of it is stated in the center.
-% To the right astronomical data
-% are shown: Lunar days/moon phase, sun rise, sun set and light hours.
-% In order to have complete section at the end of the calendar a number of
-% pages with lines are added.
+%D \module
+%D [ file=t-calendar-examples.tex
+%D version=2023.04.15,
+%D title=Calendar examples based on PocketDiary,
+%D subtitle=A5 format 1 day per page calendar,
+%D author=W. Egger,
+%D date=\currentdate,
+%D copyright=W. Egger,
+%D license=Public Domain]
+
+%D This is an example of how to use the PocketDiary-module outside the built-in
+%D structure of a PocketDiary.
+%D In order to use this example you need to have the PocketDiary-module
+%D installed from:
+%D https://modules.contextgarden.net/cgi-bin/module.cgi/action=view/id=132
+%D If you want collating marks placed on the outermost sheet of a section,
+%D then you need to install also the Collatingmarks-module from:
+%D https://modules.contextgarden.net/cgi-bin/module.cgi/action=view/id=129
+%D The used imposition scheme is contained in the \CONTEXT\ distro.
+
+%D This is an example how to prepare a calendar, where each page contains one
+%D day. On the left side there is a time-schedule starting at 06:00 ending
+%D at 22:00. The header contains left the month and right the year. Below the
+%D header there is a table showing left the day and the short dayname followed
+%D by
+%D the weeknumber and the daynumber of the year. If the day in question is a
+%D Chrstian holiday, then the name of it is stated in the center.
+%D To the right astronomical data
+%D are shown: Lunar days/moonphase, sun rise, sun set and light hours.
+%D In order to have complete sections a number of pages with lines are added.
\usemodule[pocketdiary]
\usemodule[collatingmarks][Collatingmarks=yes]
-% define the different modes to enable the international interface:
+%D Setup the language to be used: EN,DE,NL,FR,IT,ES
-\definemode[English,Dutch,German,French,Italian,Spanish][keep]
+\mainlanguage[en]
-\enablemode[English]
-% \enablemode[German]
-% \enablemode[Dutch]
-% \enablemode[Italian]
-% \enablemode[French]
-% \enablemode[Spanish]
-
-% The variable sets for the PocketDiary module:
+%D The variable sets for the PocketDiary module:
\setvariables
[PocketDiary]
@@ -62,16 +58,16 @@
[Separatorline=blue,
Gridline={s=.75}]
-\setvariables
+\setvariables %Koziegłowy 52.467860 16.981240
[PocketDiaryGeoPosition]
[lat=52.467860,
lon=16.981240,
timezoneoffset=1,
- continent=EU] % EU, US or empty for no Daylight Saving Time (DST)
+ continent=US] % EU, US or empty for no Daylight Saving Time (DST)
\setvariables
[PocketDiaryAddress]
- [Familyname=YourFamilyName,
+ [Familyname={\bf YourFamilyName},
Forename=YourName,
Street=YourStreet and Number,
Zipcode=YourPostalCode,
@@ -88,34 +84,15 @@
\addfeature[f:Tabular]
-\startmode[English]
- \mainlanguage[en]
-\stopmode
-
-\startmode[German]
- \mainlanguage[de]
-\stopmode
-
-\startmode[French]
- \mainlanguage[fr]
-\stopmode
-
-\startmode[Italian]
- \mainlanguage[it]
-\stopmode
-
-\startmode[Spanish]
- \mainlanguage[es]
-\stopmode
-
-% The document is double sided printed, the page number will be set in the \setupfootertexts:
+%D The document is double sided printed, the page number will be set in the
+%D \setupfootertexts:
\setuppagenumbering[alternative=doublesided,location=]
\setuppapersize[A5][A4,landscape]
% \setuppapersize[A5][A5]
-% Adapt the page layout to the size of the page:
+%D Adapt the page layout to the size of the page:
\setuplayout
[topspace=.6cm,
@@ -129,72 +106,74 @@
width=middle,
location=middle]
-% Enable the imposition: 2 pages recto and verso using 4 sheets of A4 for forming one section
+%D Enable the imposition: 2 pages recto and verso using 4 sheets of A4 for forming one section
\setuparranging[2*2*4]
-% Setup of the Collating marks module:
+
+%D Setup of the Collating marks module:
\setupMPvariables % for collatingmarks
[pages=8, % pages per sheet of paper doublesided
sheets=2, % sheets of paper used per section
horpageshift=-0.5mm]
+
% \showframe
-% Let Lua do the work:
+%D Let Lua do the work:
\startluacode
local report = logs.reporter("Calendar-1-day-per-page")
-
+
function thirddata.diary.year_of_monthtables(
- year,lat,lon,timeoffset,continent)
-
+ year,lat,lon,timeoffset,continent)
+
report("Working in function: diary.year_of_monthtables")
for i = 1,12 do
local monthname = string.lower(os.date
("%B",os.time{year=year,month=i,day=1}))
-
+
thirddata.diary.header_text(monthname,year)
thirddata.diary.monthblock(i,year,lat,lon,timeoffset,continent)
end
end
-
+
function thirddata.diary.monthblock(month,year,lat,lon,timeoffset,continent)
-
+
report("Working in function diary.monthblock")
-
+
local nofdays = 1
-
+
local monthname = thirddata.calendar.select_nameofmonth(month,year)
- local yeardays = thirddata.calendar.isleapyear(year)
-
+ local yeardays = thirddata.calendar.isleapyear(year)
+
if month == 2 and yeardays == 366 then
nofdays = thirddata.calendar.nofdays_month(month,year) + 1
else
nofdays = thirddata.calendar.nofdays_month(month,year)
end
-
+
--report("Number of days in month: %s", nofdays)
-
+
for i = 1,nofdays do
local ordinalday = thirddata.calendar.ordinalday(i,month,year)
local weeknumber = thirddata.calendar.weeknumber(i,month,year)
- local dayname = string.lower(os.date ("%a",os.time{day=i,month=month,year=year}))
+ local dayname = string.lower(os.date ("%a",os.time{day=i,month=month,year=year}))
local holiday = thirddata.calendar.checkchristianfeast(i,month,year)
local moondata = thirddata.moonphase.lunardays(year,month,i)
- local dst_start,dst_stop = thirddata.diary.DST(year,continent)
+ local dst_start,dst_stop = thirddata.diary.DST(year,continent)
local sunrise,sunset,lighthours =
thirddata.srss.sundata(
- i,month,year,lat,lon,timeoffset,dst_start,dst_stop)
+ i,month,year,lat,lon,timeoffset,dst_start,dst_stop)
- if holiday ~= "" then
- report("Holiday: %s", holiday)
- report("Day number: %s", i)
- end
+ if holiday ~= "" then
+ report("Holiday: %s", holiday)
+ report("Day number: %s", i)
+ end
context.bTABLE({setups="table:dayblock"})
context.bTR()
@@ -203,8 +182,8 @@
context.NC()
context("\\bf")
--report("Daynumber: %s Month %s", i,month)
- if dayname == "sun" or holiday ~= "" and holiday ~= "ashw" then
- local dnu = i
+ if dayname == "sun" or holiday ~= "" and holiday ~= "ashw"
+ then local dnu = i
local dna = dayname
context.color({"red"},
function() context(dnu) end) --day number
@@ -297,19 +276,24 @@
return true
end
})
- end
-
+ end
+
\stopluacode
+%D Setup the tab;e for the day page
+
\startsetups[table:dayblock]
\setupTABLE[each][each][frame=off]
\setupTABLE[r][each][offset=0pt,loffset=3pt,roffset=3pt,align=lohi]
\setupTABLE[c][1][width=0.35\textwidth,align=lohi]
\setupTABLE[c][2][style={\switchtobodyfont[6pt]},width=0.65\textwidth] \stopsetups
+%D Define the macro for invoking the lua calculations
+
\define[5]\Yearofmonthtables{%
\ctxlua{thirddata.diary.year_of_monthtables(#1,#2,#3,#4,#5)}}
+%D Create a buffer containing the contents of the variables to be used
\startbuffer[Yearofmonthtables]
\Yearofmonthtables %Year,lat,lon,timeoffset,continent
@@ -320,7 +304,7 @@
{"\getvariable{PocketDiaryGeoPosition}{continent}"}
\stopbuffer
-% Create a time-table as a background to the page
+%D Create a time-table in \METAFUN\ as a background to the page
\startreusableMPgraphic{Time-Lines}
numeric w; w:= OverlaytWidth;
@@ -328,7 +312,7 @@
numeric t;
path p,q;
p := unitsquare xscaled OverlayWidth yscaled (OverlayHeight-2cm);
-
+
q:= llcorner p -- lrcorner p;
draw q withpen pencircle scaled .5pt
withcolor \MPcolor{Grid};
@@ -336,14 +320,15 @@
draw q shifted (0,i*h) withpen pencircle scaled .5pt
withcolor \MPcolor{Grid};
t := 24 - 1 - i ;
- label.top(textext(""& decimal t & ":00"),point 0 of q)
- shifted (15pt,((i-1)*h)+1pt);
+ label.top(textext(""& decimal t & ":00"),point 0 of q) shifted (15pt,((i-1)*h)+1pt);
endfor;
\stopreusableMPgraphic
+%D Make the timetable available as a background on the page
+
\defineoverlay[Textbackground][\reuseMPgraphic{Time-Lines}]
-% Implement international interface:
+%D Implement international interface:
\setuplabeltext[en][title=Title]
\setuplabeltext[nl][title=Titel]
\setuplabeltext[de][title=Titel]
@@ -372,10 +357,12 @@
\setuplabeltext[it][compilation=Dato di compilazione]
\setuplabeltext[es][compilation=Fecha de compilación]
-% Setup the TeX side of the document:
+%D Setup the TeX side of the document:
\starttext
+%D Create the title pages
+
\startstandardmakeup[page=yes,doublesided=no]
\strut
\startalignment [middle]
@@ -400,28 +387,40 @@
\stoptabulate
\stopstandardmakeup
- \getbuffer[Lost-Returnto]
+%D Load the Lost-Returnto template
+ \getbuffer[Lost-Returnto]
+
\setupbackgrounds[text][background=]
-
+
\setupbackgrounds[text][background=Textbackground]
+%D Insert all day pages
+
\getbuffer[Yearofmonthtables]
-
+
\setupbackgrounds[text][background=]
+%D Add a year table with all months
+
\getbuffer[Yearcurrentplan]
-
+
\setupheadertexts[\bfa \getvariable{PocketDiary}{Yearnext}]
+%D Insert a year table with all months of the following year
+
\getbuffer[Yearnextplan]
+
+%D Add some todo-lists
\dorecurse
{3}
{\getbuffer[Todo]}
-
+
+%D Add notes pages
+
\dorecurse
{10}
{\getbuffer[Lines]}
-
+
\stoptext
diff --git a/macros/context/contrib/context-calendar-examples/tex/context/third/calendar-examples/A6-1week_per_2pages.tex b/macros/context/contrib/context-calendar-examples/tex/context/third/calendar-examples/A6-1week_per_2pages.tex
index 6432824f46..eaee939c4c 100644
--- a/macros/context/contrib/context-calendar-examples/tex/context/third/calendar-examples/A6-1week_per_2pages.tex
+++ b/macros/context/contrib/context-calendar-examples/tex/context/third/calendar-examples/A6-1week_per_2pages.tex
@@ -1,56 +1,65 @@
-% Context file
-% Filename: A6-1week_per_2pages.tex
-%
-% 14-01-2023
-% Created by Willi Egger, w.egger@boede.nl
-% This document is in the Public Domain.
-
-% This is an example of how to use the PocketDiary-module outside the built-in
-% structure of a PocketDiary.
-% In order to use this example you need to have the PocketDiary-module
-% installed from:
-% https://modules.contextgarden.net/cgi-bin/module.cgi/action=view/id=132
-% If you want collating marks placed on the outermost sheet of a section,
-% then you need to install also the Collatingmarks-module from:
-% https://modules.contextgarden.net/cgi-bin/module.cgi/action=view/id=129
-% The used imposition scheme is contained in the \CONTEXT\ distro.
-
-% This is an example how to prepare a calendar, where two facing pages carry
-% one week as a table. Saturday and Sunday are placed together in one row.
-% The header contains the month name to the left and the week number and the
-% year to the right.
-% The footer contains three fields. The first contains the job-name, the center
-% field shows the page number, the right field is not filled. -- However
-% this can easily be changed in the variable set "PocketDiaryFooter".
-% Each row of the week-table shows top left the day number followed by the short
-% name of the day. Next to this the ordinal day number of the year is typeset.
-% If the day in question is a Christian holiday, then its name is placed next
-% to the general information.
-% This example supports 6 languages i.e. English, German, Dutch, French,
-% Italian and Spanish. The respective interface is activated by enabling the
-% respective mode
-% The original idea was to have an A6 calendar, where 4 pages are print on the
-% A4 paper. This is activated by enabling the mode "A6". By activating the mode
-% "A5" the calendar is prepared A5 sized on a A4 landscape paper.
-% Because there are astronomical data concerning the sun rise, sun set times it
-% is necessary to fill in the correct geo-positional data in the variable set "PocketDiaryGeoPosition".
+%D \module
+%D [ file=t-calendar-examples.tex,
+%D version=2023.04.15,
+%D title=Calendar examples based on PocketDiary,
+%D subtitle=A5/A6 format, 1 week per 2 facing pages,
+%D author=W. Egger,
+%D date=\currentdate,
+%D copyright=W. Egger,
+%D license=Public Domain]
+
+%D This is an example of how to use the PocketDiary-module outside the built-in
+%D structure of a PocketDiary.
+%D In order to use this example you need to have the PocketDiary-module
+%D installed from:
+%D https://modules.contextgarden.net/cgi-bin/module.cgi/action=view/id=132
+%D If you want collating marks placed on the outermost sheet of a section,
+%D then you need to install also the Collatingmarks-module from:
+%D https://modules.contextgarden.net/cgi-bin/module.cgi/action=view/id=129
+%D The used imposition scheme is contained in the \CONTEXT\ distro.
+
+%D This is an example how to prepare a calendar, where two facing pages carry
+%D one week as a table. Saturday and Sunday are placed together in one row.
+%D The header contains the month name to the left and the week number and the
+%D year to the right.
+%D The footer contains three fields. The first contains the job-name, the center
+%D field shows the page number, the right field is not filled. -- However
+%D this can easily be changed in the variable set "PocketDiaryFooter".
+%D Each row of the week-table shows top left the day number followed by the short
+%D name of the day. Next to this the ordinal day number of the year is typeset.
+%D If the day in question is a Christian holiday, then its name is placed next
+%D to the general information.
+%D This example supports 6 languages i.e. English, German, Dutch, French,
+%D Italian and Spanish. The respective interface is activated by enabling the
+%D respective mode
+%D The original idea was to have an A6 calendar, where 4 pages are print on the
+%D A4 paper. This is activated by enabling the mode "A6". By activating the mode
+%D "A5" the calendar is prepared A5 sized on a A4 landscape paper.
+%D Because there are astronomical data concerning the sun rise, sun set times it
+%D is necessary to fill in the correct geo-positional data in the variable set
+%D "PocketDiaryGeoPosition".
+
+%D Load the PocketDiary module
\usemodule[pocketdiary]
+
+%D Load the Collating marks module
+
\usemodule[collatingmarks][Collatingmarks=yes]
-\definemode[English,Dutch,German,French,Italian,Spanish,Polish][keep]
+%D Define the modes for the different formats
+
\definemode[A5,A6][keep]
-\enablemode[English]
-% \enablemode[German]
-% \enablemode[Dutch]
-% \enablemode[Italian]
-% \enablemode[French]
-% \enablemode[Spanish]
-% \enalbemode[Polish]
+%D Enable the desired format of the calendar
+
+\enablemode[A5]
-\enablemode[A6]
-%\enablemode[A5]
+%D Set the interface language which includes EN,DE,NL,FR,IT,ES
+
+\mainlanguage[en]
+
+%D Setup the variable sets for the PocketDiary module
\setvariables
[PocketDiary]
@@ -90,32 +99,17 @@
Mobile=YourMobilePhoneNumber,
E-mail=YourEmail@YourProvider,
Web=YourWWW]
-
+
+%D Setup the desired font to be used
+
\setupbodyfont[ibmplex,ss,10pt]
\definefontfeature[f:Tabular][tnum=yes]
\addfeature[f:Tabular]
-\startmode[English]
- \mainlanguage[en]
-\stopmode
-
-\startmode[German]
- \mainlanguage[de]
-\stopmode
-
-\startmode[French]
- \mainlanguage[fr]
-\stopmode
-
-\startmode[Italian]
- \mainlanguage[it]
-\stopmode
-
-\startmode[Spanish]
- \mainlanguage[es]
-\stopmode
+%D Make the document doublesided, switch off the page numbering. The latter
+%D is done in the PocketDiary footer setup
\setuppagenumbering[alternative=doublesided,location=]
@@ -132,6 +126,8 @@
location=middle,
marking=on]
+%D Elaborate the definitions for the A6 format
+
\startmode[A6]
\definepapersize[Agenda][width=100mm,height=140mm]
@@ -156,6 +152,8 @@
horpageshift=-0.5mm]
\stopmode
+%D Elaborate the definition for the A5 format
+
\startmode[A5]
\definepapersize[Agenda][width=148mm,height=210mm]
@@ -170,7 +168,7 @@
horpageshift=0mm]
\stopmode
-% Let Lua the main work:
+%D Let Lua the main work:
\startluacode
@@ -187,30 +185,28 @@
report("Working in function: diary.year_of_weektables")
--- for calendarmonth = 1,12 do
-
- for calendarmonth = 1,12 do
+ for calendarmonth = 1,12 do
--for calendarmonth = 1,12 do
- thirddata.diary.monthblock
- (calendarmonth,year,lat,lon,timeoffset,continent)
+ thirddata.diary.monthblock
+ (calendarmonth,year,lat,lon,timeoffset,continent)
end
end
function thirddata.diary.monthblock(month,year,
lat,lon,timeoffset,continent)
-
+
report("Working in function diary.monthblock: %s", month)
-
+
local c = thirddata.calendar.month(month,year) --returns number of weeks in a given month
local wkf = thirddata.calendar.weeknumber(1,month,year) --weeknumber of 1st day of a given month
-
- report("First week in month %s of year %s is %s",month,year,wkf)
-
+
+ report("First week in month %s of year %s is %s",month,year,wkf)
+
local wkl = wkf + c - 1 -- last week of a given month based on wkf and c, is wrong for January
-
+
report("Weeks in the selected month: %s", c)
report("First week of month: %s", wkf)
-
+
if month == 1 and wkf > 51 then
--report("Calculating in week number %s", wkf)
@@ -218,32 +214,32 @@
thirddata.diary.setup_header_texts(wkf,month,calcyear)
thirddata.diary.thisweek(wkf,month,year,lat,lon,timeoffset,continent)
-
- report("Week %s - Year %s",wkf,year)
-
+
+ report("Week %s - Year %s",wkf,year)
+
--year = year + 1
wkf = 1
wkl = wkf + c - 2
-
+
for i = wkf, wkl do
thirddata.diary.setup_header_texts(i,month,year)
thirddata.diary.thisweek(i,month,year,lat,lon,timeoffset,continent)
- end
+ end
else
for i = wkf, wkl do
-
+
report("Calculating in week number %s", i)
-
+
thirddata.diary.setup_header_texts(i,month,year)
thirddata.diary.thisweek(i,month,year,
lat,lon,timeoffset,continent)
end
end
end
-
-
+
+
function thirddata.diary.setup_header_texts(week,month,year)
-
+
local monthname = string.lower(os.date
("%B",os.time{year=year,month=month,day=1}))
@@ -282,6 +278,8 @@
\stopluacode
+%D Setup the table for the week calendar
+
\startsetups[table:week]
\setupTABLE[split=yes]
\setupTABLE[each][each][frame=on]
@@ -296,8 +294,11 @@
\setupTABLE[c][2][width=0.5\textwidth]
\stopsetups
+%D Define the macro for invoking the calculations
+
\define[5]\Yearofweektables{\ctxlua{thirddata.diary.year_of_weektables(#1,#2,#3,#4,#5)}}
+%D Create a buffer containing all variables for the calculations
\startbuffer[Yearofweektables]
\Yearofweektables %Year,lat,lon,timeoffset,continent
@@ -308,8 +309,12 @@
{"\getvariable{PocketDiaryGeoPosition}{continent}"}
\stopbuffer
+%D Setup the \TEX\ side of the document
+
\starttext
+%D Establish the content for the title pages
+
\startstandardmakeup[page=yes,doublesided=no]
\strut
\godown[.3\textheight]
@@ -353,19 +358,30 @@
\stoptabulate
\stopstandardmakeup
+%D Insert a page with lost-return-to information (PocketDiary
+%D template)
+
\getbuffer[Lost-Returnto]
+%D Add a year table with all months
+
\getbuffer[Yearcurrentplan]
\setupheadertexts[\bfa \getvariable{PocketDiary}{Yearnext}+1]
+%D Add a year table of the next year with all months
+
\getbuffer[Yearnextplan]
\setupheadertexts[]
-
+
+%D Insert all weektables by loading the buffer
+
\getbuffer[Yearofweektables]
- % \dorecurse
- % {4}
- % {\getbuffer[Lines]}
+%D Add pages for notes
+\dorecurse
+ {4}
+ {\getbuffer[Lines]}
+
\stoptext \ No newline at end of file
diff --git a/macros/context/contrib/context-calendar-examples/tex/context/third/calendar-examples/Menu-calendar.tex b/macros/context/contrib/context-calendar-examples/tex/context/third/calendar-examples/Menu-calendar.tex
index 135994f9d8..23ae3f7017 100644
--- a/macros/context/contrib/context-calendar-examples/tex/context/third/calendar-examples/Menu-calendar.tex
+++ b/macros/context/contrib/context-calendar-examples/tex/context/third/calendar-examples/Menu-calendar.tex
@@ -1,62 +1,72 @@
-% Context file
-% Filename: Menu-calender.tex
-%
-% 14-01-2023
-% Created by Willi Egger w.egger@boede.nl
-% This file is in the Public Domain
-
-% This is an example of how to use the PocketDiary-module outside the built-in
-% structure of a PocketDiary.
-% In order to use this example you need to have the PocketDiary-module
-% installed from:
-% https://modules.contextgarden.net/cgi-bin/module.cgi/action=view/id=132
-% If you want collating marks placed on the outermost sheet of a section,
-% then you need to install also the Collatingmarks-module from:
-% https://modules.contextgarden.net/cgi-bin/module.cgi/action=view/id=129
-% The used imposition scheme is contained in the \CONTEXT\ distro.
+%D \module
+%D [ file=t-calendar-examples.tex
+%D version=2023.04.15
+%D title=Calendar examples based on PocketDiary
+%D subtitle=Menu calendar,
+%D author=W. Egger,
+%D date=\currentdate
+%D copyright=W. Egger
+%D license=Public Domain
+
+
+%D This is an example of how to use the PocketDiary-module outside the built-in
+%D structure of a PocketDiary.
+%D In order to use this example you need to have the PocketDiary-module
+%D installed from:
+%D https://modules.contextgarden.net/cgi-bin/module.cgi/action=view/id=132
+%D
+%D If you want collating marks placed on the outermost sheet of a section,
+%D then you need to install also the Collatingmarks-module from:
+%D https://modules.contextgarden.net/cgi-bin/module.cgi/action=view/id=129
+%D The used imposition scheme is contained in the \CONTEXT\ distribution.
+
+%D Load the PocketDiary module
\usemodule[pocketdiary]
+
+%D Load the Collating marks module
+
\usemodule[collatingmarks][Collatingmarks=yes]
-% Choose your font
+%% Choose and setup the desired font
\setupbodyfont[ibmplex,ss,10pt]
-% Add a path to the picture placed on page 3:
+%D Add a path to the picture placed on page 3:
\setupexternalfigures
- [directory=/Users/willi/Documents/TEXdata
- /Koken/Grossmutters-Guetzli-Rezepte/]
+ [directory=/Path-to-the-picture/]
-% Choose the main language it determines the interface:
+%D Choose the main language which determines the interface:
\mainlanguage[en]
-% This document will be doublesided, the pagenumber will be placed in the footer by means of \setupfootertexts:
+%D This document will be doublesided, the pagenumber will be placed in the
+%D footer by means of \type{\setupfootertexts}:
+
\setuppagenumbering[alternative=doublesided,location=]
-% The calendar has a pagesize of A6 and with the imposition 4 pages recto and verso are placed on a A4. Two sheets of A4 form one section:
+%D The calendar has a pagesize of A6 and with the imposition 4 pages recto and
+%D verso are placed on a A4. Two sheets of A4 form one section:
+
+%D Setup paper size and map it on the size of the print paper
-%\setuppapersize[A6][A4]
-\setuppapersize[A5][A4,landscape]
+\setuppapersize[A6][A4]
-% \setuparranging[2*4*2]
-%\setuparranging[2*2*4]
-\setuparranging[2SIDE]
+%D Invoke the arranging of the pages
-% The module Collating marks needs appropriate information:
+\setuparranging[2*4*2]
+
+%D Setup the appropriate information for the collating marks module:
-% \setupMPvariables
-% [pages=8, % pages per sheet of paper doublesided
-% sheets=2, % sheets of paper used per section
-% horpageshift=0mm]
\setupMPvariables
- [pages=4, % pages per sheet of paper doublesided
- sheets=4, % sheets of paper used per section
+ [pages=8, % pages per sheet of paper doublesided
+ sheets=2, % sheets of paper used per section
horpageshift=0mm]
-% Adapt the layout of the page to the size of the page:
+%D Adapt the layout of the page to the size of the page:
+
\setuplayout
[topspace=.6cm,
backspace=.6cm,
@@ -69,7 +79,7 @@
width=middle,
location=middle]
-% Variable sets from the PocketDiary module to be set:
+%D Setup the variable sets from the PocketDiary module to be set:
\setvariables
[PocketDiary]
@@ -86,7 +96,8 @@
[Separatorline=blue,
Gridline={s=.75}]
-% The data are presented in table form. The setup of the table:
+%D The data are presented in table form. The setup of the table is
+%D as follows:
\startsetups table:week
\setupTABLE[split=yes]
@@ -96,34 +107,41 @@
\setupTABLE[r][2,3,5,6,8,9,11,12,14,15,17,18,20,21][bottomframe=on]
\stopsetups
-% There are currently 6 interfaces supported:
+%D There are currently 6 interfaces supported: EN,DE,NL,FR,IT,ES
+%D Create some label texts for each language
+
+%D English interface
-% English interface
\setuplabeltext[en][menu=Menu]
\setuplabeltext[en][comment=Comment]
-% German interface
+%D German interface
+
\setuplabeltext[de][menu=Menü]
\setuplabeltext[de][comment=Kommentar]
-% French interface
+%D French interface
+
\setuplabeltext[fr][menu=Menu]
\setuplabeltext[fr][comment=Commentaire]
-% Dutch interface
+%D Dutch interface
+
\setuplabeltext[nl][menu=Menu]
\setuplabeltext[nl][comment=Commentaar]
-% Italian interface
+%D Italian interface
+
\setuplabeltext[it][menu=Menu]
\setuplabeltext[it][comment=Commento]
-% Spanish interface
+%D Spanish interface
+
\setuplabeltext[es][menu=Menú]
\setuplabeltext[es][comment=Comentario]
-% The lua code performing all the magic:
+%D Let lua perform all the magic:
\startluacode
@@ -133,8 +151,8 @@
local stamp = mondaytimestamp
local year = year
local week = w
- local daynumber,dayname,monthname,holiday
-
+ local daynumber,dayname,monthname,holiday
+
local day = stamp + 1 * 24 * 60 * 60
report("Working in function: thirddata.calendar.menuweektable")
@@ -144,9 +162,9 @@
--report("Month: %s Week: %s", monthname,week)
thirddata.calendar.myheadertext(monthname,week)
-
+
context.bTABLE({setups="table:week"})
-
+
for i = 1,7 do
local day = stamp + i * 24 * 60 * 60
@@ -159,16 +177,16 @@
if holiday ~= "" then
report("Holiday (before table row): %s", holiday)
- report("Day number (before table row): %s", daynumber)
+ report("Day number (before table row): %s", daynumber)
report("Day name (before table row): %s",dayname)
- end
-
+ end
+
context.bTR()
context.bTD({style="bfa"})
if dayname == "sun" or holiday ~= "" and f ~= "ashw" then
- local dnu = daynumber
- local dna = dayname
+ local dnu = daynumber
+ local dna = dayname
context.color({"red"},function() context(dnu) end)
context("~")
context.color({"red"},function() context.labeltext(dna) end)
@@ -198,9 +216,9 @@
end
function thirddata.calendar.myheadertext(monthname,week)
-
- report("Working in function myheadertext")
-
+
+ report("Working in function myheadertext")
+
context.setupheadertexts{
function()
context("\\bgroup\\bfa")
@@ -216,8 +234,8 @@
function thirddata.calendar.week(weeknumber,year)
local w = weeknumber
- local year = year
- local month = thirddata.calendar.select_month(1,w,year)
+ local year = year
+ local month = thirddata.calendar.select_month(1,w,year)
local mondaytimestamp = thirddata.calendar.weekcalendar(w,month,year)
report("Working in function: thirddata.calendar.week")
@@ -228,15 +246,19 @@
\stopluacode
-% We need a macro to call the lua-code: this macro has two parameters week number and year
+%D We need a macro to call the lua-code: this macro has two parameters
+%D week number and year
\define[2]\MenuWeektable{\ctxlua{thirddata.calendar.week(#1,#2)}}
% \showframe
-% The setup of the document at the TeX-side:
+%D The setup of the document at the TeX-side:
\starttext
+
+%D Add a title page
+
\startstandardmakeup[page=yes,doublsided=yes]
\strut
\godown[.3\textheight]
@@ -248,11 +270,13 @@
\vfil
\stopstandardmakeup
+%D Add a picture on page 3
+
\setupheadertexts[][]
-
- \strut\vfil
- \startplacefigure
+ \strut\vfil
+
+ \startplacefigure
[number=,
title=,
location=middle]
@@ -263,20 +287,27 @@
\page
+%D Call the footer text setups
+
\setups{Footertext}
-
+
+%D Place the week tables for the indicated year
+
\dorecurse{52}
{\setvariables
[PocketDiary]
[Week=\recurselevel]
\MenuWeektable{\recurselevel}{\getvariable{PocketDiary}{Year}}\page}
-
+
\page
+%D Add some empty pages for notes
+
\setupheadertexts[\bf \labeltext{notes}]
\dorecurse
{3}
{\strut\page}
+
\stoptext
diff --git a/macros/context/contrib/context-calendar-examples/tex/context/third/calendar-examples/Photocalendar.tex b/macros/context/contrib/context-calendar-examples/tex/context/third/calendar-examples/Photocalendar.tex
index f55b954e14..59185f3840 100644
--- a/macros/context/contrib/context-calendar-examples/tex/context/third/calendar-examples/Photocalendar.tex
+++ b/macros/context/contrib/context-calendar-examples/tex/context/third/calendar-examples/Photocalendar.tex
@@ -1,16 +1,26 @@
-% Context file
-% Filename: Photocalendar.tex
-%
-% 14-01-2023
-% Created by Willi Egger, w.egger@boede.nl
-% This file is in the Public Domain
-
-% Mind you that Thomas Schmitz put on the \CONTEXT -wiki a lua-script, which
-% creates a tex-file which can be compiled with \CONTEXT\ already back in 2007
-% for the preparation of a photo-calendar.
-% The nice thing about it is, that it uses a small number of formulae. Nice is,
-% that it also uses the Sohael Babwani formulae. See:
-% https://wiki.contextgarden.net/Calendar_script
+%D \module
+%D [ file=t-calendar-examples.tex
+%D version=2023.04.14
+%D title=Calendar examples based on PocketDiary
+%D subtitle=Photo calendar,
+%D author=W. Egger,
+%D date=\currentdate
+%D copyright=W. Egger
+%D license=Public Domain
+
+%D Mind you that Thomas Schmitz put on the \CONTEXT -wiki a lua-script, which
+%D creates a tex-file which can be compiled with \CONTEXT\ already back in 2007
+%D for the preparation of a photo-calendar.
+%D The nice thing about it is, that it uses a small number of formulae. Nice is,
+%D that it also uses the Sohael Babwani formulae. See:
+%D https://wiki.contextgarden.net/Calendar_script
+
+%D This eaxmple creates a photo calender. It has a front page with a photo and
+%D the year. The following pages have a photo at the top and at the bottom a
+%D month table. On top of the month table there is the month name and the year.
+%D This photo calendar is based on the PocketDiary.
+
+%D Load the PocketDiary module
% This example file creates a photo calendar based on the PocketDiary-module.
% In order to use this example you need to have the PocketDiary-module
@@ -26,15 +36,24 @@
% the title page.
% This file supports 6 languages, which are selected through the \mainlanguage[]
+%D Load the PockeDiary module
\usemodule[pocketdiary]
+%D Choose and setup the font to be used
+
\setupbodyfont[ibmplex,ss,12pt]
+%D Switch off the page numbering
+
\setuppagenumbering[location=]
+%D Setup the paper size
+
\setuppapersize[A4,portrait][A4,portrait]
+%D Adjust the layout of the page
+
\setuplayout
[topspace=20mm,
backspace=8.6mm,
@@ -43,10 +62,10 @@
height=middle,
width=middle]
-% Supported languages: en, de, nl, fr, it, es
+%% Supported languages: EN,DE,NL,FR,IT,ES
\mainlanguage[en]
-% Where to find the calendar pictures
+%D Setup the path where to find the calendar pictures
\setupexternalfigures
[directory=./MyPhotoDirectory]
@@ -103,19 +122,21 @@
[13]
[M.jpg]
-% Setup the variables for the Pocket diary, only year is used for the title page and the variable passed to Lua.
+%D Setup the variables for the Pocket diary, only year is used for the
+%D calculations.
\setvariables
[PocketDiary]
[Year=2023]
-
-% Let the header and the footer be empty:
+
+%D Let the header and the footer be empty:
\setupheadertexts[][]
\setupfootertexts[][]
-% Add the international interfaces:
+%D Add some label texts for the international interfaces:
+
\setuplabeltext[en][fotocal={Photo Calendar}]
\setuplabeltext[nl][fotocal=Fotokalender]
\setuplabeltext[de][fotocal=Fotokalender]
@@ -123,7 +144,7 @@
\setuplabeltext[it][fotocal={Calendario fotografico}]
\setuplabeltext[es][fotocal={Calendario fotográfico}]
-% Lua is performing the magic:
+%D Let lua is perform the magic:
\startluacode
local report = logs.reporter("Photo calendar")
@@ -159,7 +180,7 @@
end
\stopluacode
-% The setup of the table with the day numbers:
+% Setup of the month table
\startsetups table:month
\setupTABLE[c]
@@ -171,15 +192,17 @@
\setupTABLE[c][7][foregroundcolor=red]
\stopsetups
-% We need a simple macro with one parameter to call the lua-code:
+%D Define the macro for calling lua
\define[1]\Photocalendarpages
{\ctxlua{thirddata.calendar.Photo_calendar_page(#1)}}
-% Layout of the TeX part of the calendar:
+%D Setup the \TEX\ side of the document
\starttext
+%D Add a title page
+
\startstandardmakeup[page=yes,doublesided=yes]
\startplacefigure
[location=middle,
@@ -190,6 +213,8 @@
\midaligned{\bfc \labeltext{fotocal}~\getvariable{PocketDiary}{Year}}
\stopstandardmakeup
+%D Call the defined macro
+
\Photocalendarpages{\getvariable{PocketDiary}{Year}}
\stoptext
diff --git a/macros/context/contrib/context-calendar-examples/tex/context/third/calendar-examples/Sundata-calendar.tex b/macros/context/contrib/context-calendar-examples/tex/context/third/calendar-examples/Sundata-calendar.tex
index 99865d70c0..81c97e537e 100644
--- a/macros/context/contrib/context-calendar-examples/tex/context/third/calendar-examples/Sundata-calendar.tex
+++ b/macros/context/contrib/context-calendar-examples/tex/context/third/calendar-examples/Sundata-calendar.tex
@@ -1,305 +1,280 @@
-% Context file
-% Filename: Sundata-calendar.tex
-%
-% 13-07-2022
-% Copyright (c) 2022 BOEDE. All rights reserved.
-%
-% \nopdfcompression
-% \enabletrackers[context.trace]
-% \enabletrackers[system.jobfiles]
+%D \module
+%D [ file=t-calendar-examples.tex,
+%D version=2023.04.15,
+%D title=Calendar examples based on PocketDiary,
+%D subtitle=Sun and moon data calendar,
+%D author=W. Egger,
+%D date=\currentdate,
+%D copyright=W. Egger,
+%D license=Public Domain]
+
+%D This examples creates a small calendar, containing the sunrise and
+%D sunset time as well as the lunar days for each day of a given year.
+
+%D In order to create this calendar the PocketDiary module must be installed
+%D on the computer
+
+%D For placing collating marks on the outside of the sections, the
+%D Collating Marks module is required.
+
+%D Load the PocketDiary module
\usemodule[pocketdiary]
+
+%D Load the Collating Marks module
+
\usemodule[collatingmarks][Collatingmarks=yes]
-% \definemode[English,Dutch,German,French,Italian,Spanish][keep]
+%D Setup the main language. This determines the interface to be used
+
+\mainlanguage[en]
+
-\mainlanguage[es]
-% \enablemode[English]
-% \enablemode[German]
-% \enablemode[Dutch]
-% \enablemode[Italian]
-% \enablemode[French]
-% \enablemode[Spanish]
+% Setup of the variable sets for the PocketDiary module
\setvariables
- [PocketDiary]
- [Year=2023,
- Week=1,
- Day=1,
- Month=1,
- Nextyear=no,
- Place=Kozeigłowy,
+ [PocketDiary]
+ [Year=2023,
+ Week=1,
+ Day=1,
+ Month=1,
+ Nextyear=no,
+ Place=Koziegłowy,
Country=PL]
-%{Ośrodek szkoleniowo \crlf wypoczynkowy Uniwersytetu Mikołaja Kopernika \crlf Bacho\TEX},
\setvariables
- [PocketDiaryFooter]
- [Lefttext={\jobname .pdf},
- Centertext=\pagenumber,
- Righttext=]
+ [PocketDiaryFooter]
+ [Lefttext={\jobname .pdf},
+ Centertext=\pagenumber,
+ Righttext=]
\setvariables
- [PocketDiaryColors]
- [Separatorline=blue,
- Gridline={s=.75}]
+ [PocketDiaryColors]
+ [Separatorline=blue,
+ Gridline={s=.75}]
\setvariables
- [PocketDiaryGeoPosition]
- [lat=52.464588,
+ [PocketDiaryGeoPosition]
+ [lat=52.464588,
lon=16.981689,
timezoneoffset=1,
continent=EU] %EU, US or empty for no DST
-% lat=51.63682, %Sambeek Maasstraat 2A (Google Maps)
-% lon=5.96655, %Sambeek, Maasstraat 2A (Google Maps)
-% lat=53.287540, %Bachotek lake head
-% lon=19.475584 %Bachotek lake head
-
- %Koziegłowy
- % lat = 52.467860
- % lon= 16.981240
-
-% Czerwonak
-% lat": 52.464588
-% lon": 16.981689
-
- % Hasselt
- % lat = 52.5921425
- % lon = 6.0962685,
+%D Choose and setup the desired font to be used
\setupbodyfont[ibmplex,ss,10pt]
-% \usetypescriptfile[type-seravek]
-% \usetypescript[Seravek]
-% \setupbodyfont[Seravek,ss,10pt]
-
-% % Modes for the international interface
-%
-% \startmode[English]
-% \mainlanguage[en]
-% \setuplabeltext[en][week=Wk.~]
-% \stopmode
-%
-% \startmode[Dutch]
-% \mainlanguage[nl]
-% \stopmode
-%
-% \startmode[German]
-% \mainlanguage[de]
-% \setuplabeltext[de][week=Wo.~]
-% \stopmode
-%
-% \startmode[French]
-% \mainlanguage[fr]
-% \stopmdode
-%
-% \startmode[Italian]
-% \mainlanguage[it]
-% \stopmode
-%
-% \startmode[Spanish]
-% \mainlanguage[es]
-% \stopmode
+
+%D Make the document doublesided and switch off automatic page number placement
\setuppagenumbering[alternative=doublesided,location=]
-%\setuppapersize[A6][A4]
-% \setuppapersize[A6][A6]
-\setuppapersize[A6][A5,landscape]
+%D Setup paper size
+
+\setuppapersize[A6][A4]
+
+%D Setup the layout of the page
\setuplayout
- [topspace=.6cm,
- backspace=.6cm,
- header=2\bodyfontsize,
- headerdistance=.5\bodyfontsize,
- footer=1.2\bodyfontsize,
- footerdistance=.5\bodyfontsize,
- margin=0pt,
- height=middle,
- width=88mm,
- location=middle]
-
-%\setuparranging[2*4*2]
-\setuparranging[2SIDE]
+ [topspace=.6cm,
+ backspace=.6cm,
+ header=2\bodyfontsize,
+ headerdistance=.5\bodyfontsize,
+ footer=1.2\bodyfontsize,
+ footerdistance=.5\bodyfontsize,
+ margin=0pt,
+ height=middle,
+ width=88mm,
+ location=middle]
+
+
+%D Setup page arrangement
+
+\setuparranging[2*4*2]
+
+% Setup the variables for the Collating Marks module
\setupMPvariables % for collatingmarks
[pages=8, % pages per sheet of paper doublesided
sheets=2, % sheets of paper used per section
horpageshift=0mm]
-
-
+
+%D Let lua do the calculations
+
\startluacode
local report = logs.reporter("Sundata calendar")
function thirddata.diary.year_of_monthtables(
year,lat,lon,timeoffset,continent)
-
- report("Working in function: diary.year_of_monthtables")
-
- local dst_start,dst_stop = thirddata.diary.DST(year,continent)
-
- report("DST start: %s, DST stop: %s",dst_start,dst_stop)
-
--- for i= 1,12 do
- for i= 4,4 do
- local monthname = string.lower(os.date
- ("%B",os.time{year=year,month=i,day=1}))
-
- context.setupheadertexts(
- {
- function()
- context("\\bf")
- context.labeltext(monthname)
- return true
- end
- },
- {
- function()
- context(year)
- return true
- end
- },
- {
- function()
- context("\\bf")
- context.labeltext(monthname)
- return true
- end
- },
- {
- function()
- context(year)
- return true
- end
- })
-
- thirddata.diary.monthblock(i,year,lat,lon,timeoffset,dst_start,dst_stop)
- end
+
+ report("Working in function: diary.year_of_monthtables")
+
+ local dst_start,dst_stop = thirddata.diary.DST(year,continent)
+
+ report("DST start: %s, DST stop: %s",dst_start,dst_stop)
+
+-- for i= 1,12 do
+ for i= 4,4 do
+ local monthname = string.lower(os.date
+ ("%B",os.time{year=year,month=i,day=1}))
+
+ context.setupheadertexts(
+ {
+ function()
+ context("\\bf")
+ context.labeltext(monthname)
+ return true
+ end
+ },
+ {
+ function()
+ context(year)
+ return true
+ end
+ },
+ {
+ function()
+ context("\\bf")
+ context.labeltext(monthname)
+ return true
+ end
+ },
+ {
+ function()
+ context(year)
+ return true
+ end
+ })
+
+ thirddata.diary.monthblock(i,year,lat,lon,timeoffset,dst_start,dst_stop)
+ end
end
function thirddata.diary.monthblock(
month,year,lat,lon,timeoffset,dst_start,dst_stop)
-
- report("Working in function diary.monthblock")
-
- local c = thirddata.calendar.month(month,year) --returns number of weeks in a given month
- local wkf = thirddata.calendar.weeknumber(1,month,year)
-
- --report("Weeks in the selected month: %s", c)
- --report("Week number : %s", wkf)
-
- local nofdays = 1
-
- if month == 2 and thirddata.calendar.isleapyear(year) ~= 365 then
- nofdays = thirddata.calendar.nofdays_month(month,year) + 1
- else
- nofdays = thirddata.calendar.nofdays_month(month,year)
- end
-
- report("Number of days in month: %s", nofdays)
-
- local wkl = thirddata.calendar.weeknumber(nofdays,month,year)
-
- local monthname = thirddata.calendar.select_nameofmonth(month,year)
+
+ report("Working in function diary.monthblock")
+
+ local c = thirddata.calendar.month(month,year) --returns number of weeks in a given month
+ local wkf = thirddata.calendar.weeknumber(1,month,year)
+
+ --report("Weeks in the selected month: %s", c)
+ --report("Week number : %s", wkf)
+
+ local nofdays = 1
+
+ if month == 2 and thirddata.calendar.isleapyear(year) ~= 365 then
+ nofdays = thirddata.calendar.nofdays_month(month,year) + 1
+ else
+ nofdays = thirddata.calendar.nofdays_month(month,year)
+ end
+
+ report("Number of days in month: %s", nofdays)
+
+ local wkl = thirddata.calendar.weeknumber(nofdays,month,year)
+
+ local monthname = thirddata.calendar.select_nameofmonth(month,year)
context.bTABLE({setups="table:monthblock"})
-
- for i = 1,nofdays do
-
- local ordinalday = thirddata.calendar.ordinalday(i,month,year)
- local weeknumber = thirddata.calendar.weeknumber(i,month,year)
+
+ for i = 1,nofdays do
+
+ local ordinalday = thirddata.calendar.ordinalday(i,month,year)
+ local weeknumber = thirddata.calendar.weeknumber(i,month,year)
local holiday = thirddata.calendar.checkchristianfeast(i,month,year)
- local moondata = thirddata.moonphase.lunardays(year,month,i)
- local sunrise,sunset,lighthours =
- thirddata.srss.sundata(
- i,month,year,lat,lon,timeoffset,dst_start,dst_stop)
-
- context.bTR()
- context.bTD()
-
- local dayname = string.lower(os.date
- ("%a",os.time{day=i,month=month,year=year}))
-
- --report("Dayname: %s",dayname)
- context.starttabulate{"|lw(0.1\\textwidth)|lw(0.06\\textwidth)|l|"}
- context.NC()
- if dayname == "sun" or holiday ~= "" and holiday ~= "asw" then
- local dnu = i
- local dna = dayname
+ local moondata = thirddata.moonphase.lunardays(year,month,i)
+ local sunrise,sunset,lighthours =
+ thirddata.srss.sundata(
+ i,month,year,lat,lon,timeoffset,dst_start,dst_stop)
+
+ context.bTR()
+ context.bTD()
+
+ local dayname = string.lower(os.date
+ ("%a",os.time{day=i,month=month,year=year}))
+
+ --report("Dayname: %s",dayname)
+ context.starttabulate{"|lw(0.1\\textwidth)|lw(0.06\\textwidth)|l|"}
+ context.NC()
+ if dayname == "sun" or holiday ~= "" and holiday ~= "asw" then
+ local dnu = i
+ local dna = dayname
+ context.color({"red"},
+ function() context(dnu) end) --day number
+ context("~")
context.color({"red"},
- function() context(dnu) end) --day number
- context("~")
- context.color({"red"},
- function() context.labeltext(dna) end)--dayname
- else
- context(i) --day
- context("~")
- context.labeltext(dayname) --dayname
- end
- context.NC()
- context.switchtobodyfont{"6pt"}
- context.labeltext("week")
- context(": ")
- context(weeknumber)
- context.NC()
- context.switchtobodyfont{"6pt"}
- context.labeltext("day")
- context(": ")
- context(ordinalday)
- context.NC()
- context.NR()
- context.stoptabulate()
- context.eTD()
- context.bTD()
- context.starttabulate{"|lw(0.2\\textwidth)|l|l|l|l|"}
- context.NC()
- if holiday == "" then
- context.strut()
- context.NC()
- context.NC()
- context.NC()
- context.NC()
- else
- context.labeltext(holiday)
- context.NC()
- context.NC()
- context.NC()
- context.NC()
- end
- context.NR()
- context.NC()
- if tonumber(moondata) then
- context.labeltext("moondays")
- else
- context.labeltext("moon")
- end
- context(":~")
- context(moondata)
- context.NC()
- --context.labeltext("sunrise")
- context("\\SunA[background=Sunrise]{}")
- context("\\quad :~")
- context(sunrise)
- context.NC()
- context("\\SunA[background=Sunset]{}")
- context("\\quad :~")
- context(sunset)
- context.NC()
- context("\\SunB[background=Light]{}")
- context("~:~")
- context(lighthours)
- context.NC()
- context.NR()
- context.stoptabulate()
- context.eTD()
- context.eTR()
- end
+ function() context.labeltext(dna) end)--dayname
+ else
+ context(i) --day
+ context("~")
+ context.labeltext(dayname) --dayname
+ end
+ context.NC()
+ context.switchtobodyfont{"6pt"}
+ context.labeltext("week")
+ context(": ")
+ context(weeknumber)
+ context.NC()
+ context.switchtobodyfont{"6pt"}
+ context.labeltext("day")
+ context(": ")
+ context(ordinalday)
+ context.NC()
+ context.NR()
+ context.stoptabulate()
+ context.eTD()
+ context.bTD()
+ context.starttabulate{"|lw(0.2\\textwidth)|l|l|l|l|"}
+ context.NC()
+ if holiday == "" then
+ context.strut()
+ context.NC()
+ context.NC()
+ context.NC()
+ context.NC()
+ else
+ context.labeltext(holiday)
+ context.NC()
+ context.NC()
+ context.NC()
+ context.NC()
+ end
+ context.NR()
+ context.NC()
+ if tonumber(moondata) then
+ context.labeltext("moondays")
+ else
+ context.labeltext("moon")
+ end
+ context(":~")
+ context(moondata)
+ context.NC()
+ --context.labeltext("sunrise")
+ context("\\SunA[background=Sunrise]{}")
+ context("\\quad :~")
+ context(sunrise)
+ context.NC()
+ context("\\SunA[background=Sunset]{}")
+ context("\\quad :~")
+ context(sunset)
+ context.NC()
+ context("\\SunB[background=Light]{}")
+ context("~:~")
+ context(lighthours)
+ context.NC()
+ context.NR()
+ context.stoptabulate()
+ context.eTD()
+ context.eTR()
+ end
context.eTABLE()
context.page()
end
-\stopluacode
+\stopluacode
+
+%D Setup the table for the months
\startsetups[table:monthblock]
\setupTABLE[split=yes]
@@ -308,8 +283,12 @@ end
\setupTABLE[c][1][width=0.35\textwidth,align=lohi]
\setupTABLE[c][2][style={\switchtobodyfont[6pt]},width=0.65\textwidth] \stopsetups
+%D Define the macro to call lua
+
\define[5]\Yearofmonthtables{\ctxlua{thirddata.diary.year_of_monthtables(#1,#2,#3,#4,#5)}}
+%D Create a buffer containing all required variables for the calculations
+
\startbuffer[Yearofmonthtables]
\Yearofmonthtables %Year,lat,lon,timeoffset,dst_start,dst_stop
{\getvariable{PocketDiary}{Year}}
@@ -319,7 +298,11 @@ end
{"\getvariable{PocketDiaryGeoPosition}{continent}"}
\stopbuffer
-% Implement international interface:
+%D Setup label texts for the different interfaces
+
+\setuplabeltext[en][week=Wk.~]
+\setuplabeltext[de][week=Wo.~]
+
\setuplabeltext[en][title=Title]
\setuplabeltext[nl][title=Titel]
\setuplabeltext[de][title=Titel]
@@ -348,102 +331,109 @@ end
\setuplabeltext[it][compilation=Dato di compilazione]
\setuplabeltext[es][compilation=Fecha de compilación]
+%D Setup the document at the \TEX\ side
\starttext
+%D Add a title page
+
\startstandardmakeup[page=yes,doublesided=no]
\strut
\startalignment [middle]
\godown[.3\textheight]
- \startmode[**en]
+ \startmode[**en]
{\bfc \labeltext{sunstar}- and \labeltext{moon}-\labeltext{calendar}}
- \stopmode
- \startmode[**nl]
+ \stopmode
+ \startmode[**nl]
{\bfc \labeltext{sunstar}- en \labeltext{moon}-\labeltext{calendar}}
- \stopmode
- \startmode[**de]
- {\bfc \labeltext{sunstar}n- und \labeltext{moon}-\labeltext{calendar} }
- \stopmode
- \startmode[**fr]
+ \stopmode
+ \startmode[**de]
+ {\bfc \labeltext{sunstar}n- und \labeltext{moon}-\labeltext{calendar} }
+ \stopmode
+ \startmode[**fr]
{\bfc \labeltext{calendar} du \labeltext{sunstar} et de la \labeltext{moon}}
- \stopmode
- \startmode[**it]
+ \stopmode
+ \startmode[**it]
{\bfc \labeltext{calendar} di \labeltext{sunstar} e della \labeltext{moon}}
- \stopmode
- \startmode[**es]
+ \stopmode
+ \startmode[**es]
{\labeltext{calendar} del \labeltext{sunstar} y la
- \labeltext{moon}}
- \stopmode
- \blank
- {\bfb \getvariable{PocketDiary}{Place}}
+ \labeltext{moon}}
+ \stopmode
+ \blank
+ {\bfb \getvariable{PocketDiary}{Place}}
\vfill
{\tfa \getvariable{PocketDiary}{Year}}
\stopalignment
\vfil
\stopstandardmakeup
+%D Add an editorial and info page
+
\startstandardmakeup[page=yes,doublesided=no]
\starttabulate[|l|p|]
- \NC \labeltext{title}
- \EQ
- \startmode[**en]
+ \NC \labeltext{title}
+ \EQ
+ \startmode[**en]
{\labeltext{sunstar}- and \labeltext{moon}-\labeltext{calendar}}
- \stopmode
- \startmode[**nl]
+ \stopmode
+ \startmode[**nl]
{\labeltext{sunstar}- en \labeltext{moon}-\labeltext{calendar}}
- \stopmode
- \startmode[**de]
- {\labeltext{sunstar}n- und \labeltext{moon}-\labeltext{calendar} }
- \stopmode
- \startmode[**fr]
+ \stopmode
+ \startmode[**de]
+ {\labeltext{sunstar}n- und \labeltext{moon}-\labeltext{calendar} }
+ \stopmode
+ \startmode[**fr]
{\labeltext{calendar} du \labeltext{sunstar} et de la
- \labeltext{moon}}
- \stopmode
- \startmode[**it]]
+ \labeltext{moon}}
+ \stopmode
+ \startmode[**it]]
{\labeltext{calendar} di \labeltext{sunstar} e della
- \labeltext{moon}}
- \stopmode
- \startmode[**es]
+ \labeltext{moon}}
+ \stopmode
+ \startmode[**es]
{\labeltext{calendar} del \labeltext{sunstar} y la
- \labeltext{moon}}
- \stopmode
- \NC\NR
- \NC \labeltext{author}
- \EQ \getvariable{PocketDiaryAddress}{Forename}~
- \getvariable{PocketDiaryAddress}{Familyname} \NC\NR
- \NC \labeltext{typography} \EQ \CONTEXT\ with \LUAMETATEX \NC\NR
- \NC \labeltext[compilation] \EQ \currentdate \NC\NR
- \stoptabulate
- \vfil
- \startmode[**en]
- This calendar is generated for \getvariable{PocketDiary}{Place},
- \getvariable{PocketDiary}{Country}
- \stopmode
- \startmode[**de]
- Dieser Kalender ist berechnet für \getvariable{PocketDiary}{Place},
- \getvariable{PocketDiary}{Country}
- \stopmode
- \startmode[**nl]
- Deze kalender is opgemaakt voor \getvariable{PocketDiary}{Place},
- \getvariable{PocketDiary}{Country}
- \stopmode
- \startmode[**fr]
- Ce calendrier est fait pour \getvariable{PocketDiary}{Place},
- \getvariable{PocketDiary}{Country}
- \stopmode
- \startmode[**it]
- Questo calendario è prodotto per \getvariable{PocketDiary}{Place},
- \getvariable{PocketDiary}{Country}
- \stopmode
- \startmode[**es]
- Este calendario está calculado para \getvariable{PocketDiary}{Place},
- \getvariable{PocketDiary}{Country}
- \stopmode
- \starttabulate[|l|r|]
- \NC Longitude \EQ \getvariable{PocketDiaryGeoPosition}{lon} \NC\NR
- \NC Latitude \EQ \getvariable{PocketDiaryGeoPosition}{lat} \NC\NR
- \stoptabulate
+ \labeltext{moon}}
+ \stopmode
+ \NC\NR
+ \NC \labeltext{author}
+ \EQ \getvariable{PocketDiaryAddress}{Forename}~
+ \getvariable{PocketDiaryAddress}{Familyname} \NC\NR
+ \NC \labeltext{typography} \EQ \CONTEXT\ with \LUAMETATEX \NC\NR
+ \NC \labeltext[compilation] \EQ \currentdate \NC\NR
+ \stoptabulate
+ \vfil
+ \startmode[**en]
+ This calendar is generated for \getvariable{PocketDiary}{Place},
+ \getvariable{PocketDiary}{Country}
+ \stopmode
+ \startmode[**de]
+ Dieser Kalender ist berechnet für \getvariable{PocketDiary}{Place},
+ \getvariable{PocketDiary}{Country}
+ \stopmode
+ \startmode[**nl]
+ Deze kalender is opgemaakt voor \getvariable{PocketDiary}{Place},
+ \getvariable{PocketDiary}{Country}
+ \stopmode
+ \startmode[**fr]
+ Ce calendrier est fait pour \getvariable{PocketDiary}{Place},
+ \getvariable{PocketDiary}{Country}
+ \stopmode
+ \startmode[**it]
+ Questo calendario è prodotto per \getvariable{PocketDiary}{Place},
+ \getvariable{PocketDiary}{Country}
+ \stopmode
+ \startmode[**es]
+ Este calendario está calculado para \getvariable{PocketDiary}{Place},
+ \getvariable{PocketDiary}{Country}
+ \stopmode
+ \starttabulate[|l|r|]
+ \NC Longitude \EQ \getvariable{PocketDiaryGeoPosition}{lon} \NC\NR
+ \NC Latitude \EQ \getvariable{PocketDiaryGeoPosition}{lat} \NC\NR
+ \stoptabulate
\stopstandardmakeup
-
+
+%D Call the buffer for creating the contents of the calendar
+
\getbuffer[Yearofmonthtables]
\stoptext \ No newline at end of file
diff --git a/macros/context/contrib/context-collatingmarks/README.md b/macros/context/contrib/context-collatingmarks/README.md
new file mode 100644
index 0000000000..bbdd0eff82
--- /dev/null
+++ b/macros/context/contrib/context-collatingmarks/README.md
@@ -0,0 +1,17 @@
+# Module: Collating Marks
+
+## Editorial
+
+Author = W. Egger
+Version = 2023.04.15
+License = Public Domain
+
+## Introduction
+
+Collating marks are small black rules placed on the spine of printed sections. On each section the mark is moved by the length of the black rule. When the book is assembled on the spine appears a stair like pattern. Continuity of this pattern insures that the book is ordered in the correct sequence of sections.
+
+## Description
+
+The module is used in connection with arranging pages for folding to form sections.
+
+Depending on the arranging scheme used the module must be set up accordingly in the set of MetaPost variables. \ No newline at end of file
diff --git a/macros/context/contrib/context-collatingmarks/VERSION b/macros/context/contrib/context-collatingmarks/VERSION
index bcdfbcd1bb..faab976b2f 100644
--- a/macros/context/contrib/context-collatingmarks/VERSION
+++ b/macros/context/contrib/context-collatingmarks/VERSION
@@ -1 +1 @@
-2023.03.23 \ No newline at end of file
+2023.04.15
diff --git a/macros/context/contrib/context-collatingmarks/doc/context/third/collating-marks/README.md b/macros/context/contrib/context-collatingmarks/doc/context/third/collating-marks/README.md
index f35f92a89e..b953b7761f 100644
--- a/macros/context/contrib/context-collatingmarks/doc/context/third/collating-marks/README.md
+++ b/macros/context/contrib/context-collatingmarks/doc/context/third/collating-marks/README.md
@@ -1,21 +1,31 @@
-## Collting Marks
+# Module: Collating Marks
-# Introduction
-Collating marks are small black rules placed on printed sections. On each section the mark is moved by the length of the black rule. When the book is assembled on the spine appears a stair like pattern. Continuity of this pattern insures that the book is ordered in the correct sequence of sections.
+## Editorial
+
+Author = W. Egger
+Version = 2023.04.15
+License = Public Domain
+
+## Introduction
+
+Collating marks are small black rules placed on the spine of printed sections. On each section the mark is moved by the length of the black rule. When the book is assembled on the spine appears a stair like pattern. Continuity of this pattern insures that the book is ordered in the correct sequence of sections.
+
+## Usage
-# Usage
The module is used in connection with arranging pages for folding to form sections.
Depending on the arranging scheme used the module must be set up accordingly in the set of MetaPost variables.
-Example:
+### Example:
+
+Example setup for the collating marks:
\usemodule[collatingmarks][Collatingmarks=yes]
\setupMPvariables
[pages=8, % pages per sheet of paper doublesided
sheets=2, % sheets of paper used per section
- horpageshift=0mm, % used for correction if horizontal page-shifting is used
+ horpageshift=0.5mm, % used for correction if horizontal page-shifting is used
frenchdoors=false,
wickel=false]
@@ -23,7 +33,7 @@ This setup is used for the arranging scheme \setuparranging[2*4*2] which indicat
The shift parameter is used to adjust the position of the collating mark centered on the spine. This is specially important when a horizontal shift-list is used for arranging!
-Exanmple:
+Example setup for horizontal page shifting:
\definepageshift
[hor]
@@ -33,4 +43,4 @@ Exanmple:
\setuppageshift[paper][hor] %paper= arrange only, horizontal only
-\setuparranging[2*2*4]
+\setuparranging[2*4*2]
diff --git a/macros/context/contrib/context-collatingmarks/doc/context/third/collating-marks/t-collatingmarks-module-doc.pdf b/macros/context/contrib/context-collatingmarks/doc/context/third/collating-marks/t-collatingmarks-module-doc.pdf
index 1dd95ed6c6..52bf0eed68 100644
--- a/macros/context/contrib/context-collatingmarks/doc/context/third/collating-marks/t-collatingmarks-module-doc.pdf
+++ b/macros/context/contrib/context-collatingmarks/doc/context/third/collating-marks/t-collatingmarks-module-doc.pdf
Binary files differ
diff --git a/macros/context/contrib/context-collatingmarks/tex/context/third/collationg-marks/t-collatingmarks.tex b/macros/context/contrib/context-collatingmarks/tex/context/third/collating-marks/t-collatingmarks.tex
index 5b340243a5..c0f13da3d0 100644
--- a/macros/context/contrib/context-collatingmarks/tex/context/third/collationg-marks/t-collatingmarks.tex
+++ b/macros/context/contrib/context-collatingmarks/tex/context/third/collating-marks/t-collatingmarks.tex
@@ -1,7 +1,7 @@
%D \module
%D [ file=t-collatingmarks,
-%D version=\currentdate,
-%D title=\CONTEXT\ User Module,
+%D version=2023.04.15,
+%D title=Collating Marks \CONTEXT\ User Module,
%D subtitle=Environment for collating marks,
%D author={W. Egger},
%D date=\currentdate,
@@ -14,11 +14,11 @@
\startmodule[collatingmarks]
-\writestatus{loading}{Context Module for collating marks}
+\writestatus{loading}{Context Module for Collating Marks}
%D\enablemode[demo]
-%D \subject{Introduction}
+%D \startsubject[title={Introduction}]
%D
%D This code is based on the work of Thomas A. Schmitz, who created the module for
%D different crop marks.
@@ -28,8 +28,9 @@
%D according to the number of the section. After collating the book it becomes
%D easy tho check whether the sequence of the sections is correct. One should
%D see a \quotation{stair case} on the spine of the book.
+%D \stopsubject
%D
-%D \subject{Using the module}
+%D \startsubject[title={Using the module}]
%D
%D If the collating marks should be placed, then the system should be setup with
%D \type{\setupMPvariables[pages=8,sheets=2,shift=0mm,frenchdoors=false,wickel=false]} Note that the
@@ -48,16 +49,12 @@
%D (boolean).
%D For preparing a section with parallelfolding/letterfolding/Wickelfalz the
%D MPvariable \quotation{wickel} must be set to true (boolean).
-%D
-%D Be aware that the use of collating marks in MKII causes a lot of calls to
-%D Metapost, resulting in very long compilation times.
-%D So better use MKIV where Metapost is included as a
-%D library. In this case the time overhead is absolutely minimal.
-%D
-%D \section{Vocabulary}
+%D\stopsubject
+
+%D \startsubject[title={Vocabulary}]
%D
%D EN: Collating mark, DE: Kollationiermarke, NL: collationeerblokje
-%D
+%D \stopsubject
\unprotect
diff --git a/macros/context/contrib/context-interval-calendar/README.md b/macros/context/contrib/context-interval-calendar/README.md
new file mode 100644
index 0000000000..297e05a2db
--- /dev/null
+++ b/macros/context/contrib/context-interval-calendar/README.md
@@ -0,0 +1,8 @@
+## Interval driven lists
+
+# Intro
+This module provides a possibility to create lists which are based on date-intervals e.g. keeping track of an observation which must be done every third day.
+
+# Author
+Willi Egger
+License Public Domain \ No newline at end of file
diff --git a/macros/context/contrib/context-interval-calendar/VERSION b/macros/context/contrib/context-interval-calendar/VERSION
index 48d81a803c..faab976b2f 100644
--- a/macros/context/contrib/context-interval-calendar/VERSION
+++ b/macros/context/contrib/context-interval-calendar/VERSION
@@ -1 +1 @@
-2022-08-13 \ No newline at end of file
+2023.04.15
diff --git a/macros/context/contrib/context-interval-calendar/doc/context/third/interval-calendar/t-intervalcalendar-module-doc.pdf b/macros/context/contrib/context-interval-calendar/doc/context/third/interval-calendar/t-intervalcalendar-module-doc.pdf
index a97245c510..0cd7b0db0d 100644
--- a/macros/context/contrib/context-interval-calendar/doc/context/third/interval-calendar/t-intervalcalendar-module-doc.pdf
+++ b/macros/context/contrib/context-interval-calendar/doc/context/third/interval-calendar/t-intervalcalendar-module-doc.pdf
Binary files differ
diff --git a/macros/context/contrib/context-interval-calendar/tex/context/third/interval-calendar/Interval-calendar.tex b/macros/context/contrib/context-interval-calendar/tex/context/third/interval-calendar/Interval-calendar.tex
index e5da11f8f0..36feee934f 100644
--- a/macros/context/contrib/context-interval-calendar/tex/context/third/interval-calendar/Interval-calendar.tex
+++ b/macros/context/contrib/context-interval-calendar/tex/context/third/interval-calendar/Interval-calendar.tex
@@ -1,17 +1,41 @@
-% Context file
-% Filename: Interval-calendar.tex
-%
-% 13-08-2022
-% Copyright (c) 2022 Willi Egger. All rights reserved.
+%D \module
+%D [ file=t-interval-calendar.tex,
+%D version=2023.04.15,
+%D title=Date interval driven lists,
+%D subtitle=User file for the interval calendar,
+%D author=W. Egger,
+%D date=\currentdate,
+%D copyright=W. Egger,
+%D license=Public Domain]
+
+
+%D This module enables you to create lists which are based on date-intervals.
+%D Dat intervals are given in days. There is no limit to the length of the
+%D lists. The module creates tables based on variable sets. The number of
+%D columns and the names of the header cells can freely be setup.
+
+%D There are different predefined intervals which are contained in modes
+%D Define the modes
% \enablemode[weekly]
-% \enablemode[twoweekly]
-\enablemode[monthly]
+\enablemode[twoweekly]
+%\enablemode[monthly]
+
+%D Load the module
\usemodule[intervalcalendar]
+%D Choose the main language. This sets the interface. Supported
+%D interfaces are EN,NL,DE
+
\mainlanguage[en]
+%D Choose and setup the desired font
+
+\setupbodyfont[ibmplex,rm,12pt]
+
+%D Write setups for the table layout
+
\startsetups table:interval_check
\setupTABLE[split=repeat]
\setupTABLE[r][each][height=12mm,align=lohi]
@@ -21,24 +45,27 @@
\setupTABLE[c][5][width=0.3\textwidth]
\stopsetups
-% Columnheads
+%D Define label texts for the column heads
+
\setuplabeltext[en][c1=Datum]
\setuplabeltext[en][c2=Gas]
\setuplabeltext[en][c3=Electricity]
\setuplabeltext[en][c4=Water]
\setuplabeltext[en][c5=Observation]
-
+%D Build the document
\starttext
- \startmode[weekly]
- \Checklist{"2022-8-10"}{"2022-9-30"}{5}{7} % startdate,enddate,columns,interval
- \stopmode
- \startmode[twoweekly]
- \Checklist{"2022/9/10"}{"2023/01/31"}{5}{14} % startdate,enddate,columns,interval
- \stopmode
- \startmode[monthly]
+ \startmode[weekly]
+ \Checklist{"2022-8-10"}{"2022-9-30"}{5}{7} % startdate,enddate,columns,interval
+ \stopmode
+
+ \startmode[twoweekly]
+ \Checklist{"2022/9/10"}{"2023/01/31"}{5}{14} % startdate,enddate,columns,interval
+ \stopmode
+
+ \startmode[monthly]
\Checklist{"2022/8/10"}{"2023/05/31"}{5}{30} % startdate,enddate,columns,interval
- \stopmode
+ \stopmode
\stoptext \ No newline at end of file
diff --git a/macros/context/contrib/context-interval-calendar/tex/context/third/interval-calendar/t-intervalcalendar.tex b/macros/context/contrib/context-interval-calendar/tex/context/third/interval-calendar/t-intervalcalendar.tex
index 4d1c38cac1..b55e545224 100644
--- a/macros/context/contrib/context-interval-calendar/tex/context/third/interval-calendar/t-intervalcalendar.tex
+++ b/macros/context/contrib/context-interval-calendar/tex/context/third/interval-calendar/t-intervalcalendar.tex
@@ -1,7 +1,7 @@
%D \module
%D [ file=t-interval-calender,
-%D version=2022.08.13,
-%D title=\CONTEXT\ User Module,
+%D version=2023.04.15,
+%D title=Interval calendar \CONTEXT\ User Module,
%D subtitle=Interval Calendar,
%D author=Willi Egger,
%D date=\currentdate,
diff --git a/macros/context/contrib/context-pocketdiary/README.md b/macros/context/contrib/context-pocketdiary/README.md
new file mode 100644
index 0000000000..f89e5ff70d
--- /dev/null
+++ b/macros/context/contrib/context-pocketdiary/README.md
@@ -0,0 +1,12 @@
+## PocketDiary module
+
+# Description
+On the interenet there is a site where one can compose a so called PocketMod. This is based on 8 pages placed on a single sheet of paper, printed singlesided. The paper can then be folded into a booklet in such a way, that only printed pages are visible.
+
+The PocketDiary module implements the 8 pages on a A4 landscape sheet of paper. As the original there are different predefined possibilities to fill the 8 pages. First there are day, weekend, week, month and year tables. One can have not only the actual week, month, year, it is possible to have those a the following week. -- Beyond the calendars there are also a couple of templates for notes, todo, contacts and lost-return-to.
+
+Additionally the module can calculate sunrise and sunset times as well as calculate the moon-cylce.
+
+# Author
+W. Egger
+License: Everything is in the Public Domain except the algorithms contained in the solar data calculations (t-solar.lua) which license is: CCO "http://creativecommons.org/about/cc0" \ No newline at end of file
diff --git a/macros/context/contrib/context-pocketdiary/VERSION b/macros/context/contrib/context-pocketdiary/VERSION
index 97060b2f65..faab976b2f 100644
--- a/macros/context/contrib/context-pocketdiary/VERSION
+++ b/macros/context/contrib/context-pocketdiary/VERSION
@@ -1 +1 @@
-2023.03.17 \ No newline at end of file
+2023.04.15
diff --git a/macros/context/contrib/context-pocketdiary/doc/context/third/pocketdiary/README.md b/macros/context/contrib/context-pocketdiary/doc/context/third/pocketdiary/README.md
index f26c09d48f..d7d6c333a6 100644
--- a/macros/context/contrib/context-pocketdiary/doc/context/third/pocketdiary/README.md
+++ b/macros/context/contrib/context-pocketdiary/doc/context/third/pocketdiary/README.md
@@ -1,12 +1,13 @@
-Modulename : t-pocketdiary
+# Modulename : t-pocketdiary
+
+## Editorial
+
Author : Willi Egger
License : Public Domain
-Version : 2.5
-Release date: March 2023
+Version : 2023-04-15
-Description
------------
+## Description
For those who are in need of a personal organizer this module offers a flexible solution based on a single sided printed A4. The pocket diary can be folded in such a way, that it forms a small booklet where only the printed pages are visible (see documentation).
@@ -17,8 +18,7 @@ Please refer to the documentation for further options.
This module is a overhauled version of the previous module. It is built for the use with MKIV and LUAMETATEX (LMTX). In addition to the first version it is also calculating moon cycle and the sunrise and sunset time.
-Usage
------
+## Usage
Create a file e.g. PocketDiary.tex
@@ -87,10 +87,12 @@ Create a file e.g. PocketDiary.tex
[lat=Latitude of your place,
lon=Longitude of your place,
timeoffset=Timezone (positive to the East, negative to the West from UTC),
- continent=EU]
+ continent=EU] % US, empty for no Daylight Saving Time (DST)
% Do the typesetting
\starttext
\setuparranging[1*8] % this can be uncommented in t-pocketdiary.tex
\getbuffer[Pocketdiary]
-\stoptext \ No newline at end of file
+\stoptext
+
+
diff --git a/macros/context/contrib/context-pocketdiary/doc/context/third/pocketdiary/t-pocketdiary-module-doc.pdf b/macros/context/contrib/context-pocketdiary/doc/context/third/pocketdiary/t-pocketdiary-module-doc.pdf
index de63406602..542bfe8a76 100644
--- a/macros/context/contrib/context-pocketdiary/doc/context/third/pocketdiary/t-pocketdiary-module-doc.pdf
+++ b/macros/context/contrib/context-pocketdiary/doc/context/third/pocketdiary/t-pocketdiary-module-doc.pdf
Binary files differ
diff --git a/macros/context/contrib/context-pocketdiary/tex/context/third/pocketdiary/Moonphase/moons-MP.tex b/macros/context/contrib/context-pocketdiary/tex/context/third/pocketdiary/Moonphase/moons-MP.tex
index a515e6db64..f5817bd2eb 100644
--- a/macros/context/contrib/context-pocketdiary/tex/context/third/pocketdiary/Moonphase/moons-MP.tex
+++ b/macros/context/contrib/context-pocketdiary/tex/context/third/pocketdiary/Moonphase/moons-MP.tex
@@ -1,6 +1,13 @@
-% Metafun
-% filename: moons.tex
-% Boede 2021
+%D \module
+%D [ file=t-pocketdiary,
+%D version=2023-04-15,
+%D title=PocketDiary \CONTEXT\ User Module,
+%D subtitle=Moon pictogrammes,
+%D author=Willi Egger,
+%D date=\currentdate,
+%D copyright=Willi Egger,
+%D email=w.egger@boede.nl,
+%D license=Public Domain]
% \setupbodyfont[plex,ss,14pt]
diff --git a/macros/context/contrib/context-pocketdiary/tex/context/third/pocketdiary/Moonphase/t-moonphase.lua b/macros/context/contrib/context-pocketdiary/tex/context/third/pocketdiary/Moonphase/t-moonphase.lua
index 70d644e3b7..2c6e5c3ba8 100644
--- a/macros/context/contrib/context-pocketdiary/tex/context/third/pocketdiary/Moonphase/t-moonphase.lua
+++ b/macros/context/contrib/context-pocketdiary/tex/context/third/pocketdiary/Moonphase/t-moonphase.lua
@@ -1,5 +1,5 @@
if not modules then modules = { } end modules ['t-moonphase'] = {
- version = 1.0,
+ version = 2023.04.15,
comment = "Moonphase calculation",
author = "SubSystems www.subsystems.us edited by Willi Egger",
copyright = "Willi Egger",
diff --git a/macros/context/contrib/context-pocketdiary/tex/context/third/pocketdiary/PocketDiary.tex b/macros/context/contrib/context-pocketdiary/tex/context/third/pocketdiary/PocketDiary.tex
index 9f21c68e6e..fb2172fc6c 100644
--- a/macros/context/contrib/context-pocketdiary/tex/context/third/pocketdiary/PocketDiary.tex
+++ b/macros/context/contrib/context-pocketdiary/tex/context/third/pocketdiary/PocketDiary.tex
@@ -1,27 +1,38 @@
-% Context file
-% Filename: PocketDiary.tex
-%
-% Version 1: 30-12-2010
-% Version 2: December-2022
-%
-% This is the base for the compilation of a PocketDiary.
-% Please refer to the documentation of the module to see
-% which options you have to make up your own layout for the PocketDiary
-% This module is built for usage withKIV and LUAMETATEX (LMTX)
-
-
+%D \module
+%D [ file=t-pocketdiary.tex,
+%D version=2023.04.15,
+%D title=PocketDiary,
+%D subtitle=User file for PocketDiary,,
+%D author=W. Egger,
+%D date=\currentdate,
+%D copyright=W. Egger,
+%D license=Public Domain]
+
+
+%D This is the base for the compilation of a PocketDiary.
+%D Please refer to the documentation of the module to see
+%D which options you have to make up your own layout for the PocketDiary
+%D This module is built for usage withKIV and LUAMETATEX (LMTX)
+
+%D Load the PocketDiary module
\usemodule[pocketdiary]
+%D Choose and setup the desired font to be used
+
\setupbodyfont[ibmplex,rm,8pt]
\definefontfeature[f:tabular][tnum=yes]
\addfeature[f:tabular]
-% Supported interfaces: en,de,nl,fr,it,es,pl
+%D Set the main language, which sets the interface to be used. Supported interfaces: EN,DE,NL,FR,IT,ES,PL
-\mainlanguage[pl]
+\mainlanguage[en]
-%\setuppapersize[A6][A4,landscape]
+%D setup the paper size and mapping onto the print paper
+
+\setuppapersize[A6][A4,landscape]
+
+%D Setup of the different variable sets of the PocketDiary
\setvariables
[PocketDiary]
@@ -32,9 +43,9 @@
Nextyear=yes,
Daybyday=no]
-% If "Daybyday = yes" then the first 6 pages are filled with 5 times a single
-% day and the weekend is 1 page. The pages 7 and 8 are filled with what is set
-% in PockedDiaryLayout for page 7 and 8.
+%D If "Daybyday = yes" then the first 6 pages are filled with 5 times a single
+%D day and the weekend is 1 page. The pages 7 and 8 are filled with what is set
+%D in PockedDiaryLayout for page 7 and 8.
\setvariables
[PocketDiaryLayout]
@@ -48,34 +59,37 @@
Page8=Lost-Returnto]
-% Names of included templates: You are allowed to use the same template on multiple pages.
-% Dayplan
-% Weekcurrentplan
-% Weekendplan
-% Weeknextplan
-% Monthcurrentplan
-% Monthnextplan
-% Yearcurrentplan
-% Yearnextplan
-% Lines
-% Blank
-% Caro
-% Todo
-% Contact
-% Lost-Returnto
+%D Names of included templates: You are allowed to use the same template
+%D on multiple pages.
+%D \startlines
+%D Dayplan
+%D Weekcurrentplan
+%D Weekendplan
+%D Weeknextplan
+%D Monthcurrentplan
+%D Monthnextplan
+%D Yearcurrentplan
+%D Yearnextplan
+%D Lines
+%D Blank
+%D Caro
+%D Todo
+%D Contact
+%D Lost-Returnto
+%D \stoplines
\setvariables
[PocketDiaryAddress]
- [Familyname={2023},
- Forename={Bacho\TEX\ },
- Street={Ośrodek szkoleniowo - wypoczynkowy Uniwersytetu Mikołaja Kopernika},
- Zipcode=87-313,
- City=Brzozie,
- Country=Polska,
+ [Familyname={YourFamilyName},
+ Forename={YourFirstName},
+ Street=Pine Lane
+ Zipcode=2080,
+ City=YourTown,
+ Country=YourCountry,
Phone={\dots},
Mobile={\dots},
- E-mail=sekretariat@gust.org.pl,
- Web={https://www.gust.org.pl/}]
+ E-mail={\dots},
+ Web={\dots}]
\setvariables
[PocketDiaryFooter]
@@ -91,13 +105,15 @@
\setvariables %Dreifelden
[PocketDiaryGeoPosition]
- [lat=52.467860, %Dreifelden: lat=50.590494, lon=7.835367,
+ [lat=52.467860,
lon=16.981240,
timezoneoffset=1,
continent=US] % EU, US or leave empty for no DST
-
+
+%D Setup the document
\starttext
\setuparranging[1*8] % this can be uncommented in t-pocketdiary.tex
+
\getbuffer[Pocketdiary]
\stoptext \ No newline at end of file
diff --git a/macros/context/contrib/context-pocketdiary/tex/context/third/pocketdiary/Solar/sun-MP.tex b/macros/context/contrib/context-pocketdiary/tex/context/third/pocketdiary/Solar/sun-MP.tex
index 3eca68a8c9..0ccd8923cc 100644
--- a/macros/context/contrib/context-pocketdiary/tex/context/third/pocketdiary/Solar/sun-MP.tex
+++ b/macros/context/contrib/context-pocketdiary/tex/context/third/pocketdiary/Solar/sun-MP.tex
@@ -1,6 +1,13 @@
-% Metafun
-% filename: moons.tex
-% Boede 2021
+%D \module
+%D [ file=t-pocketdiary,
+%D version=2023-04-15,
+%D title=PocketDiary \CONTEXT\ User Module,
+%D subtitle=Sun pictogrammes,
+%D author=Willi Egger,
+%D date=\currentdate,
+%D copyright=Willi Egger,
+%D email=w.egger@boede.nl,
+%D license=Public Domain]
% \setupbodyfont[plex,ss,14pt]
diff --git a/macros/context/contrib/context-pocketdiary/tex/context/third/pocketdiary/Solar/t-solar.lua b/macros/context/contrib/context-pocketdiary/tex/context/third/pocketdiary/Solar/t-solar.lua
index eb6756aaa6..98f4c585aa 100644
--- a/macros/context/contrib/context-pocketdiary/tex/context/third/pocketdiary/Solar/t-solar.lua
+++ b/macros/context/contrib/context-pocketdiary/tex/context/third/pocketdiary/Solar/t-solar.lua
@@ -1,5 +1,5 @@
if not modules then modules = { } end modules ['t-solar'] = {
- version = 1.0,
+ version = 2023.04.15,
comment = "Sun rise and sun set calculation",
author = "Alexander Yakushev, edited by Willi Egger",
copyright = "Willi Egger",
diff --git a/macros/context/contrib/context-pocketdiary/tex/context/third/pocketdiary/t-calendar.lua b/macros/context/contrib/context-pocketdiary/tex/context/third/pocketdiary/t-calendar.lua
index 2c15fcc424..7f94397351 100644
--- a/macros/context/contrib/context-pocketdiary/tex/context/third/pocketdiary/t-calendar.lua
+++ b/macros/context/contrib/context-pocketdiary/tex/context/third/pocketdiary/t-calendar.lua
@@ -1,5 +1,5 @@
if not modules then modules = { } end modules ['t-calendar'] = {
- version = 1.100,
+ version = 2023.04.15,
comment = "Date calculation collection",
author = "Willi Egger",
copyright = "Willi Egger",
diff --git a/macros/context/contrib/context-pocketdiary/tex/context/third/pocketdiary/t-pocketdiary.lua b/macros/context/contrib/context-pocketdiary/tex/context/third/pocketdiary/t-pocketdiary.lua
index 843a3e510b..fe893d3f7e 100644
--- a/macros/context/contrib/context-pocketdiary/tex/context/third/pocketdiary/t-pocketdiary.lua
+++ b/macros/context/contrib/context-pocketdiary/tex/context/third/pocketdiary/t-pocketdiary.lua
@@ -1,10 +1,10 @@
if not modules then modules = { } end modules ['t-pocketdiary'] = {
- version = 1.0,
+ version = 2023.04.15,
comment = "Layouts of diary pages",
author = "Willi Egger",
copyright = "Willi Egger",
email = "w.egger@boede.nl",
- license = "CC0 http://creativecommons.org/about/cc0"
+ license = "Public Domain"
}
thirddata = thirddata or { }
diff --git a/macros/context/contrib/context-pocketdiary/tex/context/third/pocketdiary/t-pocketdiary.tex b/macros/context/contrib/context-pocketdiary/tex/context/third/pocketdiary/t-pocketdiary.tex
index 22bfda6241..0c84937223 100644
--- a/macros/context/contrib/context-pocketdiary/tex/context/third/pocketdiary/t-pocketdiary.tex
+++ b/macros/context/contrib/context-pocketdiary/tex/context/third/pocketdiary/t-pocketdiary.tex
@@ -1,7 +1,7 @@
%D \module
%D [ file=t-pocketdiary,
-%D version=2022.07.05,
-%D title=\CONTEXT\ User Module,
+%D version=2023-04-15,
+%D title=PocketDiary \CONTEXT\ User Module,
%D subtitle=PocketDiary,
%D author=Willi Egger,
%D date=\currentdate,
@@ -976,8 +976,8 @@
\startsetups table:topinfo
\setupTABLE[each][each][frame=off]
\setupTABLE[r][1][offset=0pt,loffset=1pt,roffset=1pt,align=lohi] % Date row
- \setupTABLE[r][2][height=1.3\bodyfontsize] % Astronomy row
- \setupTABLE[c][1][style=bold,width=0.25\textwidth,align=lohi] % Day
+ \setupTABLE[r][2][height=1.3\bodyfontsize,frame=off,offset=0pt] % Astronomy row
+ \setupTABLE[c][1][style=bold,width=0.25\textwidth] % Day
\setupTABLE[c][2][width=0.35\textwidth,align=lohi] % Feastname column
\setupTABLE[c][3][width=0.4\textwidth,
align={flushright,lohi}] % Month / year column