Git Product home page Git Product logo

Comments (8)

riosavila avatar riosavila commented on May 28, 2024 1

Sorry that was totally my fault

---
title: "Stata Error"
format: html
jupyter: nbstat
---

Setup

sysuse auto, clear

Example

This one will work:

scatter price mpg, \\\
    ytitle("Price") xtitle("Miles per Gallon") ///
    title("Scatterplot of Price vs. Miles per Gallon") ///
    subtitle("Automobiles 1978") ///
    note("Source: Stata Example Datasets") ///
    caption("Scatterplot of Price vs. Miles per Gallon")

This one will not work:

scatter price mpg, ///
	ytitle("Price") xtitle("Miles per Gallon") ///
	title("Scatterplot of Price vs. Miles per Gallon") ///
	subtitle("Automobiles 1978") ///
	note("Source: Stata Example Datasets") ///
	caption("Scatterplot of Price vs. Miles per Gallon")

The difference. The second code chunk was written in Stata editor. So the Spaces are "tabs"
in the first case, I redid the indentation using vsc, so each tabulation is four "spaces"

In the second case it will indicate that command " " does not exists.

from nbstata.

hugetim avatar hugetim commented on May 28, 2024

It would be helpful to see a specific example: the code and what error it produces. In nbstata stuff, I've tried to make the processing of code robust to the use of Tabs, but it's certainly possible it's sometimes not.

from nbstata.

friosavila avatar friosavila commented on May 28, 2024

from nbstata.

riosavila avatar riosavila commented on May 28, 2024

Not sure how to send you Jypter Notebooks, but
I did run an example with the code I provided earlier, and it works with Stata Magic, but with nbstata.

from nbstata.

hugetim avatar hugetim commented on May 28, 2024

Ok, right, I can confirm this is an nbstata issue, not pystata or quarto.

from nbstata.

hugetim avatar hugetim commented on May 28, 2024

The same issue occurs in v0.6.3 and v0.6.1, so it doesn't seem to have been introduced by recent changes to how comments and indentation are handled.

from nbstata.

hugetim avatar hugetim commented on May 28, 2024

It's actually quite a specific issue. For example, if you combined the sysuse auto line together in the same cell as the offending code, no error would be triggered. I'll try to get the fix shipped to a new pypi version this evening.

from nbstata.

friosavila avatar friosavila commented on May 28, 2024

Thank you!
Best wishes

from nbstata.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.