Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Marking of index entries in familiar notes #436

Closed
sonator opened this issue Oct 22, 2015 · 15 comments
Closed

Marking of index entries in familiar notes #436

sonator opened this issue Oct 22, 2015 · 15 comments

Comments

@sonator
Copy link

sonator commented Oct 22, 2015

The marking of index entries in familiar notes of numbered text with an italic 'n' is failing. The solution of the indextools handbook p. 12-13 for ledmac does not run using reledmac.

And xindy ignores a command like \newcommand{\fn}[1]{#1\textit{n}}.

Please have a look on the MWE. Thank you!

\documentclass{scrbook}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[german]{babel}

\usepackage{letltxmacro}
\usepackage[xindy,splitindex]{indextools}%
\indexsetup{level=\section*,toclevel=section}

\usepackage[series={A},noeledsec,noend,xindy,xindy+hyperref]{reledmac}
\usepackage[hyperindex=false]{hyperref}

%\newcommand{\fn}[1]{#1\textit{n}}

\makeatletter
\LetLtxMacro\orig@@Index\index
\newcommand\nindex[1]{\orig@@Index{#1|innote}}
\newcommand\innote[1]{#1\textit{n}}

\makeindex[name=res,title=Index rerum]
\makeindex[name=nom,title=Index nominum]

\AtBeginDocument{%
\pretocmd{@footnotetext}{\let\index\nindex}{}{}
}
\makeatother

\begin{document}

Textus usitatus\footnote{nota communis\nindex[res]{nota communis}}.

\begin{ledgroup}
\beginnumbering
\pstart
Textus\index[res]{textus} a reledmac\footnoteA{Nota familiaris reledmacensis\nindex[nom]{reledmac}} numeratus.
\pend
\endnumbering
\end{ledgroup}

\printindex[res]
\printindex[nom]

\end{document}

maieul added a commit that referenced this issue Oct 22, 2015
@maieul
Copy link
Owner

maieul commented Oct 22, 2015

It is not at all nore a reledmac nore a indextools problem, but just a standard behavior of xindy.

I explain: with you hack (Or more exacty with the hack as described in this file: https://github.com/maieul/ledmac/blob/5a1163a0e9225e7989ac6ec41931a7cfd13f2ff6/issue436.tex), which could be used also for otherthing that for reledmac), you write entry in the .idx in the following form:

\indexentry{textus}{1}
\indexentry{textus}{1}
\indexentry{reledmac|innote}{1}
\indexentry{nota communis|innote}{1}

and xindy can't understand the innote, except if you add in your .xdy file the following lines:

  (define-attributes ("innote")) 
  (markup-locref :open "\innote{" :close "}" :attr "innote") 

So what could I do:

  • for furnish this "hack" as a standard option of indextools.
  • then documente what we need to add in the .xdy file.

@sonator
Copy link
Author

sonator commented Oct 23, 2015

Thank you very much!
The solution works optimally, if only one index is generated.

If I split the index via splitindex into two indices, as done in the modified MWE below, it doesn't work. Is there an error in my usage?

\documentclass{scrbook}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[german]{babel}

\usepackage{letltxmacro}
\usepackage[xindy,splitindex]{indextools}%
\indexsetup{level=\section*,toclevel=section}
\makeindex[title=Index generalis]
\makeindex[name=res,title=Index rerum]

\usepackage[xindy+hyperref]{reledmac}
\usepackage[hyperindex=false]{hyperref}

\makeatletter
\LetLtxMacro\orig@@Index\index
\newcommand\nindex[1]{\orig@@Index{#1|innote}}
\newcommand\innote[1]{#1\textit{n}}

\AtBeginDocument{%
\pretocmd{@footnotetext}{\let\index\nindex}{}{}
\pretocmd{\footnoteA}{\let\index\nindex}{}{}
\apptocmd{\footnoteA}{\let\index\orig@@Index}{}{}
\apptocmd{@footnotetext}{\let\index\orig@@Index}{}{}
}
\makeatother

\begin{document}

Textus\index{textus} usitatus\footnote{nota communis\index[res]{nota communis}}.

\begin{ledgroup}
\beginnumbering
\pstart
Textus\index{textus} a reledmac\footnoteA{Nota familiaris reledmacensis\index[res]{nota reledmacensis}} numeratus.
\pend
\endnumbering
\end{ledgroup}
\printindex
\printindex[res]

\end{document}

@maieul
Copy link
Owner

maieul commented Oct 26, 2015

first splitindex and xindy options are mutually exclusive. Then, as the index as two arguments, you should define with the following \nindex:

\newcommandx\nindex[2][1,usedefault]{\orig@@index[#1]{#2|innote}}

cf 40ee967.

I am quit e busy now, but I hope to find time in next weeks to integrate such hack directly in reledmac and indextools.

@sonator
Copy link
Author

sonator commented Oct 26, 2015

In splitted indices the page numbers refering to footnotes in numbered and unnumbered texts are now marked comme il faut. And so the mentioned hack in reledmac and indextools will surely find at least one very thankful user!

@maieul
Copy link
Owner

maieul commented Oct 26, 2015

yes, just need to find time...

@maieul
Copy link
Owner

maieul commented Nov 8, 2015

hi @sonator could you try BOTH branch "issue436" of reledmac and "issue4" of indextools.

It provide an option to indextools : innote. It's automatically do the right things.

@maieul
Copy link
Owner

maieul commented Nov 11, 2015

@sonator do yo thinks you will have time to look on it before this week-end ? I would like to merge it for the next release.

@maieul
Copy link
Owner

maieul commented Nov 12, 2015

hi @sonator : any answer ?

@sonator
Copy link
Author

sonator commented Nov 15, 2015

SORRY for the long delay! There has been a misunderstanding. I thought that for some time you would be too busy to work on reledmac/indextools problems. And so I did not check my GitHub account.

Now I have installed reledmac-issue436 and indextools-issue4. The example of issue4 is running optimally with both options using makeindex. In particular the notenumber option is an unexpected and highly comfortable application.

Please have a look on the MWE. Indextools, reledmac/reledpar, splitindex, and xindy are working perfectly. But for any reason the command \setcounter{footnoteC}{0} in the second ledgroup environment will be disabled.

In this MWE the notenumber option of indextools does not yet work. But please note, that this is not an urgent problem.

Chapeau et merci!

\documentclass{book}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[german]{babel}

\usepackage[splitindex,innote]{indextools}%notenumber
\indexsetup{level=\section*,toclevel=section,noclearpage}

\makeindex[name=res,title=Index rerum]
\makeindex[name=pers,title=Index personarum]

\usepackage[series={A,B,C},noeledsec,noend,xindy,xindy+hyperref]{reledmac}
\usepackage{reledpar}
\usepackage[hyperindex=false]{hyperref}

\begin{document}

\begin{ledgroup}
\begin{pairs}
\begin{Leftside}
\beginnumbering
\pstart
Et quamquam Philon in tractatu suo de aqueductibus\footnoteC{Philon von Byzanz\index[pers]{Philon von Byzanz}}. Magister\index[res]{Magister} Dominicus de Florentia\footnoteC{Dominicus von Florenz\index[pers]{Dominicus von Florenz}}
\pend
\endnumbering
\end{Leftside}

\begin{Rightside}
\beginnumbering
\pstart
Und obwohl ...
\pend
\endnumbering
\end{Rightside}

\end{pairs}
\Columns
\end{ledgroup}

\newpage

\begin{ledgroup}
\setcounter{footnoteC}{0}
\begin{pairs}
\begin{Leftside}
\beginnumbering
\pstart
Et quamquam Heron\footnoteC{Heron von Alexandrien\index[pers]{Heron von Alexandrien}}. Magister\index[res]{Magister} Ptolemaeus\footnoteC{Ptolemaeus\index[pers]{Ptolemaeus}}.
\pend
\endnumbering
\end{Leftside}

\begin{Rightside}
\beginnumbering
\pstart
Und obwohl ...
\pend
\endnumbering
\end{Rightside}

\end{pairs}
\Columns
\end{ledgroup}

\newpage
\printindex[res]
\printindex[pers]

\end{document}

@maieul
Copy link
Owner

maieul commented Nov 15, 2015

@sonator the time to manage reledmac/reledpar is quite fluctuant. But you do not receipt any email from github ?

For now, I will release next version of indextools, and then I will look to you problem, which is I think not related to the index system but to the new feature added to manage correctly the footnote number in parallel typesetting.

@sonator
Copy link
Author

sonator commented Nov 15, 2015

No, I do not receive any E-Mail. You are right. It's time to modify the profile. Thank you for the rapid reaction!

@maieul
Copy link
Owner

maieul commented Nov 15, 2015

problem found. I correct it.

maieul added a commit that referenced this issue Nov 15, 2015
… eviter de tout casser. On test deja sans ledgroup
@maieul
Copy link
Owner

maieul commented Nov 15, 2015

please try the new branch. It should solve this problem (which was, definitivly, not linked to this issue, but to the new way reledpar manage footnote number in // typesetting).

@sonator
Copy link
Author

sonator commented Nov 15, 2015

In two test files the \setcounter command inside the ledgroup environment is working correctly. Thank you very much!

maieul added a commit that referenced this issue Nov 15, 2015
@maieul
Copy link
Owner

maieul commented Nov 15, 2015

ok. Will be published next week.

@maieul maieul closed this as completed Nov 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants