All JACoW proceedings

Table of Contents

Events

ABD Workshop on High Luminosity Circular e+e- Colliders

Venue Date Editors
Novosibirsk, Russia 14 Apr 2008–16 Apr 2008  
Daresbury, United Kingdom 24 Oct 2016–27 Oct 2016  
Hong Kong, China 24 Sep 2018–27 Sep 2018  
Frascati, Italy 12 Sep 2022–16 Sep 2022  
Tsukuba, Japan 03 Mar 2025–07 Mar 2025  

ABD Workshop on Electron Cloud Physics

Venue Date Editors
Ithaca, New York, USA 08 Oct 2010–12 Oct 2010  

ABD Workshop on Energy Recovery Linacs

Venue Date Editors
Daresbury, United Kingdom 21 May 2007–25 May 2007  
Ithaca, New York, USA 08 Jun 2009–12 Jun 2009  
Tsukuba, Japan 16 Oct 2011–21 Oct 2011  
Novosibirsk, Russia 09 Sep 2013–13 Sep 2013  
Stony Brook, NY, USA 07 Jun 2015–12 Jun 2015  
Geneva, Switzerland 18 Jun 2017–23 Jun 2017  
Berlin, Germany 15 Sep 2019–20 Sep 2019  
Tsukuba, Japan 24 Sep 2024–27 Sep 2024  

ABD Workshop on Future Light Sources

Venue Date Editors
Hamburg, Germany 15 May 2006–16 May 2006  
Shanghai, China 05 Mar 2018–09 Mar 2018  
Luzern, Switzerland 27 Aug 2023–01 Sep 2023  

ABD Workshop on High-Intensity

Venue Date Editors
Tsukuba, Japan 29 May 2006–02 Jun 2006  
Nashville, Tennessee, USA 25 Aug 2008–29 Aug 2008  
Morschach, Switzerland 27 Sep 2010–01 Oct 2010  
Beijing, China 17 Sep 2012–21 Sep 2012  
East-Lansing, MI, USA 10 Nov 2014–14 Nov 2014  
Malmö, Sweden 03 Jul 2016–08 Jul 2016  
Daejeon, Korea 18 Jun 2018–22 Jun 2018  
Batavia, IL, USA 04 Oct 2021–08 Oct 2021  
CERN, Geneva, Switzerland 09 Oct 2023–13 Oct 2023  
Huizhou, Guangdong, China 19 Oct 2025–24 Oct 2025  

ABD Workshop on High Luminosity Circular e+e- Colliders - Higgs Factory

Venue Date Editors
Beijing, China 09 Oct 2014–12 Oct 2014  

Asian Particle Accelerator Conf. (superseded by IPAC)

Venue Date Editors
Tsukuba, Japan 23 Mar 1998–27 Mar 1998  
Beijing, China 17 Sep 2001–21 Sep 2001  
Gyeongju, Korea 22 Mar 2004–26 Mar 2004  
Indore, India 29 Jan 2007–02 Feb 2007  

Beam Instrum. Workshop (superseded by IBIC)

Venue Date Editors
Tahoe City, California, USA 04 May 2008–08 May 2008  
Santa Fe, New Mexico, USA 02 May 2010–06 May 2010  
Newport News, Virginia, USA 15 Apr 2012–19 Apr 2012  

Int. Workshop on Beam Cooling and Related Topics

Venue Date Editors
Bad Kreuznach, Germany 09 Sep 2007–14 Sep 2007  
Lanzhou, China 31 Aug 2009–04 Sep 2009  
Alushta, Ukraine 12 Sep 2011–16 Sep 2011  
Mürren, Switzerland 10 Jun 2013–14 Jun 2013  
Newport News, Virginia, USA 28 Sep 2015–02 Oct 2015  
Bonn, Germany 18 Sep 2017–21 Sep 2017  
Novosibirsk, Russian 23 Sep 2019–27 Sep 2019  
Novosibirsk, Russian 01 Nov 2021–05 Nov 2021  
Montreux, Switzerland 08 Oct 2023–14 Oct 2023  

Int. Conf. on Cyclotrons and their Applications

Venue Date Editors
Sea Island, Georgia, USA 02 Feb 1959–04 Feb 1959  
Geneva, Switzerland 23 Apr 1963–26 Apr 1963  
Gatlinburg, Tennessee, USA 02 May 1966–05 May 1966  
Oxford, United Kingdom 17 Sep 1969–20 Sep 1969  
Vancouver, Canada 18 Jul 1972–21 Jul 1972  
Zürich, Switzerland 19 Aug 1975–22 Aug 1975  
Bloomington, Indiana, USA 18 Sep 1978–21 Sep 1978  
Caen, France 07 Sep 1981–10 Sep 1981  
East Lansing, Michigan, USA 30 Apr 1984–03 May 1984  
Tokyo, Japan 13 Oct 1986–17 Oct 1986  
Berlin, Germany 08 May 1989–12 May 1989  
Vancouver, BC, Canada 06 Jul 1992–10 Jul 1992  
Cape Town, South Africa 08 Oct 1995–13 Oct 1995  
Caen, Franc 14 Jun 1998–19 Jun 1998  
East Lansing, Michigan, USA 13 May 2001–17 May 2001  
Tokyo, Japan 18 Oct 2004–22 Oct 2004  
Giardini Naxos, Italy 01 Oct 2007–05 Oct 2007  
Lanzhou, China 06 Sep 2010–10 Sep 2010  
Vancouver, BC, Canada 16 Sep 2013–20 Sep 2013  
Zürich, Switzerland 11 Sep 2016–16 Sep 2016  
Cape Town, South Africa 22 Sep 2019–27 Sep 2019  
Beijing, China 05 Dec 2022–09 Dec 2022  

