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

algorithmic:0.1.0 #60

Merged
merged 1 commit into from
Aug 19, 2023
Merged

algorithmic:0.1.0 #60

merged 1 commit into from
Aug 19, 2023

Conversation

lf-
Copy link
Contributor

@lf- lf- commented Jul 29, 2023

I am submitting

  • a new package
  • an update for a package

I have read and followed the submission guidelines and, in particular, I

  • selected a name in conformance with the guidelines

    My read of the guidelines is that "algorithm" here would be wrong, but "algorithmic" seems sufficiently funky to not be purely descriptive.

  • added a typst.toml file with all required keys

  • added a README.md with documentation for my package

  • have chosen a license and added a LICENSE file or linked one in my README.md

    I am REUSE compliant and all the files have license headers. The actual license is in LICENSES/MIT.txt

  • ensured that my submission does not infringe upon the rights of a third party

  • tested my package locally on my system and it worked

  • named this PR as name:version of the submitted package

  • agree that my package will not be removed without good reason

Description: This package provides facilities for typesetting algorithmic pseudocode, inspired by algorithmicx for LaTeX.

Screenshot:
demo-rendered

@laurmaedje laurmaedje added the new A new package submission. label Jul 30, 2023
@laurmaedje
Copy link
Member

One more thing: The package directory layout just changed. It's now packages/preview/package/version instead of packages/preview/package-version.

@lf-
Copy link
Contributor Author

lf- commented Aug 6, 2023

git mistake 😆

should be in the new structure now.

@likern
Copy link

likern commented Aug 11, 2023

I've tested a bit this package.

Some functions return content, for example FnI("Func", "a") call, while others return array, like Cmt:

#let Cmt(c) = (Ic(c),)

And these functions are not composable.
If I try to call Cmt inside content I get this output (definitely not desired):

#algorithm({
  import algorithmic: *

  Cmt[Comment: #Cmt[Nested Comment]]
})

Screenshot from 2023-08-11 22-35-40

But if I try to call FnI at top-level (or in other places where array is expected and joined together - in any code block)
I get criptic message "Cannot join content with array"

Screenshot from 2023-08-11 22-30-10

Screenshot from 2023-08-11 22-34-26

Screenshot from 2023-08-11 22-30-04

which is quite annoying.

I think this limits package usability (while I much like it). For example I can't create my own custom functions like using if in assignment.

Is there possible fix or workaround exists?

@lf-
Copy link
Contributor Author

lf- commented Aug 11, 2023

This is completely intentional and unavoidable. See the readme regarding "inline".

@laurmaedje laurmaedje merged commit 0694c9a into typst:main Aug 19, 2023
1 check passed
@laurmaedje
Copy link
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new A new package submission.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants