PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Falsche Silbentrennung in Lyx



Spacemarine
08-11-2009, 23:44
Hallo,

ich bekomme in Lyx keine gescheite Silbentrennung hin. Es wird z.B. so getrennt: El-ement oder technis-chen

Ich habe dazu schon gesucht, und auch schon ausprobiert folgendes in die Präambel zu schreiben:

\usepackage[ngerman]{babel}

Leider hatte dies keinen Erfolg, es wurde immer noch falsch getrennt.

Kann mir jemand helfen die Silben richtig zu trennen?

Meine Präambel sieht momentan so aus:


\documentclass[11pt,twoside,ngerman]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage[a4paper]{geometry}
\geometry{verbose,lmargin=3cm,rmargin=3cm}
\pagestyle{plain}
\setlength{\parskip}{\medskipamount}
\setlength{\parindent}{0pt}
\usepackage{babel}

\usepackage{array}
\usepackage{float}
\usepackage{textcomp}
\usepackage{relsize}
\usepackage{graphicx}
\usepackage{setspace}
\usepackage[numbers]{natbib}
\onehalfspacing
\usepackage[unicode=true, pdfusetitle,
bookmarks=true,bookmarksnumbered=false,bookmarksop en=false,
breaklinks=false,pdfborder={0 0 0},backref=false,colorlinks=false]
{hyperref}

