[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Feedback on LaTeX output usepackage customization
From: |
Patrice Dumas |
Subject: |
Feedback on LaTeX output usepackage customization |
Date: |
Sun, 13 Nov 2022 17:30:31 +0100 |
Hello,
For LaTeX output, it seems important to allow to customize the
beginning of the preamble, with the documentclass and usepackage.
The remaining of the generated preamble can probably be undone/modified
by LaTeX code in a @latex block appearing in the preamble, before any
formatted content, though some generated code depends on some
\usepackage being emitted.
The generated documentclass/usepackage preamble is the following:
First a constant part
\documentclass{book}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage[gen]{eurosym}
\usepackage{textcomp}
\usepackage{graphicx}
\usepackage{etoolbox}
\usepackage{titleps}
Then a part that depends on the document encoding, with, for UTF-8
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
Then some \usepackage depending on the Texinfo @-commands used in the
document. For example
\usepackage{imakeidx} (presence of indices)
\usepackage{needspace} (@need)
\usepackage{array} (@multitable)
\usepackage{embrac} (@deffn, @defun...)
\usepackage{expl3} (needed by embrac related code)
\usepackage{tabularx} (@def*)
\usepackage[framemethod=tikz]{mdframed} (@cartouche)
...
Lastly
\usepackage[hidelinks]{hyperref}
My plan is to add
* a customization variable that would replace the first two blocks,
(from \documentclass{book} to \usepackage[T1]{fontenc}), named
CLASS_BEGIN_USEPACKAGE
* a customization variable that would replace the remaining (dynamically
determined usepackages and \usepackage[hidelinks]{hyperref}), named
END_USEPACKAGE
What do you think? Is it the right level for customization? Would that
be easy to use?
--
Pat
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Feedback on LaTeX output usepackage customization,
Patrice Dumas <=