When working with a knitr file (RNW document) on Kile the document structure isn't shown in the structure view, even though it contains a valid LaTeX structure of parts, sections etc. If I change the file suffix into .tex then the structure is shown, but it's a bad idea because I need to compile it later into a real LaTeX document. Is there any way to trick Kile into showing the structure of an RNW file?

closed as off-topic by Joseph Wright Aug 3 '14 at 8:35

  • This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • RNW files are the ones used by knitr to weave R code chunks into a LaTeX document. – Roey Angel Jan 25 '13 at 11:18
  • You can search for Kile in the documentation for editors and follow the instructions: yihui.name/knitr/demo/editors – Yihui Xie Jan 26 '13 at 5:12
  • I know Marek's website, but his instructions refer only to how to add the knitting command to Kiles build options and for opening and saving but that doesn't make kile read the file structure. – Roey Angel Jan 28 '13 at 9:42
  • @RoeyAngel OK, I thought the bullet point 2 Automatic syntax highlighting of .Rnw sources should help; sounds like it does not. I do not use Kile, so I do not really know... – Yihui Xie Jan 28 '13 at 17:45
  • I think, but not sure, that Automatic syntax highlighting of .Rnw sources makes kile highlight the LaTeX part of the document (but not the R parts) and it also doesn't detect the structure. My new workaround for the structure issue is to save the .rnw document with a .ltx instead (which kile recognizes). – Roey Angel Jan 28 '13 at 22:27

Browse other questions tagged or ask your own question.