aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs4
-rw-r--r--src/Text/Pandoc/Writers/LaTeX/Table.hs4
-rw-r--r--src/Text/Pandoc/Writers/LaTeX/Util.hs2
-rw-r--r--test/command/1710.md6
-rw-r--r--test/command/3450.md2
-rw-r--r--test/command/4016.md4
-rw-r--r--test/command/4690.md4
-rw-r--r--test/command/4805-beamer-columns-alignment.md8
-rw-r--r--test/command/5367.md2
-rw-r--r--test/command/6033.md4
-rw-r--r--test/command/7272.md2
-rw-r--r--test/tables.latex24
-rw-r--r--test/tables/nordics.latex8
-rw-r--r--test/tables/students.latex10
14 files changed, 42 insertions, 42 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
index 214d96827..5b664c01b 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -1068,7 +1068,7 @@ inlineToLaTeX (Image attr@(_,_,kvs) _ (source, _)) = do
Just (Percent a) ->
[d <> literal (showFl (a / 100)) <>
case dir of
- Width -> "\\textwidth"
+ Width -> "\\linewidth"
Height -> "\\textheight"
]
Just dim ->
@@ -1076,7 +1076,7 @@ inlineToLaTeX (Image attr@(_,_,kvs) _ (source, _)) = do
Nothing ->
case dir of
Width | isJust (dimension Height attr) ->
- [d <> "\\textwidth"]
+ [d <> "\\linewidth"]
Height | isJust (dimension Width attr) ->
[d <> "\\textheight"]
_ -> []
diff --git a/src/Text/Pandoc/Writers/LaTeX/Table.hs b/src/Text/Pandoc/Writers/LaTeX/Table.hs
index b69506418..db01b9579 100644
--- a/src/Text/Pandoc/Writers/LaTeX/Table.hs
+++ b/src/Text/Pandoc/Writers/LaTeX/Table.hs
@@ -149,7 +149,7 @@ colDescriptors isSimpleTable
toColDescriptor :: Int -> Alignment -> Double -> Text
toColDescriptor numcols align width =
T.pack $ printf
- ">{%s\\arraybackslash}p{(\\columnwidth - %d\\tabcolsep) * \\real{%0.4f}}"
+ ">{%s\\arraybackslash}p{(\\linewidth - %d\\tabcolsep) * \\real{%0.4f}}"
(T.unpack (alignCommand align))
((numcols - 1) * 2)
width
@@ -391,7 +391,7 @@ multicolumnDescriptor isSimpleTable
(T.unpack (colAlign align))
(if colnum + colspan >= numcols then skipColSep else "")
- else printf "%s>{%s\\arraybackslash}p{(\\columnwidth - %d\\tabcolsep) * \\real{%0.4f} + %d\\tabcolsep}%s"
+ else printf "%s>{%s\\arraybackslash}p{(\\linewidth - %d\\tabcolsep) * \\real{%0.4f} + %d\\tabcolsep}%s"
(if colnum == 0 then skipColSep else "")
(T.unpack (alignCommand align))
(2 * (numcols - 1))
diff --git a/src/Text/Pandoc/Writers/LaTeX/Util.hs b/src/Text/Pandoc/Writers/LaTeX/Util.hs
index fb17a871e..5cccb82f2 100644
--- a/src/Text/Pandoc/Writers/LaTeX/Util.hs
+++ b/src/Text/Pandoc/Writers/LaTeX/Util.hs
@@ -235,7 +235,7 @@ wrapDiv (_,classes,kvs) t = do
w = maybe "0.48" fromPct (lookup "width" kvs)
in inCmd "begin" "column" <>
valign <>
- braces (literal w <> "\\textwidth")
+ braces (literal w <> "\\linewidth")
$$ contents
$$ inCmd "end" "column"
else id
diff --git a/test/command/1710.md b/test/command/1710.md
index d14e35e14..624b1d70b 100644
--- a/test/command/1710.md
+++ b/test/command/1710.md
@@ -57,7 +57,7 @@ ok
\begin{frame}{Slide one}
\phantomsection\label{slide-one}
\begin{columns}[T]
-\begin{column}{0.4\textwidth}
+\begin{column}{0.4\linewidth}
\begin{itemize}
\tightlist
\item
@@ -67,7 +67,7 @@ ok
\end{itemize}
\end{column}
-\begin{column}{0.4\textwidth}
+\begin{column}{0.4\linewidth}
\begin{itemize}
\tightlist
\item
@@ -77,7 +77,7 @@ ok
\end{itemize}
\end{column}
-\begin{column}{0.1\textwidth}
+\begin{column}{0.1\linewidth}
ok
\end{column}
\end{columns}
diff --git a/test/command/3450.md b/test/command/3450.md
index 5ccfd05ff..d12b0d9c1 100644
--- a/test/command/3450.md
+++ b/test/command/3450.md
@@ -8,5 +8,5 @@
% pandoc -fmarkdown-implicit_figures -t latex
![image](lalune.jpg){height=2em}
^D
-\includegraphics[width=\textwidth,height=2em]{lalune.jpg}
+\includegraphics[width=\linewidth,height=2em]{lalune.jpg}
```
diff --git a/test/command/4016.md b/test/command/4016.md
index 54cbc78c3..2d17e8cfe 100644
--- a/test/command/4016.md
+++ b/test/command/4016.md
@@ -16,7 +16,7 @@
\begin{frame}{Level 2 blocks}
\phantomsection\label{level-2-blocks}
\begin{columns}[T]
-\begin{column}{0.4\textwidth}
+\begin{column}{0.4\linewidth}
\begin{block}{Block one}
\phantomsection\label{block-one}
\begin{itemize}
@@ -27,7 +27,7 @@
\end{block}
\end{column}
-\begin{column}{0.6\textwidth}
+\begin{column}{0.6\linewidth}
\begin{block}{Block two}
\phantomsection\label{block-two}
\begin{itemize}
diff --git a/test/command/4690.md b/test/command/4690.md
index 454f31171..e755f70e2 100644
--- a/test/command/4690.md
+++ b/test/command/4690.md
@@ -14,11 +14,11 @@ content2
\begin{frame}{title}
\phantomsection\label{title}
\begin{columns}[T]
-\begin{column}{0.08\textwidth}
+\begin{column}{0.08\linewidth}
content
\end{column}
-\begin{column}{0.84\textwidth}
+\begin{column}{0.84\linewidth}
content2
\end{column}
\end{columns}
diff --git a/test/command/4805-beamer-columns-alignment.md b/test/command/4805-beamer-columns-alignment.md
index d890730a8..73a322111 100644
--- a/test/command/4805-beamer-columns-alignment.md
+++ b/test/command/4805-beamer-columns-alignment.md
@@ -19,18 +19,18 @@
^D
\begin{frame}
\begin{columns}[T]
-\begin{column}[c]{0.48\textwidth}
+\begin{column}[c]{0.48\linewidth}
\end{column}
-\begin{column}[b]{0.48\textwidth}
+\begin{column}[b]{0.48\linewidth}
\end{column}
\end{columns}
\begin{columns}[b,onlytextwidth]
-\begin{column}[T]{0.48\textwidth}
+\begin{column}[T]{0.48\linewidth}
\end{column}
-\begin{column}[t]{0.48\textwidth}
+\begin{column}[t]{0.48\linewidth}
\end{column}
\end{columns}
diff --git a/test/command/5367.md b/test/command/5367.md
index 205ccf098..55c849a44 100644
--- a/test/command/5367.md
+++ b/test/command/5367.md
@@ -21,7 +21,7 @@ dolly[^5]
hello\footnote{doc footnote}
\begin{longtable}[]{@{}
- >{\centering\arraybackslash}p{(\columnwidth - 0\tabcolsep) * \real{0.1667}}@{}}
+ >{\centering\arraybackslash}p{(\linewidth - 0\tabcolsep) * \real{0.1667}}@{}}
\caption[Sample table.]{Sample table.\footnote{caption footnote}}\tabularnewline
\toprule\noalign{}
\begin{minipage}[b]{\linewidth}\centering
diff --git a/test/command/6033.md b/test/command/6033.md
index cc1b212bf..3748a222a 100644
--- a/test/command/6033.md
+++ b/test/command/6033.md
@@ -38,7 +38,7 @@
\begin{frame}{One-A}
\begin{columns}[T]
-\begin{column}{0.48\textwidth}
+\begin{column}{0.48\linewidth}
\begin{itemize}
\tightlist
\item
@@ -46,7 +46,7 @@
\end{itemize}
\end{column}
-\begin{column}{0.48\textwidth}
+\begin{column}{0.48\linewidth}
\begin{itemize}
\tightlist
\item
diff --git a/test/command/7272.md b/test/command/7272.md
index ea11b6f9d..9a97abf57 100644
--- a/test/command/7272.md
+++ b/test/command/7272.md
@@ -15,7 +15,7 @@
</table>
^D
\begin{longtable}[]{@{}
- >{\raggedright\arraybackslash}p{(\columnwidth - 0\tabcolsep) * \real{1.0000}}@{}}
+ >{\raggedright\arraybackslash}p{(\linewidth - 0\tabcolsep) * \real{1.0000}}@{}}
\toprule\noalign{}
\endhead
\bottomrule\noalign{}
diff --git a/test/tables.latex b/test/tables.latex
index eed12de44..6bb80df81 100644
--- a/test/tables.latex
+++ b/test/tables.latex
@@ -53,10 +53,10 @@ Right & Left & Center & Default \\
Multiline table with caption:
\begin{longtable}[]{@{}
- >{\centering\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.1500}}
- >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.1375}}
- >{\raggedleft\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.1625}}
- >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.3500}}@{}}
+ >{\centering\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.1500}}
+ >{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.1375}}
+ >{\raggedleft\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.1625}}
+ >{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.3500}}@{}}
\caption{Here's the caption. It may span multiple lines.}\tabularnewline
\toprule\noalign{}
\begin{minipage}[b]{\linewidth}\centering
@@ -91,10 +91,10 @@ Second & row & 5.0 & Here's another one. Note the blank line between rows. \\
Multiline table without caption:
\begin{longtable}[]{@{}
- >{\centering\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.1500}}
- >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.1375}}
- >{\raggedleft\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.1625}}
- >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.3500}}@{}}
+ >{\centering\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.1500}}
+ >{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.1375}}
+ >{\raggedleft\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.1625}}
+ >{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.3500}}@{}}
\toprule\noalign{}
\begin{minipage}[b]{\linewidth}\centering
Centered Header
@@ -128,10 +128,10 @@ Table without column headers:
Multiline table without column headers:
\begin{longtable}[]{@{}
- >{\centering\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.1500}}
- >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.1375}}
- >{\raggedleft\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.1625}}
- >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.3500}}@{}}
+ >{\centering\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.1500}}
+ >{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.1375}}
+ >{\raggedleft\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.1625}}
+ >{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.3500}}@{}}
\toprule\noalign{}
\endhead
\bottomrule\noalign{}
diff --git a/test/tables/nordics.latex b/test/tables/nordics.latex
index 399983994..cb60220d2 100644
--- a/test/tables/nordics.latex
+++ b/test/tables/nordics.latex
@@ -1,8 +1,8 @@
\begin{longtable}[]{@{}
- >{\centering\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.3000}}
- >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.3000}}
- >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.2000}}
- >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.2000}}@{}}
+ >{\centering\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.3000}}
+ >{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.3000}}
+ >{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.2000}}
+ >{\raggedright\arraybackslash}p{(\linewidth - 6\tabcolsep) * \real{0.2000}}@{}}
\caption[Nordic countries]{States belonging to the
\emph{Nordics.}}\label{nordics}\tabularnewline
\toprule\noalign{}
diff --git a/test/tables/students.latex b/test/tables/students.latex
index 802b00c60..c71a398f9 100644
--- a/test/tables/students.latex
+++ b/test/tables/students.latex
@@ -1,6 +1,6 @@
\begin{longtable}[]{@{}
- >{\raggedright\arraybackslash}p{(\columnwidth - 2\tabcolsep) * \real{0.5000}}
- >{\raggedright\arraybackslash}p{(\columnwidth - 2\tabcolsep) * \real{0.5000}}@{}}
+ >{\raggedright\arraybackslash}p{(\linewidth - 2\tabcolsep) * \real{0.5000}}
+ >{\raggedright\arraybackslash}p{(\linewidth - 2\tabcolsep) * \real{0.5000}}@{}}
\caption{List of Students}\label{students}\tabularnewline
\toprule\noalign{}
\begin{minipage}[b]{\linewidth}\centering
@@ -20,15 +20,15 @@ Name
\endhead
\bottomrule\noalign{}
\endlastfoot
-\multicolumn{2}{@{}>{\raggedright\arraybackslash}p{(\columnwidth - 2\tabcolsep) * \real{1.0000} + 2\tabcolsep}@{}}{%
+\multicolumn{2}{@{}>{\raggedright\arraybackslash}p{(\linewidth - 2\tabcolsep) * \real{1.0000} + 2\tabcolsep}@{}}{%
Computer Science} \\
3741255 & Jones, Martha \\
4077830 & Pierce, Benjamin \\
5151701 & Kirk, James \\
-\multicolumn{2}{@{}>{\raggedright\arraybackslash}p{(\columnwidth - 2\tabcolsep) * \real{1.0000} + 2\tabcolsep}@{}}{%
+\multicolumn{2}{@{}>{\raggedright\arraybackslash}p{(\linewidth - 2\tabcolsep) * \real{1.0000} + 2\tabcolsep}@{}}{%
Russian Literature} \\
3971244 & Nim, Victor \\
-\multicolumn{2}{@{}>{\raggedright\arraybackslash}p{(\columnwidth - 2\tabcolsep) * \real{1.0000} + 2\tabcolsep}@{}}{%
+\multicolumn{2}{@{}>{\raggedright\arraybackslash}p{(\linewidth - 2\tabcolsep) * \real{1.0000} + 2\tabcolsep}@{}}{%
Astrophysics} \\
4100332 & Petrov, Alexandra \\
4100332 & Toyota, Hiroko \\