-
Notifications
You must be signed in to change notification settings - Fork 1
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
\lemma with n-dash #13
Comments
This should be pretty simple. I will get on to it as soon as possible. Maybe tonight, maybe tomorrow. I think I might also want to add an option for defining other "span symbols". |
I have pushed a suggestion for a solution to this. Please see branch https://github.com/stenskjaer/samewords/tree/issue-13. This adds the ability to include a configuration file where any custom ellipsis patterns can be written. I have already included your suggested different types of dashes, so they will always be taken into consideration. But it is also possible to declare custom patterns with the config file. Can you confirm if that works at your end? |
I can confirm that it works out of the box for Also customisation via json (eg. for I couldn't get it to process the pattern |
Thank you. I'm not quite sure I understand how you wanted to test |
The idea was to put thin space (LaTeX |
Well that actually works too. The only thing is that comma is a meta-character in regex too, so both the backslash and the comma need to be escaped. This creates this regex pattern: I have added a note about this to the readme of this branch. EDIT: I have added the example to the sample_config file |
I am not familiar with python's specific RegEx flavour, but are you sure about comma being a meta character outside of At least I cannot get it to work: \documentclass{article}
\usepackage[series={A},nofamiliar,noeledsec,noledgroup,draft]{reledmac}
\begin{document}
\beginnumbering
\pstart
\edtext{\sameword[1]{B}}{\Afootnote{del.}}
\edtext{\sameword[1]{F}}{\Afootnote{del.}}
\edtext{B C D E F}{\lemma{B\,--\,F}\Afootnote{b c d e f}}
\edtext{\sameword[1]{B}}{\Afootnote{bb}}
\edtext{\sameword[1]{F}}{\Afootnote{ff}}
\pend
\endnumbering
\end{document} with "ellipsis_patterns": [
"\\\\,-+\\\\,"
], gives me \pstart
\edtext{\sameword[1]{B}}{\Afootnote{del.}}
\edtext{\sameword[1]{F}}{\Afootnote{del.}}
\edtext{B C D E F}{\lemma{B\,--\,F}\Afootnote{b c d e f}}
\edtext{\sameword[1]{B}}{\Afootnote{bb}}
\edtext{\sameword[1]{F}}{\Afootnote{ff}}
\pend which is obviously incorrect. But as said earlier, this isn't a case that is bothering me too much. |
This was a very interesting problem. This had to do with how the word segmentation system works. It didn't take the TeX spacing macros into consideration, so that's why this didn't work when you actually used them correctly (as you do in the example). I have pushed some changes that I believe solve the problem. Agree? |
The whole underlying system has been completely rewritten. According to all my tests, this as working as it's supposed to now. |
Is the rewritten code you mention included in the vers. 0.2.7 branch "issue-19"? Testing any ellipsis marker, with or without calling the json file give me an incorrect result, e.g. the one from the top gives: \documentclass{article}
\usepackage[series={A},nofamiliar,noeledsec,noledgroup,draft]{reledmac}
\begin{document}
\beginnumbering
\pstart
\edtext{\sameword[1]{B}}{\Afootnote{del.}}
\edtext{\sameword[1]{F}}{\Afootnote{del.}}
\edtext{\sameword{B} C D E \sameword{F}}{\lemma{B--F}\Afootnote{b c d e f}}
\edtext{\sameword[1]{B}}{\Afootnote{bb}}
\edtext{\sameword[1]{F}}{\Afootnote{ff}}
\pend
\endnumbering
\end{document} instead of \documentclass{article}
\usepackage[series={A},nofamiliar,noeledsec,noledgroup,draft]{reledmac}
\begin{document}
\beginnumbering
\pstart
\edtext{\sameword{B}}{\Afootnote{del.}}
\edtext{\sameword{F}}{\Afootnote{del.}}
\edtext{\sameword[1]{B} C D E \sameword[1]{F}}{\lemma{\sameword{B}--\sameword{F}}\Afootnote{b c d e f}}
\edtext{\sameword{B}}{\Afootnote{bb}}
\edtext{\sameword{F}}{\Afootnote{ff}}
\pend
\endnumbering
\end{document} |
In our typographical tradition it is the usual that the abbreviated part in
\lemma
is denoted by dashes, sometimes n-dashes, sometimes m-dashes, sometimes with spaces on their sides, sometimes without – but hardly ever\ldots
.Would it be possible to add this to the code so that
would be annotated to display the apparatus unambiguously?
If this is tricky, I can quite easily get by by redefining
\ldots
. In this case I'd suggest that you add to the readme that\ldots
is required to get the\lemma
annotated correctly ... it took me quite some time to realise what the problem was ;)The text was updated successfully, but these errors were encountered: