Tôi muốn sử dụng một số luồng điều khiển lặp lại để đơn giản hóa mã LaTeX sau.Lặp lại trong LaTeX
\begin{sidewaystable}
\caption{A glance of images}
\centering
\begin{tabular}{| c ||c| c| c |c| c|| c |c| c|c|c| }
\hline
\backslashbox{Theme}{Class} &\multicolumn{5}{|c|}{Class 0} & \multicolumn{5}{|c|}{Class 1} \\
\hline
\hline
1 &
\includegraphics[scale=2]{../../results/1/0_1.eps}
&\includegraphics[scale=2]{../../results/1/0_2.eps}
&\includegraphics[scale=2]{../../results/1/0_3.eps}
&\includegraphics[scale=2]{../../results/1/0_4.eps}
&\includegraphics[scale=2]{../../results/1/0_5.eps}
&\includegraphics[scale=2]{../../results/1/1_1.eps}
&\includegraphics[scale=2]{../../results/1/1_2.eps}
&\includegraphics[scale=2]{../../results/1/1_3.eps}
&\includegraphics[scale=2]{../../results/1/1_4.eps}
&\includegraphics[scale=2]{../../results/1/1_5.eps} \\
\hline
... % similarly for 2, 3, ..., 22
\hline
23 &
\includegraphics[scale=2]{../../results/23/0_1.eps}
&\includegraphics[scale=2]{../../results/23/0_2.eps}
&\includegraphics[scale=2]{../../results/23/0_3.eps}
&\includegraphics[scale=2]{../../results/23/0_4.eps}
&\includegraphics[scale=2]{../../results/23/0_5.eps}
&\includegraphics[scale=2]{../../results/23/1_1.eps}
&\includegraphics[scale=2]{../../results/23/1_2.eps}
&\includegraphics[scale=2]{../../results/23/1_3.eps}
&\includegraphics[scale=2]{../../results/23/1_4.eps}
&\includegraphics[scale=2]{../../results/23/1_5.eps} \\
\hline
\end{tabular}
\end{sidewaystable}
Tôi biết rằng forloop package cung cấp vòng lặp for
. Nhưng tôi không chắc chắn làm thế nào để áp dụng nó vào trường hợp của tôi? Hoặc các phương pháp khác không phải bởi forloop?
Nếu tôi cũng muốn chỉ đơn giản là một trường hợp tương tự, nơi sự khác biệt duy nhất là thư mục không chạy từ 1, 2, đến 23, nhưng trong một số thứ tự tùy ý như 3, 2, 6, 9 , ... hoặc thậm chí là danh sách các chuỗi như dira, dirc, dird, dirb, .... Làm cách nào để tôi tạo mã LaTeX thành các vòng lặp?
xin vui lòng kiểm tra nếu câu trả lời chấp nhận vẫn là sự lựa chọn tốt nhất. Câu trả lời bình chọn cao nhất có gần gấp ba lần số phiếu bầu! Cảm ơn. – Sebastian