.png)
当初、私は 2 種類の末尾注を区別するために parnotes と endnotes を使用しました。
- 注意:最初の「グレーボックス」のトライアルコードをコンパイルするには、
hyperendnotes
-「パッケージ」- (.sty ファイル)をダウンロードします。。 \patchcmd{..}{..}{..}{..}
注:とについてもっと知りたい場合は\usepackage{etoolbox}
、この質問の別の「サブ」投稿。
\documentclass{article}
\usepackage{changepage} % \begin{adjustwidth}{...cm}{...cm}
\usepackage[colorlinks=true,linkcolor=red]{hyperref} % colors endnotes red --- for hyperlinks --- hyperref permits use of color{blue}{...}
\usepackage{endnotes} % \endnote{...}
\input{hyperendnotes.sty} % LOADS (needs \usepackage{hyperref}) hyperendnotes.sty; which can be downloaded at
% https://github.com/bibliogum/latexamu/blob/master/hyperendnotes.sty
\def\enoteheading{} % endnotes without standard heading
\usepackage[breakwithin, roman]{parnotes} % parnotes
\makeatletter % needed for \renewcommand{...} and \patchcmd{...}
\renewcommand{\parnotemarkfmt}[1]{{{\color{blue}\PN@mark@set{#1}\hspace{0.5mm}}}} % color parnotes blue --- tweaks spacing --- adjusts size of parnotes to look like hyperendnotes (part 1)
\usepackage{etoolbox} % \patchcmd{...}
\patchcmd{\PN@parnote@real}
{\parnotemarkfmt{PN@t}}
{\textsuperscript{\hspace{1.23mm}\parnotemarkfmt{PN@t}\hspace{-0.67mm}}}
{}{} % <<< adjusts size of parnotes to look like hyperendnotes (part 2) --- thanks a lot for this part @egreg; at
% https://tex.stackexchange.com/questions/219000/a-question-about-using-a-renewcommand-to-adapt-a-package/219007#219007
\makeatother % needed for \renewcommand{...} and \patchcmd{...}
\begin{document}
\noindent Some text \parnote{A parnote} \parnote{Another parnote} \endnote{An endnote} \parnote{Another parnote} \endnote{Another endnote} \endnote{Another endnote} \endnote{Another endnote} \parnote{Another parnote} \parnote{Another parnote} \parnote{Another parnote} \parnote{Another parnote} \endnote{Another endnote} \parnote{Another parnote} \endnote{Another endnote} \endnote{Another endnote} \endnote{Another endnote} \endnote{Another endnote} \endnote{Another endnote} \parnote{Another parnote} \endnote{Another endnote} \parnote{Another parnote} \parnote{Another parnote} \par
\noindent \textbf{Parnotes}
\parnotes
\textbf{Endnotes} \par
\begin{adjustwidth}{2.49mm}{0cm}
\theendnotes
\end{adjustwidth}
\end{document}
のでだった適切に分離され、「ラベル付け」されます (2 種類の脚注が混在している場合でも)。
でもあのしなかった注釈の相互参照(クリック可能なリンク)を取得します...
ロードすると、hyperendnotes.sty
クリック可能な相互参照「リンク」が にのみ配置されます\endnote{...}
が、 には配置されません\parnote{...}
。
そこで、ユーザー @cfr が -package を示唆しました。余分なものをロードする必要がなくなったので、少なくとも簡単にenotez
なりました。\usepackage{enotez}
hyperendnotes.sty
この 2 回目の試行では、エンドノートのみを使用しました (クリック可能なハイパーリンクを取得できなかったため、パラノートは削除しました)。
この 2 回目の試行では、エンドノートのみを使用しました (クリック可能なハイパーリンクを取得できなかったため、パラノートは削除しました)。
- 注意: この 2 番目の「グレー ボックス」の試用コードは、2 回コンパイルする必要があります (-package のため
enotez
)。
\documentclass{article}
\usepackage{enotez}
\DeclareInstance{enotez-list}{section}{paragraph}{heading={}}
\setenotez{backref=true, list-style=section, reset, split-title=\noindent}
\usepackage{hyperref}
\hypersetup{colorlinks=true}
\usepackage{biblatex}
\begin{document}
\hypersetup{linkcolor=red}
Som text here \endnote{Endnote}. \par
Some more text \endnote{Endnote} before the first call of \colorbox{gray!20}{\textbackslash printendnotes}.
\vspace{1em} \textbf{A first person's endnotes} \printendnotes \vspace{1em}
\setenotez{counter-format={roman}} \hypersetup{linkcolor=blue}
See? I can get clickable endnotes in two different colours, which is what I wanted. \endnote{Endnote}. \par {\large{But the problem is that ALL of the endnotes (of a certain colour) have to be grouped together and originate before the first \colorbox{gray!20}{\textbackslash printendnotes} and before ALL of the other endnotes (of another colour): there is no freedom to use the endnotes "interwoven", unfortunately.}} \endnote{Endnote}.
\vspace{1em} \textbf{A second person's endnotes} \printendnotes \vspace{2em}
\setenotez{counter-format={arabic}} \hypersetup{linkcolor=red}
You can get both footnote sections to truly follow each-other at the end of the document \endnote{Endnote} (which is what i wanted), by using a lot of \colorbox{gray!20}{\textbackslash vspace}'s (see the .tex-code below this line). But having to constantly adjust the \colorbox{gray!20}{\textbackslash vspace}'s doesn't seem very elegant at all. \endnote{Endnote}
\vspace{8.2em}% extra \vspace{...} to group the endnote sections together at the end of the .pdf
\vspace{1em} \textbf{A first person's endnotes} \printendnotes \vspace{1em}
\setenotez{counter-format={roman}} \hypersetup{linkcolor=blue}
\vspace{-15em}% extra \vspace{...} to group the endnote sections together at the end of the .pdf
See?\endnote{Endnote} Now the the sections are really together \endnote{Endnote} at the very end of the document. \par However: the {\large{origins of the two different types of endnotes still have to be grouped together, and cannot get interwoven, unfortunately.}}
\vspace{8em}% extra \vspace{...} to group the endnote sections together at the end of the .pdf
\vspace{1em} \textbf{A second person's endnotes} \printendnotes \vspace{1em}
\end{document}
今そこにはすべての文末脚注に相互参照(クリック可能なリンク)が付いています。
しかし、さまざまな種類のエンドノートもうできない織り交ぜた。
この方法では (副注なしで) 異なる「タイプ」のエンドノートに正しくコードラベルを付ける方法はありません。「織り交ぜる」と、2 つの「タイプ」に番号が付けられず、文書の下部に別々に配置されます。
つまり、簡単に言うと、次のいずれかで私の問題は解決できるはずです。
どちらか:
- parnotes で相互参照を取得します。
または(相互参照可能な脚注を使用する場合):
- 「(脚注の)タイプ」にラベルを付けて(番号、色、数字を別々にするため)、別々に印刷します。
解決策が提示できるかどうか疑問に思い始めましたない標準的な注釈、文末脚注、脚注はまったく使用しないのですか? ただし、2 種類の「注釈」を区別するために他のコード ラベルを用意し、上付き文字、番号、色 (「偽の」文末脚注) を追加します。その後、別々に印刷しますか? おそらく (最後の手段として) biblatex
?
この「偽造」または「脚注を自律的に定義する」ことは、ドイツの QA サイト texwelt で行われたと思われます。ここまたはここ以下に英語版(少し改変)を投稿します。
\documentclass{article}
\usepackage{xcolor}
%%%%%%%%%%%
\newcommand\newnotestype[2]{%
\newcounter{#1note}%
\expandafter\newwrite\csname the#1notes\endcsname
\expandafter\immediate\expandafter\openout\csname
the#1notes\endcsname=\jobname.#1\relax %
\expandafter\newcommand\csname #1note\endcsname[1]{%
\stepcounter{#1note}%
{%
\tiny\textsuperscript\expandafter\textcolor{#2}{{%
\raisebox{1ex}{\hbox{\kern-0.0em\csname
the#1note\endcsname\kern-0.0em}}}}%
\expandafter\immediate\expandafter\write\csname the#1notes\endcsname%
{\csname the#1note\endcsname\ \unexpanded{##1 \par}}%
}}%
\expandafter\newcommand\csname display#1notes\endcsname[1]{%
\vspace{1\baselineskip}%
\expandafter\immediate\expandafter\closeout%
\csname the#1notes\endcsname%
\par\tiny\expandafter\textcolor{#2}{\textbf{##1}}\par%
\input\jobname.#1%
}}%
%%%%%%%%%%%
\newnotestype{first}{red}
\newnotestype{second}{blue}
%%%%%%%%%%%
\begin{document}
This is the test-text \firstnote{Endnote} \secondnote{Endnote} , some more \firstnote{Endnote} test-text, some more \secondnote{Endnote} test-text \secondnote{Endnote}.
%%%%%%%%%%%
\displayfirstnotes{A first person's endnotes}
\displaysecondnotes{A second person's endnotes}
\end{document}
さて、さまざまな種類の文末脚注できる簡単にラベル付けして再度織り合わせることができます。
しかし、またもうない相互参照(クリック可能なリンク)どれでも文末脚注の。
\usepackage{hyperref}
脚注は実際の「脚注」ではなく、脚注のように見えるように「偽造」されているため、この単純な方法はもはや機能しません。
では、これらの「オブジェクト」で相互参照(クリック可能なリンク)を取得するための優れたソリューションを知っている人はいますか?
その他の質問:
- この最後の(3番目の)試行では、文末脚注の見出しにも色を付けますが、ない文末脚注番号 (少なくとも文末脚注が印刷されている箇所ではありません)。文末脚注番号にも色を付けていただけるとありがたいです。
- また、こちら側、あちら側もはやアラビア数字からローマ数字に切り替える簡単な方法があるようです (一般的に、特に 1 つの「タイプ」の文末脚注の場合)。
どうもありがとう。