Opened 20 years ago
Closed 3 years ago
#1503 closed enhancement (fixed)
GUI \hyphenation support (preamble)
Reported by: | Georg Baum | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | |
Component: | general | Version: | 1.4.0cvs |
Severity: | minor | Keywords: | |
Cc: |
Description (last modified by )
It would be nice if the \hyphenation command could be supported by the GUI. The
problem is that if you enter a hyphenation list into the preamble it is ignored silently.
Reason: LyX puts the \usepackage{babel} line after the user defined preamble, but
\hyphenation lists entered before babel is loaded are ignored. A workaround is to load
the babel package by hand right before the hyphenation list.
Of course this request is sort of curing the symptom and not the problem, because the
real problem is that due to the ordering of LyX generated preamble stuff and user
defined preamble it is simply impossible to do everything that one can do with raw
LaTeX with LyX.
Nevertheless a hyphenation list dialog is useful on its own.
Change History (14)
comment:1 by , 20 years ago
comment:2 by , 20 years ago
Yes, I think so, too. The only problem that I see is: How should the user know what to
write into the language specific preamble part and what into the general preamble?
Of course if one thinks about this a bit it is clear that e.g. e redefinition of \chaptername
is a language specific thing, but I am not sure wether this will be seen by all users.
So a bit of explanation on the usage of general preamble <-> language specific
preamble would be nice.
comment:4 by , 19 years ago
Owner: | changed from | to
---|
comment:6 by , 18 years ago
blocked: | → 2220 |
---|
comment:7 by , 18 years ago
blocked: | 2220 |
---|
comment:9 by , 15 years ago
Priority: | high → low |
---|
follow-up: 11 comment:10 by , 14 years ago
Hello,
I am a new user really. I have done some things in Lyx many years ago, but nothing really serious. Now I try to produce a book and Lyx seemed to be the obvious choice. However after setting up the system and using it for an hour or so, I stumbled upon the problem of hyphenation exceptions. Where do I put them? I am aware of the \hyphenation{} command but putting it into the preamble is of no use to me. My book is in Dutch and in the logs I can see that this command with the exceptions gets loaded before the babel package, so it is not used at all. Very annoying really. The workaround I am using now is to put ERT (the \hyphenation{} command with all my exceptions inside brackets) somewhere at the beginning of my text, but I think this is not an elegant solution long term. I think that the right place for this is in the Document > Settings > Language dialogue where there is enough space left to include an editbox or so where you could simply list all your exceptions. Lyx should then insert this at the right spot for it to work documentwide.
comment:11 by , 14 years ago
Description: | modified (diff) |
---|
Replying to marchey:
I can see that this command with the exceptions gets loaded before the babel package, so it is not used at all.
try
\AtBeginDocument{% \hyphenation{...} }
in the preamble
comment:12 by , 14 years ago
Summary: | GUI \hyphenation support → GUI \hyphenation support (preamble) |
---|
comment:14 by , 3 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I use hyphenation all the time with LyX---I load a style file with my declarations so often it's in my default template---so I do not think this is a problem any more.
The idea I had to fix this babel annoyance in preamble was to allow to
define a language-specific preamble for any language you want.
The current preamble would go before the \usepackage{babel}, and the
language-specific part would be added as a babel hook for the given language.
It seems to me that this would fix properly this babel/preamble problem, and add
much more flexibility to the user.