Skip to content
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

subtle error with beginDocumentation() #12

Closed
jakobkroeker opened this issue Mar 24, 2013 · 3 comments
Closed

subtle error with beginDocumentation() #12

jakobkroeker opened this issue Mar 24, 2013 · 3 comments

Comments

@jakobkroeker
Copy link
Contributor

Hello,

consider a package with code behind 'beginDocumentation()':

if the package is installed by hand or loaded in its directory everything is fine,

but after 'installingPackage' and a Macaulay2 restart, M2 does not recognize functions placed below 'beginDocumentation'. Even if it is mentioned in the Macaulay2 documentation,
-this mistake is unfortunately not detected during installation process.
-prevents the programmer to place documentation near to the code it documents.

Question,
can this mistake at least be detected automatically,
or is it possible to allow code behind 'beginDocumentation'?

@DanGrayson
Copy link
Member

That's a very good point. To fix it, it seems to me we need a system where
the documentation is contained in comments, and is extracted by some
automatic procedure. But writing that would be a pain.

Computers are getting faster, so why not just not use "beginDocumentation"?

On Sun, Mar 24, 2013 at 3:49 PM, jakobkroeker notifications@github.comwrote:

Hello,

consider a package with code behind 'beginDocumentation()':

if the package is installed by hand or loaded in its directory everything
is fine,

but after 'installingPackage' and a Macaulay2 restart, M2 does not
recognize functions placed below 'beginDocumentation'. Even if it is
mentioned in the Macaulay2 documentation,
-this mistake is unfortunately not detected during installation process.
-prevents the programmer to place documentation near to the code it
documents.

Question,
can this mistake at least be detected automatically,
or is it possible to allow code behind 'beginDocumentation'?


Reply to this email directly or view it on GitHubhttps://github.com//issues/12
.

@jakobkroeker
Copy link
Contributor Author

Thanks!

If I understand it correctly, to replace 'beginDocumentation()'
without triggering the subtle issue above I have to load "SimpleDoc" and "Text" packages

needsPackage "SimpleDoc";
needsPackage "Text";

to use the doc keyword as before.

Could this explicitly be mentioned in the description of 'beginDocumentation' ?

@DanGrayson
Copy link
Member

done 3c46824

bapike added a commit to bapike/M2 that referenced this issue Nov 20, 2015
…caulay2#35.

This should make sqrt 2p3000000 work, hopefully.
mahrud pushed a commit to mahrud/M2 that referenced this issue Jan 23, 2021
d-torrance pushed a commit to d-torrance/M2 that referenced this issue Dec 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants