我有以下代码
\documentclass[version=3.21]{scrartcl}
\usepackage{pdfpages}
\usepackage[showframe]{geometry}
\usepackage[automark,headsepline=false,footsepline=false]{scrlayer-scrpage}
\usepackage{graphicx}
\setlength{\fboxsep}{0pt}
\setlength{\fboxrule}{4mm}
\setlength{\parindent}{0pt}
\usepackage{blindtext}
\begin{document}
\KOMAoptions{paper=432pt:506.7271049203993513765453827pt}
\recalctypearea
\thispagestyle{scrheadings}
\newgeometry{layoutwidth = 432pt,layoutheight = 506pt,left=4mm,right=4mm,top=0mm, bottom=0mm,footskip=1mm}
\fbox{\blindtext}
\end{document}
输出为:
现在我想移动到页面边缘。我尝试使用 hspace,但它仍然显示一些偏移
\documentclass[version=3.21]{scrartcl}
\usepackage{pdfpages}
\usepackage[showframe]{geometry}
\usepackage[automark,headsepline=false,footsepline=false]{scrlayer-scrpage}
\usepackage{graphicx}
\setlength{\fboxsep}{0pt}
\setlength{\fboxrule}{4mm}
\setlength{\parindent}{0pt}
\usepackage{blindtext}
\begin{document}
\KOMAoptions{paper=432pt:506.7271049203993513765453827pt}
\recalctypearea
\thispagestyle{scrheadings}
\newgeometry{layoutwidth = 432pt,layoutheight = 506pt,left=4mm,right=4mm,top=0mm, bottom=0mm,footskip=1mm}
\hspace*{-4mm}
\fbox{\blindtext}
\end{document}
输出
如何将 fbox 移动到边缘。
答案1
只需%
在行尾引入即可解决问题MWE
:
\newgeometry{layoutwidth = 432pt,layoutheight = 506pt,left=4mm,right=4mm,top=0mm, bottom=0mm,footskip=1mm}%
\hspace*{-4mm}%
\fbox{\blindtext}
%
用于删除不需要的细小空间...您可以在大多数.sty
和.cls
文件中看到这一点