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

Fix README #204

Merged
merged 3 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
`latexify` is a Python package to compile a fragment of Python source code to a
corresponding $\LaTeX$ expression:

![Example of latexify usage](example.jpg)
![Example of latexify usage](https://github.com/google/latexify_py/blob/main/example.jpg)

`latexify` provides the following functionalities:

Expand All @@ -34,13 +34,17 @@ corresponding $\LaTeX$ expression:

## Getting started

See the [example notebook](examples/latexify_examples.ipynb), which provides several
See the
[example notebook](https://github.com/google/latexify_py/blob/main/examples/latexify_examples.ipynb),
which provides several
use-cases of this library.

You can also try the above notebook on
[Google Colaboratory](https://colab.research.google.com/github/google/latexify_py/blob/main/examples/latexify_examples.ipynb).

See also the official [documentation](docs/index.md) for more details.
See also the official
[documentation](https://github.com/google/latexify_py/blob/main/docs/index.md)
for more details.

## How to Contribute

Expand Down
1 change: 1 addition & 0 deletions src/latexify/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
DON'T TOUCH THIS FILE.
This file is replaced during the release process.
"""

__version__ = "0.0.0a0"
18 changes: 6 additions & 12 deletions src/latexify/frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,13 @@
@overload
def algorithmic(
fn: Callable[..., Any], **kwargs: Any
) -> ipython_wrappers.LatexifiedAlgorithm:
...
) -> ipython_wrappers.LatexifiedAlgorithm: ...


@overload
def algorithmic(
**kwargs: Any,
) -> Callable[[Callable[..., Any]], ipython_wrappers.LatexifiedAlgorithm]:
...
) -> Callable[[Callable[..., Any]], ipython_wrappers.LatexifiedAlgorithm]: ...


def algorithmic(
Expand Down Expand Up @@ -55,15 +53,13 @@ def wrapper(f):
@overload
def function(
fn: Callable[..., Any], **kwargs: Any
) -> ipython_wrappers.LatexifiedFunction:
...
) -> ipython_wrappers.LatexifiedFunction: ...


@overload
def function(
**kwargs: Any,
) -> Callable[[Callable[..., Any]], ipython_wrappers.LatexifiedFunction]:
...
) -> Callable[[Callable[..., Any]], ipython_wrappers.LatexifiedFunction]: ...


def function(
Expand Down Expand Up @@ -99,15 +95,13 @@ def wrapper(f):
@overload
def expression(
fn: Callable[..., Any], **kwargs: Any
) -> ipython_wrappers.LatexifiedFunction:
...
) -> ipython_wrappers.LatexifiedFunction: ...


@overload
def expression(
**kwargs: Any,
) -> Callable[[Callable[..., Any]], ipython_wrappers.LatexifiedFunction]:
...
) -> Callable[[Callable[..., Any]], ipython_wrappers.LatexifiedFunction]: ...


def expression(
Expand Down
3 changes: 1 addition & 2 deletions src/latexify/ipython_wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ def __call__(self, *args) -> Any:
return self._fn(*args)

@abc.abstractmethod
def __str__(self) -> str:
...
def __str__(self) -> str: ...

@abc.abstractmethod
def _repr_html_(self) -> str | tuple[str, dict[str, Any]] | None:
Expand Down
Loading