LyXImplementing a custom module to support journalling?

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
symptom-heap-chuck
Posts: 3
Joined: Fri Nov 28, 2025 8:21 am

Implementing a custom module to support journalling?

Post by symptom-heap-chuck »

Hi everyone.

I use LaTeX to write journals with dated entries. The way I deal with the entries with a small bit of code and a new command:

Code: Select all

% journal entry command
\usepackage[en-CA]{datetime2}
\newcommand{\journalentry}[2]{
    \renewcommand{\thesection}{\DTMdate{#1}} % numbering to date
    \section{#2}
}

With this code, I can now create new journal entries with \journalentry{2025-01-01}{My Journal Title}. The content body shows the localized date as the "section number" for each entry.

This works in LaTeX. I want to do this in LyX. Instead of having to insert TeX code every time I need to use \journalentry, I want to add an entry to the top-left drop down. I'm guessing what I would do is have two entries in the drop-down, one to set the next journal entry's date and then another to set the journal entry's title.

I guess custom module would let me do this, but I cannot find any documentation on how to implement a custom module. How would I get started?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

Post Reply