Posts

Typst - Reusability

Sharing String Contents

Typst offers the capability of content reuse by allowing for file imports. It makes extensive use of functions to perform special manipulation of text.

Shared Function - Load Function from File

Reusable content can be defined in another file within a function. This function when called will yield the shared content.

// shared-function.typ

#let content() = {
[ 
  = Content from another file
 Shared appears here.
 ]
}

The sample.typ will load the content from shared-function.typ.

// sample.typ

#import("shared-function.typ"): *
#content()
Categories: #shell #typst
Typst - LaTeX Alternative

Typesetting Documents with Rust

LaTeX is a time-honored typesetting application that has developed a large community. With age, comes accumulation of the wealth of packages for general document creation. Although it is tool that is well-developed, it tends to be slower and is burden with a legacy design that is not as performant as newer tools. Since its use is so pervasive, it has become entrenched in the document creation community preventing new competing application has come forth. However, there is an alternative that is worth considering and that one is Typst.

Categories: #shell #typst
Tags: #NodeJs
Oclif and Vite

Incompatibility with CLI Build

If you intend to build out an Oclif typescript CLI app that is to be consumed by Vitejs, you might experience an issue with integrating the two. The Oclif CLI builds properly, but when executing the CLI through vite, this errors comes up.

[ERR_UNKNOWN_FILE_EXTENSION] TypeError Plugin: ... [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" ...
Categories: #shell #typescript
Tags: #NodeJs
PyQT - Collapsible Sections

PyQt - Accordion Equivalent

When there are groups of related information that are to be made available for viewing, but is too visually cluttering when shown all at once, one can use the grouping behavior of an accordion or collapsible section to selectively show information.

One native Qt widget that can be used in PyQT is the QtToolBox. This widget offers a vertical list of collapsible containers where only one can be viewed at a time. It behaves similar to a tab view except the the tab and its associated content are bunched together.

Categories: #python
Tags: #pyqt