SCM

Forum: support

Monitor Forum | Start New Thread Start New Thread
RE: Improve the appearance of the tables in ULTRA [ Reply ]
By: Amelia Garcia Luengo on 2023-12-27 22:33
[forum:49820]

File2.png (1) downloads
Thank you for your response.
I have done it, as you told me.

\[
\begin{array}{|l|cc|} \hline
& Variable \hspace{0.20em} X & Variable \hspace{0.20em} Y \\ \hline
Mediana & \Sexpr{f} & \Sexpr{f1} \\
Mínimo & \Sexpr{d} & \Sexpr{d1} \\
Máximo & \Sexpr{e} & \Sexpr{e1} \\
Moda & \Sexpr{h} & \Sexpr{h1} \\
Primer \hspace{0.25em} cuartil & \Sexpr{j} & \Sexpr{j1} \\
Tercer \hspace{0.25em} cuartil & \Sexpr{g} & \Sexpr{g1} \\ \hline
\end{array}
\]

When I generate it with:

exams2blackboard("Sumatoria6SinNOPC", n=3, encoding = "utf8",mchoice = list(enumerate = FALSE), converter = "pandoc", eval = list(partial = T, negative = T, rule = "false"))

it gives these warnings, but at the end it creates the table. Attached image.


[WARNING] Could not convert TeX math \begin{array}{|l|cc|} \hline
& Variable \hspace{0.20em} X & Variable \hspace{0.20em} Y \\ \hline
Mediana & 42 & 222 \\
Mínimo & 25 & 106 \\
Máximo & 68 & 318 \\
Moda & 25 & 106 \\
Primer \hspace{0.25em} cuartil & 38 & 187 \\
Tercer \hspace{0.25em} cuartil & 50 & 242 \\ \hline
\end{array}, rendering as TeX:
& Variable \hspace{0.20em} X & Variable
^
unexpected "&"
expecting "%", "\\label", "\\tag", "\\nonumber", whitespace, "\\hline", "\\\\", "\\displaystyle", "\\textstyle", "\\scriptstyle", "\\scriptscriptstyle", "{", "\\operatorname", letter, digit, ".", "!", "'", "''", "'''", "''''", "*", "+", ",", "-", ".", "/", ":", ":=", ";", "<", "=", ">", "?", "@", "~", "_", "^", "\\left", "\\" or "\\hyperref"
[WARNING] Could not convert TeX math \begin{array}{|l|cc|} \hline
& Variable \hspace{0.20em} X & Variable \hspace{0.20em} Y \\ \hline
Mediana & 44 & 238 \\
Mínimo & 21 & 130 \\
Máximo & 66 & 330 \\
Moda & 21 & 130 \\
Primer \hspace{0.25em} cuartil & 38 & 212 \\
Tercer \hspace{0.25em} cuartil & 53 & 279 \\ \hline
\end{array}, rendering as TeX:
& Variable \hspace{0.20em} X & Variable
^
unexpected "&"
expecting "%", "\\label", "\\tag", "\\nonumber", whitespace, "\\hline", "\\\\", "\\displaystyle", "\\textstyle", "\\scriptstyle", "\\scriptscriptstyle", "{", "\\operatorname", letter, digit, ".", "!", "'", "''", "'''", "''''", "*", "+", ",", "-", ".", "/", ":", ":=", ";", "<", "=", ">", "?", "@", "~", "_", "^", "\\left", "\\" or "\\hyperref"
[WARNING] Could not convert TeX math \begin{array}{|l|cc|} \hline
& Variable \hspace{0.20em} X & Variable \hspace{0.20em} Y \\ \hline
Mediana & 56 & 241 \\
Mínimo & 36 & 136 \\
Máximo & 76 & 352 \\
Moda & 36 & 136 \\
Primer \hspace{0.25em} cuartil & 51 & 204 \\
Tercer \hspace{0.25em} cuartil & 65 & 272 \\ \hline
\end{array}, rendering as TeX:
& Variable \hspace{0.20em} X & Variable
^
unexpected "&"
expecting "%", "\\label", "\\tag", "\\nonumber", whitespace, "\\hline", "\\\\", "\\displaystyle", "\\textstyle", "\\scriptstyle", "\\scriptscriptstyle", "{", "\\operatorname", letter, digit, ".", "!", "'", "''", "'''", "''''", "*", "+", ",", "-", ".", "/", ":", ":=", ";", "<", "=", ">", "?", "@", "~", "_", "^", "\\left", "\\" or "\\hyperref"
adding: imsmanifest.xml (deflated 46%)
adding: res00001.dat (deflated 95%)
adding: res00002.dat (deflated 80%)
adding: .bb-package-info (stored 0%)

Best regards,

Amelia

RE: Improve the appearance of the tables in ULTRA [ Reply ]
By: Gabriele Cantaluppi on 2023-12-27 21:00
[forum:49819]
My suggestion is to use the array environment instead of the tabular environment to create tables with Bb Ultra.
Another solution is to use knitr::kable, as it is suggested at https://rstudio-pubs-static.s3.amazonaws.com/789559_a1a19b17db6b4edd8cb1cd8f68a5aa5f.html

Best regards,

Gabriele

Improve the appearance of the tables in ULTRA [ Reply ]
By: Amelia Garcia Luengo on 2023-12-27 19:30
[forum:49818]

File.png (4) downloads
Hello.

I have the following question:
When I generate a table in this way:

\begin{center}
\begin{tabular}{|l|cc|} \hline
& Variable X & Variable Y \\ \hline
Mediana & \Sexpr{f} & \Sexpr{f1} \\
Mínimo & \Sexpr{d} & \Sexpr{d1} \\
Máximo & \Sexpr{e} & \Sexpr{e1} \\
Moda & \Sexpr{h} & \Sexpr{h1} \\
Primer cuartil & \Sexpr{j} & \Sexpr{j1} \\
Tercer cuartil & \Sexpr{g} & \Sexpr{g1} \\ \hline
\end{tabular}
\end{center}

And then I import to ULTRA the file obtained with:

exams2blackboard("Sumatoria6SinNOPC", n=3, encoding = "utf8",mchoice =
list(enumerate = FALSE), converter = "pandoc", eval = list(partial = T, negative = T, rule = "false"))


The aspect that the table looks like in ULTRA, I attach it in the attached image.

My question is if the size of the cells could be set according to the size of the data, that is, that the rows are not so long.

Thank you very much

Thanks to:
Vienna University of Economics and Business Powered By FusionForge