European Workshop on Beam Diagnostics and Instrum. for Particle Accelerators (superseded by IBIC)

Venue Date Editors
Chester, UK 16 May 1999–18 May 1999  
Grenoble, France 13 May 2001–15 May 2001  
Mainz, Germany 05 May 2003–07 May 2003  
Lyon, France 06 Jun 2005–08 Jun 2005  
Venice, Italy 20 May 2007–23 May 2007  
Basel, Switzerland 25 May 2009–27 May 2009  
Hamburg, Germany 16 May 2011–18 May 2011  

Int. Workshop on ECR Ion Source

Venue Date Editors
Chicago, Illinois, USA 15 Sep 2008–18 Sep 2008  
Grenoble, France 23 Aug 2010–26 Aug 2010  
Sydney, Australia 25 Sep 2012–28 Sep 2012  
Nizhny Novgorod, Russia 24 Aug 2014–28 Aug 2014  
Busan, Korea 28 Aug 2016–01 Sep 2016  
Catania, Italy 10 Sep 2018–14 Sep 2018  
East Lansing, MI, USA 28 Sep 2020–30 Sep 2020  
Darmstadt, Germany 15 Sep 2024–19 Sep 2024  

European Particle Accelerator Conf. (superseded by IPAC)

Venue Date Editors
Rome, Italy 07 Jun 1988–11 Jun 1988  
Nice, France 12 Jun 1990–16 Jun 1990  
Berlin, Germany 24 Mar 1992–28 Mar 1992  
London, England 27 Jun 1994–01 Jul 1994  
Sitges, Spain 10 Jun 1996–14 Jun 1996  
Stockholm, Sweden 22 Jun 1998–26 Jun 1998  
Vienna, Austria 26 Jun 2000–30 Jun 2000  
Paris, France 03 Jun 2002–07 Jun 2002  
Lucerne, Switzerland 05 Jul 2004–09 Jul 2004  
Edinburgh, UK 26 Jun 2006–30 Jun 2006  
Genoa, Italy 23 Jun 2008–27 Jun 2008  

Int. Free-Electron Laser Conf.

Venue Date Editors
Trieste, Italy 29 Aug 2004–03 Sep 2004  
Palo Alto, California, USA 21 Aug 2005–26 Aug 2005  
Berlin, Germany 27 Aug 2006–01 Sep 2006  
Novosibirsk, Russia 26 Aug 2007–31 Aug 2007  
Gyeongju, Korea 24 Aug 2008–29 Aug 2008  
Liverpool, UK 23 Aug 2009–28 Aug 2009  
Malmö, Sweden 23 Aug 2010–27 Aug 2010  
Shanghai, China 22 Aug 2011–26 Aug 2011  
Nara, Japan 26 Aug 2012–31 Aug 2012  
Manhattan, NY, USA 26 Aug 2013–30 Aug 2013  
Basel, Switzerland 25 Aug 2014–29 Aug 2014  
Daejeon, Korea 23 Aug 2015–28 Aug 2015  
Santa Fe, NM, USA 20 Aug 2017–25 Aug 2017  
Hamburg, Germany 26 Aug 2019–30 Aug 2019  
Trieste, Italy 22 Aug 2022–26 Aug 2022  
Warsaw, Poland 19 Aug 2024–23 Aug 2024  

Int. Conf. on Heavy Ion Accelerator Technology

Venue Date Editors
Venice, Italy 08 Jun 2009–12 Jun 2009  
Chicago, IL, USA 18 Jun 2012–21 Jun 2012  
Yokohama, Japan 07 Sep 2015–11 Sep 2015  
Lanzhou, China 22 Oct 2018–26 Oct 2018  
Darmstadt, Germany 27 Jun 2022–01 Jul 2022  
East Lansing, MI, USA 22 Jun 2025–27 Jun 2025  

Int. Beam Instrum. Conf.

Venue Date Editors
Tsukuba, Japan 01 Oct 2012–04 Oct 2012  
Oxford, UK 16 Sep 2013–19 Sep 2013  
Monterey, CA, USA 14 Sep 2014–18 Sep 2014  
Melbourne, Australia 13 Sep 2015–17 Sep 2015  
Barcelona, Spain 11 Sep 2016–15 Sep 2016  
Grand Rapids, MI, USA 20 Aug 2017–24 Aug 2017  
Shanghai, China 09 Sep 2018–13 Sep 2018  
Malmö, Sweden 08 Sep 2019–12 Sep 2019  
Santos, Brazil 14 Sep 2020–18 Sep 2020  
Pohang, Korea 13 Sep 2021–17 Sep 2021  
Kraków, Poland 11 Sep 2022–15 Sep 2022  
Saskatoon, Canada 10 Sep 2023–14 Sep 2023  
Beijing, China 09 Sep 2024–13 Sep 2024  
Liverpool, UK 07 Sep 2025–11 Sep 2025  

Int. Conf. on Accelerator and Large Experimental Physics Control Systems

