请问如何抑制由于 putmarginpar 而导致的字符 ==> 和 <== 之间的意外空格?(我使用强化文本,因为我的文档中空间很小)
\documentclass[a5paper, para]{book}
\usepackage[left=1cm, right=1cm, top=0.5cm, bottom=0.3cm, includeheadfoot] {geometry}
\usepackage[french]{babel}
\usepackage[x11names]{xcolor}
\usepackage{multicol}
\usepackage{zref-savepos}
\usepackage{ifthen, pgffor}
\usepackage{setspace}
\setlength{\columnsep}{3mm}\setlength{\columnseprule}{0.1mm}
\setstretch{0.80}\fontdimen2\font=0.25em\fontdimen3\font=0.25em
\makeatletter
\def\putmarginpar#1#2{
\zsavepos{#1}
\ifnum6139194>\number\zposx{#1}%
\hbox to 0pt{\hskip\dimexpr-\zposx{#1}sp +1.0cm \relax#2}
\else
\hbox to 0pt{\hskip\dimexpr-\zposx{#1}sp +20.5cm \relax#2}
\fi
}
\makeatother
\newcommand{\bv}{This is a sample of a text.}
\newcommand{\bvn}[2]{\foreach \n in {#1,...,#2} { \bv}}
\newcommand{\txt}[2]{\foreach \n in {#1,...,#2} {
\bvn{1}{5}\textcolor{red}{==>}\putmarginpar{40:1:1}{1}\textcolor{red}{<==}\bvn{1}{5}\\
}}
\begin{document}
\begin{multicols}{2}
\txt{1}{9}
\end{multicols}
\end{document}