From e8afde71cee7eaee99284f71f771fb0880219bf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20St=C3=B6hr?= Date: Sat, 3 Feb 2007 20:50:46 +0000 Subject: [PATCH] EmbeddedObjects: allow to compile the document without having all LaTeX-packages installed git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X@17035 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/doc/EmbeddedObjects.lyx | 220 +++++++++++++++++++++++++++-- lib/doc/es_EmbeddedObjects.lyx | 250 +++++++++++++++++++++++++++++++-- 2 files changed, 440 insertions(+), 30 deletions(-) diff --git a/lib/doc/EmbeddedObjects.lyx b/lib/doc/EmbeddedObjects.lyx index 4b52be59e0..9a696ece11 100644 --- a/lib/doc/EmbeddedObjects.lyx +++ b/lib/doc/EmbeddedObjects.lyx @@ -32,10 +32,6 @@ \let\figure\MyFigure \let\endfigure\MyEndfigure} -% use the marginnote package for margin notes -\usepackage{marginnote} -\let\marginpar\marginnote - % enables calculation of values, \usepackage{calc} @@ -100,9 +96,6 @@ \definecolor{darkgreen}{cmyk}{0.5, 0, 1, 0.5} \definecolor{lightgrey}{gray}{0.8} -% used for tables with dashed lines -\usepackage{arydshln} - % used for multirows \usepackage{multirow} %\renewcommand{\multirowsetup}{\centering} @@ -163,6 +156,27 @@ % redefine the greyed out note \renewenvironment{lyxgreyedout} {\textcolor{blue}\bgroup}{\egroup} + +% ------------------------------------ +% used to check for needed LaTeX packages +\usepackage{ifthen} + +% check for package arydshln +% used for tables with dashed lines +\newboolean{arydshln} +\IfFileExists{arydshln.sty} + {\usepackage{arydshln} + \setboolean{arydshln}{true}} + {\setboolean{arydshln}{false}} + +% check for package marginnote +% used for margin notes +\newboolean{marginnote} +\IfFileExists{marginnote.sty} + {\usepackage{marginnote} + \let\marginpar\marginnote + \setboolean{marginnote}{true}} + {\setboolean{marginnote}{false}} \end_preamble \options fleqn,liststotoc,bibtotoc,idxtotoc,BCOR7.5mm,titlepage \language english @@ -242,7 +256,7 @@ status collapsed status collapsed \begin_layout Standard -original author: Uwe Stöhr +original author: Uwe Stöhr \end_layout \end_inset @@ -269,19 +283,18 @@ Version 1.4.4-1 status open \begin_layout Standard -To export this document to PDF, PS, or DVI the LaTeX-packages +To export all parts of this document to PDF, PS, or DVI the LaTeX-packages + \series bold arydshln \series default -, + and \series bold marginnote -\series default -, and -\series bold -prettyref \series default must be installed. + If they are not installed you can export the document anyway but the sections + where the packages are required won't appear in the output. \end_layout \begin_layout Standard @@ -16719,6 +16732,37 @@ Dashed Lines \end_inset +\end_layout + +\begin_layout Standard +\begin_inset ERT +status collapsed + +\begin_layout Standard + + +\backslash +ifarydshln +\end_layout + +\end_inset + + +\begin_inset Note Note +status open + +\begin_layout Standard +The following section will only be displayed when you have the LaTeX-package + +\series bold +arydshln +\series default + is installed. +\end_layout + +\end_inset + + \end_layout \begin_layout Standard @@ -17180,6 +17224,60 @@ colortbl \end_inset +\end_layout + +\begin_layout Standard +\begin_inset ERT +status collapsed + +\begin_layout Standard + + +\backslash +else +\end_layout + +\end_inset + + +\begin_inset Note Note +status open + +\begin_layout Standard +The following will be displayed when the LaTeX-package +\series bold +arydshln +\series default + is not installed: +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +You need to install the package +\series bold +arydshln +\series default + to see the contents of this section in the output. +\end_layout + +\begin_layout Standard +\begin_inset ERT +status collapsed + +\begin_layout Standard + + +\backslash +fi +\end_layout + +\end_inset + + \end_layout \begin_layout Chapter @@ -22064,6 +22162,44 @@ Note: \end_inset +\end_layout + +\begin_layout Standard +\begin_inset VSpace bigskip +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset ERT +status collapsed + +\begin_layout Standard + + +\backslash +ifmarginnote +\end_layout + +\end_inset + + +\begin_inset Note Note +status open + +\begin_layout Standard +The following section will only be displayed when you have the LaTeX-package + +\series bold +marginnote +\series default + is installed. +\end_layout + +\end_inset + + \end_layout \begin_layout Standard @@ -22520,7 +22656,7 @@ myMarginpar{#1}} \series default \begin_inset Note Note -status open +status collapsed \begin_layout Standard The margin note format is changed only for this example. @@ -22529,6 +22665,60 @@ The margin note format is changed only for this example. \end_inset +\end_layout + +\begin_layout Standard +\begin_inset ERT +status collapsed + +\begin_layout Standard + + +\backslash +else +\end_layout + +\end_inset + + +\begin_inset Note Note +status open + +\begin_layout Standard +The following will be displayed when the LaTeX-package +\series bold +marginnote +\series default + is not installed: +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +You need to install the LaTeX-package +\series bold +marginnote +\series default + to see the following part of this section in the output. +\end_layout + +\begin_layout Standard +\begin_inset ERT +status collapsed + +\begin_layout Standard + + +\backslash +fi +\end_layout + +\end_inset + + \end_layout \begin_layout Chapter diff --git a/lib/doc/es_EmbeddedObjects.lyx b/lib/doc/es_EmbeddedObjects.lyx index 5ded11ffc6..6f5b1b27f6 100644 --- a/lib/doc/es_EmbeddedObjects.lyx +++ b/lib/doc/es_EmbeddedObjects.lyx @@ -32,10 +32,6 @@ \let\figure\MyFigure \let\endfigure\MyEndfigure} -% use the marginnote package for margin notes -\usepackage{marginnote} -\let\marginpar\marginnote - % enables calculation of values, \usepackage{calc} @@ -100,9 +96,6 @@ \definecolor{verdeoscuro}{cmyk}{0.5, 0, 1, 0.5} \definecolor{grisclaro}{gray}{0.8} -% used for tables with dashed lines -\usepackage{arydshln} - % used for multirows \usepackage{multirow} %\renewcommand{\multirowsetup}{\centering} @@ -163,6 +156,27 @@ % redefine the greyed out note \renewenvironment{lyxgreyedout} {\textcolor{blue}\bgroup}{\egroup} + +% ------------------------------------ +% used to check for needed LaTeX packages +\usepackage{ifthen} + +% check for package arydshln +% used for tables with dashed lines +\newboolean{arydshln} +\IfFileExists{arydshln.sty} + {\usepackage{arydshln} + \setboolean{arydshln}{true}} + {\setboolean{arydshln}{false}} + +% check for package marginnote +% used for margin notes +\newboolean{marginnote} +\IfFileExists{marginnote.sty} + {\usepackage{marginnote} + \let\marginpar\marginnote + \setboolean{marginnote}{true}} + {\setboolean{marginnote}{false}} \end_preamble \options fleqn,liststotoc,bibtotoc,idxtotoc,BCOR7.5mm,titlepage \language spanish @@ -242,7 +256,7 @@ status collapsed status collapsed \begin_layout Standard -autor original: Uwe Stöhr +autor original: Uwe Stöhr \end_layout \end_inset @@ -273,19 +287,18 @@ status open \begin_layout Standard \lang english -To export this document to PDF, PS, or DVI the LaTeX-packages +To export all parts of this document to PDF, PS, or DVI the LaTeX-packages + \series bold arydshln \series default -, + and \series bold marginnote -\series default -, and -\series bold -prettyref \series default must be installed. + If they are not installed you can export the document anyway but the sections + where the packages are required won't appear in the output. \end_layout \begin_layout Standard @@ -16660,6 +16673,41 @@ L \end_inset +\end_layout + +\begin_layout Standard +\begin_inset ERT +status collapsed + +\begin_layout Standard + + +\backslash +ifarydshln +\end_layout + +\end_inset + + +\lang english + +\begin_inset Note Note +status open + +\begin_layout Standard + +\lang english +The following section will only be displayed when you have the LaTeX-package + +\series bold +arydshln +\series default + is installed. +\end_layout + +\end_inset + + \end_layout \begin_layout Standard @@ -17113,6 +17161,66 @@ colortbl \end_inset +\end_layout + +\begin_layout Standard +\begin_inset ERT +status collapsed + +\begin_layout Standard + + +\backslash +else +\end_layout + +\end_inset + + +\lang english + +\begin_inset Note Note +status open + +\begin_layout Standard + +\lang english +The following will be displayed when the LaTeX-package +\series bold +arydshln +\series default + is not installed: +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard + +\lang english +You need to install the package +\series bold +arydshln +\series default + to see the contents of this section in the output. +\end_layout + +\begin_layout Standard +\begin_inset ERT +status collapsed + +\begin_layout Standard + + +\backslash +fi +\end_layout + +\end_inset + + \end_layout \begin_layout Chapter @@ -21987,6 +22095,48 @@ Nota: \end_inset +\end_layout + +\begin_layout Standard +\begin_inset VSpace bigskip +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset ERT +status collapsed + +\begin_layout Standard + + +\backslash +ifmarginnote +\end_layout + +\end_inset + + +\lang english + +\begin_inset Note Note +status open + +\begin_layout Standard + +\lang english +The following section will only be displayed when you have the LaTeX-package + +\series bold +marginnote +\series default + is installed. +\end_layout + +\end_inset + + \end_layout \begin_layout Standard @@ -22262,13 +22412,23 @@ marginnote El diseño de las notas al margen puede ser redefinido. Por ejemplo, para crear una cabecera para todas las notas con el texto -\family sans +\begin_inset Quotes eld +\end_inset + + \series bold \bar under +¡ +\family sans Atención \family default +! \series default \bar default + +\begin_inset Quotes erd +\end_inset + , subrayado, sans-serif en negrita, añade lo siguiente en el preámbulo: \end_layout @@ -22447,6 +22607,66 @@ El formato de la nota al margen se ha cambiado solo para este ejemplo. \end_inset +\end_layout + +\begin_layout Standard +\begin_inset ERT +status collapsed + +\begin_layout Standard + + +\backslash +else +\end_layout + +\end_inset + + +\lang english + +\begin_inset Note Note +status open + +\begin_layout Standard + +\lang english +The following will be displayed when the LaTeX-package +\series bold +marginnote +\series default + is not installed: +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard + +\lang english +You need to install the LaTeX-package +\series bold +marginnote +\series default + to see the following part of this section in the output. +\end_layout + +\begin_layout Standard +\begin_inset ERT +status collapsed + +\begin_layout Standard + + +\backslash +fi +\end_layout + +\end_inset + + \end_layout \begin_layout Chapter