diff options
| author | John MacFarlane <[email protected]> | 2025-05-26 20:29:20 -0700 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2025-05-26 20:29:20 -0700 |
| commit | 28e01fac74c88a777dc69c693f1296e46e1d738c (patch) | |
| tree | 8831fed5fc6bae1835550f1ed6c2fa0ec0c99e54 /test | |
| parent | 5c4ca5b75b44256eaaddcb1b8c72f84386a7603c (diff) | |
LaTeX writer: include alt option in `\includegraphics`.
Closes #6095.
Diffstat (limited to 'test')
| -rw-r--r-- | test/Tests/Writers/LaTeX.hs | 2 | ||||
| -rw-r--r-- | test/command/3450.md | 2 | ||||
| -rw-r--r-- | test/command/5116.md | 6 | ||||
| -rw-r--r-- | test/command/5476.md | 2 | ||||
| -rw-r--r-- | test/command/7181.md | 2 | ||||
| -rw-r--r-- | test/command/9045.md | 2 | ||||
| -rw-r--r-- | test/writer.latex | 6 |
7 files changed, 11 insertions, 11 deletions
diff --git a/test/Tests/Writers/LaTeX.hs b/test/Tests/Writers/LaTeX.hs index c4a456dce..f9062e32e 100644 --- a/test/Tests/Writers/LaTeX.hs +++ b/test/Tests/Writers/LaTeX.hs @@ -70,7 +70,7 @@ tests = [ testGroup "code blocks" "\\begin{description}\n\\item[foo] ~ \n\\subsection{bar}\n\nbaz\n\\end{description}" , "containing image" =: header 1 (image "imgs/foo.jpg" "" (text "Alt text")) =?> - "\\section{\\texorpdfstring{\\protect\\pandocbounded{\\includegraphics[keepaspectratio]{imgs/foo.jpg}}}{Alt text}}" + "\\section{\\texorpdfstring{\\protect\\pandocbounded{\\includegraphics[keepaspectratio,alt={Alt text}]{imgs/foo.jpg}}}{Alt text}}" ] , testGroup "inline code" [ "struck out and highlighted" =: diff --git a/test/command/3450.md b/test/command/3450.md index e83ce21f7..1feb91548 100644 --- a/test/command/3450.md +++ b/test/command/3450.md @@ -8,5 +8,5 @@ % pandoc -fmarkdown-implicit_figures -t latex {height=2em} ^D -\includegraphics[width=\linewidth,height=2em,keepaspectratio]{lalune.jpg} +\includegraphics[width=\linewidth,height=2em,keepaspectratio,alt={image}]{lalune.jpg} ``` diff --git a/test/command/5116.md b/test/command/5116.md index ac4928659..5a57f0716 100644 --- a/test/command/5116.md +++ b/test/command/5116.md @@ -12,7 +12,7 @@ ^D \begin{figure} \centering -\pandocbounded{\includegraphics[keepaspectratio]{img.jpg}} +\pandocbounded{\includegraphics[keepaspectratio,alt={This is a figure.}]{img.jpg}} \caption{This is a figure.} \end{figure} @@ -50,7 +50,7 @@ Right & Left & Center & Default \\ \begin{figure} \centering \caption{This is a figure.} -\pandocbounded{\includegraphics[keepaspectratio]{img.jpg}} +\pandocbounded{\includegraphics[keepaspectratio,alt={This is a figure.}]{img.jpg}} \end{figure} \begin{longtable}[]{@{}rlcl@{}} @@ -86,7 +86,7 @@ Right & Left & Center & Default \\ ^D \begin{figure} \centering -\pandocbounded{\includegraphics[keepaspectratio]{img.jpg}} +\pandocbounded{\includegraphics[keepaspectratio,alt={This is a figure.}]{img.jpg}} \caption{This is a figure.} \end{figure} diff --git a/test/command/5476.md b/test/command/5476.md index bc8b88549..b7a258c8e 100644 --- a/test/command/5476.md +++ b/test/command/5476.md @@ -4,7 +4,7 @@ ^D \begin{figure} \centering -\pandocbounded{\includegraphics[keepaspectratio]{test/lalune.jpg}} +\pandocbounded{\includegraphics[keepaspectratio,alt={moon}]{test/lalune.jpg}} \caption[moon]{moon\footnotemark{}} \end{figure} \footnotetext{the moon} diff --git a/test/command/7181.md b/test/command/7181.md index e449e057e..6915e9991 100644 --- a/test/command/7181.md +++ b/test/command/7181.md @@ -4,7 +4,7 @@ ^D \begin{figure} \centering -\pandocbounded{\includegraphics[keepaspectratio,page=13,trim=1cm,clip,width=4cm]{slides.pdf}} +\pandocbounded{\includegraphics[keepaspectratio,page=13,trim=1cm,clip,width=4cm,alt={Global frog population.}]{slides.pdf}} \caption{Global frog population.} \end{figure} diff --git a/test/command/9045.md b/test/command/9045.md index 387ba75b5..d028d4a29 100644 --- a/test/command/9045.md +++ b/test/command/9045.md @@ -4,7 +4,7 @@ ^D \begin{figure} \centering -\pandocbounded{\includegraphics[keepaspectratio]{there.jpg}} +\pandocbounded{\includegraphics[keepaspectratio,alt={hi}]{there.jpg}} \caption{hi}\label{foo} \end{figure} ``` diff --git a/test/writer.latex b/test/writer.latex index 6e6811cf0..4a268e32e 100644 --- a/test/writer.latex +++ b/test/writer.latex @@ -923,12 +923,12 @@ From ``Voyage dans la Lune'' by Georges Melies (1902): \begin{figure} \centering -\pandocbounded{\includegraphics[keepaspectratio]{lalune.jpg}} +\pandocbounded{\includegraphics[keepaspectratio,alt={lalune}]{lalune.jpg}} \caption{lalune} \end{figure} -Here is a movie \pandocbounded{\includegraphics[keepaspectratio]{movie.jpg}} -icon. +Here is a movie +\pandocbounded{\includegraphics[keepaspectratio,alt={movie}]{movie.jpg}} icon. \begin{center}\rule{0.5\linewidth}{0.5pt}\end{center} |