Venue Date Editors
Tsukuba, Japan 11 Nov 1991–15 Nov 1991  
Trieste, Italy 04 Oct 1999–08 Oct 1999  
San Jose, California, USA 27 Nov 2001–30 Nov 2001  
Gyeongju, Korea 13 Oct 2003–17 Oct 2003  
Geneva, Switzerland 10 Oct 2005–14 Oct 2005  
Knoxville, Tennessee, USA 15 Oct 2007–19 Oct 2007  
Kobe, Japan 12 Oct 2009–16 Oct 2009  
Grenoble, France 10 Oct 2011–14 Oct 2011  
San Francisco, CA, USA 06 Oct 2013–11 Oct 2013  
Melbourne, Australia 17 Oct 2015–23 Oct 2015  
Barcelona, Spain 08 Oct 2017–13 Oct 2017  
Brooklyn, New York City, NY, USA 07 Oct 2019–11 Oct 2019  
Shanghai, China 14 Oct 2021–22 Oct 2021  
Cape Town, South Africa 07 Oct 2023–13 Oct 2023  
Chicago, IL, USA 20 Sep 2025–26 Sep 2025  

Int. Computational Accelerator Physics Conf.

Venue Date Editors
Chamonix, France 02 Oct 2006–06 Oct 2006  
San Francisco, California, US 31 Aug 2009–04 Sep 2009  
Rostock-Warnemünde, Germany 19 Aug 2012–24 Aug 2012  
Shanghai, China 12 Oct 2015–16 Oct 2015  
Key West, FL, USA 20 Oct 2018–24 Oct 2018  

Int. Particle Accelerator Conf.

Venue Date Editors
Kyoto, Japan 23 May 2010–28 May 2010  
San Sebastián, Spain 04 Sep 2011–09 Sep 2011  
New Orleans, Louisiana, USA 20 May 2012–25 May 2012  
Shanghai, China 12 May 2013–17 May 2013  
Dresden, Germany 15 Jun 2014–20 Jun 2014  
Richmond, VA, USA 03 May 2015–08 May 2015  
Busan, Korea 08 Aug 2016–13 May 2016  
Copenhagen, Denmark 14 May 2017–19 May 2017  
Vancouver, Canada 29 Apr 2018–04 May 2018  
Melbourne, Australia 19 May 2019–24 May 2019  
Caen, France 10 May 2020–15 May 2020  
Campinas, Brazil 24 May 2021–28 May 2021  
Bangkok, Thailand 12 Jun 2022–17 Jun 2022  
Venice, Italy 07 May 2023–12 May 2023  
Nashville, TN, USA 18 May 2024–24 May 2024  
Taipei, Taiwan 01 Jun 2025–06 Jun 2025  

Int. Linear Accelerator Conf.

Venue Date Editors
Upton, Long Island, New York, USA 01 Apr 1961–14 Apr 1961  
Upton, Long Island, New York, USA 20 Aug 1962–24 Aug 1962  
New Haven, Connecticut, USA 21 Oct 1963–25 Oct 1963  
Madison, Wisconsin, USA 20 Jul 1964–24 Jul 1964  
Los Alamos, New Mexico, USA 03 Oct 1966–07 Oct 1966  
Upton, Long Island, New York, USA 20 May 1968–24 May 1968  
Batavia, Illinois, USA 28 Sep 1970–02 Oct 1970  
Los Alamos, New Mexico, USA 10 Oct 1972–13 Oct 1972  
Chalk River, Ontario, Canada 14 Sep 1976–17 Sep 1976  
Montauk, New York, USA 10 Sep 1979–14 Sep 1979  
Santa Fe, New Mexico, USA 19 Oct 1981–23 Oct 1981  
Seeheim, Germany 07 May 1984–11 May 1984  
Stanford, California, USA 02 Jun 1986–06 Jun 1986  
Newport News, Virginia, USA 03 Oct 1988–07 Oct 1988  
Albuquerque, New Mexico, USA 10 Sep 1990–14 Sep 1990  
Ottawa, Ontario, Canada 24 Aug 1992–28 Aug 1992  
Tsukuba, Japan 21 Aug 1994–26 Aug 1994  
Geneva, Switzerland 26 Aug 1996–30 Aug 1996  
Chicago, Illinois, USA 23 Aug 1998–28 Aug 1998  
Monterey, CA, USA 21 Aug 2000–25 Aug 2000  
Gyeongju, Korea 19 Aug 2002–23 Aug 2002  
Lübeck, Germany 16 Aug 2004–20 Aug 2004  
Knoxville, Tennessee USA 21 Aug 2006–25 Aug 2006  
Victoria, British Columbia, Canada 29 Sep 2008–03 Oct 2008  
Tsukuba, Japan 12 Sep 2010–17 Sep 2010  
Tel Aviv, Israel 09 Sep 2012–14 Sep 2012  
Geneva, Switzerland 31 Aug 2014–05 Sep 2014  
East Lansing, MI, USA 25 Sep 2016–30 Sep 2016  
Beijing, China 16 Sep 2018–21 Sep 2018  
Liverpool, UK 01 Sep 2020–04 Sep 2020  
Liverpool, UK 28 Aug 2022–02 Sep 2022  
Chicago, IL, USA 25 Aug 2024–30 Aug 2024  

Int. Conf. on Mechanical Engineering Design of Synchrotron Radiation Equipment and Instrum.

Venue Date Editors
Barcelona, Spain 11 Sep 2016–16 Sep 2016  
Paris, France 25 Jun 2018–29 Jun 2018  
Chicago, IL, USA 26 Jul 2021–29 Jul 2021  
Beijing, China 06 Nov 2023–10 Nov 2023  
Lund, Sweden 15 Sep 2025–19 Sep 2025  

North American Particle Accelerator Conf.

Venue Date Editors
New York, NY, USA 28 Mar 2011–01 Apr 2011  
Pasadena, CA, USA 29 Sep 2013–04 Oct 2013  
Chicago, IL, USA 09 Oct 2016–14 Oct 2016  
Lansing, MI, USA 02 Sep 2019–06 Sep 2019  
Albuquerque, NM, USA 07 Aug 2022–12 Aug 2022  

