我正在为自己开发的一个应用程序编写用户手册,我使用的是书籍文档类以及geometry
包footmisc
。我需要增加脚注的边距,这样它们就不会占据整个文本宽度。MWE(可能不是那么小......)如下:
% !TeX encoding = UTF-8
\documentclass[letterpaper,12pt,oneside]{book}
\usepackage[utf8]{inputenc}
\usepackage[spanish]{babel}
\usepackage[spanish]{layout}
\usepackage{graphics,graphicx}
\usepackage[bottom=2.5cm,top=3cm,left=1.8cm,right=1.8cm,footnotesep=0.5cm]{geometry} % ,showframe
\usepackage[flushmargin]{footmisc}
\makeatletter
\def\@makechapterhead#1{%
\vspace*{50\p@}%
{\parindent \z@ \raggedright \normalfont
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
%\huge\bfseries \@chapapp\space \thechapter
\Huge\bfseries \thechapter.\space%
%\par\nobreak
%\vskip 20\p@
\fi
\fi
\interlinepenalty\@M
\Huge \bfseries #1\par\nobreak
\vskip 40\p@
}
}
\def\@makeschapterhead#1{%
\vspace*{50\p@}%
{\parindent \z@ \raggedright \normalfont
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
%\huge\bfseries \@chapapp\space \thechapter
\Huge\bfseries \thechapter.\space%
%\par\nobreak
%\vskip 20\p@
\fi
\fi
\interlinepenalty\@M
\Huge \bfseries #1\par\nobreak
\vskip 40\p@
}
}
\makeatother
\addtolength{\footnotesep}{2.5mm}
\renewcommand{\thefootnote}{\textbf{\arabic{footnote}}}
\begin{document}
\begin{titlepage}
\centering
%\includegraphics[width=6cm]{pics/logo.png}
\par\vspace{1cm}
{\scshape\LARGE Company's shortname\par}
\par\vspace{1cm}
{\scshape\LARGE Manual de Usuario \par}
\par\vspace{1cm}
{\scshape\Large Company's name \par}
\vfill
{\scshape My name ;) \par}
\today \par
\end{titlepage}
\frontmatter
\tableofcontents
%\include{./TeX_files/intro}
\mainmatter
%\include{./TeX_files/primeros_pasos}
%\include{./TeX_files/cap_actas}
%\include{./TeX_files/cap_fotos}
\chapter{This is a chapter}
Some filler text here... \footnote{This is the footnote.}
\backmatter
% bibliography, glossary and index would go here.
\end{document}
我的边距两边都是 1.8 厘米,我需要脚注的边距为 3 厘米。
提前致谢! ;)
答案1
您可以在\@makefntext
% !TeX encoding = UTF-8
\documentclass[letterpaper,12pt,oneside]{book}
\usepackage[utf8]{inputenc}
\usepackage[spanish]{babel}
\usepackage[spanish]{layout}
\usepackage{graphics,graphicx}
\usepackage[bottom=2.5cm,top=3cm,left=1.8cm,right=1.8cm,footnotesep=0.5cm]{geometry} % ,showframe
\usepackage[flushmargin]{footmisc}
\makeatletter
\renewcommand\@makefntext[1]{%
\advance\leftskip 1.2cm
\advance\rightskip 1.2cm
\parindent 1em%
\noindent
\hb@[email protected]{\hss\@makefnmark}#1}
\def\@makechapterhead#1{%
\vspace*{50\p@}%
{\parindent \z@ \raggedright \normalfont
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
%\huge\bfseries \@chapapp\space \thechapter
\Huge\bfseries \thechapter.\space%
%\par\nobreak
%\vskip 20\p@
\fi
\fi
\interlinepenalty\@M
\Huge \bfseries #1\par\nobreak
\vskip 40\p@
}
}
\def\@makeschapterhead#1{%
\vspace*{50\p@}%
{\parindent \z@ \raggedright \normalfont
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
%\huge\bfseries \@chapapp\space \thechapter
\Huge\bfseries \thechapter.\space%
%\par\nobreak
%\vskip 20\p@
\fi
\fi
\interlinepenalty\@M
\Huge \bfseries #1\par\nobreak
\vskip 40\p@
}
}
\makeatother
\addtolength{\footnotesep}{2.5mm}
\renewcommand{\thefootnote}{\textbf{\arabic{footnote}}}
\begin{document}
\begin{titlepage}
\centering
%\includegraphics[width=6cm]{pics/logo.png}
\par\vspace{1cm}
{\scshape\LARGE Company's shortname\par}
\par\vspace{1cm}
{\scshape\LARGE Manual de Usuario \par}
\par\vspace{1cm}
{\scshape\Large Company's name \par}
\vfill
{\scshape My name ;) \par}
\today \par
\end{titlepage}
\frontmatter
\tableofcontents
%\include{./TeX_files/intro}
\mainmatter
%\include{./TeX_files/primeros_pasos}
%\include{./TeX_files/cap_actas}
%\include{./TeX_files/cap_fotos}
\chapter{This is a chapter}
Some filler text here... \footnote{This is the footnote.}
\backmatter
% bibliography, glossary and index would go here.
\end{document}
上述重新定义适用于标准乳胶脚注,因为footmisc
您可以改为
\renewcommand\footnotelayout{%
\advance\leftskip 1.2cm
\advance\rightskip 1.2cm
}
将边距添加到 footmisc 的设置中,而不是直接重新定义 latex 命令