子图标题未在行首开始

子图标题未在行首开始

我遇到这样一种情况,即子图标题没有从行首开始。\captionsetup[table]{width=\textwidth}添加以尝试让标题占据整行,而不是按照建议在表格边界处换行防止 lyx 中的子表标题换行

在此处输入图片描述

%% LyX 1.6.7 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}

\makeatletter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
%% Because html converters don't know tabularnewline
\providecommand{\tabularnewline}{\\}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage{caption}
\usepackage{subfig}
\captionsetup[table]{width=\textwidth}

\@ifundefined{showcaptionsetup}{}{%
 \PassOptionsToPackage{caption=false}{subfig}}
\usepackage{subfig}
\makeatother

\usepackage{babel}

\begin{document}
%
\begin{table}
\caption{Valleys in promoters of genes correlated with overexpression by breast
cancer subtype}


\label{tab:vlyTallyUniqVlyMtchCntrlOvrExp}

\subfloat[Number of valleys in the promoter region marking overexpresses genes
in breast cancer by subtype]{\begin{raggedright}

\par\end{raggedright}

\begin{raggedright}
\label{tab:vlyTallyUniqCombinedVlyMtchCntrlOvrExp}
\par\end{raggedright}

\raggedright{}\begin{tabular}{|c|c|c|c|}
\cline{3-4} 
\multicolumn{1}{c}{} &   & \multicolumn{2}{c|}{Over-expression}\tabularnewline
\cline{3-4} 
\multicolumn{1}{c}{} &  & Basal & Luminal \tabularnewline
\hline 
Marked & Basal  & 131  & 116\tabularnewline
\cline{2-4} 
Cell line & Luminal  & 100  & 104\tabularnewline
\hline
\end{tabular}}

\subfloat[Directly overlapping valleys in promoters of genes correlated with
overexpression by breast cancer subtype]{\begin{raggedright}

\par\end{raggedright}

\begin{raggedright}
\label{tab:vlyTallyUniqOverlappingVlyMtchCntrlOvrExp}
\par\end{raggedright}

\raggedright{}\begin{tabular}{|c|c|c|c|}
\cline{3-4} 
\multicolumn{1}{c}{} &   & \multicolumn{2}{c|}{Over-expression}\tabularnewline
\cline{3-4} 
\multicolumn{1}{c}{} &  & Basal & Luminal \tabularnewline
\hline 
Marked & Basal  & 26 & 18\tabularnewline
\cline{2-4} 
Cell line & Luminal  & 20 & 10\tabularnewline
\hline
\end{tabular}}
\end{table}




\end{document}

答案1

\begin{figure}在 LyX 中,在a后面写上内容\centering,或者在浮动内容上写上内容,然后选择居中

相关内容