Particle Accelerator Conf. (superseded by NAPAC)

Venue Date Editors
Washington D.C., USA 10 Mar 1965–12 Mar 1965  
Washington D.C., USA 01 Mar 1967–03 Mar 1967  
Washington D.C., USA 05 Mar 1969–07 Mar 1969  
Chicago, IL, USA 01 Mar 1971–03 Mar 1971  
San Francisco, CA, USA 05 Mar 1973–07 Mar 1973  
Washington D.C., USA 12 Mar 1975–14 Mar 1975  
Chicago, IL, USA 16 Mar 1977–18 Mar 1977  
San Francisco, CA, USA 12 Mar 1979–14 Mar 1979  
Washington D.C., USA 11 Mar 1981–13 Mar 1981  
Santa Fe, New Mexico, USA 21 Mar 1983–23 Mar 1983  
Vancouver, BC, Canada 13 Mar 1985–16 Mar 1985  
Washington D.C., USA 16 Mar 1987–19 Mar 1987  
Chicago, IL, USA 20 Mar 1989–23 Mar 1989  
San Francisco, CA, USA 06 May 1991–09 May 1991  
Washington D.C., USA 17 May 1993–20 May 1993  
Dallas, Texas, USA 01 May 1995–05 May 1995  
Vancouver, B.C., Canada 12 May 1997–16 May 1997  
New York City, New York, USA 29 Mar 1999–02 Apr 1999  
Chicago, Illinois, USA 18 Jun 2001–22 Jun 2001  
Portland, Oregon, USA 12 May 2003–16 May 2003  
Knoxville, Tennessee, USA 16 May 2005–20 May 2005  
Albuquerque, New Mexico, USA 25 Jun 2007–29 Jun 2007  
Vancouver, British Columbia, Canada 04 May 2009–08 May 2009  

Int. Workshop on Emerging Techn. and Scientific Facilities Controls

Venue Date Editors
Ljubljana, Slovenia 20 Oct 2008–23 Oct 2008  
Saskatoon, Saskatchewan, Canada 06 Oct 2010–08 Oct 2010  
Kolkata, India 04 Dec 2012–07 Dec 2012  
Karlsruhe, Germany 14 Oct 2014–17 Oct 2014  
Campinas, Brazil 25 Oct 2016–28 Oct 2016  
Hsinchu, Taiwan 16 Oct 2018–19 Oct 2018  
Dolní Brežany, Czech Republic 04 Oct 2022–07 Oct 2022  

