| |
CompPad is a LibreOffice extension for performing units-aware
engineering calculations within a Writer document, allowing calculations to be
documented using all of the resources of the Writer application. It has
functionality similar to Mathcad, but is not intended to be a Mathcad clone.
Rather, I hope it might prove more flexible and extensible, and that it might
encourage other free / open-source alternatives to a proprietary engineering
"Killer App."
| |
CompPad allows you to create technical calculations in the form of
conventional-looking mathematical expressions using the LibreOffice equation
editor. This editor has a simple text syntax that some consider to be faster and
more intuitive than other equation editors. Then, with the click of a toolbar
icon, CompPad will evaluate the expressions and display the results, embedded in
your document. All of the features of LibreOffice are available for
documenting and formatting your document so that it can be presented with pride
to co-workers, customers, professors, etc.
NOTE: This page is fairly static. The most up-to-date information may be found on the
Discussion Forum.
Example
Here is an example of how you might use CompPad. It is a simple
mechanical harmonic oscillator example based on the Wikipedia
topic . You
can download this example here:
example - harmonic oscillator.odt.
- Install the CompPad extension (easy, see below.)
- Open a new LibreOffice Writer document. You should see a toolbar that
looks like this:
.
- First we define the mass of the oscillator. Enter the following text in
the toolbar edit field
:
(without quotation marks) "M:=10 kg"
- Press "enter" or click
.
The following formula will be created:
- Use the mouse to move the cursor to a point after the formula. Now you
can create another formula or edit text.
- Define the spring constant:
"K:= 4 lbf/inch"
- Calculate the natural frequency of the oscillator:
"f_n := 1 over {2 %pi} sqrt{ K over M}="
- To evaluate the expressions you've entered so far, click
. You will see that the last expression gets updated with the
result of the calculation:
Notice how the units of measure were handled automatically. Even though we
entered quantities in both SI and US Customary units, the correct solution was
computed.
- Define the amplitude of the oscillation:
"A:= 2 cm"
- Define position as a function of time:
"x(t) := A cos left( sqrt{K over M } t right)"
- Create a time vector with 21 elements, ranging from 0 to 1 s:
"t:={0 dotslow 20} over 20 s"
- Then calculate the position vector:
x_t:= x(t)
- To plot position vs. time:
"plotxy(t,x_t)"
- Finally, click
. You will see the following plot added to the document:
Now, you can add text, pictures, formatting, and other elements using all of
the features of LibreOffice Writer. If you need to change a parameter in
the calculation, you can make your changes using the equation editor, and then
to re-evaluate the document.
CompPadDemo.odt demonstrates all the features of CompPad in a writer
document. Also, check out the example files.
Screenshots
Click thumbnails for full-size image.
Installation
- All releases are available
HERE.
- New users should download the most recent .oxt from "0.5" - this is the
current release and the default download.
- The older Java-based releases remain available under "Stable" if you need
them.
- In LibreOffice, installing the extension for the
first time should be as simple as opening the .oxt file using "File" -> "Open",
or via "Tools" -> "Extension Manager".
- After installing, you will need to re-start LibreOffice.
- If you are upgrading from a previous version of CompPad, the above procedure
may work. However, if it fails, ask on the
Discussion Forum
The current release (0.5.03) is implemented in Python and requires no Java
runtime - it uses the Python scripting support built into LibreOffice, and has
been tested with LibreOffice 26.2. It should run on Windows, Linux, macOS, and
other operating systems that support LibreOffice.
The legacy 0.4.x releases under "Stable" are implemented in Java and require
Java 11.
Using CompPad
- Try the example above
- For a document with an extensive list of examples, download
CompPadDemo.odt . This file demonstrates most of the features of CompPad and
should help you get started.
- Try changing the expressions in these examples, or create a new document with
your own expressions. If you get an error, double-check the offending formula.
- If you're stuck, search the Discussion Forum
to see if your question has already been answered.
- Post questions, bug-reports and feature requests to the Discussion Forum .
Example Files
CompPadDemo.odt
is a document which contains examples of most CompPad features.
example - fluid mechanics.odt
Current Status
CompPad is usable and has been reportedly used to evaluate documents with
hundreds of formulas.
Here are a few of the features that are supported in the most recent version:
- Single-line function definition
- Quick editing of formulas using edit field in tool-bar.
- Real and Complex numbers, booleans, vectors and matrices
- Units of measure are handled in all quantities and calculations.
- Units are displayed according to the specified system of units. Options are
"SI","US","CGS".
- Support for alternate decimal separators - either "." or ","
- Basic operators including arithmetical, exponential, comparison, rounding,
trigonometric, logarithmic, exponential..
- Vector / matrix operators including transpose, multiply, Min, max, sum,
product. Scalar operators can also be applied to vectors.
- Basic X-Y plotting
- Complex variable names consisting of almost any combination of text or formula element.
- Changing expression color
- Blocking evaluation of an expression.
- Setting number of displayed significant figures or decimal places.
- import expressions from a text file.
If you require a certain feature for CompPad to be useful to you, please
let me know. I may be able to give it priority.
Development
CompPad is being actively developed.
Following are a few features I hope to implement eventually:
- Import expressions from other documents
- Read from and write to cells in LibreOffice Calc.
- Solve blocks
- Function blocks
- Control stuctures (do-loops, if-then-else, etc.)
- More complete set of built-in functions and operators, including integrals and
derivatives.
- Symbolic operations, using
Maxima as a symbolic engine
- Localization
- Plug-in framework for adding new functions, operators, etc.
- Web interface
Contribute
Currently the best way to contribute is to try out CompPad, and post your
question and comments to the Discussion Forum. Your
comments help me know what is important to users. I would especially like to know how you would
like to use CompPad. If you require a certain feature in order for CompPad to be
useful to you, then let me know. I may be able to give it priority.
If you like CompPad, please let people know by posting a message in your blog,
in on-line forums, or other news outlets. If you don't like it, then post on the
Discussion Forum and tell me why!
Financial contributions are also welcome, and will mostly be used to fund
Claude usage.
License
Source code is provided under the terms of the GPL Ver. 3. It is available
through GIT on the Sourceforge Project Page.

Copyright 2026. All Rights Reserved.
|
News
File Releases
0.5 (current)
Stable (legacy 0.4.x - Java)
|
|