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}
}
\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?