当学习外语字母或语言(因此是 [x]unicode)时,将字母或单词打印出来,散布在周围环境中,并时不时地自我测验,以提高识别速度,会很有帮助。
例如图:
可从以下地址获取:
\documentclass{article}
\usepackage[letterpaper,margin=1.0in]{geometry}
\usepackage{fontspec}
\usepackage{xunicode}
\usepackage{xltxtra}
\setmainfont[Mapping=tex-text]{Lucida Sans Unicode}
\begin{document}
\Huge
\begin{tabular}{|c|c|c|c|c|}
\hline
α & β & γ & δ & ε \\
\hline
ζ & η & θ & ι & κ \\
\hline
\end{tabular}
\end{document}
上面的表格可以解决问题,但是它有两个问题:
- 很难准确地沿着线条切割,最好没有蜿蜒的线条。如何用微小的十字线代替线条来提示切割的位置?
- 即使是“巨大”,这仍然太小,因此:
- 如何才能让每一个字母或单词周围留出更充足的空白呢?
- 如何以通用的方式增加字母的大小(以适用于任何字体)?
更新:
对于文字,最好让文字居中,这tabular
很c
容易做到。我不确定 tikz 是否如此。例如:
\documentclass[12pt]{article}
\usepackage[letterpaper,margin=1.2in]{geometry}
\usepackage[no-math]{fontspec}
\setmainfont{Comic Sans MS}
\usepackage{mathtools}
\usepackage{unicode-math}
\begin{document}
\fontsize{10mm}{11mm}\selectfont % was: \Huge
\begin{tabular}{|c|c|c|c|c|}
\hline
Dolce & mia & fanciulla & il & tuo \\
\hline
signore & sara & domani & solo & mondo \\
\hline
\end{tabular}
\end{document}
生成:
我认为用虚线代替线条就好了。经过半仔细的切割后,它们将变得难以察觉。David 回答了字体大小问题(我在这里使用)。因此,这保持了居中、边距和更离散的边界。
答案1
ATiKZ matrix
可以帮助解决部分问题。
\documentclass{article}
\usepackage[letterpaper,margin=1.0in]{geometry}
\usepackage{fontspec}
\usepackage{xunicode}
\usepackage{xltxtra}
\setmainfont[Mapping=tex-text]{Lucida Sans Unicode}
\usepackage{tikz}
\usetikzlibrary{matrix,shapes.misc}
\begin{document}
\begin{tikzpicture}[mycross/.style={cross out, draw=gray,
minimum size=4pt, rotate=45, outer sep=0pt, inner sep=0pt},
myletter/.style={inner sep=5mm,
minimum width=15mm,
minimum height=20mm, anchor=center, font=\Huge}]
\matrix (A) [matrix of nodes, nodes=myletter, column sep=0pt, row sep=0pt,]{
α & β & γ & δ & ε \\
ζ & η & θ & ι & κ \\ };
\foreach \j in {1,...,2}{
\foreach \i in {1,...,5}
\node[mycross] at (A-\j-\i.north west) {};
\node[mycross] at (A-\j-5.north east) {};
}
\foreach \i in {1,...,5}
\node[mycross] at (A-2-\i.south west) {};
\node[mycross] at (A-2-5.south east) {};
\end{tikzpicture}
\end{document}
更新:scale
我不知道这是否是正确的做法,但看起来像是风格scale
内部的因素myletter
,改变了字体大小:
\documentclass{article}
\usepackage[letterpaper,margin=1.0in]{geometry}
\usepackage{fontspec}
\usepackage{xunicode}
\usepackage{xltxtra}
\setmainfont[Mapping=tex-text]{Lucida Sans Unicode}
\usepackage{tikz}
\usetikzlibrary{matrix,shapes.misc}
\begin{document}
\noindent\begin{tikzpicture}[mycross/.style={cross out, draw=gray,
minimum size=4pt, rotate=45, outer sep=0pt, inner sep=0pt},
myletter/.style={inner sep=3mm,
minimum width=15mm,
minimum height=20mm, anchor=center,
font=\Huge, scale=2.5}]
\matrix (A) [matrix of nodes, nodes=myletter, column sep=0pt, row sep=0pt,]{
α & β & γ & δ & ε \\
ζ & η & θ & ι & κ \\ };
\foreach \j in {1,...,2}{
\foreach \i in {1,...,5}
\node[mycross] at (A-\j-\i.north west) {};
\node[mycross] at (A-\j-5.north east) {};
}
\foreach \i in {1,...,5}
\node[mycross] at (A-2-\i.south west) {};
\node[mycross] at (A-2-5.south east) {};
\end{tikzpicture}
\end{document}
第二次更新:tcbraster
排列字母或单词的另一种解决方案可能是tcbraster
来自 的环境tcolorbox
。它在具有固定列的矩阵上组织框并从左到右填充。包括字体缩放的示例是:
\documentclass{article}
\usepackage[letterpaper,margin=1.0in]{geometry}
\usepackage{fontspec}
\usepackage{xunicode}
\usepackage{xltxtra}
\setmainfont[Mapping=tex-text]{Lucida Sans Unicode}
\usepackage[most]{tcolorbox}
\usetikzlibrary{shapes.misc}
\tcbset{%
nobeforeafter, empty,
overlay={%
\foreach \i in {north west, south west,
north east, south east}
\node[mycross] at (frame.\i) {};},
halign=center,
valign=center,
boxsep=8mm,
raster equal height=rows,
raster column skip=0pt,
raster row skip=0pt
}
\tikzset{
mycross/.style={cross out, draw=gray,
minimum size=4pt, rotate=45,
outer sep=0pt, inner sep=0pt}
}
\begin{document}
\thispagestyle{empty}
\begin{tcbitemize}[raster columns=3, before upper={\fontsize{40mm}{48mm}\selectfont}
]
\tcbitem α
\tcbitem β
\tcbitem γ
\tcbitem δ
\tcbitem ε
\tcbitem ζ
\tcbitem η
\tcbitem θ
\tcbitem ι
\tcbitem κ
\end{tcbitemize}
\begin{tcbitemize}[raster columns=2, before upper={\fontsize{10mm}{11mm}\selectfont}]
\tcbitem Dolce
\tcbitem mia
\tcbitem fanciulla
\tcbitem il
\tcbitem tuo
\tcbitem signore
\tcbitem sara
\tcbitem domani
\tcbitem solo
\tcbitem mondo
\end{tcbitemize}
\end{document}
答案2
Ignasi 答案的附录,它解决了您提出的所有问题:
\documentclass[border=5mm,14pt,tikz]{standalone}
\usetikzlibrary{matrix,shapes.misc}
\usepackage{fontspec}
\usepackage{xunicode}
\usepackage{xltxtra}
\setmainfont[Mapping=tex-text]{Lucida Sans Unicode}
\usepackage{graphicx}
\begin{document}
\begin{tikzpicture}[
mycross/.style = {cross out, draw=gray,
minimum size=4pt, rotate=45, outer sep=0pt, inner sep=0pt},
myletter/.style = {inner sep=1mm,
minimum width=15mm, minimum height=20mm, anchor=center},
]
\matrix (A) [matrix of nodes, nodes=myletter, column sep=0pt, row sep=0pt,]{
\scalebox{5}{α} & \scalebox{5}{β}
& \scalebox{5}{γ} & \scalebox{5}{δ} & \scalebox{5}{ε} \\
\scalebox{5}{ζ} & \scalebox{5}{η}
& \scalebox{5}{θ} & \scalebox{5}{ι} & \scalebox{5}{κ} \\ };
\foreach \j in {1,...,2}{
\foreach \i in {1,...,5}
\node[mycross] at (A-\j-\i.north west) {};
\node[mycross] at (A-\j-5.north east) {};
}
\foreach \i in {1,...,5}
\node[mycross] at (A-2-\i.south west) {};
\node[mycross] at (A-2-5.south east) {};
\end{tikzpicture}
\end{document}
如您所见,通过使用scalebox
fromgraphicx
包,您可以放大字母,对于大于 5 的比例,您需要myletter
相应地增加最小节点大小(以英寸为单位)。
升级(1):根据 David Carlisle 的评论,放大字母更有效的方法是使用\fontsize{<size>}{<line space>}\selectfont
。使用它,选择字体大小 40mm,代码和结果是:
\documentclass[border=5mm,14pt,tikz]{standalone}
\usetikzlibrary{matrix,shapes.misc}
\usepackage{fontspec}
\usepackage{xunicode}
\usepackage{xltxtra}
\setmainfont[Mapping=tex-text]{Lucida Sans Unicode}
\begin{document}
\begin{tikzpicture}[
mycross/.style = {cross out, draw=gray,
minimum size=4pt, rotate=45, outer sep=0pt, inner sep=0pt},
myletter/.style = {inner sep=1mm,
minimum width=40mm, minimum height=48mm, anchor=center,
font=\fontsize{40mm}{48mm}\selectfont},
]
\matrix (A) [matrix of nodes, nodes=myletter, column sep=0pt, row sep=0pt,]{
α & β & γ & δ & ε \\
ζ & η & θ & ι & κ \\ };
\foreach \j in {1,...,2}{
\foreach \i in {1,...,5}
\node[mycross] at (A-\j-\i.north west) {};
\node[mycross] at (A-\j-5.north east) {};
}
\foreach \i in {1,...,5}
\node[mycross] at (A-2-\i.south west) {};
\node[mycross] at (A-2-5.south east) {};
\end{tikzpicture}
\end{document}
笔记:“小十字”之间的水平距离为 40 毫米,因此它适合 A4 纸,边距只有 5 毫米。因此,如果您想要更大的字母,您应该考虑将纸张旋转为横向(或使用 A3 或更大的打印机/绘图仪)。
升级(2):根据 Calaf 的评论,这里是一个选项,用作article
文档类。
\documentclass{article}
\usepackage[letterpaper,margin=0.1in,showframe]{geometry}
\usepackage{tikz}
....