我有一个 lyx 文档,其中包含一个带有子浮点的浮动图形,其中引用子浮点(例如应该是 1a)显示为差一编号(例如显示为 2a),并且所有后续图形引用都以相同的方式错误(例如 3, 4 而不是 2, 3)。下面我对这个问题的最小限度重现需要使用子图并在文档中插入一些希伯来语文本,但我不确定是否有必要。
以下是仅有 tex 的复制品(由@scottkosty 创建):
%% LyX 2.3.0dev created this file. For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[12pt,hebrew,english]{article}
\usepackage[T1]{fontenc}
\usepackage[cp1255,latin9]{inputenc}
\usepackage{geometry}
\geometry{verbose,tmargin=2cm,bmargin=2cm,lmargin=2cm,rmargin=2cm,headheight=2cm,headsep=2cm,footskip=1cm}
\usepackage{setspace}
\onehalfspacing
\makeatletter
\@ifundefined{showcaptionsetup}{}{%
\PassOptionsToPackage{caption=false}{subfig}}
\usepackage{subfig}
\makeatother
\usepackage{babel}
\begin{document}
\selectlanguage{hebrew}%
\inputencoding{cp1255}%
עברית
\selectlanguage{english}%
\inputencoding{latin9}\begin{figure}
\caption{Title}
\subfloat[Sub-title]{
\label{fig:figure-label}
Figure text}
\end{figure}
See in figure \ref{fig:figure-label}.
\end{document}
以下是 Lyx 的原始版本:
#LyX 2.1 created this file. For more info see http://www.lyx.org/
\lyxformat 474
\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_math auto
\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 12
\spacing onehalf
\use_hyperref false
\papersize default
\use_geometry true
\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 true
\use_refstyle 1
\index Index
\shortcut idx
\color #008000
\end_index
\leftmargin 2cm
\topmargin 2cm
\rightmargin 2cm
\bottommargin 2cm
\headheight 2cm
\headsep 2cm
\footskip 1cm
\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
\lang hebrew
עברית
\end_layout
\begin_layout Standard
\begin_inset Float figure
wide false
sideways false
status open
\begin_layout Plain Layout
\begin_inset Caption Standard
\begin_layout Plain Layout
Title
\end_layout
\end_inset
\begin_inset Float figure
wide false
sideways false
status open
\begin_layout Plain Layout
\begin_inset Caption Standard
\begin_layout Plain Layout
Sub-title
\end_layout
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset CommandInset label
LatexCommand label
name "fig:figure-label"
\end_inset
\end_layout
\begin_layout Plain Layout
Figure text
\end_layout
\end_inset
\end_layout
\end_inset
\end_layout
\begin_layout Standard
See in figure
\begin_inset CommandInset ref
LatexCommand ref
reference "fig:figure-label"
\end_inset
.
\end_layout
\end_body
\end_document