Le 25/07/2011 12:18, NGUYEN VU Quang Anh a écrit :
Bonjour à tous,J’ai intention de faire la rédaction la thèse en LyX avec la mise en page de classe thloria (de Denis Roegel depuis 2002) http://www.loria.fr/~roegel/TeX/TL.html Pour ce faire, j’ai copié thloria.layout (extraction du fichier TL.zip qui est téléchargé de l’url ci-dessus) à la destination C:\Program Files (x86)\LyX16\Resources\layouts Ensuite, démarrer LyX et choisir "Edit" > "Reconfigure". Fermer Lyx. Quand j’ouvre exemple.lyx, un fichier d’exemple de Denis Roegel, j’ai reçu une erreur suivante.
J'ai regardé de plus près le layout et l'exemple. Il ne sont plus adapté à lyx-2.0 (l'exemple a été réalisé avec lyx-1.3) pour des questions d'encodage de caractères essentiellement.
Le layout comporte une inclusion d'un fichier qui n'existe plus (algorithm.inc), je l'ai commenté. Je pense que cette erreur doit expliquer l'échec de l'ouverture de la classe thloria sous windows, qui n'est pas disert sur les erreurs. Linux est plus précis et identifie l'erreur qui fait échouer le chargement de la classe. En outre, il y une erreur mineure (LatexType au lieu de LabelType) et certaines légendes sont encodées en latin, je l'ai converti en utf-8, voir ci-après le diff.
En ce qui concerne exemple.lyx, l'ouverture du fichier en lyx-2.0 convertit correctement tout l'encodage (qui est en latin 1) en UTF, mais dans le menu Document>Paramètres>Langue, l'encodage est marqué auto, ce qui veut dire implicitement latin9, alors que la classe thloria.cls requiert explicitement latin1: il faut harmoniser. Il y a en outre un clash babel multilingue que j'ai résolu ne marquant en langue anglaise le résumé anglais (LyX gère parfaitement les langues multiples en babel), voir également le diff.
Les fichiers sont petits, je mes mets en p.j.
Merci de confirmer le fonctionnement sous Windows.
Jean-Pierre
--- thloria.layout.orig 2011-07-30 18:36:29.000000000 +0200
+++ thloria.layout 2011-07-30 18:36:39.000000000 +0200
@@ -1,12 +1,12 @@
#% Do not delete the line below; configure depends on this
# \DeclareLaTeXClass[thloria]{ThLoria}
# ThLoria textclass definition file. Taken from initial LyX source code
-# Author: Mael Hill�reau <[email protected]>
+# Author: Mael Hilléreau <[email protected]>
# Last modif.: 04/01/2006
# Input standard definitions
Input stdclass.inc
-Input algorithm.inc
+#Input algorithm.inc
# Global parameters.
Sides 2
@@ -83,7 +83,7 @@
LatexType Command
LatexName ThesisFirstPageHead
LabelType Top_Environment
- LabelString "En-t�te"
+ LabelString "En-tête"
TopSep 0.7
BottomSep 0.7
LabelBottomSep 0.5
@@ -137,7 +137,7 @@
Style Dedicace
CopyStyle Remerciements
LatexName ThesisDedication
- LabelString "D�dicace"
+ LabelString "Dédicace"
End
Style FinPreface
@@ -166,7 +166,7 @@
Style ResumeFrancais
CopyStyle FinPageDeTitre
LatexName begin{ThesisAbstract}\begin{FrenchAbstract}
- LabelString "R�sum�"
+ LabelString "Résumé"
LabelBottomSep 0.2
LabelFont
Size Large
@@ -201,8 +201,8 @@
Style SectionSpeciale
CopyStyle Chapter
LatexName SpecialSection
- LatexType Top_Environment
- LabelString "Section sp�ciale"
+ LabelType Top_Environment
+ LabelString "Section spéciale"
End
Style MiniTOC
--- exemple_orig_2.0.lyx 2011-07-30 18:33:35.000000000 +0200
+++ exemple.lyx 2011-07-30 18:29:15.000000000 +0200
@@ -24,7 +24,7 @@
\maintain_unincluded_children false
\language french
\language_package default
-\inputencoding auto
+\inputencoding latin1
\fontencoding global
\font_roman default
\font_sans default
@@ -721,6 +721,8 @@
\end_layout
\begin_layout ResumeAnglais
+
+\lang english
Abstract in English.
Abstract in English.
Abstract in English.
#% Do not delete the line below; configure depends on this
# \DeclareLaTeXClass[thloria]{ThLoria}
# ThLoria textclass definition file. Taken from initial LyX source code
# Author: Mael Hilléreau <[email protected]>
# Last modif.: 04/01/2006
# Input standard definitions
Input stdclass.inc
#Input algorithm.inc
# Global parameters.
Sides 2
#PageStyle Headings
DefaultFont
Family Sans
Series Medium
Shape Up
Size Normal
Color None
EndFont
# There is no abstract environment in book.cls
NoStyle Abstract
# a few changes to the bibliography
Style Bibliography
TopSep 4
LabelString Bibliography
# label font definition
LabelFont
Series Bold
Size Huge
EndFont
End
Style Title
LatexName ThesisTitle
InTitle 0
Font
Size Giant
Color Red
EndFont
End
Style Author
CopyStyle Title
LatexName ThesisAuthor
Font
Size Large
EndFont
End
Style Date
CopyStyle Title
LatexName ThesisDate
Font
Size Large
EndFont
End
Style President
CopyStyle Author
LatexName President=
End
Style Rapporteurs
CopyStyle Author
LatexName Rapporteurs=
End
Style Examinateurs
CopyStyle Author
LatexName Examinateurs=
End
Style Diplome
CopyStyle Author
LatexName ThesisDiploma
End
Style EntetePageDeTitre
LatexType Command
LatexName ThesisFirstPageHead
LabelType Top_Environment
LabelString "En-tête"
TopSep 0.7
BottomSep 0.7
LabelBottomSep 0.5
LabelFont
Color Red
Series Bold
EndFont
End
Style PiedPageDeTitre
CopyStyle EntetePageDeTitre
LatexName ThesisFirstPageFoot
LabelString "Pied de page"
End
Style FinPageDeTitre
LatexType Command
LatexName MakeThesisTitlePage
KeepEmpty 1
Margin Static
ParSkip 0
TopSep 1
BottomSep 1
ParSep 0
LabelType Centered_Top_Environment
LabelBottomSep -1
LabelString "~=~"
OptionalArgs 0
LabelFont
Series Bold
Size Huge
Color Red
EndFont
End
Style Remerciements
LatexType Environment
LatexName ThesisAcknowledgments
LabelType Centered_Top_Environment
LabelString "Remerciements"
TopSep 0.7
BottomSep 0.7
LabelBottomSep 0.5
LabelFont
Color Blue
Series Bold
Size Large
EndFont
End
Style Dedicace
CopyStyle Remerciements
LatexName ThesisDedication
LabelString "Dédicace"
End
Style FinPreface
CopyStyle FinPageDeTitre
LatexName mainmatter
LabelFont
Color Blue
EndFont
End
Style Annexes
CopyStyle FinPreface
LabelString "Annexes"
LatexName Annexes
LabelFont
Color None
EndFont
End
Style Annex
CopyStyle Chapter
LatexName Annex
LabelString "Annexe #"
End
Style ResumeFrancais
CopyStyle FinPageDeTitre
LatexName begin{ThesisAbstract}\begin{FrenchAbstract}
LabelString "Résumé"
LabelBottomSep 0.2
LabelFont
Size Large
Color Magenta
EndFont
End
Style ResumeAnglais
CopyStyle ResumeFrancais
LatexName end{FrenchAbstract}\begin{EnglishAbstract}
LabelString "Abstract"
End
Style FinResumeAnglais
CopyStyle FinPageDeTitre
LatexName end{EnglishAbstract}\end{ThesisAbstract}
LabelFont
Color Magenta
EndFont
End
Style Part
CopyStyle Part
LabelString "Partie #"
End
Style Chapter
CopyStyle Chapter
LabelString "Chapitre "
End
Style SectionSpeciale
CopyStyle Chapter
LatexName SpecialSection
LabelType Top_Environment
LabelString "Section spéciale"
End
Style MiniTOC
CopyStyle FinPageDeTitre
LatexName minitoc
LabelString "-- minitoc --"
LabelType Top_Environment
LabelFont
Shape Italic
Size Large
Color None
EndFont
End
exemple.lyx
Description: application/lyx
