Opened 20 years ago

Closed 3 years ago

#1503 closed enhancement (fixed)

GUI \hyphenation support (preamble)

Reported by: Georg Baum Owned by: nobody@…
Priority: low Milestone:
Component: general Version: 1.4.0cvs
Severity: minor Keywords:
Cc:

Description (last modified by Juergen Spitzmueller)

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 lasgouttes, 20 years ago

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.

comment:2 by Georg Baum, 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:3 by lasgouttes, 20 years ago

Yes, there is an UI problem to solve here, I think

comment:4 by lasgouttes, 19 years ago

Owner: changed from lasgouttes to nobody@…

comment:5 by Uwe Stöhr, 18 years ago

related to #2220

comment:6 by Uwe Stöhr, 18 years ago

blocked: 2220

comment:7 by Uwe Stöhr, 18 years ago

blocked: 2220

comment:8 by Uwe Stöhr, 18 years ago

Forget comment 4, I reverted this.

comment:9 by ps, 15 years ago

Priority: highlow

comment:10 by Marc, 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.

in reply to:  10 comment:11 by Juergen Spitzmueller, 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 Vincent van Ravesteijn, 14 years ago

Summary: GUI \hyphenation supportGUI \hyphenation support (preamble)

comment:13 by Uwe Stöhr, 9 years ago

This bug is related to bug #5031.

comment:14 by Richard Kimberly Heck, 3 years ago

Resolution: fixed
Status: newclosed

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.

Note: See TracTickets for help on using tickets.