latex-style-esdpx/xespdfootnote.sty

83 lines
3.5 KiB
TeX
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

% Copyright 2006 Konstantin Korikov <lostclus@ua.fm>
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2003/12/01 or later.
%
% This work has the LPPL maintenance status "maintained".
%
% This Current Maintainer of this work is Konstantin Korikov.
%
% This work consists of all files listed in manifest.txt.
%
%
% This is automaticaly generated file, do not edit it.
%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{xespdfootnote}[2010/01/14 v0.98 Footnote Settings]
% Нумероваться сноски должны в пределах одной страницы.
% Самое очевидное решение - переподчинить счетчик footnote счетчику page,
% но такой метод будет давать сбои, если сноска вставлена
% близко к концу страницы.
% Эту проблему решил Обердайк в своем пакете zref
% пакет amsmath должен быть загружен ПЕРЕД zref
% возможно стоит загружать его в классе xespdtext
% а не здесь
\RequirePackage{amsmath}
\RequirePackage{zref-perpage}
% привязываем сброс счетчика сносок к границам страниц
\zmakeperpage{footnote}
\let\footnotesize\small
% Нижеследующая строка была взята из xespddstu.sty.
% Согласно ГОСT 2.105-95 после метки сноски должна быть закрывающая скобка.
% Стандарт межгосударственный и данная строка будет более
% уместно смотреться здесь
\renewcommand{\thefootnote}{\arabic{footnote})}
% Помимо арабских цифр с закрывающей скобкой
% стандарт допускает использование звездочек.
% Более четырех использовать <<не рекомендуется>>.
% Сложно сказать, что это значит. Наверное,
% на усмотрение нормоконтроля.
% Для удобства определим команду \fnasterisk
% по аналогии с \fnsymbol
\def\fnasterisk#1{\expandafter\@fnasterisk\csname c@#1\endcsname}
\def\@fnasterisk#1{%
\ifcase#1%
% empty for zero value
\or*%
\or**%
\or***%
\or****%
\else\PackageError{xespdfootnote}{Too many asterisks}%
{GOST 2.105-95 does not recommend to use\MessageBreak
more then 4 asterisks in footnotes.\MessageBreak
Use 'footnotearabic' option in documentclass instead}%
\fi%
}
% Принимаемые опции
\DeclareOption{footnotearabic}{\renewcommand{\thefootnote}{\arabic{footnote})}}
\DeclareOption{footnoteasterisk}{\renewcommand{\thefootnote}{\fnasterisk{footnote}}}
\ProcessOptions\relax
% Метка сноски должна находиться по срезу абзацного отступа.
% Для этого вставляем пустой бокс шириной в абзацный отступ,
% после него бокс с меткой сноски, а за ним, собственно, текст.
\renewcommand\@makefntext[1]{%
\parindent 15mm%
\noindent%
\hbox to \parindent{}\hbox{\hss\@makefnmark} #1}