Skip to content

Conversation

@dhicks
Copy link

@dhicks dhicks commented Feb 21, 2015

patchKnitrSynctex was failing with this concordance file:

\Sconcordance{concordance:commentary.tex:commentary.Rnw:%
1 2 1 49 0 1 11 69 1 1 20 1 1 1 27 10 1 1 27 5 1 7 0 %
77 1 1 7}

I determined that the problem was that the regex pattern re assumed exactly two lines. I rewrote re to accommodate multiple lines. This led to errors in the line rleValues <- read.table(textConnection(parsed[[1]][i,5]));. I then determined that the problem was that this element of the regex results now contained non-numeric characters (%, \n, and }). This element is now passed through gsub to remove everything except digits and spaces. I tested the new version of patchKnitrSynctex in situ with the concordance file above and both forward and backward searching appears to be working correctly.

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.

1 participant