答案1
干得好 …
我使用colortbl
(loaded by xcolor
) 为表格中的行着色,并使用 TikZ 在其周围绘制框架。代码注释中还有一些解释,如果我需要更详细地解释某些内容,请告诉我。
\documentclass[fontsize=8.5pt]{scrartcl}
% set page size
\usepackage{geometry}
\geometry{
paperwidth = 3.5in,
paperheight = 2in,
margin = 0.15in,
}
% load array for the '>{stuff}' syntax in tabular
\usepackage{array}
% load xcolor to define the colors
% 'table' option loads colortbl (reccomended way)
\usepackage[table]{xcolor}
% define the colors for the rows
\definecolor{row1}{HTML}{FFFFFF}
\definecolor{row2}{HTML}{C1C1C1}
\definecolor{row3}{HTML}{F0C4C1}
\definecolor{row4}{HTML}{D6FDC2}
\definecolor{row5}{HTML}{FFFFC3}
\definecolor{row6}{HTML}{C1C2FF}
\definecolor{row7}{HTML}{F0C5FF}
\definecolor{row8}{HTML}{D6FEFF}
% make rows a bit higher
\renewcommand{\arraystretch}{1.25}
% we want to use TikZ to add the border around the page
% to get it at the right position, compile twice!
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
% content should be centered and in monotype font:
\centering\ttfamily
% 1. the border, relative to the 'current page' node
\begin{tikzpicture}[remember picture, overlay]
\draw [rounded corners = 3mm, thick] ($(current page.north west)+(0.1in,-0.1in)$)
rectangle ($(current page.south east)+(-0.1in,0.1in)$);
\end{tikzpicture}
% 2. the table containing the random codes
% - '>{\scriptsize}' manes add '\scriptsize' to every cell in this col
% - '\rowcolor{row1}' colors the row – who had guessed that ;-)
\begin{tabular}{>{\scriptsize}ll}
& Header row with same amount of characters \\
\rowcolor{row1} 1 & Some quite random charachters in this row \\
\rowcolor{row2} 2 & Some quite random+=!@\#\$\%\textasciicircum\&*()\_-\textbackslash|'"`\textasciitilde \\
\rowcolor{row3} 3 & \verb?Some quite random+=!@#$%^&*()_-\|'"`~? \\
\rowcolor{row4} 4 & Some quite random charachters in this row \\
\rowcolor{row5} 5 & Some quite random charachters in this row \\
\rowcolor{row6} 6 & Some quite random charachters in this row \\
\rowcolor{row7} 7 & Some quite random charachters in this row \\
\rowcolor{row8} 8 & Some quite random charachters in this row \\
\end{tabular}
% 3. the smaller code at the bottom
% - \vfill inserst a stretchabe space, so the code is shifted to the
% bottom of the page
\vfill
\scriptsize
Smaller code
\end{document}
要找到第一行的符号,你可以看看symbols-a4.pdf
或者如何查找符号或识别数学符号或字符?。
附言:我太懒了,没有从你的图片中输入字符串;-)