Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent column width with conversion of grid_table from markdown to latex #4238

Closed
vancleve opened this issue Jan 10, 2018 · 3 comments
Closed

Comments

@vancleve
Copy link

Using the following grid_table in markdown,

 --------- ------------------------------ ---------------------------------------------------------- ------------------ -------------------- 
| Session | Lecture Dates (T=Tue/R=Thur) | Lecture Topic                                            | Lecture Readings | Quiz questions due |
 --------- ------------------------------ ---------------------------------------------------------- ------------------ -------------------- 
|       1 | 1/12 R                       | Introduction: Ecology, Evolution, and Statistics         | Chapter 1        |                    |
 --------- ------------------------------ ---------------------------------------------------------- ------------------ -------------------- 
|       2 | 1/17 T                       | Population Genetics and Natural Selection                | Chapter 7        |                    |
 --------- ------------------------------ ---------------------------------------------------------- ------------------ -------------------- 
|       3 | 1/19 R                       | Adaptations to Aquatic Environments                      | Chapter 2        | #1                 |
 --------- ------------------------------ ---------------------------------------------------------- ------------------ -------------------- 

pandoc 2.1 produces (first two rows only)

\begin{longtable}[]{@{}lllll@{}}
\toprule
\endhead
\begin{minipage}[t]{0.06\columnwidth}\raggedright
Session\strut
\end{minipage} & \begin{minipage}[t]{0.19\columnwidth}\raggedright
Lecture Dates (T=Tue/R=Thur)\strut
\end{minipage} & \begin{minipage}[t]{0.36\columnwidth}\raggedright
Lecture Topic\strut
\end{minipage} & \begin{minipage}[t]{0.12\columnwidth}\raggedright
Lecture Readings\strut
\end{minipage} & \begin{minipage}[t]{0.13\columnwidth}\raggedright
Quiz questions due\strut
\end{minipage}\tabularnewline
\begin{minipage}[t]{0.19\columnwidth}\raggedright
\begin{verbatim}
  1
\end{verbatim}
\strut
\end{minipage} & \begin{minipage}[t]{0.19\columnwidth}\raggedright
1/12 R\strut
\end{minipage} & \begin{minipage}[t]{0.19\columnwidth}\raggedright
Introduction: Ecology, Evolution, and Statistics\strut
\end{minipage} & \begin{minipage}[t]{0.19\columnwidth}\raggedright
Chapter 1\strut
\end{minipage} & \begin{minipage}[t]{0.19\columnwidth}\raggedright
\strut
\end{minipage}\tabularnewline

where the column widths of the first row are scaled to the width of the markdown columns but the second row is not scaled correctly (total width of the rows appears to be different too).

@mb21
Copy link
Collaborator

mb21 commented Jan 10, 2018

What exactly would be the expected output?

@jgm
Copy link
Owner

jgm commented Jan 10, 2018

You'd expect the widths for the body columns to match the widths for the header columns. This looks like a bug indeed.

@jgm jgm closed this as completed in c5ba3b8 Jan 10, 2018
@vancleve
Copy link
Author

thanks @jgm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants