From lyx-users Mon Nov 24 15:45:50 2008 From: Charles de Miramon Date: Mon, 24 Nov 2008 15:45:50 +0000 To: lyx-users Subject: Going from custom charstyles to module Message-Id: X-MARC-Message: https://marc.info/?l=lyx-users&m=122754160320017 Hello I'm starting to move my real work to LyX 1.6 and I have problem with the new modules. I had in LyX 1.5 some semantic custom markup for citations in Latin and Old French in a mycharstyles.inc file # Personal character styles definition Format 2 CharStyle Latin LatexType Command LatexName latin Font Family Sans EndFont LabelFont Family Roman Color blue EndFont Preamble \newcommand{\latin}[1]{\og~#1~\fg} EndPreamble End CharStyle Ancien LatexType Command LatexName ancien Font Family Sans EndFont LabelFont Family Roman Color blue EndFont Preamble \newcommand{\ancien}[1]{\og~#1~\fg} EndPreamble End I have created a module in LyX 1.6 (I could not find any documentation about the syntax of modules and the new flexible insets) Latin.module #\DeclareLyXModule{Latin} #DescriptionBegin #Définit des styles spécifiques pour les textes en latin et en ancien français #DescriptionEnd #Charles de Miramon 24/11/08 Format 11 InsetLayout Latin LyxType charstyle LabelString Latin LatexType Command LatexName latin Font Family Sans EndFont LabelFont Family Roman Color blue EndFont Preamble \newcommand{\latin}[1]{\og~#1~\fg} EndPreamble End InsetLayout Ancien LyxType charstyle LabelString Ancien LatexType Command LatexName ancien Font Family Sans EndFont LabelFont Family Roman Color blue EndFont Preamble \newcommand{\ancien}[1]{\og~#1~\fg} EndPreamble End It works for new files but does not translate the old files. The old LyX code was : \begin_inset CharStyle Latin status inlined and the new one seems to be : \begin_inset Flex Latin status collapsed Questions : 1) Is there a way to automatically transform the old custom charstyle formatting to the module ? 2) Why do we have in the new syntax a 'status collapsed' ? Charstyles are not insets that can be closed or opened 3) I'm a bit mixed up between the old custom charstyles, flexible insets, modules. What is going to be deprecated ? Cheers, Charles -- http://www.kde-france.org