-1

Can someone compile the following code so I can use it as a photo in my document. I had a problem which I asked in a different question but it still doesn't compile for me: How to draw a vertical line in a table?

I'm looking for answer identical to the one provided by Simon Dispa in Edit 2 of his answer.

First table:

\documentclass{article}
\usepackage{geometry}
\usepackage{tabularray} 
\UseTblrLibrary{booktabs}

\begin{document} \noindent\begin{tblr}{colspec = {| Q[c,$] X[l] | Q[c,$] X[l] |}, row{1} = {mode=text}, row{2-Y} = {belowsep+=2pt} } \toprule Parameter & Sensitivity index & Parameter & Sensitivity index\ \midrule \mu & +1.000 & \epsilon & +0.473 \ \beta_1 & +0.612 & p_1 & +0.096 \ \beta_2 & +0.318 & p_2 & +0.054 \ \beta_3 & +0.070 & \xi_1 & -0.315 \ p & -1.837 & \xi_2 & -0.052 \ q & -0.636 & \nu & -2.225 \ r & -0.097 & \alpha & -0.035 \ \bottomrule \end{tblr} \end{document}

Second table:

 \documentclass{article}
    \usepackage{geometry}
    \usepackage{tabularray} 
    \UseTblrLibrary{booktabs}
\begin{document}
  \noindent\begin{tblr}{colspec = {| Q[c,$] X[l] |
                                       Q[c,$] X[l] |},
                           row{1} = {mode=text},
                         row{2-Y} = {belowsep+=2pt}
                         } 
        \toprule
    Parameter & Sensitivity index & Parameter & Sensitivity index\\
        \midrule
    \mu     & +1.000 
                & \epsilon  & +0.093  \\
    \beta_1 & +0.078 
                & p_1       & +0.463    \\
    \beta_2 & +0.800 
                & p_2       & -0.457      \\
    \beta_3 & +0.122 
                & \xi_1     & -0.088      \\
    p       & -0.026 
                & \xi_2     & -0.062      \\
    q       & -0.400 
                & \nu       & -1.888                    \\
    r       & -0.0875 
                & \alpha    & -0.061            \\
        \bottomrule
    \end{tblr}

\end{document}

Math
  • 765

1 Answers1

3

Your tables are compilable and in both the vertical rules are present. So, your problem cannot be reproduced. This may mean, that you have problem with you LaTeX installation

Anyway, try solution based on my answer on the same question to which you provide link in your question:

Edit: Considering your comment below both tables can be:

  • The first table:
\documentclass{article}
\usepackage{geometry}
\usepackage{tabularray}
\UseTblrLibrary{booktabs}

\begin{document} \noindent\begin{tblr}{vline{odd} = solid, colspec = {*{4}{Q[c,$]}}, row{1} = {mode=text}, row{2-Y} = {belowsep+=2pt} } \toprule Parameter
& Sensitivity index & Parameter & Sensitivity index\ \midrule \mu & +1.000 & \epsilon & +0.473 \ \beta_1 & +0.612 & p_1 & +0.100 \ \beta_2 & +0.318 & p_2 & +0.054 \ \beta_3 & +0.070 & \xi_1 & -0.315 \ p & -1.837 & \xi_2 & -0.052 \ q & -0.636 & \nu & -2.225 \ r & -0.097 & \alpha & -0.035 \ \bottomrule \end{tblr} \end{document}

enter image description here

  • The second table:
\documentclass{article}
\usepackage{geometry}
\usepackage{tabularray}
\UseTblrLibrary{booktabs}

\begin{document} \noindent\begin{tblr}{vline{odd} = solid, colspec = {*{4}{Q[c,$]}}, row{1} = {mode=text}, row{2-Y} = {belowsep+=2pt} } \toprule Parameter
& Sensitivity index & Parameter & Sensitivity index\ \midrule \mu & +1.000 & \epsilon & +0.093 \ \beta_1 & +0.078 & p_1 & +0.463 \ \beta_2 & +0.800 & p_2 & -0.457 \ \beta_3 & +0.122 & \xi_1 & -0.088 \ p & -0.026 & \xi_2 & -0.062 \ q & -0.400 & \nu & -1.888 \ r & -0.087 & \alpha & -0.061 \ \bottomrule \end{tblr} \end{document}

enter image description here

Both table are tested by tabularray package, version 2022A.

Edit (2):

Table contents was edited by OP, now I only compile them.

Zarko
  • 296,517
  • This is nice however, can you remove the extra white space to the right of the "sensitivity index" column? – Math May 05 '22 at 11:50
  • @Math, yes, it can be removed. Specification X replace by Q. However, in answer I consider your MWE, where you use X. See edited answer. – Zarko May 05 '22 at 12:05
  • Can you redo the question as I made a mistake in my computations.. Thank you! – Math May 05 '22 at 12:58
  • Do you like to have the first version of answer back? If yes, just replace colspec = {*{4}{Q[c,$]}}, with colspec = {*{2}{Q[l,$] X[l,$]}}, ` – Zarko May 05 '22 at 13:10
  • No, I like the second version, but as I said, its not working on my computer.. I'd like the same format as the current(2nd version) but with the updated numbers – Math May 05 '22 at 13:12
  • I think you misunderstood me; I'd like you to run my updated code with the 2nd version of your answer – Math May 05 '22 at 13:15
  • Oh my dear @Math, correct numbers you can insert yourself. This is not a big deal. – Zarko May 05 '22 at 13:30
  • I would if the code ran for me.. I am using the picture in my document since I cannot run the code. This is why I ask you to update the photo!! I'm sorry to bother you but it will help me a lot, I appreciate your help, Sir. – Math May 05 '22 at 13:44
  • @Math, you can edit my answer and I will than compile again for you. Anyway, you should upgrade your installation that you will be able to compile recent version of tabularray – Zarko May 05 '22 at 13:49
  • I have updated your answer. To my knowledge, I have all the latest packages.. – Math May 05 '22 at 14:06
  • Answer now has table images with your data. You claim, that you have recent version of LaTeX installation What is than your error? Compiling of provided MWEs in answer should be compiled smooth, without any problem. – Zarko May 05 '22 at 14:40
  • When I compile your code in a fresh TeXworks file, this is the error I get, it makes no sense to me: `! Undefined control sequence. \l_keys_key_str

    l.4612 ...ormal } { Continued ~ on ~ next ~ page }

    ? `

    – Math May 05 '22 at 14:48
  • This is not part of the both provided MWEs. This error arise from somewhere else, what is not shown in your MWEs. – Zarko May 05 '22 at 14:55
  • I have no clue since I have all the latest packages installed.. – Math May 05 '22 at 15:08