grattan / grattex

7 stars 6 forks source link

check_spelling doesn't support nested \input{}s #150

Closed wfmackey closed 3 years ago

wfmackey commented 5 years ago

We have main.tex file. This includes (for example) \input{chapters/economic-development}. Within chapters/economic-development.tex, there is an input to a metrics table \input{chapters/metrics_tables/economic-development}.

When conducting spell-checks on the main.tex file, the check_spelling function pastes together the first input folder directory (./chapters) with the \input file directory (chapters/metrics_tables/tbl-economic-development), giving the error:

Check subfiles:
chapters/metrics_tables/tbl-economic-development.tex 
Error: './chapters/chapters/metrics_tables/tbl-economic-development.tex' does not exist in current working directory ('/Users/wfmackey/Google Drive/git/2019-Commonwealth-Orange-Book').

There is a terrible workaround for this: copy-and-paste all chapter metrics tables into the chapter .tex files directly. This is problematic because it removes the live updating using grattanMetricTables; and makes the chapters messy.

Would be best to get this fixed asap.

wfmackey commented 5 years ago

(have posted this to TeXCheckR, where the problem lies)

wfmackey commented 5 years ago

check_spelling code has been fixed and PR sent to TeXCheckR