Russian Particle Accelerator Conf. (not in JACoW since the Russia's war in Ukraine on Feb. 24, 2022)

Venue Date Editors
Dubna, Russia 04 Oct 2004–08 Oct 2004  
Novosibirsk, Russia 10 Sep 2006–14 Sep 2006  
Zvenigorod, Russia 28 Sep 2008–03 Oct 2008  
Protvino, Russia 27 Sep 2010–01 Oct 2010  
Saint-Petersburg, Russia 24 Sep 2012–28 Sep 2012  
Obninsk, Russia 06 Oct 2014–10 Oct 2014  
Saint-Petersburg, Russia 21 Nov 2016–25 Nov 2016  
Protvino, Russia 01 Oct 2018–05 Oct 2018  
Alushta, Russia 27 Sep 2021–01 Oct 2021  

Symposium on Accelerator Physics

Venue Date Editors
Lanzhou, China 13 Aug 2014–15 Aug 2014  
Jishou, Hunan, China 28 Aug 2017–30 Aug 2017  

Int. Conf. on RF Superconductivity

Venue Date Editors
Karlsruhe, Germany 02 Jul 1980–04 Jul 1980  
Geneva, Switzerland 23 Jul 1984–27 Jul 1984  
Argonne National Laboratory, Illinois, USA 14 Sep 1987–18 Sep 1987  
KEK, Tsukuba, Japan 14 Aug 1989–18 Aug 1989  
DESY, Hamburg, Germany 19 Aug 1991–23 Aug 1991  
CEBAF, Newport News, Virginia, USA 04 Oct 1993–08 Oct 1993  
Gif-sur-Yvette, France 17 Oct 1995–20 Oct 1995  
Abano Terme (Padova), Italy 06 Oct 1997–10 Oct 1997  
Santa Fe, New Mexico, USA 01 Nov 1999–05 Nov 1999  
Tsukuba, Ibaraki, Japan 06 Sep 2001–11 Sep 2001  
Lübeck/Travemünder, Germany 08 Sep 2003–12 Sep 2003  
Cornell University, Ithaca, New York, USA 10 Jul 2005–15 Jul 2005  
Peking Univ., Beijing, China 14 Oct 2007–19 Oct 2007  
Berlin, Germany 20 Sep 2009–25 Sep 2009  
Chicago, IL, USA 25 Jul 2011–29 Jul 2011  
Paris, France 23 Sep 2013–27 Sep 2013  
Whistler, BC, Canada 13 Sep 2015–18 Sep 2015  
Lanzhou, China 17 Jul 2017–21 Jul 2017  
Dresden, Germany 30 Jun 2019–05 Jul 2019  
East Lansing, MI, USA 27 Jun 2021–02 Jul 2021  
Grand Rapids, MI, USA 25 Jun 2023–30 Jun 2023  
Tokyo, japan 21 Sep 2025–26 Sep 2025  

Appendix

I want to export the database to various formats:

  • .bib which can be used by authors
  • .org file which will give a tree view of the events and can be further exported
  • .html with .svg calendars so I can have a brief check on the events

This appendix contains only the EMACS elisp snippets so you can customize the output by modifying them.

Write to BibTeX

The reason I don’t use if (> (length ...) 1 is because the greater-than symbol is regarded as a closing brace in source code blocks.

(defun print-bib (event venue eventdate)
  "Print bibtex."
  (let* ((event-date (split-string eventdate "--"))
         (start-date (car event-date))
         (end-date (cadr event-date))
         (event-year (format-time-string "%Y" (org-read-date nil t start-date nil)))
         (event-year-short  (substring event-year -2 nil))
         (event-start (org-read-date nil nil start-date nil))
         (event-end (org-read-date nil nil end-date nil))
         )
    (concat
     "@proceedings{" event event-year ",\n"
     "  title      = \"Proc. " event "’" event-year-short "\",\n"
     "  eventtitle = \""       event "’" event-year-short "\",\n"
     "  venue      = \""       venue "\",\n"
     "  eventdate  = \""       event-start "/" event-end "\",\n"
     "}" "\n")))

(defun table-to-bibtex (ev tbl)
  "Write table to BibTeX."
  (if (and (car tbl) (cadr tbl))
      (concat (print-bib ev (car tbl) (cadr tbl))
              (table-to-bibtex ev (cddr tbl)))
    nil)
  )

Write to Org

(defun print-org (event venue eventdate ev-alist)
  "Print Org."
  (let* ((event-date (split-string eventdate "--"))
         (start-date (car event-date))
         (end-date (cadr event-date))
         (event-year (format-time-string "%Y" (org-read-date nil t start-date nil)))
         (event-year-short  (substring event-year -2 nil))
         (event-start (org-read-date nil nil start-date nil))
         (event-end (org-read-date nil nil end-date nil))
         (event-start-epoch (car (org-read-date nil t start-date nil)))
         (event-key (format-time-string "%04Y-%02m-%02d"  (org-read-date nil t start-date nil)))
         (event-val
          (concat
           "\n**** " event "’" event-year-short " :" event ":\n"
           ":PROPERTIES:\n"
           ":VENUE: " venue "\n"
           ":EVENTDATE: " eventdate "\n"
           ":END:\n\n"
           ))
         )
    (add-to-list ev-alist (cons event-key event-val))
    ))

(defun table-to-org (ev tbl ev-alist)
  "Write table to Org."
  (if (and (car tbl) (cadr tbl))
      (progn
        (print-org ev (car tbl) (cadr tbl) ev-alist)
        (table-to-org ev (cddr tbl) ev-alist))))

Write to HTML

(defun print-html (event venue eventdate ev-alist)
  "Print Org."
  (let* ((event-date (split-string eventdate "--"))
         (start-date (car event-date))
         (end-date (cadr event-date))
         (event-year (format-time-string "%Y" (org-read-date nil t start-date nil)))
         (event-year-short  (substring event-year -2 nil))
         (event-start (org-read-date nil nil start-date nil))
         (event-end (org-read-date nil nil end-date nil))
         (event-start-epoch (car (org-read-date nil t start-date nil)))
         (event-key (format-time-string "%04Y-%02m-%02d"  (org-read-date nil t start-date nil)))
         (event-val
          (list event venue event-start event-end))
         )
    (add-to-list ev-alist (cons event-key event-val))
    ))

(defun table-to-html (ev tbl ev-alist)
  "Write table to Org."
  (if (and (car tbl) (cadr tbl))
      (progn
        (print-html ev (car tbl) (cadr tbl) ev-alist)
        (table-to-html ev (cddr tbl) ev-alist))))

;;(defun draw-year-to-svg (current-year svg &optional size)
;;  "Draw calendar to svg obj."
;;  (let* (
;;         (day-wd (or size 50))
;;         (month-wd (* 7 day-wd))
;;         (month-gap (/ day-wd 3))
;;         (month-pos (lambda (n) (+ (* n month-wd) (* (1+ n) month-gap))))
;;         (day-font-size (/ day-wd 4.0))
;;         (month-font-size (* day-wd 4))
;;         )
;;    ;; Calendar frame
;;    (svg-rectangle svg 0 0 (funcall month-pos 4) (funcall month-pos 3) :fill "transparent" :stroke "green")
;;    (dotimes (i 3)
;;      (dotimes (j 4)
;;        (let (
;;              ;; (x0,y0): top-left anchor
;;              (x0 (funcall month-pos j))
;;              (y0 (funcall month-pos i))
;;              (current-month (+ 1 j (* i 4)))
;;              )
;;          ;; 12 Months
;;          (svg-rectangle svg x0 y0 month-wd month-wd :fill-opacity 0 :stroke "lightblue")
;;          (svg-text svg (number-to-string current-month) :font-size month-font-size :x (+ x0 (/ month-wd 2)) :y (+ y0 (/ month-wd 2)) :class "month-text")
;;          ;; For each month:
;;          ;;   1st day to 1st of next month (not included)
;;          (let* (
;;                 (first-weekday
;;                  (string-to-number
;;                   (format-time-string
;;                    "%u"
;;                    (org-read-date nil t (format "%04d-%02d-01" current-year current-month)))))
;;                 (first-day   (org-time-string-to-absolute (format "%04d-%02d-01" current-year current-month)))
;;                 (last-day    (org-time-string-to-absolute (format "%04d-%02d-01" current-year (1+ current-month))))
;;                 (current-day (org-time-string-to-absolute (format "%04d-%02d-01" current-year current-month)))
;;                 (ii 0)
;;                 ;; (x1,y1): top-right anchor of
;;                 ;;   the first cell (which is Monday)
;;                 ;; 1st day of the month is
;;                 ;;   the first cell shifted to the left by `first-weekday' - 1
;;                 (x1 x0)
;;                 (y1 (+ y0 day-wd))
;;                 xx
;;                 yy
;;                 is-weekend
;;                 )
;;            (while (< current-day last-day)
;;              (setq xx (+ x1 (* (% (+ ii first-weekday -1) 7) day-wd))
;;                    yy (+ y1 (* (/ (+ ii first-weekday -1) 7) day-wd))
;;                    is-weekend (cond
;;                                ((= (% (+ ii first-weekday) 7) 6) "weekend") ;; Saturday
;;                                ((= (% (+ ii first-weekday) 7) 0) "weekend") ;; Sunday
;;                                (t "workday") ;; workday
;;                                )
;;                    )
;;              (svg-rectangle svg xx yy day-wd day-wd :stroke "lightgrey" :class (concat is-weekend "-frame"))
;;              (svg-text svg (format "%02s" (1+ ii)) :font-size day-font-size :x (+ xx day-wd) :y yy :class "day-text")
;;              (setq current-day (1+ current-day)
;;                    ii          (1+ ii)
;;                    )))
;;          )))
;;    ))

(defun eventdate-to-shape (bev eev)
  "Calculate the shape of the event in a month."
  (let* ((start-days (org-time-string-to-absolute bev))
         (end-days   (org-time-string-to-absolute eev))
         (start-date (calendar-gregorian-from-absolute start-days))
         (current-year  (elt start-date 2))
         (current-month (elt start-date 0))
         (first-days (org-time-string-to-absolute (format "%04d-%02d-01" current-year current-month)))
         (first-week      (elt (calendar-iso-from-absolute first-days) 0))
         (start-week   (- (elt (calendar-iso-from-absolute start-days) 0) first-week))
         (end-week     (- (elt (calendar-iso-from-absolute end-days  ) 0) first-week))
         (start-day (% (+ (elt (calendar-iso-from-absolute start-days) 1) 6) 7))
         (end-day   (% (+ (elt (calendar-iso-from-absolute end-days  ) 1) 6) 7))
         ev-shape
         )
    (while (< start-week end-week) ;;)
      (push (list start-day start-week (- 7 start-day)) ev-shape)
      (setq start-week (1+ start-week) ;; move pointer to next week Monday
            start-day  0)
      )
    (push (list start-day start-week (+ end-day 1)) ev-shape)
    )
  )

JACoW Series

(setq jacow-list '("eeFACT" "eCloud" "ERL" "FLS" "HB" "HF" "APAC" "BIW" "COOL" "CYCLOTRONS" "DIPAC" "ECRIS" "EPAC" "FEL" "HIAT" "IBIC" "ICALEPCS" "ICAP" "IPAC" "LINAC" "MEDSI" "NAPAC" "PAC" "PCaPAC" "RuPAC" "SAP" "SRF"))
(setq jacow-color-list '("blueviolet" "crimson" "darkcyan" "deeppink" "dimgray" "forestgreen" "indianred" "lightsalmon" "olive" "orange"))

.bib file

(let* ((dir "texmf/bibtex/bib/biblatex-jacow")
       (file-name (concat dir "/jacow-conferences.bib")))
  (when (not (file-exists-p dir))
    (make-directory dir t))
  (when (file-exists-p file-name)
    (delete-file file-name))
  (append-to-file
   (mapconcat
    (lambda (x)
      (let ((series-info (mapcar #'org-no-properties (org-table-get-remote-range x "@I$1..@>$2"))))
        (table-to-bibtex x series-info)))
    jacow-list "\n\n\n")
   nil file-name))

.org file

(let* ((file-name "./jacow-events.org"))
  (when (file-exists-p file-name)
    (delete-file file-name))
  (let (events-alist)
    (dolist (series jacow-list events-alist)
      (table-to-org series (mapcar #'org-no-properties (org-table-get-remote-range series "@I$1..@>$2")) 'events-alist))
    (setq events-alist (sort events-alist (lambda (a b) (string-lessp (car a) (car b)))))
    (let (current-year)
      (dolist (my-event events-alist)
        (if (not (string-equal current-year (substring (car my-event) 0 4)))
            (progn
              (setq current-year (substring (car my-event) 0 4))
              (append-to-file
               (concat "*** " current-year " :" current-year ":\n\n")
               nil file-name)))
        (append-to-file (cdr my-event) nil file-name)))))

.html file

@import url(https://fonts.googleapis.com/css2?family=Zen+Dots);
@import url(https://fonts.googleapis.com/css2?family=Barlow+Condensed);

text { 
    font-family:'Barlow Condensed';
}

.month-text {font-family:'Zen Dots'; font-weight:bold; text-anchor:middle; dominant-baseline:middle; stroke:black; stroke-width:0; fill:pink; }
.day-text   {font-family:'Zen Dots'; font-weight:normal; text-anchor:end; dominant-baseline:hanging; stroke:black; stroke-width:0; fill:black;}
.event-text {font-family:'Barlow Condensed'; font-weight:bold; text-anchor:start; dominant-baseline:middle;  stroke:white; stroke-width:0.1; fill:white;}

.day-frame     {stroke:lightgrey; stroke-width:2; stroke-dasharray:10 5; fill:white; fill-opacity:0;  }
.workday-frame {stroke:lightgrey;                                        fill:white; fill-opacity:0.1;}
.weekend-frame {stroke:lightgrey; stroke-width:0; stroke-opacity:0;      fill:grey;  fill-opacity:0.1;}
.month-frame   {stroke:orange;    stroke-width:3; stroke-opacity:0.3;    fill:white; fill-opacity:0;  }
.month-box     {stroke:orange;    stroke-width:0; stroke-opacity:0;      fill:wheat; fill-opacity:0.1;}
(let* ((file-name "./jacow-events.html")
       (cal-dir "cal")
       my-html
       ;;(css-file  "./calendar.css")
       ;;(js-file   "./calendar.js")
       (years-list nil))
  (setq my-html '(html
                  (head
                   (title "JACoW Calendar")
                   (meta :something "hi"))))
  (nconc my-html '((body (h1 "JACoW Calendar"))))
  (require 'svg)
  (require 'xmlgen)
  (when (file-exists-p file-name)
    (delete-file file-name))
  (make-directory cal-dir :parents)
  (let (events-alist)
    (dolist (series jacow-list events-alist)
      (table-to-html series (mapcar #'org-no-properties (org-table-get-remote-range series "@I$1..@>$2")) 'events-alist))
    (setq events-alist (sort events-alist (lambda (a b) (string-lessp (car a) (car b)))))
    (let* (this-year
           event-info
           (event-start "")
           (event-end "")
           svg-file
           svg
           (cell-size 50)
           (month-wd (* 7 cell-size))
           (month-gap (/ cell-size 3))
           (month-pos (lambda (n) (+ (* n month-wd) (* (1+ n) month-gap))))
           (date-pos (lambda (date-str)
                       (let* (
                              (the-current-days   (org-time-string-to-absolute date-str))
                              ;;(the-current-iso    (calendar-iso-from-absolute       the-current-days))
                              (the-current-date   (calendar-gregorian-from-absolute the-current-days))
                              (the-current-year   (elt the-current-date 2))
                              (the-current-month  (elt the-current-date 0))
                              (the-current-day    (elt the-current-date 1))
                              (the-first-iso      (calendar-iso-from-absolute (- the-current-days the-current-day -1)))
                              (the-current-offset (1+ (% (+ 6 (elt the-first-iso  1)) 7)))
                              (days-since-monday  (+ the-current-offset the-current-day -1))
                              )
                         (list
                          (% (1- the-current-month) 4) (/ (1- the-current-month) 4) ;; month x,y
                          (% (1- days-since-monday) 7) (/ (1- days-since-monday) 7) ;; day   x,y
                          )
                         )))
           (day-font-size   (/ cell-size 4.0))
           (month-font-size (* cell-size 4))
           (event-priority 1)
           (event-color 0)
           )
      (dolist (my-event events-alist)
        (setq event-info (cdr my-event))
        ;; start a new year calendar
        ;; draw the frame
        ;; --------
        (if (not (string-equal this-year (substring (car my-event) 0 4)))
            (progn
              (when svg ;; `nil' means we are at the beginning of the list
                ;; otherwise, dump `svg' to a file before starting a new one
                (with-temp-file svg-file
                  (set-buffer-multibyte nil)
                  (svg-print svg)))
              (setq this-year (substring (car my-event) 0 4))
              (add-to-list 'years-list this-year)
              (setq svg-file  (concat cal-dir "/" this-year ".svg"))
              (nconc (nth 2 my-html) `((h2 ,this-year)))
              (nconc (nth 2 my-html) `((object :data ,svg-file :type "image/svg+xml" ,this-year)))
              (setq event-color 1)
              (when (file-exists-p svg-file)
                (delete-file svg-file))
              ;; create svg
              (setq svg (svg-create (funcall month-pos 4) (funcall month-pos 3) :stroke-width 2))
              ;; add css
              (svg-node svg 'link :type "text/css" :rel "stylesheet" :href "../css/calendar.css" :xmlns "http://www.w3.org/1999/xhtml")
              ;; add js
              (svg-node svg 'script :type "text/javascript" :href  "calendar.js")
              ;;(print this-year)
              ;;(draw-year-to-svg (string-to-number this-year) svg cell-size)
              ;;
              ;; Calendar frame
              (svg-rectangle svg 0 0 (funcall month-pos 4) (funcall month-pos 3) :fill "transparent" :stroke "green")
              (dotimes (i 3)
                (dotimes (j 4)
                  (let* (
                         ;; (x0,y0): top-left anchor
                         (x0 (funcall month-pos j))
                         (x-min x0)
                         (x-max (+ x0 (* 7 cell-size)))
                         (x-mid (+ x0 (* 5 cell-size)))
                         (y0 (funcall month-pos i))
                         (current-month (+ 1 j (* i 4)))
                         (current-year (string-to-number this-year))
                         )
                    ;; 12 Months
                    (svg-rectangle svg x0 y0 month-wd month-wd :class "month-box")
                    (svg-text svg (number-to-string current-month) :font-size month-font-size :x (+ x0 (/ month-wd 2)) :y (+ y0 (/ month-wd 2)) :class "month-text")
                    ;; For each month:
                    ;;   1st day to 1st of next month (not included)
                    (let* (
                           (first-weekday
                            (string-to-number
                             (format-time-string
                              "%u"
                              (org-read-date nil t (format "%04d-%02d-01" current-year current-month)))))
                           (first-day   (org-time-string-to-absolute (format "%04d-%02d-01" current-year current-month)))
                           (last-day    (org-time-string-to-absolute (format "%04d-%02d-01" current-year (1+ current-month))))
                           (current-day (org-time-string-to-absolute (format "%04d-%02d-01" current-year current-month)))
                           (ii 0)
                           ;; (x1,y1): top-right anchor of
                           ;;   the first cell (which is Monday)
                           ;; 1st day of the month is
                           ;;   the first cell shifted to the left by `first-weekday' - 1
                           (x1 x0)
                           (y1 (+ y0 cell-size))
                           xx
                           yy
                           is-weekend
                           (p-x0 (+ x0 (* (% (1- first-weekday) 7) cell-size)))
                           (p-y0 (+ y0 cell-size))
                           p-x1
                           p-y1
                           )
                      (while (< current-day last-day) ;;)
                        (setq xx (+ x1 (* (% (+ ii first-weekday -1) 7) cell-size))
                              yy (+ y1 (* (/ (+ ii first-weekday -1) 7) cell-size))
                              is-weekend (cond
                                          ((= (% (+ ii first-weekday) 7) 6) "weekend") ;; Saturday
                                          ((= (% (+ ii first-weekday) 7) 0) "weekend") ;; Sunday
                                          (t "workday") ;; workday
                                          )
                              )
                        ;;(svg-rectangle svg xx yy cell-size cell-size :stroke "lightgrey" :class (concat is-weekend "-frame"))
                        (svg-text svg (format "%02s" (1+ ii)) :font-size day-font-size :x (+ xx cell-size) :y yy :class "day-text")
                        (setq current-day (1+ current-day)
                              ii          (1+ ii)
                              p-x1        (+ xx cell-size)
                              p-y1        (+ yy cell-size)
                              ))
                      (svg-polygon
                       svg
                       `((,p-x0  . ,p-y0)
                         (,x-max . ,p-y0)
                         (,x-max . ,(- p-y1 cell-size))
                         (,p-x1  . ,(- p-y1 cell-size))
                         (,p-x1  . ,p-y1)
                         (,x-min . ,p-y1)
                         (,x-min . ,(+ p-y0 cell-size))
                         (,p-x0  . ,(+ p-y0 cell-size))
                         )
                       :class "month-frame"
                       )
                      (svg-polygon
                       svg
                       `((,(max x-mid p-x0) . ,p-y0)
                         (,x-max            . ,p-y0)
                         (,x-max            . ,(- p-y1 cell-size))
                         (,(max x-mid p-x1) . ,(- p-y1 cell-size))
                         (,(max x-mid p-x1) . ,p-y1)
                         (,x-mid            . ,p-y1)
                         (,x-mid            . ,(+ p-y0 cell-size))
                         (,(max x-mid p-x0) . ,(+ p-y0 cell-size))
                         )
                       :class "weekend-frame"
                       )
                      (dotimes (i 6)
                        (let* ((current-x (+ x-min (* (1+ i) cell-size)))
                               (current-y0 (if (< p-x0 current-x) p-y0 (+ p-y0 cell-size)))
                               (current-y1 (if (> p-x1 current-x) p-y1 (- p-y1 cell-size)))
                               )
                          (svg-line svg current-x current-y0 current-x current-y1
                                    :class "day-frame")
                          )
                        )
                      (dotimes (i 5)
                        (let* ((current-y (+ p-y0 (* (1+ i) cell-size)))
                               (current-x0 (if (< (+ p-y0 cell-size) current-y) x-min p-x0))
                               (current-x1 (if (> (- p-y1 cell-size) current-y) x-max p-x1))
                               )
                          (if (< current-y p-y1) ;;)
                              (svg-line svg current-x0 current-y current-x1 current-y
                                        :class "day-frame")
                            )
                          )
                        )
                      )
                    )))
              ))
        ;; --------
        ;; event
        (setq event-start (caddr event-info))
        (if (string-lessp event-start event-end)
            (setq event-priority (1+ event-priority))
          (setq event-priority 1)
          )
        (setq event-color (1+ event-color))
        (setq event-end (cadddr event-info))
        (let* (
               (date-coord (funcall date-pos event-start))
               (m-x0 (funcall month-pos (car   date-coord)))
               (m-y0 (funcall month-pos (cadr  date-coord)))
               (d-x0 (* (caddr  date-coord) cell-size))
               (d-y0 (* (1+ (cadddr date-coord)) cell-size))
               (start-days (org-time-string-to-absolute event-start))
               (end-days   (org-time-string-to-absolute event-end  ))
               (start-week (org-days-to-iso-week start-days))
               (end-week   (org-days-to-iso-week end-days  ))
               )
          (dolist (my-event (eventdate-to-shape event-start event-end))
            (svg-rectangle
             svg
             (+ m-x0 (* cell-size (car my-event))) (+ m-y0 cell-size (* event-priority day-font-size) (* cell-size (cadr my-event))) (* cell-size (caddr my-event)) day-font-size
             :fill (nth event-color jacow-color-list)
             :rx (/ day-font-size 4.0)
             :ry (/ day-font-size 4.0)
             )
            )
          ;; --------
          (svg-text svg (if (and (string= (car event-info) "CYCLOTRONS") (= (caddr date-coord) 6)) "CYC" (car event-info))
                    :font-size (/ day-font-size 1.2)
                    :x (+ m-x0 d-x0 (/ day-font-size 2.0))
                    :y (+ m-y0 d-y0 (* event-priority day-font-size)  (/ day-font-size 2.0))
                    :class "event-text")
          )
        )
      ;;(print (reverse years-list))
      (with-temp-file svg-file
        (set-buffer-multibyte nil)
        (svg-print svg))
      )
    )
  (append-to-file
   (xmlgen my-html)
   nil file-name)
  ;;(princ (xmlgen my-html))
  ;;(print my-html)
  )

Author: Zhichu Chen

Created: 2024-06-15 Sat 21:58

Validate