On 2020-08-15 18:09, Richard Kimberly Heck wrote:
On 8/15/20 4:41 AM, Lorenzo Bertini wrote:
UI-wise, this would probably be better than what we have, but you can
already do this with Local Layout. Like this:

Format 61

AddToHTMLPreamble

<style>
h2.section { font-size: 150%; font-weight: bold; }
</style>

EndPremable

You can put anything else in there that you want in the head block, too.

Do feel free to file an enhancement request on the bug tracker.

Riki
Thank you, this solves some problems for me. However now I'm
questioning whether the <LaTeX preamble> section in document->settings
isn't just a shortcut for <AddToPreamble ... EndPreamble> in <local
layout>? In this case I think putting them at the same level is
confusing, and prevented me from ever needing to look deeper in <local
layout>; I understand not all users would want to learn this but it's
three lines to get a LaTeX or HTML preamble. Ideally there would be a
way to keep the generality of the <local layout> section that however
makes it super easy and intuitive to change a preamble.

I can see why it might seem that way, but these are quite different in
principle. The Local Layout box is really intended for layout code, like
you'd find in a module, but which is document-specific (not something
you really want to be able to reuse). E.g., I sometimes need a specific
kind of list for one document, so I put the layout code there. It's
basically a side-effect of the fact that the AddTo...Preamble tags exist
in layout code that one can put preamble info there as well. But I
wouldn't really recommend it if you're going to have very much preamble
code.

There's a long-standing request, actually, for there to be TWO preamble
boxes, whose contents are output at different times (before and after
other code that LyX generates). I'm actually not sure whether the layout
code from Local Layout (or from layout code more generally) is output
before or after the code in the Preamble box. So these may not actually
be equivalent.

I leave this decision to you and I'll not file a bug (feature) report
for now, but here's my two cents for keeping things clear and
functional:
1) <LaTeX preamble> section gets removed
2) <local layout> section gets an "advanced" tab with the text entry
we have now, and an "easy" tab made by text boxes, buttons and toggles
(for a start, just containing the infamous LaTeX Preamble and HTML
Preamble, then maybe more).
Except for the advantages in clarity on preambles, I think this would
make way easier not only to tinker with layouts but also to learn how
Lyx works and what are the commands. I know this is a bit of an
overhaul, I'm just leaving this here as an idea.

The complete version of this would give us a kind of GUI layout
editor---another longstanding request and something of a holy grail.
It's possible, presumably, but has proven difficult.

I guess you are not referring to the general preamble stuff here, right? By GUI layout editor, you mean something like the style widgets of other word processors, or? There you have a list of all styles and the ability to edit them and add new ones. For example, one could create new enumerations via a dialog to set the numbering style. So, this has been tried? Is it possible to see some of the attempts or difficulties encountered?
--
Daniel

--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to