mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
449 lines
6.4 KiB
Plaintext
449 lines
6.4 KiB
Plaintext
#LyX 2.2 created this file. For more info see http://www.lyx.org/
|
|
\lyxformat 504
|
|
\begin_document
|
|
\begin_header
|
|
\save_transient_properties true
|
|
\origin /systemlyxdir/doc/es/
|
|
\textclass scrartcl
|
|
\begin_preamble
|
|
\usepackage{ifpdf}
|
|
|
|
\ifpdf
|
|
|
|
\usepackage[colorlinks=true,
|
|
pdftitle=Formelnummerierung, pdfpagemode=none,
|
|
pdfpagelayout=OneColumn, pdfstartview=XYZ,
|
|
pdfauthor={Uwe Stöhr},
|
|
pdfsubject={LaTeX/LyX numbering example},
|
|
pdfkeywords={LaTeX, numbering, LyX}]{hyperref}
|
|
|
|
\else % if DVI
|
|
|
|
\usepackage[colorlinks=true]{hyperref}
|
|
|
|
\fi
|
|
|
|
% define Roman counter
|
|
\newcounter{rom}
|
|
\renewcommand{\therom}{\roman{rom}}
|
|
|
|
% remember the original counter
|
|
\newcommand{\c@org@eq}{}
|
|
\let\c@org@eq\c@equation
|
|
\newcommand{\org@theeq}{}
|
|
\let\org@theeq\theequation
|
|
|
|
% \setrom activates the Roman counter
|
|
\newcommand{\setrom}{
|
|
\let\c@equation\c@rom
|
|
\let\theequation\therom}
|
|
|
|
% \setarab activates the original Arabic counter
|
|
\newcommand{\setarab}{
|
|
\let\c@equation\c@org@eq
|
|
\let\theequation\org@theeq}
|
|
\end_preamble
|
|
\options fleqn
|
|
\use_default_options false
|
|
\maintain_unincluded_children false
|
|
\language spanish
|
|
\language_package default
|
|
\inputencoding auto
|
|
\fontencoding global
|
|
\font_roman "default" "default"
|
|
\font_sans "default" "default"
|
|
\font_typewriter "default" "default"
|
|
\font_math "auto" "auto"
|
|
\font_default_family default
|
|
\use_non_tex_fonts false
|
|
\font_sc false
|
|
\font_osf false
|
|
\font_sf_scale 100 100
|
|
\font_tt_scale 100 100
|
|
\graphics default
|
|
\default_output_format pdf2
|
|
\output_sync 0
|
|
\bibtex_command default
|
|
\index_command default
|
|
\paperfontsize 12
|
|
\spacing single
|
|
\use_hyperref false
|
|
\papersize default
|
|
\use_geometry false
|
|
\use_package amsmath 2
|
|
\use_package amssymb 2
|
|
\use_package cancel 0
|
|
\use_package esint 0
|
|
\use_package mathdots 1
|
|
\use_package mathtools 0
|
|
\use_package mhchem 1
|
|
\use_package stackrel 0
|
|
\use_package stmaryrd 0
|
|
\use_package undertilde 0
|
|
\cite_engine basic
|
|
\cite_engine_type default
|
|
\biblio_style plain
|
|
\use_bibtopic false
|
|
\use_indices false
|
|
\paperorientation portrait
|
|
\suppress_date false
|
|
\justification true
|
|
\use_refstyle 0
|
|
\index Índice
|
|
\shortcut idx
|
|
\color #008000
|
|
\end_index
|
|
\secnumdepth 4
|
|
\tocdepth 3
|
|
\paragraph_separation skip
|
|
\defskip medskip
|
|
\quotes_language english
|
|
\papercolumns 1
|
|
\papersides 1
|
|
\paperpagestyle empty
|
|
\tracking_changes false
|
|
\output_changes false
|
|
\html_math_output 0
|
|
\html_css_as_file 0
|
|
\html_be_strict false
|
|
\end_header
|
|
|
|
\begin_body
|
|
|
|
\begin_layout Standard
|
|
Este documento muestra el uso de dos categorías diferentes de ecuaciones.
|
|
Una está numerada en arábigos, la otra en romanos.
|
|
\end_layout
|
|
|
|
\begin_layout Standard
|
|
\begin_inset Formula
|
|
\begin{equation}
|
|
A=B\label{eq:B}
|
|
\end{equation}
|
|
|
|
\end_inset
|
|
|
|
|
|
\begin_inset Formula
|
|
\begin{equation}
|
|
A=C\label{eq:C}
|
|
\end{equation}
|
|
|
|
\end_inset
|
|
|
|
|
|
\begin_inset ERT
|
|
status collapsed
|
|
|
|
\begin_layout Plain Layout
|
|
|
|
|
|
\backslash
|
|
setrom
|
|
\end_layout
|
|
|
|
\end_inset
|
|
|
|
|
|
\begin_inset Formula
|
|
\begin{equation}
|
|
A=D\label{eq:D}
|
|
\end{equation}
|
|
|
|
\end_inset
|
|
|
|
|
|
\begin_inset Formula
|
|
\begin{equation}
|
|
A=E\label{eq:E}
|
|
\end{equation}
|
|
|
|
\end_inset
|
|
|
|
|
|
\begin_inset ERT
|
|
status collapsed
|
|
|
|
\begin_layout Plain Layout
|
|
|
|
|
|
\backslash
|
|
setarab
|
|
\end_layout
|
|
|
|
\end_inset
|
|
|
|
|
|
\begin_inset Formula
|
|
\begin{equation}
|
|
A=F\label{eq:F}
|
|
\end{equation}
|
|
|
|
\end_inset
|
|
|
|
|
|
\begin_inset Formula
|
|
\begin{equation}
|
|
A=G\label{eq:G}
|
|
\end{equation}
|
|
|
|
\end_inset
|
|
|
|
|
|
\begin_inset ERT
|
|
status collapsed
|
|
|
|
\begin_layout Plain Layout
|
|
|
|
|
|
\backslash
|
|
setrom
|
|
\end_layout
|
|
|
|
\end_inset
|
|
|
|
|
|
\begin_inset Formula
|
|
\begin{equation}
|
|
A=H\label{eq:H}
|
|
\end{equation}
|
|
|
|
\end_inset
|
|
|
|
|
|
\begin_inset Formula
|
|
\begin{equation}
|
|
A=I\label{eq:I}
|
|
\end{equation}
|
|
|
|
\end_inset
|
|
|
|
|
|
\end_layout
|
|
|
|
\begin_layout Standard
|
|
Referencias cruzadas:
|
|
\begin_inset CommandInset ref
|
|
LatexCommand eqref
|
|
reference "eq:B"
|
|
|
|
\end_inset
|
|
|
|
,
|
|
\begin_inset CommandInset ref
|
|
LatexCommand eqref
|
|
reference "eq:C"
|
|
|
|
\end_inset
|
|
|
|
,
|
|
\begin_inset CommandInset ref
|
|
LatexCommand eqref
|
|
reference "eq:F"
|
|
|
|
\end_inset
|
|
|
|
,
|
|
\begin_inset CommandInset ref
|
|
LatexCommand eqref
|
|
reference "eq:G"
|
|
|
|
\end_inset
|
|
|
|
,
|
|
\begin_inset CommandInset ref
|
|
LatexCommand eqref
|
|
reference "eq:D"
|
|
|
|
\end_inset
|
|
|
|
,
|
|
\begin_inset CommandInset ref
|
|
LatexCommand eqref
|
|
reference "eq:E"
|
|
|
|
\end_inset
|
|
|
|
,
|
|
\begin_inset CommandInset ref
|
|
LatexCommand eqref
|
|
reference "eq:H"
|
|
|
|
\end_inset
|
|
|
|
,
|
|
\begin_inset CommandInset ref
|
|
LatexCommand eqref
|
|
reference "eq:I"
|
|
|
|
\end_inset
|
|
|
|
|
|
\end_layout
|
|
|
|
\begin_layout Standard
|
|
\noindent
|
|
\begin_inset CommandInset line
|
|
LatexCommand rule
|
|
offset "0.5ex"
|
|
width "100line%"
|
|
height "1pt"
|
|
|
|
\end_inset
|
|
|
|
|
|
\begin_inset VSpace medskip
|
|
\end_inset
|
|
|
|
Para escribir este ejemplo, primero hay que definir un contador para las
|
|
fórmulas numeradas en romanos.
|
|
Para ello se inserta lo siguiente en el preámbulo \SpecialCharNoPassThru LaTeX
|
|
:
|
|
\end_layout
|
|
|
|
\begin_layout Standard
|
|
|
|
\series bold
|
|
|
|
\backslash
|
|
newcounter{rom}
|
|
\begin_inset Newline newline
|
|
\end_inset
|
|
|
|
|
|
\backslash
|
|
renewcommand{
|
|
\backslash
|
|
therom}{
|
|
\backslash
|
|
roman{rom}}
|
|
\end_layout
|
|
|
|
\begin_layout Standard
|
|
\begin_inset Newpage newpage
|
|
\end_inset
|
|
|
|
Para guardar el valor del contador arábigo
|
|
\series bold
|
|
equation
|
|
\series default
|
|
, se añade al preámbulo lo siguiente
|
|
\end_layout
|
|
|
|
\begin_layout Standard
|
|
|
|
\series bold
|
|
|
|
\backslash
|
|
newcommand{
|
|
\backslash
|
|
c@org@eq}{}
|
|
\begin_inset Newline newline
|
|
\end_inset
|
|
|
|
|
|
\backslash
|
|
let
|
|
\backslash
|
|
c@org@eq
|
|
\backslash
|
|
c@equation
|
|
\begin_inset Newline newline
|
|
\end_inset
|
|
|
|
|
|
\backslash
|
|
newcommand{
|
|
\backslash
|
|
org@theeq}{}
|
|
\begin_inset Newline newline
|
|
\end_inset
|
|
|
|
|
|
\backslash
|
|
let
|
|
\backslash
|
|
org@theeq
|
|
\backslash
|
|
theequation
|
|
\end_layout
|
|
|
|
\begin_layout Standard
|
|
Para poder alternar en el documento entre ambos esquemas de numeración,
|
|
se definen los siguientes comandos en el preámbulo:
|
|
\end_layout
|
|
|
|
\begin_layout Standard
|
|
|
|
\series bold
|
|
|
|
\backslash
|
|
newcommand{
|
|
\backslash
|
|
setrom}{
|
|
\backslash
|
|
let
|
|
\backslash
|
|
c@equation
|
|
\backslash
|
|
c@rom
|
|
\backslash
|
|
let
|
|
\backslash
|
|
theequation
|
|
\backslash
|
|
therom}
|
|
\end_layout
|
|
|
|
\begin_layout Standard
|
|
para la numeración romana y
|
|
\end_layout
|
|
|
|
\begin_layout Standard
|
|
|
|
\series bold
|
|
|
|
\backslash
|
|
newcommand{
|
|
\backslash
|
|
setarab}{
|
|
\backslash
|
|
let
|
|
\backslash
|
|
c@equation
|
|
\backslash
|
|
c@org@eq
|
|
\backslash
|
|
let
|
|
\backslash
|
|
theequation
|
|
\backslash
|
|
org@theeq}
|
|
\end_layout
|
|
|
|
\begin_layout Standard
|
|
para la numeración arábiga.
|
|
\end_layout
|
|
|
|
\begin_layout Standard
|
|
Cada fórmula será numerada en arábigos por defecto.
|
|
Para cambiar a numeración en romanos, se inserta el comando
|
|
\series bold
|
|
|
|
\backslash
|
|
setrom
|
|
\series default
|
|
en modo \SpecialCharNoPassThru TeX
|
|
.
|
|
Con el comando
|
|
\series bold
|
|
|
|
\backslash
|
|
setarab
|
|
\series default
|
|
la numeración retorna a números arábigos.
|
|
\end_layout
|
|
|
|
\end_body
|
|
\end_document
|