git.iko.soy/typeable/pandoc
on master help sign in
beamer output: fix single digit column percentage (#4691)

fixes #4690

commit905dee6ee3c96560d67e82f6786b8f248b5c83c8 authorMauro Bieg <mb21@users.noreply.github.com> dateThu 7 Jun 2018, 19:50 (8 years ago) parent9536eb7
4 files changed+34−7
src/Text/Pandoc/Writers/LaTeX.hs+1−1 test/command/1710.md+3−4 test/command/4016.md+2−2 test/command/4690.md+28
src/Text/Pandoc/Writers/LaTeX.hs+1−1
@@ -487,7 +487,7 @@ blockToLaTeX (Div (identifier,classes,kvs) bs)
487487 then \contents ->
488488 let fromPct xs =
489489 case reverse xs of
490− '%':ds -> '0':'.': reverse ds
490+ '%':ds -> showFl (read (reverse ds) / 100 :: Double)
491491 _ -> xs
492492 w = maybe "0.48" fromPct (lookup "width" kvs)
493493 in inCmd "begin" "column" <>
test/command/1710.md+3−4
@@ -58,7 +58,7 @@ ok
5858\protect\hypertarget{slide-one}{}
5959
6060\begin{columns}[T]
61−\begin{column}{0.40\textwidth}
61+\begin{column}{0.4\textwidth}
6262\begin{itemize}
6363\tightlist
6464\item
@@ -68,7 +68,7 @@ ok
6868\end{itemize}
6969\end{column}
7070
71−\begin{column}{0.40\textwidth}
71+\begin{column}{0.4\textwidth}
7272\begin{itemize}
7373\tightlist
7474\item
@@ -78,11 +78,10 @@ ok
7878\end{itemize}
7979\end{column}
8080
81−\begin{column}{0.10\textwidth}
81+\begin{column}{0.1\textwidth}
8282ok
8383\end{column}
8484\end{columns}
8585
8686\end{frame}
8787```
88−
test/command/4016.md+2−2
@@ -17,7 +17,7 @@ pandoc -t beamer
1717\protect\hypertarget{level-2-blocks}{}
1818
1919\begin{columns}[T]
20−\begin{column}{0.40\textwidth}
20+\begin{column}{0.4\textwidth}
2121\begin{block}{Block one}
2222
2323\begin{itemize}
@@ -29,7 +29,7 @@ pandoc -t beamer
2929\end{block}
3030\end{column}
3131
32−\begin{column}{0.60\textwidth}
32+\begin{column}{0.6\textwidth}
3333\begin{block}{Block two}
3434
3535\begin{itemize}
test/command/4690.mdnew file+28
@@ -0,0 +1,28 @@
1+```
2+% pandoc -t beamer
3+# title
4+
5+:::: {.columns}
6+::: {.column width="8%"}
7+content
8+:::
9+::: {.column width="84%"}
10+content2
11+:::
12+::::
13+^D
14+\begin{frame}{title}
15+\protect\hypertarget{title}{}
16+
17+\begin{columns}[T]
18+\begin{column}{0.08\textwidth}
19+content
20+\end{column}
21+
22+\begin{column}{0.84\textwidth}
23+content2
24+\end{column}
25+\end{columns}
26+
27+\end{frame}
28+```