-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I do not know if this is the right place to post this so aplogizes in advance if it is not... #18
Comments
Glenn,
I am not sure what the fix is but the troubleshooting syntax is wrong. That
is, your syntax
img somefile.png
is wrong.
The syntax instead should be either
img using somefile.png
if you try to import the file somefile.png, or
img
if you try to include the *current graph*.
I had no problem with the test script using Stata 14 on Markdoc version
3.8.7. I am not testing 3.9.6.
I recommend you to re-run with set trace on (using valid syntax this time).
Anders
…On Mon, Feb 20, 2017 at 5:17 AM, Glenn Sandström ***@***.***> wrote:
I have worked intensively a couple of days trying to start using markdoc
in my workflow but have run into problems with inserting images that I can
not get around. I have installed weaver and statax trough ssc and markdoc
using:
net install markdoc, force from("https://raw.
githubusercontent.com/haghish/markdoc/master/")
version is: 3.9.6
Stata SE v.13.1 on Windows 10 Enterprise
Running the example script from: http://www.haghish.com/
statistics/stata-blog/reproducible-research/markdoc.php#img
/***********************************************************
*************************************/
qui log using example, replace smcl
//OFF
sysuse auto, clear
histogram price
//ON
img // that simple!
//OFF
histogram mpg
graph export mpg.png, replace width(300)
//ON
img mpg.png, title("*Figure 2*. The histogram of the *mpg* variable")
//or alternatively use Markdown syntax e.g. [image: description]
<http://filename>
/***
[image: Figure 2. The histogram of the mpg variable] <http://mpg.png>
***/
txt "[image: Figure 2. The histogram of the mpg variable] <http://mpg.png>"
_n
qui log c
markdoc example, export(docx) replace install author("E. F. Haghish") ///
title("Importing a graph in MarkDoc")
/***********************************************************
**************************************/
results in the error.....
file img.ado not found
(error occurred while loading img.ado)
r(601);
end of do-file
r(601);
/
*/ The ado is installed in my sysdir path C:\ado\plus\i\img.ado and the
helpfile is loaded when i run help img running img somefile.png with set
trace on the exeqution exit with error /*/
= if missing("ado") {
di as err "{p}file extension not recognized; MarkDoc can generate " "dynamic Stata h
elp files from {bf:do}, {bf:ado}, and {bf:mata} files" _n
exit 198
}
- confirm file "`script'"
= confirm file "img.ado"
file img.ado not found
------------------------------------------------------------------------
end sthlp ---
any help would be greatly appreciated
Best,
Glenn Sandström
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#18>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AThPmvCWMifzppbbogRLcbOvhasCMsQiks5reWg6gaJpZM4MF_W4>
.
|
Thanks for the input.
However, I tried removing the current graph part and changed the example to:
And this results in the same error:
I have already tried the set trace on and the error is thrown by the sthpl.ado command with the last couple of rows of output being the same as in my previous post:
So unfortunately I am still at square 1 on this problem. |
Complete output from trace for the code relating to sthlp.ado
|
works with no errors but the call made in markdoc->sthlp
plausibly because the confirm file call does not supply a complete path to the ado...? Output from my sysdir command is
|
Your conclusion seems plausible also to me. So, go ahead and test it :-)
That is, temporarily change the current work directory to where img.ado is:
cd "C:\ado\plus\i\"
If the test script now works, then yes you identified a new bug in version
3.9.6.
Also, does version 3.8.7 work for you? Version 3.8.7 was the most stable
for me up until version 3.9.3. Then, I switched to LaTeX and -texdoc- which
I now prefer over markdoc so I cannot comment on version 3.9.6.
…On Mon, Feb 20, 2017 at 9:24 AM, Glenn Sandström ***@***.***> wrote:
confirm file "C:\ado\plus\i\img.ado"
works with no errors but
the call made in markdoc
confirm file "img.ado"
plausibly because the confirm file call does not supply a complete path to
the ado...?
Output from my sysdir command is
PLUS: c:\ado\plus\
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#18 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AThPml7Ylr_ewV3GVywiekoFHlv9FSEtks5reaIPgaJpZM4MF_W4>
.
|
Thanks for the suggestion. Running the script from "(error occurred while loading img.ado) r(601);" anymore. Now it loads the img.ado as it should but now the windows shellscript looks for the imagefiles e.g. "mpg.png" not in the current working directory (where they are saved) but rather....
and does not include the images in the produced pdf. I think I will give up for now and see if I have better luck with a later version of markdoc as I am having no luck with getting this version 3.9.6 to run the example scripts provided in the wiki here on github. Hope you other guys have better luck because it seems to be a great package. |
I have solved the problem. I mixed the installation procedure by using: when i replaced weaver and statax by using net install image commands are working properly
...so anyone having problems should make sure that they have used only ssc or only net install from github to ensure compatible versions of all the supporting ado-files. Sorry for bothering everyone with this stupid mistake. Best, Glenn Sandström |
Unfortunately, I am seeing the same problems in both Stata 12 (linux) and Stata 15 (windows) using the |
Unfortunately, I am seeing the similar problems in both Stata 14.2 (Windows) When I install all packages from the repository:
Alternatively:
When I install all packages from SSC:
Alternatively:
|
I can confirm similar issues as reported by @ncvanegmond suffered by multiple students in my class using Stata 14.2 on either Windows or Linux irrespective of how it is installed (ssc or github). Markdoc in Stata 14.2 appears to work fine on a mac however. We have all upgraded to Stata 15...... |
it seems the last update caused many problems, I will look into that. |
I have tried installing weaver and statax from the github link mentioned above, but I get an error saying:
(although I was successful with installing markdoc from the above-mentioned link). I then downloaded the img.ado and added it to my personal directory in the ado files folder, which helped the files run without the error message. However, the pictures still do not appear in the final document. Additionally, when I use the option export(pdf), I get an error saying that it was unable to convert the html to pdf, although I do have wkhtmltopdf installed (and also tried additionally adding the ado file to my directory, but that didn't work either). I would be any grateful for any insight as to why this is happening! Thanks, |
As I am releasing a new version of So, try this updated syntax and it should work just fine. I examined it with Stata 14 and 15 on Win 10 64bit, after a fresh installation of
|
|
I have worked intensively a couple of days trying to start using markdoc in my workflow but have run into problems with inserting images that I can not get around. I have installed weaver and statax trough ssc and markdoc using:
net install markdoc, force from("https://raw.githubusercontent.com/haghish/markdoc/master/")
version is: 3.9.6
Stata SE v.13.1 on Windows 10 Enterprise
Running the example script from: http://www.haghish.com/statistics/stata-blog/reproducible-research/markdoc.php#img
/************************************************************************************************/
qui log using example, replace smcl
//OFF
sysuse auto, clear
histogram price
//ON
img // that simple!
//OFF
histogram mpg
graph export mpg.png, replace width(300)
//ON
img mpg.png, title("Figure 2. The histogram of the mpg variable")
//or alternatively use Markdown syntax e.g.
/***
***/
txt "" _n
qui log c
markdoc example, export(docx) replace install author("E. F. Haghish") ///
title("Importing a graph in MarkDoc")
/*************************************************************************************************/
results in the error.....
file img.ado not found
(error occurred while loading img.ado)
r(601);
end of do-file
r(601);
//
The ado is installed in my sysdir path C:\ado\plus\i\img.ado
and the helpfile is loaded when i run help img
running img somefile.png with set trace on the exeqution exit with error
//
any help would be greatly appreciated
Best,
Glenn Sandström
The text was updated successfully, but these errors were encountered: