Enhanced the exporter tool:
- For PDF format, added `pdf.pdfVersion`, `pdf.pdfValidator` and
`pdf.pdfTags`. `pdf.pdfVersion`, and `pdf.pdfValidator` will be combined
into `pdfStandard`, and `pdf.pdfTags` will be inverted into `noPdfTags`.
- Use `datetime-local` input for `pdf.pdfCreationTimestamp`.
- For image formats, added `pageNumberTemplate` option, since we cannot
customize that with output path for now.
<img width="1028" height="391" alt="image"
src="https://github.com/user-attachments/assets/1c0c44c9-0ea3-4f7c-a316-5a2746cb8a96"
/>
---------
Co-authored-by: Myriad-Dreamin <camiyoru@gmail.com>
Adds `c` as an alias for the `compile` subcommand to match `typst-cli`
behavior where `c = compile`.
## Changes
- Added `#[clap(alias = "c")]` attribute to the `Compile` command
variant
- Added test coverage for `tinymist c --help` and actual compilation via
alias
## Usage
```bash
# Both commands now work identically
tinymist compile input.typ output.pdf
tinymist c input.typ output.pdf
```
<!-- START COPILOT CODING AGENT SUFFIX -->
<details>
<summary>Original prompt</summary>
>
> ----
>
> *This section details on the original issue you should resolve*
>
> <issue_title>Support command alias `c` in tinymist-cli</issue_title>
> <issue_description>### Motivation
>
> As `typst-cli` has a alias `c = compile`, `tinymist compile` receives
exactly same arguments as `typst compile`, it will be suprise if the
alias itself is not supported.
>
> May not also applies to other subcommands.
>
> If this is feasible, I'd be willing to write a PR. This should be
easy.
>
> ### Description
>
> _No response_
>
> ### More Examples/Questions
>
> _No response_</issue_description>
>
> ## Comments on the Issue (you are @copilot in this section)
>
> <comments>
> </comments>
>
</details>
- FixesMyriad-Dreamin/tinymist#2259
<!-- START COPILOT CODING AGENT TIPS -->
---
✨ Let Copilot coding agent [set things up for
you](https://github.com/Myriad-Dreamin/tinymist/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Myriad-Dreamin <35292584+Myriad-Dreamin@users.noreply.github.com>
Configure whether to enable syntax-only mode for the language server. In
syntax-only mode, the language server will only provide syntax checking
and basic code completion, but will not perform full document
compilation or code analysis. This can be useful for improving
performance on low-end devices, devices under power-saving mode, or when
working with large documents.
Default behavior: Always disable syntax-only mode. The strategy may be
changed in the future, for example, automatically enable syntax-only
mode when the system is in power-saving mode.
---------
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Adds capability to introspect complations happening in the language
server, to help improve efficiency. I expect most compilations are
caused by tracing for analyzing dynamic expressions, but I haven't
really profiled a document. Then introspection will help confirm or
refute the expectation.
Closes#2107
Sorry for not getting confirmation on the issue first, but I had some
free time and thought it would be easy to implement and, indeed, it is
just a few lines of code. I'll attach a video of how it looks.
https://github.com/user-attachments/assets/60e6f7ef-cdff-4f85-a1e8-385058f87966
For the small nudges I think the instant jump is better, even though it
looks kind of janky. The problem with the smooth scroll is that you
can't press it repeatedly and I think that you use `jk` for small
adjustments where it's clear what is being scrolled. However, for the
big hl jumps I think the smooth scroll is better to not disorient you.
Happy to change anything, of course :)
---------
Co-authored-by: Myriad-Dreamin <camiyoru@gmail.com>
The preview feature heavily relies on the global `window` object. This
forces the preview to be used only as a standalone page.
In this PR, I replaced `window` with `windowElem` to make the preview
component modular and reusable.
TODO:
- [x] Fix `handleTypstLocation`
- [x] Fix zoon center
- [x] Fix drag
- [ ] Do a comprehensive test
- [x] `handleTypstLocation` under both canvas mode and SVG mode
- [ ] other stuff (idk what yet)
- feat: move symbol svg generation logic from client to client, and
directly display svg elements instead of mask-image. This significantly
boosts loading speed.
- fix: use font ascender and descender to bound view box, avoid
clipping.
- Restructured files.
- Render non-printable symbols, following typst documentation's
convention.
- Add a toggle to show details: symbol name and unicode, both of which
can be copied to clipboard on click.
- Make detypify import async, so that it will not block symbol
rendering.
- Show detypify canvas only when available.
<img width="1289" height="421" alt="image"
src="https://github.com/user-attachments/assets/ed6469c4-57a0-4d17-a4be-206875a03e43"
/>
<img width="1238" height="632" alt="image"
src="https://github.com/user-attachments/assets/e6bba758-7836-4230-9ab9-f9550454b4de"
/>
---------
Co-authored-by: Myriad-Dreamin <camiyoru@gmail.com>
| Before | After |
| ------ | ----- |
| <img width="300" height="246" alt="image"
src="https://github.com/user-attachments/assets/3f1e9d69-390c-46ce-8469-52d90c052fed"
/> | <img width="303" height="243" alt="image"
src="https://github.com/user-attachments/assets/4b70a9d2-07c6-496e-82df-d0ad27bd582e"
/> |
1. The `svg` element by default has `display: inline`, which adds extra
space at bottom (line height), change that to `block` can remove the
space.
2. The `svg` element and its outer `div` both set background color,
which will be inverted to another color that are not equal to the whole
page's background (I was setting `--main-margin` to see the outside).
This PR prevents the background from getting inverted.
There's another tiny thing: `#typst-container.mode-doc` has `margin-top:
-1px` which shifts the whole Typst doc 1px up. That will cause the page
always has 1px margin at bottom because the SVG element has the full
height. One possible fix is to always `- 1px` on the SVG `height`
attribute but I'm not sure if this affects some calculation. So I'm not
adding this trivial change.
* feat: Rescaling with Ctrl+=/- in browser (in addition to ctrl+wheel)
* Change function name also in comment
* Use Command instead of Ctrl on Macs
to match default key bindings in browsers
* return multiple positions from jump_to_cursor
* format
* remove an alert
* add a simple doc for jump test
* feat: resolve currentPosition
---------
Co-authored-by: Myriad-Dreamin <camiyoru@gmail.com>
* fix: compatibility for some old chromium core
* feat: resolve relative URL manually
* dev: revert the change
* dev: add some comment
* fix: wrong regrex in 50228956
* dev: upgrade version to use
---------
Co-authored-by: Myriad-Dreamin <camiyoru@gmail.com>
* feat: Search Gallery by name
* dev: use minisearch
* feat: highlight search
* feat: all query terms for highlight
---------
Co-authored-by: Myriad-Dreamin <camiyoru@gmail.com>
This is all the typos that `typos` is confident can just be fixed
automatically, minus the overrides added to the manifest for the false
positives I found.