\makeatletter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
\DeclareRobustCommand{\lyxmathsym}[1]{\ifmmode\begingroup\def\b@ld{bold}
\def\rmorbf##1{\ifx\math@version\b@ld\textbf{##1}\ else\textrm{##1}\fi}
\mathchoice{\hbox{\rmorbf{#1}}}{\hbox{\rmorbf{#1}} }
{\hbox{\smaller[2]\rmorbf{#1}}}{\hbox{\smaller[3]\rmorbf{#1}}}
\endgroup\else#1\fi}

%% Because html converters don't know tabularnewline
\providecommand{\tabularnewline}{\\}

\makeatother

\begin{document}

voss
09-11-2009, 00:28
ich bekomme in Lyx keine gescheite Silbentrennung hin. Es wird z.B. so getrennt: El-ement oder technis-chen

Ich habe dazu schon gesucht, und auch schon ausprobiert folgendes in die Präambel zu schreiben:


markiere den gesamten Text und wähle nochmal die Sprache deutsch

Herbert

Spacemarine
09-11-2009, 00:51
Hab ich gemacht.

Alles markiert und dann Dokument -> Einstellungen -> Sprache -> Deutsch gewählt. Stand schon auf Deutsch, also habe ich es erst umgestellt und dann wieder auf Deutsch zurückgestellt.

Hat leider nicht geholfen.

Viele Grüße,
André

u_fischer
09-11-2009, 11:43
Klingt nach englischer Silbentrennung. Was sagt denn die log-Datei? Lädst du überhaupt deutsche Trennmuster?

Spacemarine
09-11-2009, 20:31
Danke für den Tip, das scheint es zu sein. Habe gerade mal ins Log geschaut und da steht z.B. drin:


Package babel Warning: No hyphenation patterns were loaded for
(babel) the language `ngerman'
(babel) I will use the patterns loaded for \language=0 instead.

Was kann ich dagegen tun?

Hier mal der Anfang des Logs:


LaTeX2e <2005/12/01>
Babel <v3.8h> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, loaded.

(/usr/share/texmf-texlive/tex/latex/base/article.cls
Document Class: article 2005/09/16 v1.4f Standard LaTeX document class
(/usr/share/texmf-texlive/tex/latex/base/size11.clo
File: size11.clo 2005/09/16 v1.4f Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
) (/usr/share/texmf-texlive/tex/latex/base/fontenc.sty
Package: fontenc 2005/09/27 v1.99g Standard LaTeX package
(/usr/share/texmf-texlive/tex/latex/base/t1enc.def
File: t1enc.def 2005/09/27 v1.99g Standard LaTeX file
LaTeX Font Info: Redeclaring font encoding T1 on input line 43.
)) (/usr/share/texmf-texlive/tex/latex/base/inputenc.sty
Package: inputenc 2006/05/05 v1.1b Input encoding file
\inpenc@prehook=\toks14
\inpenc@posthook=\toks15
(/usr/share/texmf-texlive/tex/latex/base/latin9.def
File: latin9.def 2006/05/05 v1.1b Input encoding file
)) (/usr/share/texmf-texlive/tex/latex/geometry/geometry.sty
Package: geometry 2002/07/08 v3.2 Page Geometry
(/usr/share/texmf-texlive/tex/latex/graphics/keyval.sty
Package: keyval 1999/03/16 v1.13 key=value parser (DPC)
\KV@toks@=\toks16
)
\Gm@cnth=\count87
\Gm@cntv=\count88
\c@Gm@tempcnt=\count89
\Gm@bindingoffset=\dimen103
\Gm@wd@mp=\dimen104
\Gm@odd@mp=\dimen105
\Gm@even@mp=\dimen106
\Gm@dimlist=\toks17
) (/usr/share/texmf-texlive/tex/generic/babel/babel.sty
Package: babel 2005/11/23 v3.8h The Babel package
(/usr/share/texmf-texlive/tex/generic/babel/ngermanb.ldf
Language: ngermanb 2004/02/20 v2.6m new German support from the babel system
(/usr/share/texmf-texlive/tex/generic/babel/babel.def
File: babel.def 2005/11/23 v3.8h Babel common definitions
\babel@savecnt=\count90
\U@D=\dimen107
)

Package babel Warning: No hyphenation patterns were loaded for
(babel) the language `ngerman'
(babel) I will use the patterns loaded for \language=0 instead.

\l@ngerman = a dialect from \language0
\l@naustrian = a dialect from \language\l@ngerman
Package babel Info: Making " an active character on input line 92.
)) (/usr/share/texmf-texlive/tex/latex/tools/array.sty
Package: array 2005/08/23 v2.4b Tabular extension package (FMi)
\col@sep=\dimen108
\extrarowheight=\dimen109
\NC@list=\toks18
\extratabsurround=\skip43
\backup@length=\skip44
) (/usr/share/texmf-texlive/tex/latex/float/float.sty
Package: float 2001/11/08 v1.3d Float enhancements (AL)
\c@float@type=\count91
\float@exts=\toks19
\float@box=\box26
\@float@everytoks=\toks20
\@floatcapt=\box27
) (/usr/share/texmf-texlive/tex/latex/base/textcomp.sty
Package: textcomp 2005/09/27 v1.99g Standard LaTeX package
Package textcomp Info: Sub-encoding information:
(textcomp) 5 = only ISO-Adobe without \textcurrency
(textcomp) 4 = 5 + \texteuro
(textcomp) 3 = 4 + \textohm
(textcomp) 2 = 3 + \textestimated + \textcurrency
(textcomp) 1 = TS1 - \textcircled - \t
(textcomp) 0 = TS1 (full)
(textcomp) Font families with sub-encoding setting implement
(textcomp) only a restricted character set as indicated.
(textcomp) Family '?' is the default used for unknown fonts.
(textcomp) See the documentation for details.
Package textcomp Info: Setting ? sub-encoding to TS1/1 on input line 71.
(/usr/share/texmf-texlive/tex/latex/base/ts1enc.def
File: ts1enc.def 2001/06/05 v3.0e (jk/car/fm) Standard LaTeX file

voss
09-11-2009, 20:52
Danke für den Tip, das scheint es zu sein. Habe gerade mal ins Log geschaut und da steht z.B. drin:


Package babel Warning: No hyphenation patterns were loaded for
(babel) the language `ngerman'
(babel) I will use the patterns loaded for \language=0 instead.

Was kann ich dagegen tun?

Hier mal der Anfang des Logs:


LaTeX2e <2005/12/01>
Babel <v3.8h> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, loaded.



sieht nach Windows aus, denn Linux lädt in der Regel ca 40 Sprachen.
Für MiKTeX einafch setup aufrufen und die Sprache installieren.

Herbert

Spacemarine
09-11-2009, 21:11
Nein, ich verwendet Linux, und zwar Kubuntu 9.04. Dort habe ich Lyx über die Paketverwaltung installiert. Was soll ich noch installieren?

gruß André

voss
09-11-2009, 22:14
Nein, ich verwendet Linux, und zwar Kubuntu 9.04. Dort habe ich Lyx über die Paketverwaltung installiert. Was soll ich noch installieren?


das hat nichts mit LyX zu tun, sondern mit der Installation von TeX

kpsewhich language.dat zeigt dir den Ort der Sprachdatei an.
Dort dürfte bei dir alles auskommentiert sein.

Herbert

Spacemarine
09-11-2009, 22:27
Danke für deine Hilfe! Ich habe die Datei mal hier rein gepostet, mir ist aber nicht ganz klar was ich jetzt tun muss.

gruß André


%%% This file was automatically generated by update-language.
%
% Please do not edit it directly. If you want to add or change
% anything here, please have a look at the files in:
%
% /etc/texmf/language.d/
%
% and invoke update-language.
%
%%%

%%% From file: /etc/texmf/language.d/00tex.cnf
% 00tex.cnf: header of the configuration file for language.dat
%
% In Debian, language.dat is a file that is generated from
% configuration files in /etc/texmf/language.d/. This file, 00tex.cnf,
% contains only some comments on how to edit these files.
%
% The text of the comments is Copyright 1998, 1999 by Thomas Esser, it
% is in the Public domain.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%
%% To make it possible for package scripts to parse this file,
%% please use only "%! " to comment out hyphenation patterns!
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%
% CAUTION: the first language will be the default if no style-file
% (e.g. german.sty) is used.
% Since version 3.0 of TeX, hyphenation patterns for multiple languages are
% possible. Unless you know what you are doing, please let the american
% english patterns be the first ones. The babel system allows you to
% easily change the active language for your texts. For more information,
% have a look to the documentation in texmf/doc/generic/babel.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%
% The hyphenation pattern files are in the directory:
% texmf/tex/generic/hyphen
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%

%%% End of file: /etc/texmf/language.d/00tex.cnf

%%% From file: /etc/texmf/language.d/09texlive-base.cnf
% 09texlive-base.cnf
% You can change/add entries to this file and changes will be preserved
% over upgrades, even if you have removed the main package prior
% (not if you purged it). You should leave the following pseudo comment
% present in the file!
% -_- DebPkgProvidedMaps -_-
%
% language.us (and the start of language.dat)
% - initial hyphenation patterns.
% Created long ago by Sebastian Rahtz and others. Public domain.
%
% language.us is concatenated with the other language.*.dat files
% desired by the user to create language.dat. This is done at the end
% of install-tl.sh.
%
% The premade texmf/tex/generic/config/language.dat (where you might be
% reading this) in the distribution is a copy of this concatenation with
% all languages enabled. It is used when the user asks to run live
% (install option R).
%
% The preferred comment for actual language lines is %!. Do not use %!
% for textual comments like this. This is to be able to separate
% textual comments from commented-out language in such a way that
% automatic parsing by programs is possible, so that
% we can present the user with `all possible languages'.
%
% *PLEASE*, keep english as the default (first) here, and let it refer
% to hyphen.tex (not, e.g., ushyph.tex), and do not change the
% hyphen.tex file, or name some other file hyphen.tex. hyphen.tex must
% remain the original file from Knuth, and it must be \language0. This
% is one important aspect of ensuring that the original, frozen TeX
% always produces the same line and page breaks.
%
% The babel system allows you to easily change the active language for
% LaTeX. For more information, see the documentation in
% texmf-dist/doc/generic/babel/. ConTeXt has its own language support too.
%
english hyphen.tex % do not change!
=usenglish
=USenglish
=american
%
% ushyphmax.tex, on the other hand, includes Gerard Kuiken's additional
% patterns; it is not frozen.
usenglishmax ushyphmax.tex
%
% FYI, ushyph.tex is Dr. Kuiken's smaller set of patterns; with today's
% large memories, there is no reason to use it, and we don't list it here.
% ushyph1.tex is another (historical) name for hyphen.tex.
% ushyph2.tex is another (historical) name for ushyph.tex.
% --karl
%
dumylang dumyhyph.tex %for testing a new language.
nohyphenation zerohyph.tex %a language with no patterns at all.
%%% End of file: /etc/texmf/language.d/09texlive-base.cnf

%%% From file: /etc/texmf/language.d/10texlive-lang-german.cnf
% 10texlive-lang-german.cnf
% You can change/add entries to this file and changes will be preserved
% over upgrades, even if you have removed the main package prior
% (not if you purged it). You should leave the following pseudo comment
% present in the file!
% -_- DebPkgProvidedMaps -_-
%
german xu-dehypht.tex
ngerman xu-dehyphn.tex
%%% End of file: /etc/texmf/language.d/10texlive-lang-german.cnf

voss
10-11-2009, 11:06
Danke für deine Hilfe! Ich habe die Datei mal hier rein gepostet, mir ist aber nicht ganz klar was ich jetzt tun muss.


%%% This file was automatically generated by update-language.
%
% Please do not edit it directly. If you want to add or change
% anything here, please have a look at the files in:
%
% /etc/texmf/language.d/
%
% and invoke update-language.
%
%%%

%%% From file: /etc/texmf/language.d/00tex.cnf
% 00tex.cnf: header of the configuration file for language.dat

german xu-dehypht.tex
ngerman xu-dehyphn.tex
%%% End of file: /etc/texmf/language.d/10texlive-lang-german.cnf


hier stehen ja die beiden Sprachen, also sollten sie auch verfügbar sein.
Lass mal als root
fmtutil-sys --all
laufen.

Gibt es danach wieder die Trennprobleme?

Herbert

Spacemarine
10-11-2009, 16:16
Danke! Das hat das Problem gelöst. Fast alle Stellen die ich kontrolliert habe stimmen nun, nur ein Wort wird noch komisch getrennt:

Substra-trand.

Kann es sein dass der Latex Algorithmus an dieser Stelle versagt?
Die Fehlermeldungen aus dem Log sind auch verschwunden.

Was genau macht dein Kommando?

Gruß André

voss
10-11-2009, 22:53
Danke! Das hat das Problem gelöst. Fast alle Stellen die ich kontrolliert habe stimmen nun, nur ein Wort wird noch komisch getrennt:

Substra-trand.

Kann es sein dass der Latex Algorithmus an dieser Stelle versagt?
Die Fehlermeldungen aus dem Log sind auch verschwunden.

Was genau macht dein Kommando?


für welche Sprachen die Trennregeln geladen werden, wird fest in die
binären Formate von LaTeX und Konsorten eingebunden.
fmtutil-> format utility erzeugt mit --all für alles, was auf deiner Kiste ist
neue Formate, die dann die Trennregelen für die angegeben Sprachen
beinhalten.

Substra-trand. dürfte einfach bislang keinem aufgefallen sein, sonst wäre
es längst in den offiziellen Ausnahmetrennregeln, so musst du halt in der
Präambel

\hyphenation{Sub-strat-rand}

schreiben.

Herbert

Spacemarine
11-11-2009, 18:56
Danke vielmals!