summaryrefslogtreecommitdiff
path: root/docs/manual.org
diff options
context:
space:
mode:
Diffstat (limited to 'docs/manual.org')
-rw-r--r--docs/manual.org21
1 files changed, 19 insertions, 2 deletions
diff --git a/docs/manual.org b/docs/manual.org
index 47302d3..3c6de1c 100644
--- a/docs/manual.org
+++ b/docs/manual.org
@@ -1,6 +1,6 @@
#+TITLE: 7Units User Manual
-#+SUBTITLE: For Version 0.4.0
-#+DATE: 2022 July 8
+#+SUBTITLE: For Version 0.5.0
+#+DATE: 2024 March 23
#+LaTeX_HEADER: \usepackage[a4paper, lmargin=25mm, rmargin=25mm, tmargin=25mm, bmargin=25mm]{geometry}
#+LaTeX: \newpage
@@ -73,11 +73,28 @@
** Miscellaneous Settings
- Convert One Way Only :: In the simple conversion tab, only imperial/customary units will be shown on the left, and only metric units[fn:1] will be shown on the right. Units listed in the exceptions file (~src/main/resources/metric_exceptions.txt~) will be shown on both sides. This is a way to reduce the number of options you must search through if you only convert one way. The expressions tab is unaffected.
- Show Duplicates in "Convert Units" :: If unchecked, any unit that has multiple names will only have one included in the Convert Units lists. The selected name will be the longest; if there are multiple longest names one is selected arbitrarily. You will still be able to use these alternate names in the expressions tab.
+** Configuration File
+The settings are saved in a configuration file. On Windows, this is located at \\
+~%USERPROFILE%/AppData/Local/SevenUnits/config.txt~. On other operating systems, this is located at ~$HOME/.config/SevenUnits/config.txt~. The directory containing the ~SevenUnits~ directory can be overridden with the environment variables ~$LOCALAPPDATA~ on Windows or ~$XDG_CONFIG_HOME~ elsewhere.
+
+Each line of this file contains a setting name, followed by an equal sign (not surrounded by spaces), then the setting value.
+
+The possible setting names are:
+- ~number_display_rule~ :: The rounding rule. This can be ~FIXED_DECIMALS~, ~FIXED_PRECISION~, or ~FIXED_UNCERTAINTY~. The first two must have a space then a number after them to set the number of decimal places or significant digits.
+- ~prefix_rule~ :: The prefix repetition rule; Can be either ~NO_REPETITION~, ~NO_RESTRICTION~, \\
+ or ~COMPLEX_REPETITION~.
+- ~one_way~ :: Whether One-Way Conversion is enabled; can be either ~true~ or ~false~.
+- ~include_duplicates~ :: Whether duplicate units should be shown; can be either ~true~ or ~false~.
+- ~search_prefix_rule~ :: The prefix search rule; can be ~NO_PREFIXES~, ~COMMON_PREFIXES~, \\
+ or ~ALL_METRIC_PREFIXES~.
+
+You can also use the special setting names ~custom_unit_file~, ~custom_dimension_file~ and ~custom_exception_file~ to add custom units, dimensions and metric exceptions to the system. These files use the same format as the standard files. These setting names can be used more than once to include multiple unit, dimension or exception files.
* Appendices
** Unit Expressions
A unit expression is simply a math expression where the values being operated on are units or numbers. The operations that can be used are (in order of precedence):
- Exponentiation (^); the exponent must be an integer. Both units and numbers can be raised to an exponent
- Multiplication (*) and division (/). Multiplication can also be done with a space (so "15 meter" is the same thing as "15 * meter").
+ You can also divide with ~|~ to create fractions. Using ~|~ instead of ~/~ gives the division a higher precedence than any other operator. For example, "2|5^2" evaluates to 4/25, not 2/25.
- Addition (+) and subtraction (-). They can only be done between units of the same dimension (measuring the same thing). So you can add metres, inches and feet together, and you can add joules and calories together, but you can't add metres to seconds, or feet to calories, or watts to pounds.
Brackets can be used to manipulate the order of operations, and nonlinear units like Celsius and Fahrenheit cannot be used in expressions. You can use a value in a nonlinear unit by putting brackets after it - for example, degC(12) represents the value 12 \deg C