aahnik / ipynb1stmd2pdf

Personal Automation Utility - Generate PDF files from the first markdown cell of colab notebooks in a Google Drive folder
6 stars 1 forks source link

Missing number treated as zero #1

Closed aahnik closed 11 months ago

aahnik commented 11 months ago
 pandoc input.md -o output.tex --template=template.tex

example long table

Here are some examples to get you started.

| n   | Factorial             | Expansion                        | Value       |
|-----|-----------------------|----------------------------------|-------------|
| 1   | 1!                    | 1                                | 1           |
| 2   | 2!                    | 2 × 1                            | 2           |
| 3   | 3!                    | 3 × 2 × 1                        | 6           |
| 4   | 4!                    | 4 × 3 × 2 × 1                    | 24          |
| 5   | 5!                    | 5 × 4 × 3 × 2 × 1                | 120         |
| 6   | 6!                    | 6 × 5 × 4 × 3 × 2 × 1            | 720         |
| 7   | 7!                    | 7 × 6 × 5 × 4 × 3 × 2 × 1        | 5,040       |
| 8   | 8!                    | 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1    | 40,320      |
| 9   | 9!                    | 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1| 362,880     |
| 10  | 10!                   | 10 × 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 | 3,628,800 |

\linewidth is probably not defined in minipage environment

\begin{longtable}[]{@{}
  >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.0667}}
  >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.3067}}
  >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.4533}}
  >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.1733}}@{}}
\toprule\noalign{}
\begin{minipage}[b]{\linewidth}\raggedright
n
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
Factorial
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
Expansion
\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright
Value
\end{minipage} \\
\midrule\noalign{}
\endhead
\bottomrule\noalign{}
\endlastfoot
1 & 1! & 1 & 1 \\
2 & 2! & 2 × 1 & 2 \\
\end{longtable}

error happening near \begin minpage

Screenshot from 2023-08-03 23-51-37

aahnik commented 11 months ago
\usepackage{calc} 

this solved the issue... relief

after a lot of hit and trial,

image

https://github.com/jgm/pandoc-templates/blob/master/default.latex