haghish / markdoc

A literate programming package for Stata which develops dynamic documents, slides, and help files in various formats
http://haghish.com/markdoc
87 stars 30 forks source link

Observation regarding effect of using external text editors, and a question. #22

Closed alexmitrani closed 5 years ago

alexmitrani commented 7 years ago

Good morning

I am using Notepad++ for all my do and ado files. When I used markdoc to create an sthlp file I found that the results were not at all well formatted, with lots of visible quote marks and a lot of the smcl markup visible to the user of the help file rather than being used to format the document. As an experiment I copied and pasted all of the ado contents into the Stata do file editor, then saved it to a different name. On generating the help file from this file it looked extremely nicely formatted with none of the issues mentioned above.
Firstly I just wanted to share that because it might save other people time.
Secondly, is anyone aware of what configuration in Notepad++ might be causing the problem? I should mention that I am using a custom "language" (style sheet) in Notepad++ that highlights relevant parts of Stata syntax - might that be it? I compared the two versions of the help files with a file comparison tool and the content was identical. It must be something about the document properties rather than the visible content.
Thanks for making and sharing markdoc, I'm sure it will be extremely useful once I have got used to it.

Kind regards

Alex Mitrani

haghish commented 7 years ago

Yes. You should try it with Stats text editor, first. The dynamic help file requires rather strict format which you should make sure it is met in your ado programs. most of my ado files on GitHub can serve as an example.

alexmitrani commented 7 years ago

OK, thanks very much for your prompt and helpful reply.

alexmitrani commented 7 years ago

Hello again.

Unfortunately, today I have not been able to replicate the good results I somehow obtained yesterday using the Stata do file editor. For some reason that I have not been able to discover, it is now producing the same poorly formatted results i was getting with Notepad++. I even tried creating a test ado file wholly within the Stata do file editor but the results were no different.
I am using Stata 13.1 SE on Windows 7. I have installed MarkDoc 3.9.6 and the other related programs from GitHub following instructions provided here.
I did a few experiments in Notepad++:

Any help you can offer to resolve this issue would be very much appreciated.

Kind regards

Alex Mitrani

haghish commented 5 years ago

The sthlp format is still in the development phase. However, if you write the documentation in SMCL format, there should be no room for error. likewise, simple markdown coding will work.

please try a clean installation of markdoc and try again. also, this platform is for bug reports. Please use statalist website to ask help from the community.

alexmitrani commented 5 years ago

OK, thanks