在 Lyx 中,我使用强调来指示计算算法描述中的变量。
其中一些变量的名称很长。当这些变量进入定义的页边距时,Lyx 不会尝试对这些变量进行连字符处理,从而导致文本溢出。
此外,将它们包含在句子中似乎也会导致标准文本单词被推到边缘。
您可以在此屏幕截图中看到这两个问题;前两行表示标准文本行遵循的边距的开始:
以下是相关的 lyx 代码:
\emph default
are gathered into a set
\emph on
degreeOneNbors
\begin_inset script subscript
\begin_layout Plain Layout
\emph on
a
\end_layout
\end_inset
\emph default
and the unmapped atoms of degree greater than one which are bonded to
\emph on
mapped
\begin_inset script subscript
\begin_layout Plain Layout
\emph on
a
\end_layout
\end_inset
\emph default
are gathered into a set
\emph on
unmappedDegreeGtOneNbors
\begin_inset script subscript
\begin_layout Plain Layout
b
\end_layout
\end_inset
\emph default
.
The atoms in
\emph on
degreeOneNbors
\begin_inset script subscript
\begin_layout Plain Layout
\emph on
a
\end_layout
\end_inset
\emph default
are decomposed into groups of atoms
\emph on
chemicalSimilarityGroups
\begin_inset script subscript
\begin_layout Plain Layout
\emph on
a
\end_layout
\end_inset
\emph default
which are a chemical match [
\begin_inset CommandInset ref
LatexCommand formatted
reference "Procedure:isChemicalMatch"
\end_inset
].
So too are the atoms in
\emph on
unmappedDegreeGtOneNbors
\begin_inset script subscript
\begin_layout Plain Layout
\emph on
a
\end_layout
\end_inset
\emph default
decomposed into
\emph on
chemicalSimilarityGroups
\begin_inset script subscript
\begin_layout Plain Layout
\emph on
b
\end_layout
\end_inset
\emph default
.
These chemically similar groups are then paired up where possible such
that a group
\emph on
chemicalSimilarityGroup
\begin_inset script subscript
\begin_layout Plain Layout
\emph on
a
\end_layout
\end_inset
\emph default
in
\emph on
chemicalSimilarityGroups
\begin_inset script subscript
\begin_layout Plain Layout
\emph on
a
\end_layout
\end_inset
\emph default
contains atoms which are a chemical match for a group
\emph on
chemicalSimilarityGroup
\begin_inset script subscript
\begin_layout Plain Layout
\emph on
b
\end_layout
\end_inset
我知道我可以使用\hyphenation{wo-rd, w-ord}
来手动指示此类单词允许的连字符。但是,我有很多这样的变量,所以这种逐一的方法太耗时了。
我已经寻求解决方案Lyx 连字文档,但无济于事。
我可以在序言中添加一些内容来指示 Lyx 以与标准文本单词相同的方式对这些强调的单词进行连字符处理,并防止它们破坏 Lyx 对行长度的计算,从而也防止标准文本溢出?
我想实现符合定义的页边距的所有文本的连字,而不是使用例如启用对齐文本\raggedright
。
编辑:这是一个最小的 Lyx 文件示例。pdflatex 的图像结果(编辑 -> 查看 [PDF (pdflatex)]) 紧随其后。
\lyxformat 413
\begin_document
\begin_header
\textclass article
\use_default_options true
\maintain_unincluded_children false
\language english
\language_package default
\inputencoding auto
\fontencoding global
\font_roman default
\font_sans default
\font_typewriter default
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100
\font_tt_scale 100
\graphics default
\default_output_format default
\output_sync 0
\bibtex_command default
\index_command default
\paperfontsize default
\use_hyperref false
\papersize default
\use_geometry false
\use_amsmath 1
\use_esint 1
\use_mhchem 1
\use_mathdots 1
\cite_engine basic
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date false
\use_refstyle 1
\index Index
\shortcut idx
\color #008000
\end_index
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\paragraph_indentation default
\quotes_language english
\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
Next, the procedure considers each anchor atom
\emph on
anchor
\begin_inset script subscript
\begin_layout Plain Layout
\emph on
a
\end_layout
\end_inset
\emph default
and its mapped counterpart
\emph on
mapped
\begin_inset script subscript
\begin_layout Plain Layout
\emph on
a
\end_layout
\end_inset
\emph default
.
The degree one atoms bonded to
\emph on
anchor
\begin_inset script subscript
\begin_layout Plain Layout
\emph on
a
\end_layout
\end_inset
\emph default
are gathered into a set
\emph on
degreeOneNbors
\begin_inset script subscript
\begin_layout Plain Layout
\emph on
a
\end_layout
\end_inset
\emph default
and the unmapped atoms of degree greater than one which are bonded to
\emph on
mapped
\begin_inset script subscript
\begin_layout Plain Layout
\emph on
a
\end_layout
\end_inset
\emph default
are gathered into a set
\emph on
unmappedDegreeGtOneNbors
\begin_inset script subscript
\begin_layout Plain Layout
b
\end_layout
\end_inset
\emph default
.
The atoms in
\emph on
degreeOneNbors
\begin_inset script subscript
\begin_layout Plain Layout
\emph on
a
\end_layout
\end_inset
\emph default
are decomposed into groups of atoms
\emph on
chemicalSimilarityGroups
\begin_inset script subscript
\begin_layout Plain Layout
\emph on
a
\end_layout
\end_inset
\emph default
which are a chemical match.
So too are the atoms in
\emph on
unmappedDegreeGtOneNbors
\begin_inset script subscript
\begin_layout Plain Layout
\emph on
a
\end_layout
\end_inset
\emph default
decomposed into
\emph on
chemicalSimilarityGroups
\begin_inset script subscript
\begin_layout Plain Layout
\emph on
b
\end_layout
\end_inset
\emph default
.
These chemically similar groups are then paired up where possible such
that a group
\emph on
chemicalSimilarityGroup
\begin_inset script subscript
\begin_layout Plain Layout
\emph on
a
\end_layout
\end_inset
\emph default
in
\emph on
chemicalSimilarityGroups
\begin_inset script subscript
\begin_layout Plain Layout
\emph on
a
\end_layout
\end_inset
\emph default
contains atoms which are a chemical match for a group
\emph on
chemicalSimilarityGroup
\begin_inset script subscript
\begin_layout Plain Layout
\emph on
b
\end_layout
\end_inset
\emph default
in
\emph on
chemicalSimilarityGroups
\begin_inset script subscript
\begin_layout Plain Layout
\emph on
b
\end_layout
\end_inset
\emph default
.
Each such pair is then considered in turn.
\end_layout
\end_body
\end_document
它在 Adobe Reader 中的样子如下: