我已经成功安装了 Lyx 2.3.0,并且想要安装 LyX wiki 中提到的子方程模块/环境https://wiki.lyx.org/LyX/NewInLyX23)不幸的是,我不知道该怎么做。
我曾尝试在 MikTex 中查找该模块,但找不到,而且我在 2.3.0 中也找不到。也许这只是在 LyX 中查找正确位置的问题,因为我可以在 Stack Exchange 中看到有关子方程的问题(和答案),但我没有找到我的问题的答案。如果您能给我任何指点,我将不胜感激。
提前致以诚挚的谢意
托马斯·菲利普斯
答案1
模块就像 LyX 的“插件”。您可以在 LyX 用户指南(转到帮助 > 用户指南)第 3.1.2.3 节“模块”中阅读有关它们的更多信息。您可以在数学手册第 19.3 节“子编号”中阅读有关子方程的具体内容。
要“加载”子方程模块,请转到“文档”>“设置”>“模块”,找到并单击“子方程”,单击“添加”,然后单击“确定”。请参阅此处的屏幕截图:
加载后,您可以通过前往“插入”>“自定义插入”>“子方程”来插入子方程:
在子方程插入图中,您可以针对要输入的每个子方程转到“插入”>“数学”>“编号公式”。遗憾的是,在 LyX 2.4.0 之前的版本中,LyX 显示不会显示正确的编号。例如,如果您有两个子方程,LyX 将显示 (1) 和 (2) 作为标签,而不是 (1a) 和 (1b)。PDF 输出将具有正确的标签。在从 2.4.0 开始的 LyX 版本中,LyX 显示将是正确的。
有关子方程的更多信息,请参阅帮助 > 数学。
注意,您需要将模块添加到每个文档中。如果您希望始终加载子方程式模块,您可以转到文档设置并单击“另存为文档默认值”。
以下是 LyX 注释中给出的说明的示例文件:
#LyX 2.3 created this file. For more info see http://www.lyx.org/
\lyxformat 544
\begin_document
\begin_header
\save_transient_properties true
\origin unavailable
\textclass article
\use_default_options true
\begin_modules
subequations
\end_modules
\maintain_unincluded_children false
\language english
\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
\use_microtype false
\use_dash_ligatures true
\graphics default
\default_output_format default
\output_sync 1
\bibtex_command default
\index_command default
\paperfontsize default
\spacing single
\use_hyperref false
\papersize default
\use_geometry false
\use_package amsmath 1
\use_package amssymb 1
\use_package cancel 1
\use_package esint 1
\use_package mathdots 1
\use_package mathtools 1
\use_package mhchem 1
\use_package stackrel 1
\use_package stmaryrd 1
\use_package undertilde 1
\cite_engine basic
\cite_engine_type default
\biblio_style plain
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date false
\justification false
\use_refstyle 1
\use_minted 0
\index Index
\shortcut idx
\color #008000
\end_index
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\paragraph_indentation default
\is_math_indent 0
\math_numbering_side default
\quotes_style english
\dynamic_quotes 0
\papercolumns 1
\papersides 1
\paperpagestyle default
\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
\begin_inset Note Note
status open
\begin_layout Plain Layout
Steps:
\end_layout
\begin_layout Plain Layout
1.
Go to Document > Settings > Modules and add the
\begin_inset Quotes eld
\end_inset
Subequations
\begin_inset Quotes erd
\end_inset
module.
\end_layout
\begin_layout Plain Layout
2.
Then go to Insert > Custom Insets > Subequations.
\end_layout
\begin_layout Plain Layout
3.
Inside the subequations inset, go to Insert > Math > Numbered Formula and
write some math.
You should get the following:
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset Flex Subequations
status open
\begin_layout Plain Layout
\begin_inset Formula
\begin{equation}
E=mc^{2}
\end{equation}
\end_inset
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset Note Note
status open
\begin_layout Plain Layout
4.
Place the cursor inset the Subequations inset to the far right (e.g., put
the cursor to the right of the inset and press <Left>).
\end_layout
\begin_layout Plain Layout
5.
Press <Return>.
\end_layout
\begin_layout Plain Layout
6.
Go to Insert > Math > Numbered Formula and write some math.
You should get the following:
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset Flex Subequations
status open
\begin_layout Plain Layout
\begin_inset Formula
\begin{equation}
E=mc^{2}
\end{equation}
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Formula
\begin{equation}
1+2=3
\end{equation}
\end_inset
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset Note Note
status open
\begin_layout Plain Layout
The PDF output should be correct, but the LyX display is not correct.
If you want to show
\begin_inset Quotes eld
\end_inset
a
\begin_inset Quotes erd
\end_inset
and
\begin_inset Quotes eld
\end_inset
b
\begin_inset Quotes erd
\end_inset
in the LyX display (although the numbers may still be incorrect), do the
following:
\end_layout
\begin_layout Plain Layout
7.
Go to Tools > Preferences > Look & Feel > Display and for
\begin_inset Quotes eld
\end_inset
Instant preview
\begin_inset Quotes erd
\end_inset
set it to
\begin_inset Quotes eld
\end_inset
On
\begin_inset Quotes erd
\end_inset
.
\end_layout
\begin_layout Plain Layout
8.
Place the cursor to the left of the Subequations inset, and press <Shift>
+ <Right> to select the entire inset from the outside.
\end_layout
\begin_layout Plain Layout
9.
Go to Insert > Preview.
You should get the following:
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset Preview
\begin_layout Standard
\begin_inset Flex Subequations
status open
\begin_layout Plain Layout
\begin_inset Formula
\begin{equation}
E=mc^{2}
\end{equation}
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Formula
\begin{equation}
1+2=3
\end{equation}
\end_inset
\end_layout
\end_inset
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset Note Note
status open
\begin_layout Plain Layout
Note that the numbers are incorrect, but at least now there is an
\begin_inset Quotes eld
\end_inset
a
\begin_inset Quotes erd
\end_inset
and a
\begin_inset Quotes eld
\end_inset
b
\begin_inset Quotes erd
\end_inset
.
\end_layout
\end_inset
\end_layout
\end_body
\end_document