* feat: update cmark-writer to version 0.7.6 and refactor string handling to use EcoString
* dev: make use of eco string
---------
Co-authored-by: Myriad-Dreamin <camiyoru@gmail.com>
* chore: add TODO comment for table.header rendering in md-table function
* feat: enhance table parsing to support thead/tbody structure and complex cells
* fmt
* feat: add InlineNode for handling flattened inline content in table cells
* feat: update snapshot files and enhance DOCX/LaTeX writer to support InlineNode processing
* refactor: custom node handling in DOCX and LaTeX writers
* dev: md-grid should have similar signature to grid
---------
Co-authored-by: Myriad-Dreamin <camiyoru@gmail.com>
* feat: add protip component with markdown note block conversion
* refactor: remove ProtipNode and update related parsing and tag definitions
* fix: escape special characters in markdown output and update cmark-writer dependency
* fix: readme generation
* feat: markdown-aware export
* feat: add ieee example
* fix: fix wrong behavior of list parsing and <div> elem parsing
* test: update snapshot
Co-authored-by: Hong Jiarong <me@jrhim.com>
* fix: clippy warnings
* fix: handle br tag as hard break in HTML parsing (#1769)
* fix: handle br tag as hard break in HTML parsing
* Revert "svg gen"
This reverts commit 1ff4c0af33c209a9f653c879f2f7d504bad1ff32.
---------
Co-authored-by: Myriad-Dreamin <camiyoru@gmail.com>
* feat: some md-specific impl
* test: bad changes
---------
Co-authored-by: Hong Jiarong <me@jrhim.com>
* fix: block math align center
* fix: block math align center (#1764)
* fix: process block children
* test: update snapshot
---------
Co-authored-by: Hong Jiarong <me@jrhim.com>
* feat: docx impl
Revert "build: remove other cargo deps"
This reverts commit 059b480b1f635d1e8f5be7c191075efcf959b40b.
feat(typlite): Docx export and export markdown in cmark-writer (#1698)
* feat: docx export support
* refactor: simplify DocxConverter structure and improve content handling
* tests: add binary insta for docx
* feat: add MathBlock style and improve frame rendering in DocxConverter
* fix: enhance paragraph creation(silly method)
* fix: enhance math equation rendering
* use md5 instead of docx binary
* feat: enhance list numbering and paragraph handling in DocxConverter
* Refactor DOCX converter to improve list handling and document structure
- Introduced separate methods for creating ordered and unordered list numbering.
- Enhanced list management by tracking next numbering IDs.
- Consolidated paragraph and run management within the DocxConverter.
- Improved image processing with better error handling and placeholder support.
- Streamlined the handling of various HTML elements, including headings, lists, and images.
- Added functionality for processing captions and preformatted blocks.
- Updated methods for processing inline styles and links.
* feat: update cmark-writer to version 0.2.0
* feat: refactor code block handling in DOCX converter for improved readability
* refactor: refactor DOCX converter to enhance document structure
* refactor docx to separated files
* chore: update cmark-writer version to 0.3.0
* fix: ol custom value
* feat: table and grid processing
* use cmark-writer's ast node for consistency
* fix: update snapshot hashes for document generation tests
* fix: add preamble
* update snapshot hashes
* refactor DOCX conversion: Split writer functionality into separate module, enhance image processing, and clean up utility functions
* update comments in LaTeX and Markdown converters for clarity and consistency
* fmt
* delete utils
* feat: support figure node by custom node in cmark-writer
* fix
* fix: frame
* feat: enhance table conversion logic in MarkdownConverter
* refactor: simplify FigureNode implementation by removing CustomNode trait
* chore: update cmark-writer to version 0.5.0
* fix: update figure and raw inline snapshots for consistency
* fix: update snapshot hashes and correct caption reference in markdown.typ
* refactor proj structure
* feat: update CompileArgs to support multiple output files and remove debug option
* docs: update README to clarify usage of multiple output formats and comment out feature section
* remove DocxConverter module
* fix: update snapshots for figure caption, list, outline, and docx generation
* update tests
Co-Authored-By: Hong Jiarong <me@jrhim.com>
* test: docx snapshots
* fix: use old resvg
* feat: make docx opt-in
* fix: image process on our hand
* dev: remove support to rarely used image formats
* feat: use new base64
* test: update snapshot
* fix: dim calc
* fix: dim calc 2
* test: update snapshot
---------
Co-authored-by: Hong Jiarong <me@jrhim.com>
* fix: remove global variable use
* dev: don't ignore rest variants
* feat: latex impl
feat: pass tests
refactor lib.rs to separated files (#1692)
* feat: add all_elements test
* refactor
* reimpl md export in cmark-writer
* feat: add support for highlight tag in MarkdownConverter
* feat: refactor LaTeXConverter to improve element processing and add new methods
* feat: impl assets-path feature and add ExternalFrameNode for handling external frames and update writers to support it
* feat: enhance HTML element conversion to include attributes and children handling
* feat: update cmark-writer to 0.6.1 and refactor related code
* feat: refactor HTML element conversion to use create_html_element method and enhance table processing
* fix
* feat: add HighlightNode for highlighted text and integrate with HTML to AST parser and LaTeX writer
* refactoor
refactor: simplify MarkdownDocument structure and parsing logic (#1724)
Co-Authored-By: Hong Jiarong <me@jrhim.com>
* feat: snapshot latex
* test: update snapshot
---------
Co-authored-by: Hong Jiarong <me@jrhim.com>
* Revert "test: update bad snapshot"
This reverts commit 7ba7eb1793.
* fix: update cmark-writer to version 0.6.3 and adjust related snapshots (#1721)
* fix: annotate_docs_error and list level, but bring up 2 new errors.. (#1723)
* fix: adjust list level handling in ListParser during conversion
* fix: manually eval instead of include
* fix: annotate_docs_error, but bring up 2 new errors..
* fix: spaces
* fix: example
---------
Co-authored-by: Myriad-Dreamin <camiyoru@gmail.com>
* fix: no html
* test: update snapshot
---------
Co-authored-by: Hong Jiarong <me@jrhim.com>
* dev: init markdown file
* dev: typlite element derive
* feat: pass tests
refactor lib.rs to separated files (#1692)
feat(typlite): Docx export and export markdown in cmark-writer (#1698)
* feat: docx export support
* refactor: simplify DocxConverter structure and improve content handling
* tests: add binary insta for docx
* feat: add MathBlock style and improve frame rendering in DocxConverter
* fix: enhance paragraph creation(silly method)
* fix: enhance math equation rendering
* use md5 instead of docx binary
* feat: enhance list numbering and paragraph handling in DocxConverter
* feat: add all_elements test
* refactor
* reimpl md export in cmark-writer
* feat: add support for highlight tag in MarkdownConverter
* feat: refactor LaTeXConverter to improve element processing and add new methods
* fmt
* Refactor DOCX converter to improve list handling and document structure
- Introduced separate methods for creating ordered and unordered list numbering.
- Enhanced list management by tracking next numbering IDs.
- Consolidated paragraph and run management within the DocxConverter.
- Improved image processing with better error handling and placeholder support.
- Streamlined the handling of various HTML elements, including headings, lists, and images.
- Added functionality for processing captions and preformatted blocks.
- Updated methods for processing inline styles and links.
* feat: update cmark-writer to version 0.2.0
* feat: refactor code block handling in DOCX converter for improved readability
* refactor: refactor DOCX converter to enhance document structure
* refactor docx to separated files
* update instas
* fmt
* chore: update cmark-writer version to 0.3.0
* fix: ol custom value
* feat: table and grid processing
* use cmark-writer's ast node for consistency
* fix: update snapshot hashes for document generation tests
* fix: add preamble
* update snapshot hashes
* refactor DOCX conversion: Split writer functionality into separate module, enhance image processing, and clean up utility functions
* update comments in LaTeX and Markdown converters for clarity and consistency
* fmt
* delete utils
* feat: support figure node by custom node in cmark-writer
* fix
* fix: frame
* feat: enhance table conversion logic in MarkdownConverter
* refactor: simplify FigureNode implementation by removing CustomNode trait
* chore: update cmark-writer to version 0.5.0
* fix: update figure and raw inline snapshots for consistency
* fix: update snapshot hashes and correct caption reference in markdown.typ
* refactor proj structure
* feat: update CompileArgs to support multiple output files and remove debug option
* docs: update README to clarify usage of multiple output formats and comment out feature section
* remove DocxConverter module
* feat: impl assets-path feature and add ExternalFrameNode for handling external frames and update writers to support it
* feat: enhance HTML element conversion to include attributes and children handling
* feat: update cmark-writer to 0.6.1 and refactor related code
* fix: update snapshots for figure caption, list, outline, and docx generation
* feat: refactor HTML element conversion to use create_html_element method and enhance table processing
* fix
* feat: add HighlightNode for highlighted text and integrate with HTML to AST parser and LaTeX writer
* refactoor
* update tests
Co-Authored-By: Hong Jiarong <me@jrhim.com>
* feat: revert latex/docx conversions
* fix: warnings
* bad: convert docs
* build: remove other cargo deps
* build: update cargo.lock
* test: update snapshot
* chore: remove useless parser trait
* feat: annotate v1
* feat: annotate v2
* test: update snapshot
* question: is it a bug?
* test: update bad snapshot
---------
Co-authored-by: Hong Jiarong <me@jrhim.com>
* fix: remove unnecessary &mut in FontResolverImpl::append_font()
* refactor: better readablity in FontResolverImpl::rebuild()
* feat: FontResovlerImpl::clone_and_rebuild()
Change FontSlot to store Arc to QueryRef<Font, FontLoader>, so we can
clone FontSlot and share the cached loaded font between different slots.
Since CompilerUniverse only holds a immutable Arc to FontResovlerImpl,
adding clone_and_rebuild method allow us to append and rebuild without
mutable access to FontResovlerImpl.
* refactor: remove partial_book and modify methods from FontResolverImpl
partial_book is removed from FontResolverImpl, all the modifying methods
are also removed.
new method get_fonts and new_with_fonts are added.
If you want to modify fonts, you can get all fonts and modify them, then
call new_with_fonts to create a new FontResolverImpl.
* refactor: SystemFontSearch, BrowserFontSearch
- Both font searcher now is just a wrapper for Vec<(FontInfo,
FontSlot)>, typst::FontBook will be built when converting into
FontResolverImpl.
- Provide a method with_fonts_mut() so user can get a direct mutable
access to the under lying fonts vector to do any changes.
- Support searcher -> resolver and resolver -> searcher conversion.
* refactor: api change to biulder pattern
Method new_with_resolver() is added since CompilerUniverse only holds
Arc reference to resolver, and we can't move it out.
* fix: add fontdb::Database to SystemFontSearcher
Store fonts info in db, load them in bulk when calling flush()
* chore: merge `FontResolverImpl` and `TinymistFontResolver`
* feat: remove font profile feature
* feat: remove project font
* docs: comment the font resolver trait
* docs: comment the font slot struct
* docs: comment the crate
* test: move system tests
* dev: clean resolver
* dev: clean searchers
* dev: clean par iters
* feat: enrich memory font resolver
* todo: useless reuse
* dev: remove reuse api
* dev: build font book in `fn build`
* fix: make clippy happy
* fix: bad use
---------
Co-authored-by: c0per <60544162+c0per@users.noreply.github.com>
* feat: set flag to indicate whether we are compiling files
g1
dev: stateless compile
dev: vfs revise apis
g1
feat: bump revision on state changes
feat: track font and package changes
dev: some cases that can change state of cache
changes
* feat: implement shared source cache
* fix: take db state
* dev: update take state location
* fix: example