我该如何制定这种规则?我试过了,但较浅的那个没有对齐。提前致谢。
这是我尝试过的代码。
\documentclass[a4paper,12pt]{article}
\usepackage[spanish,es-noindentfirst]{babel}
\usepackage{fontspec}
\setmainfont{EquityAotf}[Path=./Fuentes/EquityAotf/,Extension =.otf,UprightFont=*-Regular,BoldFont=*-Bold,ItalicFont=*-Italic,BoldItalicFont=*-BoldItalic,SmallCapsFont=*-CapsRegular,Numbers=OldStyle,Kerning=On]
%\newfontfamily{\equitytab}{EquityAotfTab}
[Path=./Fuentes/EquityAotf/,Extension =.otf, UprightFont =*-Regular,BoldFont=*-Bold,Numbers=OldStyle,Kerning=On]
\usepackage[factor=1800]{microtype}
\makeatletter
\renewcommand\maketitle{
{\raggedright
{\makebox{\vrule width 2cm height 2mm}\hrule\vspace{1.5ex}\bfseries\huge\@title\\[1.25ex]\par}
{\large\@author}\\[1.5ex]
{\large\@date}\\[4ex]
}}
\makeatother
\usepackage[inner=17.5mm,outer=70mm,top=16.5mm,bottom=33mm,marginparwidth=43.75mm,marginparsep=8.75mm,headsep=1.5mm]{geometry}
\usepackage{leading}
\leading{16.6pt}
\title{Análisis de los documentos}
\author{Rafael Benítez Mozos}
\begin{document}
\maketitle
\normalfont
\section*{Introducción}
\end{document}
答案1
利用规则的深度。有了\rule
,这将为示例中的尺寸提供以下可能性:
\rule[-2mm]{2cm}{2mm}\rule[-.4pt]{\dimexpr\textwidth-2cm\relax}{.4pt}
MWE:(始终尝试减少您的 MWE,即删除所有不相关的包和选项)
\documentclass{article}
% preamble reduced to make for a real MWE
\makeatletter
\renewcommand\maketitle{
{\raggedright
% {\makebox{\vrule width 2cm height 2mm}\hrule\vspace{1.5ex}\bfseries\huge\@title\\[1.25ex]\par} %<== removed part
{\rule[-2mm]{2cm}{2mm}\rule[-.4pt]{\dimexpr\textwidth-2cm\relax}{.4pt}\par
\vspace{1.5ex}\bfseries\huge\@title\\[1.25ex]} %<-- new part
{\large\@author}\\[1.5ex]
{\large\@date}\\[4ex]
}}
\makeatother
\title{Análisis de los documentos}
\author{Rafael Benítez Mozos}
\begin{document}
\maketitle
\section*{Introducción}
\end{document}