LaTeX 多表格水平和垂直对齐

LaTeX 多表格水平和垂直对齐

我正在尝试对齐多个表,并尝试了几种不同的方法,但不幸的是,它们都不起作用。这里我附上了一个示例代码供您参考。您能否建议我如何摆脱这种愚蠢的问题。我将非常感谢您的真诚支持。谢谢

可以使用此命令找到输出关联示例输出

示例代码:-

    \documentclass[letterpaper,10pt]{article}
    \usepackage{hyperref}
    \hypersetup{colorlinks=true, linkcolor=red,  urlcolor=blue}
    \usepackage[letterpaper,margin=0.65in]{geometry}
    \usepackage{array,booktabs,siunitx,xcolor,colortbl}
    \usepackage[utf8x]{inputenc}
    \usepackage{mdwlist}
    \usepackage{amsmath}
    \usepackage{enumitem}% http://ctan.org/pkg/enumitem
    \usepackage{calc}% http://ctan.org/pkg/calc

    \usepackage{fancyhdr}% http://ctan.org/pkg/fancyhdr
    \usepackage{lastpage}% http://ctan.org/pkg/lastpage
    \pagestyle{fancy}% Set default page style to fancy
    \renewcommand{\headrulewidth}{0pt}% Remove header rule
    \fancyhead{}% Remove all header contents
    \cfoot{Page \thepage\ of \pageref{LastPage}}% Page X of Y in the footer (centered)

    \usepackage{tabulary}
    \usepackage[newcommands]{ragged2e}

    \begin{document}


    \section{ABCdhahdak dahd }
    \hrule

    \vspace{0.2cm}
    \begin{tabulary}{1.00\textwidth}{r|| L c}
    time &  ajdhahsdash dhas dhasjh dashd ashd ashdjah dhas dha & adlaksd \\
    adasd &  adlahf ahf ahfha dfhah fhad fha & \\
     &  sfhakd hfhadf ajdhf adhf adjfha fjdh fahf ahah fjadfh ajfhlad xfhalflgdh gjadf djhgad ghad gadjhg ad &  \\ 
     &  fa fjadh dfaf hajhf ahfah fhd fajhf adhf hajfh ahfjah fahf afh ajhf ahfjajhf h &  \\ 
     &  hhf ahfjh adhfaj fjahd fhaj fah jahf ahfjah fha fha &  \\
    \end{tabulary}

    \vspace{0.4cm}
    \hspace{-0cm}

    \vspace{0.2cm}
    \begin{tabulary}{1.00\textwidth}{r|| L c}
    time &  ajdhahsdash dhas dhasjh dashd ashd ashdjah dhas dha & adlaksd \\
    adasd &  adlahf ahf ahfha dfhah fhad fha & \\
     &  sfhakd hfhadf ajdhf adhf adjfha fjdh fahf ahah fjadfh ajfhlad xfhalflgdh gjadf djhgad ghad gadjhg ad &  \\ 
     &  fa fjadh dfaf hajhf ahfah fhd fajhf adhf hajfh ahfjah fahf afh ajhf ahfjajhf h &  \\ 
     &  hhf ahfjh adhfaj fjahd fhaj fah jahf ahfjah fha fha &  \\
    \end{tabulary}

    \end{document}

答案1

用于\noindent在左边距开始表格。

我不确定您是否还想对齐表格列。在这种情况下,请在需要时使用 列p{},而不是r或列,其中宽度取决于内容: lc

 \noindent\begin{tabulary}{1.00\textwidth}{p{1.5cm}|| L c}

相关内容