如何更改 vruler 字体大小以及如何隐藏特定页面

如何更改 vruler 字体大小以及如何隐藏特定页面

我正在使用vruler包裹创建行号我需要调整vruler字体稍微大一点。我不知道如何调整vruler字体大小。

第二件事是我正在创造作者查询使用包endnotes。尾注打印在文档的开头。我的需求是 vruler 应该隐藏在打印尾注页面上,并且 vruler 计数数字在章节开头页面上以“0001”开始。

平均能量损失

    \documentclass[twocolumn]{article}

\usepackage{authblk}
\usepackage{endnotes}
\usepackage{hyperref}
\usepackage{graphics}
%\usepackage{multicol}
\usepackage{graphicx}
\usepackage{vruler}


\makeatletter
\AtBeginDocument{\theendnotes}\newpage
\setvruler[10pt][1][1][4][1][0pt][0pt][0pt][\textheight]
\makeatother


\begin{document}


\title{Sample document for endnotes}
\author[1,]{Junli Liu}
\author[2]{James Rowe}
\author[2]{Keith Lindsey}
\affil[1]{Integrative Cell Biology Laboratory, School of Biological and Biomedical Sciences, The Bio physical Sciences Institute, Durham University, Durham, UK}
%\correspondence{Junli Liu is Professor of Plant Molecular Biology \newline e-mail: \href{mailto:[email protected]}{[email protected]}}
%\presentaddress{James Rowe continued from this author address\newline e-mail: [email protected] }
\maketitle


\noindent Patterning\endnote{note1} in Arabidopsis root development
is coordinated via a localized auxin concentration maximum in the
root tip (Sabatini et al., 1999), requiring the regulated expression
of speciÞc genes. This auxin gradient has been hypothesized to be sink-driven (Friml et al., 2002) and com- putational modeling suggests that auxin efßux carrier activity may be sufÞcient to generate the gradient in the absence of auxin biosynthesis in the root (Grieneisen et al., 2007; Wabnik et al., 2010). However, other experimental studies show that local auxin biosynthesis modulates gradient- directed planar polarity in Arabidopsis, and a local source of auxin biosynthesis contributes to auxin gradient homeostasis (Ikeda et al., 2009). Thus genetic studies show that auxin biosynthesis (Ikeda et al., 2009; Normanly, 2010; Zhao, 2010), the AUX1/LAX inßux carriers (Swarup et al., 2005, 2008; Jones et al., 2008; Krupinski and Jonsson, 2010), and the PIN auxin efux carri- ers (Petr‡sek et al., 2006; Grieneisen et al., 2007; Krupinski and Jonsson, 2010; Mironova et al., 2010) all play important roles in the formation of auxin gradients. In addition, experimental evidence shows that, in root devel- opment, hormones and the associated regulatory and target genes form a network, in which relevant genes regulate hormone activ- ities and hormones regulate gene expression. For example, ethy- lene promotes auxin ßux in the root, in a process dependent on the POLARIS (PLS) peptide (Ruzicka et al., 2007; Swarup et al., 2007; Liu et al., 2010a). Furthermore, PIN levels are positively reg- ulated by ethylene and auxin in Arabidopsis roots (Ruzicka et al., 2007). Interestingly, cytokinin can negatively regulate PIN lev- els (Ruzicka et al., 2009), while repressing auxin biosynthesis and promoting ethylene responses (Nordstrom et al., 2004; Chandler, 2009; Liu et al., 2010a). Cytokinin also has the capacity to mod- ulate auxin transport, by transcriptional regulation of the PIN genes (Ruzicka et al., 2009).   

\begin{figure}[!t]
\caption{The sample caption\label{fig:1}}
\end{figure}\endnote{figure endnote}
\end{document}

在打印尾注页面时应更新下面提到的所需输出。

在此处输入图片描述

下面提到的所需输出需要更新章节开头页面。

在此处输入图片描述

下面提到了我的双向链接尾注包

\usepackage{color}
\@definecounter{endnote}
\def\theendnote{\@arabic\c@endnote}

\def\@makeenmark{\textcolor{red}{\fbox{Q\@theenmark}}}
\def\makeenmark{\@makeenmark}

\def\theenmark{\@theenmark}

\newdimen\endnotesep

