Open 0825kangkang opened 1 week ago
It sounds like you're talking about the Stata "splash" (like the first output shown in this example)? That should be turned off by default. To be sure you're using nbstata, could you share the full yaml header at the start of your .qmd file?
Are you using an nbstata config file? To check, run the %status
magic by putting just that in a Stata code block.
YAML I used before is
title: "Stata testing" format: pdf python: nbstata
But badly I uninstalled and installed nbstata. Now I cannot even run the any stata codes. It always show stata_dir is wrong. I check the path (/Applications/Stata/StataMP.app/Contents/MacOS/StataMP) and it works to open stata in the terminal.
Or the problem came out because my install process is wrong? Could you do a favor to take look at it? Thank you!
I thought the YAML would be jupyter: nbstata
Otherwise, what would you like me to look at, your nbstata config file? Whatever it is, I'm happy to help.
@hugetim thank you so much for your help. I pasted my config file as below.
[nbstata] stata_dir = /Applications/Stata/StataMP.app/Contents/MacOS/StataMP edition = mp splash = False graph_format = png graph_width = 5.5in graph_height = 4in echo = None missing = .
@hugetim thank you so much for your help. I pasted my config file as below.
[nbstata] stata_dir = /Applications/Stata/StataMP.app/Contents/MacOS/StataMP edition = mp splash = False graph_format = png graph_width = 5.5in graph_height = 4in echo = None missing = .
I incorrectly closed this issue. Could you help to reopen it as it is not solved? Thank you :)
My first thought: Have checked if it works without a config file? You could just move that one to a different directory temporarily.
Otherwise, maybe try shortening the path to just /Applications/Stata/StataMP.app
. I think that's what it's looking for.
It is feasible in the first way. I move the config file to other folder and it works. In the second way it still shows the same error.
But the splash still existing in the pdf file. I pasted my code as below and I also pasted the first page in my pdf (just kick out my licence inforamtion). Thank you!
--- title: "Stata testing" format: pdf jupyter: nbstata ---
```{stata}
sysuse auto summarize
```
To get the config file working, try re-running the install program with the --conf-file
option: https://hugetim.github.io/nbstata/user_guide.html#install-nbstata
That should create a working config file for you, which you can then edit as needed.
But the splash remains puzzling. Can you provide more details about how you produced that screen shot? If possible, attach the full .qmd file, provide the nbstata and quarto versions you're using, and show the quarto command you use to create the output (or explain what you did if you are using VSCode or RStudio to produce the output).
quarto version: 1.5.57 nbstata Version: 0.7.0
I rerun below codes but sure if it is what you mean. However, still not working and presents the same path error. python -m nbstata.install --conf-file
-Below are all contents in my qmd file, no extra codes are used to produce output in vscode. After input below things, there is a 'preview' buttom in vscode and then PDF file is created.
--- title: "Stata testing" format: pdf jupyter: nbstata ---
```{stata}
sysuse auto summarize ```
Have you tried the %status
magic I suggested above to check that the config file you think is being used is actually the operative one? Try putting it by itself in a code block like this, and then see what the output is:
```{stata} %status ```
Otherwise, when I get a chance, I'll see if I can replicate the splash issue using VSCode (albeit on Windows), following your steps. I take it you're using the Quarto Extension for VSCode?
Yes, I am using quarto extension for VScode. But you still need to install quarto first and then for vscode install the extension.
I tried below code and it works as long as I remove the config file to other folders.
```{stata} %status ```
However, the splash is still existing. It seems the config file does not work in my side.
When I render qmd file in quarto, it always show that stata log and software information. Not sure where is th problem. The tool I am using is vscode and the kernel is nstata. My quarto output format is pdf.