【问题标题】:How to place the figure in the overleaf in the middle?怎样把人物放在背页的中间?
【发布时间】:2020-12-11 04:52:46
【问题描述】:

我试图在我的报告中添加一个表格。我想把它放在页面的中间。 但它移到了右侧。我该如何解决? (我使用的是背页) 如果有人能帮我解决这个问题,我真的很感激。

This is the code:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{floatrow}
\floatsetup[table]{capposition=top}

\usepackage{natbib}
\usepackage{graphicx}
\usepackage{adjustbox}
\usepackage{tabularx} 
\usepackage{caption}


\begin{table}[p]
\centering
\small
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|}
\hline
\textbf{Sub fault} & \textbf{Lat} & \textbf{Lon} & \textbf{\begin{tabular}[c]{@{}c@{}}Depth\\  (Km)\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}Strike\\  (Deg.)\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}Dip \\  (Deg.)\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}Length\\  (Km)\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}Width\\  (Km)\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}Rake \\  (Deg.)\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}Slip (m)\\ Mw=9.0\end{tabular}} \\ \hline
\textbf{1}   & 18.9848      & -65.6921     & 22.1                                                      & 89.59                                                             & 20                                                                & 100                                                             & 50                                                             & 90                                                                 & 7.4                                                                \\ \hline
\textbf{2}         & 19.4069      & -65.6953     & 5                                                              & 89.59                                                             & 20                                                                & 100                                                             & 50                                                             & 90                                                                 & 7.4                                                                \\ \hline
\textbf{3}         & 18.9484      & -66.5742     & 22.1                                                           & 84.98                                                             & 20                                                                & 100                                                             & 50                                                             & 90                                                                 & 7.4                                                                \\ \hline
\textbf{4}         & 19.3688      & -66.6133     & 5                                                              & 84.98                                                             & 20                                                                & 100                                                             & 50                                                             & 90                                                                 & 7.4                                                                \\ \hline
\textbf{5}         & 18.8738      & -67.5412     & 22.1                                                           & 85.87                                                             & 20                                                                & 100                                                             & 50                                                             & 90                                                                 & 7.4                                                                \\ \hline
\textbf{6}         & 19.2948      & -67.5734     & 5                                                              & 85.87                                                             & 20                                                                & 100                                                             & 50                                                             & 90                                                                 & 7.4                                                                \\ \hline
\textbf{7}         & 18.7853      & -68.4547     & 22.1                                                           & 83.64                                                             & 20                                                                & 100                                                             & 50                                                             & 90                                                                 & 7.4                                                                \\ \hline
\textbf{8}         & 19.2048      & -68.5042     & 5                                                              & 83.64                                                             & 20                                                                & 100                                                             & 50                                                             & 90                                                                 & 7.4                                                                \\ \hline
\textbf{9}         & 18.8870      & -63.8800     & 22.1                                                           & 95.37                                                             & 20                                                                & 100                                                             & 50                                                             & 90                                                                 & 7.4                                                                \\ \hline
\textbf{10}        & 19.3072      & -63.8382     & 5                                                              & 95.37                                                             & 20                                                                & 100                                                             & 50                                                             & 90                                                                 & 7.4                                                                \\ \hline
\textbf{11}        & 18.9650      & -64.8153     & 22.1                                                           & 94.34                                                             & 20                                                                & 100                                                             & 50                                                             & 90                                                                 & 7.4                                                                \\ \hline
\textbf{12}        & 19.3859      & -64.7814     & 5                                                              & 94.34                                                             & 20                                                                & 100                                                             & 50                                                             & 90                                                                 & 7.4                                                                \\ \hline
\textbf{13}        & 18.0566      & -61.5491     & 17.94                                                          & 112.84                                                            & 15                                                                & 100                                                             & 50                                                             & 90                                                                 & 7.4                                                                \\ \hline
\textbf{14}        & 18.4564      & -61.3716     & 5                                                              & 112.34                                                            & 15                                                                & 100                                                             & 50                                                             & 90                                                                 & 7.4                                                                \\ \hline
\textbf{15}        & 18.4149      & -62.4217     & 17.94                                                          & 117.86                                                            & 15                                                                & 100                                                             & 50                                                             & 90                                                                 & 7.4                                                                \\ \hline
\textbf{16}        & 18.7985      & -62.2075     & 5                                                              & 117.86                                                            & 15                                                                & 100                                                             & 50                                                             & 90                                                                 & 7.4                                                                \\ \hline
\textbf{17}        & 18.7844      & -63.1649     & 17.94                                                          & 110.46                                                            & 20                                                                & 100                                                             & 50                                                             & 90                                                                 & 7.4                                                                \\ \hline
\textbf{18}        & 19.1798      & -63.0087     & 5                                                              & 110.46                                                            & 20                                                                & 100                                                             & 50                                                             & 90                                                                 & 7.4                                                                \\ \hline
\textbf{19}        & 16.4535      & -59.9029     & 17.94                                                          & 136.99                                                            & 15                                                                & 100                                                             & 50                                                             & 90                                                                 & 7.4                                                                \\ \hline
\textbf{20}        & 16.7494      & -59.5716     & 5                                                              & 136.99                                                            & 15                                                                & 100                                                             & 50                                                             & 90                                                                 & 7.4                                                                \\ \hline
\textbf{21}        & 17.0903      & -60.5996     & 17.94                                                          & 138.71                                                            & 15                                                                & 100                                                             & 50                                                             & 90                                                                 & 7.4                                                                \\ \hline
\textbf{22}        & 17.3766      & -60.2580     & 5                                                              & 138.71                                                            & 15                                                                & 100                                                             & 50                                                             & 90                                                                 & 7.4                                                                \\ \hline
\textbf{23}        & 17.8560      & -61.1559     & 17.94                                                          & 141.07                                                            & 15                                                                & 100                                                             & 50                                                             & 90                                                                 & 7.4                                                                \\ \hline
\textbf{24}        & 18.1286      & -60.8008     & 5                                                              & 141.07                                                            & 15                                                                & 100                                                             & 50                                                             & 90                                                                 & 7.4                                                                \\ \hline
\end{tabular}
\captionsetup{justification=centering}
\caption{\label{tab:table-name}source parameters for a Mw 9.0 PRT co-seismic source based on 24 sub-faults (Gica eal,2008). Corresponding surface elevation computed with Okadas (1985) method is shown in fig 3}
\end{table}


\clearpage

【问题讨论】:

    标签: latex centering right-to-left figure tabular


    【解决方案1】:

    您的问题是表格太宽而无法放入文本块中。因此,LaTeX 推动左边距并让它溢出到右边距。如果您不想更改任何内容并将其居中,则可以将整个 tabular 包裹在 \makebox[\linewidth] 中:

    \begin{table}
      \centering
      \small
      \makebox[\linewidth]{%
        \begin{tabular}{| *{10}{c|} }
          <your table here>
        \end{tabular}%
      }
      \caption{<caption>}
    \end{table}
    

    有关更多详细信息和选项,请参阅My table doesn't fit; what are my options?

    【讨论】:

      【解决方案2】:

      您可以尝试以下方法:

      \begin{center}
      \begin{tabular}{ | c | c | c | }
        \hline
        symbol & value & unit \\ \hline
        $z Na$ & 11 & - \\ \hline
        $z F$ & 9 & - \\ \hline
        $Emax Na$ & 0.545 & $[MeV]$ \\ \hline
      \end{tabular}
      \end{center}
      

      参考:How to center table in latex

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2015-09-14
        • 2020-10-29
        • 2011-06-02
        • 2017-07-16
        • 2011-08-20
        • 1970-01-01
        • 2012-01-07
        • 2021-07-14
        相关资源
        最近更新 更多