\def\endnote{\@ifnextchar[\@xendnote{\stepcounter{endnote}%
     \protected@xdef\@theenmark{\theendnote}%
     \@endnotemark\@endnotetext}}

\def\@xendnote[#1]{%
   \begingroup
     \c@endnote=#1\relax
     \unrestored@protected@xdef\@theenmark{\theendnote}%
   \endgroup
   \@endnotemark\@endnotetext}

%  Here begins a section of endnote code that's really different from
% the footnote code of LaTeX.

\let\@doanenote=0
\let\@endanenote=0

\newwrite\@enotes
\newif\if@enotesopen \global\@enotesopenfalse

\def\@openenotes{\immediate\openout\@enotes=\jobname.ent\relax
      \global\@enotesopentrue}

%  The stuff with \next and \meaning is a trick from the TeXbook, 382,
% there intended for setting verbatim text, but here used to avoid
% macro expansion when the footnote text is written.  \next will have
% the entire text of the footnote as one long line, which might well
% overflow limits on output line length; the business with \newlinechar
% makes every space become a newline in the \@enotes file, so that all
% of the lines wind up being quite short.

\long\def\@endnotetext#1{%
     \if@enotesopen \else \@openenotes \fi
     \immediate\write\@enotes{\@doanenote{\@theenmark}}%
     \begingroup
        \def\next{#1}%
        \newlinechar='40
        \immediate\write\@enotes{\meaning\next}%
     \endgroup
     \immediate\write\@enotes{\@endanenote}}

% \addtoendnotes works the way the other endnote macros probably should
% have, requiring the use of \protect for fragile commands.

\long\def\addtoendnotes#1{%
     \if@enotesopen \else \@openenotes \fi
     \begingroup
        \newlinechar='40
        \let\protect\string
        \immediate\write\@enotes{#1}%
     \endgroup}

%  End of unique endnote code

\def\endnotemark{%
   \@ifnextchar[\@xendnotemark
     {\stepcounter{endnote}%
      \protected@xdef\@theenmark{\theendnote}%
      \@endnotemark}}

\def\@xendnotemark[#1]{%
   \begingroup
      \c@endnote #1\relax
      \unrestored@protected@xdef\@theenmark{\theendnote}%
   \endgroup
   \@endnotemark}

\def\@endnotemark{%
  \leavevmode
  \ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi
  \makeenmark
  \ifhmode\spacefactor\@x@sf\fi
  \relax}

\def\endnotetext{%
     \@ifnextchar [\@xendnotenext
       {\protected@xdef\@theenmark{\theendnote}%
    \@endnotetext}}

\def\@xendnotenext[#1]{\begingroup \c@endnote=#1\relax
   \xdef\@theenmark{\theendnote}\endgroup \@endnotetext}

\def\@xendnotenext[#1]{%
  \begingroup
     \c@endnote=#1\relax
     \unrestored@protected@xdef\@theenmark{\theendnote}%
  \endgroup
  \@endnotetext}


%  \theendnotes actually prints out the endnotes.

%  The user may want separate endnotes for each chapter, or a big
% block of them at the end of the whole document.  As it stands,
% either will work; you just say \theendnotes wherever you want the
% endnotes so far to be inserted.  However, you must add
% \setcounter{endnote}{0} after that if you want subsequent endnotes
% to start numbering at 1 again.

%  \enoteformat is provided so user can specify some special formatting
% for the endnotes.  It needs to set up the paragraph parameters, start
% the paragraph, and print the label.  The \mbox stuff in \enoteheading
% is to make and undo a dummy paragraph, to get around the games \section*
% plays with paragraph indenting and instead give us uniform
% indenting for all notes.

\def\notesname{Notes}%
\def\enoteheading{\section*{\notesname
  \@mkboth{\MakeUppercase{\notesname}}{\MakeUppercase{\notesname}}}%
  \mbox{}\par\vskip-\baselineskip}

\def\enoteformat{\rightskip\z@ \leftskip\z@ \parindent=1.8em
  \leavevmode\llap{\makeenmark}}

\def\enotesize{\footnotesize}

\def\theendnotes{\immediate\closeout\@enotes \global\@enotesopenfalse
  \begingroup
    \makeatletter
    %
    % The machinery with \@ResetGT and > here ensures that
    % \@doanenote works properly even if > is an active character
    % at the point where \theendnotes is invoked. > needs to have
    % catcode 12 when the arguments of \@doanenote are scanned, so
    % that the > in the string "macro:->" is matched.  The actual
    % footnote text is not an argument to \@doanenote, but just
    % follows it in the .ent file; so \@ResetGT can reset the
    % category code for > that should be used when processing
    % that text.  That resetting takes place within a
    % \begingroup-\endgroup block set up by \@doanenote and
    % \@endanenote, so the catcode for > is back to 12 for the
    % next note.
    %
    \edef\@tempa{`\string >}%
    \ifnum\catcode\@tempa=12%
      \let\@ResetGT\relax
    \else
      \edef\@ResetGT{\noexpand\catcode\@tempa=\the\catcode\@tempa}%
      \@makeother\>%
    \fi
    \def\@doanenote##1##2>{\def\@theenmark{##1}\par\begingroup
        \@ResetGT
        \edef\@currentlabel{\csname p@endnote\endcsname\@theenmark}%
        \enoteformat}
    \def\@endanenote{\par\endgroup}%
    \enoteheading
    \enotesize
    \input{\jobname.ent}%
  \endgroup}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%% hyperendnotes.sty started
\makeatletter
\newif\ifenotelinks
\newcounter{Hendnote}
% Redefining portions of endnotes-package:
\let\savedhref\href
\let\savedurl\url
\def\endnotemark{%
\@ifnextchar[\@xendnotemark{%
\stepcounter{endnote}%
\protected@xdef\@theenmark{\theendnote}%
\protected@xdef\@theenvalue{\number\c@endnote}%
\@endnotemark
}%
}%
\def\@xendnotemark[#1]{%
\begingroup\c@endnote#1\relax
\unrestored@protected@xdef\@theenmark{\theendnote}%
\unrestored@protected@xdef\@theenvalue{\number\c@endnote}%
\endgroup
\@endnotemark
}%
\def\endnotetext{%
\@ifnextchar[\@xendnotenext{%
\protected@xdef\@theenmark{\theendnote}%
\protected@xdef\@theenvalue{\number\c@endnote}%
\@endnotetext
}%
}%
\def\@xendnotenext[#1]{%
\begingroup
\c@endnote=#1\relax
\unrestored@protected@xdef\@theenmark{\theendnote}%
\unrestored@protected@xdef\@theenvalue{\number\c@endnote}%
\endgroup
\@endnotetext
}%
\def\endnote{%
\@ifnextchar[\@xendnote{%
\stepcounter{endnote}%
\protected@xdef\@theenmark{\theendnote}%
\protected@xdef\@theenvalue{\number\c@endnote}%
\@endnotemark\@endnotetext
}%
}%
\def\@xendnote[#1]{%
\begingroup
\c@endnote=#1\relax
\unrestored@protected@xdef\@theenmark{\theendnote}%
\unrestored@protected@xdef\@theenvalue{\number\c@endnote}%
\show\@theenvalue
\endgroup
\@endnotemark\@endnotetext
}%
\def\@endnotemark{%
\leavevmode
\ifhmode
\edef\@x@sf{\the\spacefactor}\nobreak
\fi
\ifenotelinks
\expandafter\@firstofone
\else
\expandafter\@gobble
\fi
{%
\Hy@raisedlink{%
\hyper@@anchor{Hendnotepage.\@theenvalue}{\empty}%
}%
}%
\marginpar{\hyper@linkstart{link}{Hendnote.\@theenvalue}%
\makeenmark
\hyper@linkend}
\ifhmode
\spacefactor\@x@sf
\fi
\relax
}%
\long\def\@endnotetext#1{%
\if@enotesopen
\else
\@openenotes
\fi
\immediate\write\@enotes{%
\@doanenote{\@theenmark}{\@theenvalue}%
}%
\begingroup
\def\next{#1}%
\newlinechar='40
\immediate\write\@enotes{\meaning\next}%
\endgroup
\immediate\write\@enotes{%
\@endanenote
}%
}%
\def\theendnotes{%
\immediate\closeout\@enotes
\global\@enotesopenfalse
\begingroup
\makeatletter
\edef\@tempa{`\string>}%
\ifnum\catcode\@tempa=12
\let\@ResetGT\relax
\else
\edef\@ResetGT{\noexpand\catcode\@tempa=\the\catcode\@tempa}%
\@makeother\>%
\fi
\def\@doanenote##1##2##3>{%
\def\@theenmark{##1}%
\def\@theenvalue{##2}%
\par
\smallskip %<-small vertical gap between endnotes
\begingroup
\def\href{\expandafter\savedhref}%
\def\url{\expandafter\savedurl}%
\@ResetGT
\edef\@currentlabel{\csname p@endnote\endcsname\@theenmark}%
\enoteformat
}%
\def\@endanenote{%
\par\endgroup
}%
% Redefine, how numbers are formatted in the endnotes-section:
\renewcommand*\@makeenmark{%
\hbox{\normalfont\@theenmark~}%
}%
% header of endnotes-section
\enoteheading
% font-size of endnotes
\enotesize
\input{\jobname.ent}%
\endgroup
}%
\def\enoteformat{%
\rightskip\z@
\leftskip1.8em
\parindent\z@
\leavevmode\llap{%
\setcounter{Hendnote}{\@theenvalue}%
\addtocounter{Hendnote}{-1}%
\refstepcounter{Hendnote}%
\ifenotelinks
\expandafter\@secondoftwo
\else
\expandafter\@firstoftwo
\fi
{\@firstofone}%
{\hyperlink{Hendnotepage.\@theenvalue}}%
{\makeenmark}%
}%
}%
% stop redefining portions of endnotes-package:
\makeatother
% Toggle switch in order to turn on/off back-links in the
% endnote-section:
\enotelinkstrue
%\enotelinksfalse

请建议更改 vruler 字体大小,并且 vruler 应该隐藏在尾注打印第一页上。

答案1

要更改软件包打印的数字的大小,vruler您需要修补宏\makevruler,因此请将以下几行添加到您的序言中

\usepackage{etoolbox}
\patchcmd{\makevruler}
{\tiny}
{\small}
{}
{}

更改\small为您喜欢的尺寸命令。

然后,要从第二页开始编号,请在 MWE 中替换以下代码

\makeatletter
\AtBeginDocument{\theendnotes}\newpage
\setvruler[10pt][1][1][4][1][0pt][0pt][0pt][\textheight]
\makeatother

与(在这种情况下不需要)\makeatletter\makeatother

% ------------- comment this at the first run -------------
\AtBeginDocument{\theendnotes\clearpage%
  \setvruler[10pt][1][1][4][1][0pt][0pt][0pt][\textheight]}
%----------------------------------------------------------

因此在发出命令之前要清除页面\vruler

我添加了注释以告知将要运行以下 MWE 的人们,在第一次运行时必须对这些行进行注释,因为尚未创建尾注,并且.ent包含它们的文件丢失。

\documentclass[twocolumn]{article}

\usepackage{authblk}
\usepackage{endnotes}
\usepackage{hyperref}
\usepackage{graphics}
%\usepackage{multicol}
\usepackage{graphicx}
\usepackage{vruler}
\usepackage{etoolbox}
\patchcmd{\makevruler}
{\tiny}
{\small}
{}
{}

% ------------- comment this at the first run -------------
\AtBeginDocument{\theendnotes\clearpage%
  \setvruler[10pt][1][1][4][1][0pt][0pt][0pt][\textheight]}
%----------------------------------------------------------


\begin{document}


\title{Sample document for endnotes}
\author[1,]{Junli Liu}
\author[2]{James Rowe}
\author[2]{Keith Lindsey}
\affil[1]{Integrative Cell Biology Laboratory, School of Biological and Biomedical Sciences, The Bio physical Sciences Institute, Durham University, Durham, UK}
%\correspondence{Junli Liu is Professor of Plant Molecular Biology \newline e-mail: \href{mailto:[email protected]}{[email protected]}}
%\presentaddress{James Rowe continued from this author address\newline e-mail: [email protected] }
\maketitle


\noindent Patterning\endnote{note1} in Arabidopsis root development
is coordinated via a localized auxin concentration maximum in the
root tip (Sabatini et al., 1999), requiring the regulated expression
of speciÞc genes. This auxin gradient has been hypothesized to be sink-driven (Friml et al., 2002) and com- putational modeling suggests that auxin efßux carrier activity may be sufÞcient to generate the gradient in the absence of auxin biosynthesis in the root (Grieneisen et al., 2007; Wabnik et al., 2010). However, other experimental studies show that local auxin biosynthesis modulates gradient- directed planar polarity in Arabidopsis, and a local source of auxin biosynthesis contributes to auxin gradient homeostasis (Ikeda et al., 2009). Thus genetic studies show that auxin biosynthesis (Ikeda et al., 2009; Normanly, 2010; Zhao, 2010), the AUX1/LAX inßux carriers (Swarup et al., 2005, 2008; Jones et al., 2008; Krupinski and Jonsson, 2010), and the PIN auxin efux carri- ers (Petr‡sek et al., 2006; Grieneisen et al., 2007; Krupinski and Jonsson, 2010; Mironova et al., 2010) all play important roles in the formation of auxin gradients. In addition, experimental evidence shows that, in root devel- opment, hormones and the associated regulatory and target genes form a network, in which relevant genes regulate hormone activ- ities and hormones regulate gene expression. For example, ethy- lene promotes auxin ßux in the root, in a process dependent on the POLARIS (PLS) peptide (Ruzicka et al., 2007; Swarup et al., 2007; Liu et al., 2010a). Furthermore, PIN levels are positively reg- ulated by ethylene and auxin in Arabidopsis roots (Ruzicka et al., 2007). Interestingly, cytokinin can negatively regulate PIN lev- els (Ruzicka et al., 2009), while repressing auxin biosynthesis and promoting ethylene responses (Nordstrom et al., 2004; Chandler, 2009; Liu et al., 2010a). Cytokinin also has the capacity to mod- ulate auxin transport, by transcriptional regulation of the PIN genes (Ruzicka et al., 2009).

\begin{figure}[!t]
\caption{The sample caption\label{fig:1}}
\end{figure}\endnote{figure endnote}
\end{document} 

输出:

在此处输入图片描述

相关内容