Debian Codegraph @

texmf-dist/doc/latex/moodle/test/test_includegraphics.tex

raw
1 % !TeX encoding = UTF-8
2 % !TeX spellcheck = en_US
3 % !TEX TS-program = lualatex
4 \documentclass{article}
5 \usepackage[nostamp]{moodle}
6 \ifPDFTeX % FOR LATEX and PDFLATEX
7 \usepackage[utf8]{inputenc} % necessary
8 \usepackage[T1]{fontenc} % necessary
9 \else % assuming XELATEX or LUALATEX
10 \usepackage{fontspec}
11 \fi
12 \usepackage{graphicx}
13
14 \begin{document}
15
16 \section*{Introduction}
17
18 This document is intended to check the support of picture inclusion using
19 \verb|\includegraphics|. Only options \texttt{width} and \texttt{height} are
20 supported. The file name or path may include spaces. The file path can be
21 specified with \verb|\graphicspath|. In general, file extensions can be
22 omitted. However, with case-sensitive file-systems (like under Linux), files
23 with extensions in upper-case cannot be omitted.
24
25 \begin{quiz}{Includegraphics}
26
27 \begin{multi}{Picture}
28 \includegraphics[width=2cm]{fig/1 1.PNG}
29 \item[feedback={\includegraphics{fig/2 2.pdf}}]* \includegraphics{fig/3.gif}
30 \item[feedback={\includegraphics{fig/4.jpg}}] \includegraphics{fig/5.jpeg}
31 \end{multi}
32
33 \graphicspath{{./fig/}}
34
35 \begin{matching}[dd]{Picture}
36 \includegraphics{1 1.PNG}
37 % on Linux, if .PNG is omitted moodle tries to manipulate "fig/1 1.png"
38 \item \includegraphics{2 2} \answer \includegraphics{3}
39 \item \includegraphics{4} \answer \includegraphics{5}
40 \item \includegraphics{3} \answer \includegraphics{2 2}
41 \end{matching}
42
43 \end{quiz}
44
45 \end{document}