Skip to content

Ideas and Projects

Stefan Löffler edited this page Feb 20, 2024 · 4 revisions

This page lists a couple of coding projects that are in our queue. This list is not necessarily exhaustive, but gives some reasonably well-defined tasks that should typically not interfere too much with other tasks.

If you are interested to help, browse this list and pick a task you are interested in and feeling up to. Please drop us a line or post to the mailing list before launching into coding to avoid problems down the road.

Note that:

  • most (if not all) projects below require some knowledge of C++, and
  • you need to be able to build TeXworks from source. See Building for instruction to get started.

If you don't have experience with C++/programming but want to help the project in other ways, please have a look at the TeXworks homepage for other ways to get involved.

Note: Please don't add your own ideas in the comments section. Instead, open a new issue or drop us a note on the mailing list to keep this page organized.

Note: the term "module" below refers to logical code units. In the future, it may also refer to C++20 module components.

Dialog to insert control data

TeXworks can be controlled by special "%!TEX" control strings at the beginning of the file, yet it lacks an easy UI to add/edit/remove them. Before coding, you can discuss the design and implementation.

  • Difficulty: easy
  • Time: short
  • Prerequisites: (C++, Qt) or QtScript
  • Related issues: issue 70

Spellchecker module

Currently, the spellchecker Hunspell is integrated tightly into the editor (and some other parts of the code). The purpose of this project is to refactor it into a module of its own with a well-defined interface to the editor. This makes it easy to support other/multiple spell checking backends (e.g., Enchant) or to add other nifty features (such as multiple dictionaries, a spell checking dialog, etc.). Before coding, you can discuss the design and implementation.

Syntax highlighting module

Currently, the syntax highlighting module is tightly integrated into the editor (and some other parts of the code). The goal of this project is to refactor it into a module of its own with a well-defined interface to the editor (which should be generic enough to allow other highlighters, such as the spellchecker, to use it as well). Before coding, you can discuss the design and implementation.

  • Difficulty: easy-intermediate
  • Time: short
  • Prerequisites: C++

Autocompletion module

Currently, autocompletion is tightly integrated into the editor (and some other parts of the code). The aim of this project is to refactor it into a module of its own with a well-defined interface to the editor (which should be generic enough to allow other context-sensitive suggestion-providing components, such as the spell checker, to use it as well). This should also include "code hinting" (i.e., a drop down list popping up during typing). Before coding, you can discuss the design and implementation.

Enhanced syntax highlighting

The current syntax highlighting definition is based exclusively on regular expressions. This prevents certain often-needed features, such as highlighting everything between matching pairs of parentheses. The purpose of this project is to implement extended syntax highlighting patterns (using, e.g., a combination of regular expressions and a self-written parser). Before coding, you can discuss the design and implementation.

Keyboard shortcut manager

TeXworks supports keyboard shortcuts for a wide variety of functions, including scripts. There currently is no easy way (i.e., no GUI) to view them or customize them. A good starter could be the Qt source code (Qt Designer includes a keyboard definition GUI widget). Before coding, you can discuss the design and implementation.

Per-script permissions

Currently, permissions and security settings can only be applied on a global basis for all scripts. The goal of this project is to allow script-specific overrides. Since this tackles security issues, a lot of planning and design is required before actually starting coding. Before coding, you can discuss the design and implementation.

  • Difficulty: intermediate-challenging
  • Time: medium
  • Prerequisites: C++
  • Related issues: issue 359

Automatic charset detection

TeXworks supports a variety of encodings through Qt, but not method is currently available to guesstimate the correct encoding when loading a file. Instead, choosing the correct encoding is left to the user, which is not "lowering the entry barrier". Most likely, this project will be implemented on top of an existing library, such as a Mozilla Charset Detector. Before coding, you can discuss the design and implementation.

  • Difficulty: intermediate-challenging
  • Time: medium
  • Prerequisites: C++
  • Related issues: issue 130, issue 371

Dynamically callable scripts

Currently, scripts in TeXworks only support a very linear control flow: once they are started, they have to run to the end before control is returned to the main application. While this is useful for many simple or linear tasks, it keeps scripting from unfolding its full potential. The aim of this project is to implement the possibility for script functions to be called dynamically. On the one hand, this would enable scripts to call functions of other scripts, thereby opening the possibility to build and use "script function libraries". On the other hand, this would allow (with some hacking of Qt's meta-object-system) for scripts to respond to Qt signals, which in turn would open the road for script-based toolbar icons, symbol palettes, etc. Before coding, you can discuss the design and implementation.

  • Difficulty: challenging
  • Time: long
  • Prerequisites: C++, Qt, QtScript/JavaScript, Lua
  • Related issues: issue 317, issue 369

Clone this wiki locally