答案1
结合我在评论中提到的问题的结果……即 doncherry 使用的fts
“Teen Spirit”字体(http://www.tug.dk/FontCatalogue/teenspirit/) 参考自我怎样才能使我的文档看起来像是由崇拜克苏鲁的疯子写的?。我也用我的答案有哪些方法可以将内容绝对定位在页面上?(适用于新挂钩系统)
下面我来介绍一下
\handnote[<angle>]{<x from left>}{<y from top>}{<width>}{<color>}{<content>}
编辑后引入以下支持重点标记:
\handline[<thickness-scale>]{<width>}
\handrightarrow[<thickness-scale>]{<width>}
\handleftarrow[<thickness-scale>]{<width>}
\handhookrightarrow[<thickness-scale>]{<width>}
\handhookleftarrow[<thickness-scale>]{<width>}
\handstealthrightarrow[<thickness-scale>]{<width>}
\handstealthleftarrow[<thickness-scale>]{<width>}
\handuparrow[<thickness-scale>]{<height>}
\handdownarrow[<thickness-scale>]{<height>}
\handnote
这些强调标记在的上下文中显示为宏<content>
。因此,当它们构成给定 的完整内容时,可以使用的参数\handnote
自由旋转它们。使用不同的s 和s 可以避免重复强调标记。<angle>
\handnote
<thickness-scale>
<width>
还进行了编辑,使得<content>
的\handnote
现在与由 指定的垂直坐标顶部对齐<y from top>
。
这是 MWE。重点标记总结在第 2 页(已编辑以说明 2018.12.1 上的 LaTeX 内核更改):
\documentclass{book}
\usepackage{lipsum,stackengine,scalerel,xcolor,emerald,rotating}
\usepackage[T1]{fontenc}
\def\PageTopMargin{1in}
\def\PageLeftMargin{1in}
\newcommand\atxy[3]{%
\AddToHookNext{shipout/background}{\put(#1,-\dimexpr#2 ){#3}}}
\newcommand\handnote[6][0]{\atxy{#2}{#3}{\rotatebox{#1}{\parbox[t]{#4}{%
\raggedright\fontfamily{fts}\selectfont\color{#5}#6}}}}
\newcommand\handxform[7]{% SCALING IS EMPLOYED TO EXPAND THE USEFUL RANGE OF #7
\raisebox{#1}{%
\scalebox{4}[#6]{% THE 4X SCALING IS LATER COUNTERED BY 0.25
\raisebox{#2}{%
\rotatebox{#3}{%
\stretchto{%
\rotatebox{#4}{%
\char#5}%
}{0.25\dimexpr#7\relax}% THE 0.25 IS COUNTERED BY THE EARLIER 4X SCALING
}%
}%
}%
}%
}
\newcommand\handline [2][1]{\handxform{.20ex}{0.30ex}{-90}{ 12}{47}{#1}{#2}}
\newcommand\handrightarrow [2][1]{\handxform{.55ex}{0.45ex}{-90}{ 90}{62}{#1}{#2}}
\newcommand\handleftarrow [2][1]{\handxform{.55ex}{-0.5ex}{ 90}{ 90}{62}{#1}{#2}}
\newcommand\handhookrightarrow [2][1]{\handxform{.70ex}{0.60ex}{-90}{-30}{35}{#1}{#2}}
\newcommand\handhookleftarrow [2][1]{\handxform{.50ex}{0.60ex}{-90}{ 30}{36}{#1}{#2}}
\newcommand\handstealthrightarrow[2][1]{\handxform{.50ex}{-0.2ex}{ 90}{ 80}{60}{#1}{#2}}
\newcommand\handstealthleftarrow [2][1]{\handxform{.50ex}{0.40ex}{-90}{ 80}{60}{#1}{#2}}
\newcommand\handyform[7]{\raisebox{#1}{\scalebox{#6}[1]{%
\rotatebox{#3}{\stretchto{\rotatebox{#4}{\raisebox{#2}{\char#5}}}{#7}}}}}
\newcommand\handuparrow [2][1]{\handyform{.10ex}{-.08ex}{ 0}{ -0}{91}{#1}{#2}}
\newcommand\handdownarrow [2][1]{\handyform{.05ex}{-.00ex}{ 0}{ -0}{93}{#1}{#2}}
\begin{document}
\pagecolor{yellow!10!orange!10}
\handnote[1]{6.3in}{1.5in}{2in}{red}{\lipsum[4]}
\handnote[4]{0.3in}{4.85in}{1.3in}{blue}{I have a really short comment}
\handnote[4]{1.3in}{4.88in}{1.3in}{blue}{\handrightarrow[1.7]{4ex}}
\handnote[0]{3.8in}{4.82in}{3in}{blue}{%
\handline[2]{7ex} \handline[2.5]{6ex} \handline[2]{5ex}}%
\handnote[10]{6.2in}{4.8in}{3in}{blue}{\handleftarrow[2]{10ex}}%
\handnote[-75]{5.95in}{9.2in}{1.3in}{red}{\handhookleftarrow[2.1]{6ex}}
\handnote[20]{6.3in}{9.55in}{1.3in}{red}{What is the meaning of life?
I really want to know. Does the teacher even read this?}
\lipsum[1-6]
\lipsum[5-6]
\handnote[89]{.5in}{7in}{7in}{red}{Here is a test of a long vertical note!
I am thinking it is working just great!}
\handnote[10]{6.5in}{5.8in}{2in}{blue}{\Huge The end!!!!}
\handnote[2]{2.38in}{4.43in}{3in}{blue}{\handline[2]{12ex}}
%
\handnote[0]{2in}{6.0in}{4.9in}{red}{\LARGE{\Huge ACCENTS:}\\%
handlines: \handline{6ex}\handline[3]{12ex}
handrightarrows: \handrightarrow{4ex}\handrightarrow[2]{5ex}
handleftarrows: \handleftarrow{4ex}\handleftarrow[2]{5ex}
handhookrightarrows: \handhookrightarrow[1]{4ex}\handhookrightarrow[2.1]{7ex}
handhookleftarrows:\handhookleftarrow[1]{5ex}\handhookleftarrow[2.1]{9ex}
handstealthleftarrows: \handstealthleftarrow{5ex}\handstealthleftarrow[2]{5ex}
handstealthrightarrows: \handstealthrightarrow{5ex}\handstealthrightarrow[2]{5ex}
handuparrows \handuparrow{2ex}\handuparrow[1.2]{4ex}
handdownarrows \handdownarrow{2ex}\handdownarrow[1.2]{4ex}}
\end{document}
仅供参考:Teen Spirit 字体表可在以下网址获取http://www.tug.dk/FontCatalogue/teenspirit/teenspirit.pdf,第 2 页
编辑注释:修改了宏,引入了缩放/反缩放,从而扩展了强制参数(长度)可以成功应用的\handxform
尺寸范围。现在可以使用宏来制作长度与长度一样长的线,而不会发生算术溢出。\handline
\handline
\LARGE 47ex