Skip to content

Conversation

@dhicks
Copy link

@dhicks dhicks commented Feb 17, 2015

str_match_all was returning 0 matches. The problem seems to be the final \\} in the regular expression re; after removing these characters everything worked as expected (including Synctex and command-clicking in TeXShop).

@jan-glx
Copy link
Owner

jan-glx commented Feb 17, 2015

Thanks for reporting and investigating the problem you encountered! There might indeed be an issue with the regex as there is no or i could not find any definition of a concordance file and just inferred. Its structure from examples. Could you post the concordance file in question? Just removing the closing bracket from the expression might hide an underlying problem and leave parts of the concordance file unparsed.
Please send further pull requests to https://github.com/EmmanuelCharpentier/patchKnitrSynctex where active development takes place.

…t has non-numeric characters that cause errors on line 25
@dhicks
Copy link
Author

dhicks commented Feb 18, 2015

Thanks for the pointer to the other repo. Taking a closer look, it looks like the underlying problem is that my concordance file has three lines; see below. The current regex and my pull request yesterday both assume there are exactly two lines. I can get the regex to match the entire concordance file, but then there are newlines and a % that cause errors with rleValues. I'm out of time today, but I'll come back to this, and submit the pull request to the other repo.

Contents of commentary-concordance.tex:

\Sconcordance{concordance:commentary.tex:commentary.Rnw:%
1 2 1 49 0 1 11 58 1 1 20 1 1 1 27 5 1 18 0 7 1 1 27 %
5 1 7 0 54 1}

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

Successfully merging this pull request may close these issues.

2 participants