TransWikia.com

arydshln stretches my vertical lines in tabular

TeX - LaTeX Asked by n00bish on May 9, 2021

The moment I put arydshln in the preamble, it messes up the boxes I drew around numbers. I’m trying to draw dotted lines in tables.

documentclass[10pt, b5paper]{article}
usepackage{ipaex-type1}
usepackage{inputenc}
usepackage{xeCJK}
usepackage{array}
usepackage{tabularx}
usepackage{geometry}
usepackage{colortbl}
usepackage{arydshln}
restylefloat{figure}
titlespacing{section}{0pt}{0pt}{0pt} 
graphicspath{ {./images/} }
geometry{b5paper, margin=0.5in}
setCJKmainfont{MS Mincho} % for rmfamily
setCJKsansfont{CMU Serif} % for sffamily
setlength{parindent}{0.0in}
renewcommand{arraystretch}{1.5}
begin{document}
begin{table}[h]
begin{tabular}{|l|l|l|c|l|l|l|l|l|l|l|l|l|}
hline
multirow{3}{*}{begin{tabular}[c]{@{}l@{}} X Y Zend{tabular}} &
  multicolumn{11}{c|}{1A・B・C【Handout】〈Part1〉} &
  誤答数  cline{2-13} 
 &
  multicolumn{2}{c|}{クラス} &
  multirow{2}{*}{begin{tabular}[c]{@{}c@{}}氏 名end{tabular}} &
  multicolumn{8}{l|}{multirow{2}{*}{}} &
  multirow{2}{*}{}  cline{2-3}
 &
  multicolumn{2}{l|}{} &
   &
  multicolumn{8}{l|}{} &
    hline
end{tabular}
end{table}  vspace{-5mm}
※キーワードチェックをしましょう。hspace{1cm}※答えは回答欄に記入しなさい
renewcommand{arraystretch}{1.1}
   begin{table}[h]
      begin{tabular}{|m{0.15cm}|}
        hline
     [-2.45ex]
        textbf{1} [0.13ex]
        hline
      end{tabular}
次の動詞を過去形にしましょう。ただし,答えが2語以上あるものもあります。
end{table}

My box gets a saggy chin when I use arydshln

One Answer

Sorry, but I haven't CJK fonts, so in y MWE (Minimal Working Example) replace CJK text with dummy asci text. Doing this

  • I didn't find any problem with arydshln package. It works as expected
  • For coloring cell instead colortbl (which not work as expected) is better to use [table]{xcolor}
  • table are poor populate, consequently is hard to redefine columns type (at least to I would change to p type
  • use float table for making frame around number is very strange and error prone. Instead it is far more appropriate to use fbox. Here is also not clear, what you like to achieve by this. You may find fonts which has numbers in boxes or in circles.

MWE, where i try to reproduce your table and framed number is:

documentclass[10pt, b5paper]{article}
usepackage[b5paper, margin=0.5in]{geometry}
usepackage{ipaex-type1}
%usepackage{inputenc}
%usepackage{xeCJK}
usepackage{makecell, multirow, tabularx}
    renewcommandtheadfont{bfseries}
    renewcommandtheadgape{}
usepackage[table]{xcolor}
usepackage{arydshln}
%restylefloat{figure}
%titlespacing{section}{0pt}{0pt}{0pt}
%graphicspath{ {./images/} }
%setCJKmainfont{MS Mincho} % for rmfamily
%setCJKsansfont{CMU Serif} % for sffamily

setlength{parindent}{0.0in}
renewcommand{arraystretch}{1.5}

begin{document}
    begin{table}[ht] % <---
begin{tabular}{|p{2em}|l|l|>{centering}p{2em}|l|l|l|l|l|l|l|l|l|} % <---
hline
multirow{3}{=}{X Y Z} % <---
    &   multicolumn{11}{c|}{some CJK text%1A・B・C【Handout】〈Part1〉
                        } & some CJK text   %誤答数 
     cline{2-13}
    &   multicolumn{2}{c|}{some text} %クラス
        &   multirow{2}{=}{centering % <---
                            YY    %氏
                            XX      %名
                           } 
            &   multicolumn{8}{l|}{} 
                &   multirow{2}{*}{} 
     cline{2-3}
    &   multicolumn{2}{l|}{ } 
        &   &   multicolumn{8}{l|}{ } 
                &    
      hdashline % <---
    rowcolor{gray!30} % <---
1   & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 % <--- added
    
    hline
end{tabular}
    end{table}

some CJK texthspace{1cm}some CJK text %※キーワードチェックをしましょう。hspace{1cm}※答えは回答欄に記入しなさい

medskip
fbox{thead{1}}
some some CJK text % 次の動詞を過去形にしましょう。ただし,答えが2語以上あるものもあります。

end{document}

enter image description here

Please, activate your CJK text above MWE and then tell me, if it still works. For now, I don’t see why not.

Answered by Zarko on May 9, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP