diff options
Diffstat (limited to 'docs/manual.tex')
-rw-r--r-- | docs/manual.tex | 56 |
1 files changed, 31 insertions, 25 deletions
diff --git a/docs/manual.tex b/docs/manual.tex index e16198f..8ab09d5 100644 --- a/docs/manual.tex +++ b/docs/manual.tex @@ -1,4 +1,4 @@ -% Created 2024-03-24 Sun 13:16 +% Created 2025-06-07 Sat 18:16 % Intended LaTeX compiler: pdflatex \documentclass[11pt]{article} \usepackage[utf8]{inputenc} @@ -13,15 +13,15 @@ \usepackage{capt-of} \usepackage{hyperref} \usepackage[a4paper, lmargin=25mm, rmargin=25mm, tmargin=25mm, bmargin=25mm]{geometry} -\date{2024 March 23} +\date{2025 June 1} \title{7Units User Manual\\\medskip -\large For Version 0.5.0} +\large For Version 1.0.0} \hypersetup{ pdfauthor={}, pdftitle={7Units User Manual}, pdfkeywords={}, pdfsubject={}, - pdfcreator={Emacs 29.2 (Org mode 9.6.15)}, + pdfcreator={Emacs 29.3 (Org mode 9.6.15)}, pdflang={English}} \begin{document} @@ -30,21 +30,22 @@ \newpage \section{Introduction and Purpose} -\label{sec:orgc09fcc7} +\label{sec:orgf5013f4} 7Units is a program that can be used to convert units. This document outlines how to use the program. \section{System Requirements} -\label{sec:orga902335} +\label{sec:org9c3bf6a} \begin{itemize} \item Works on all major operating systems \\[0pt] \textbf{NOTE:} All screenshots in this document were taken on Windows 10. If you use a different operating system, the program will probably look different than what is shown. \item Java version 11+ required +\item Gradle required +\item To run the software, simply run './gradlew run' in the main directory. \end{itemize} - \newpage \section{How to Use 7Units} -\label{sec:orgdec078f} +\label{sec:org6a030cf} \subsection{Simple Unit Conversion} -\label{sec:org785ebcb} +\label{sec:org4406ca2} \begin{enumerate} \item Select the "Convert Units" tab if it is not already selected. You should see a screen like in figure \ref{main-interface-dimension}: \begin{figure}[htbp] @@ -69,7 +70,7 @@ \end{figure} \end{enumerate} \subsection{Complex Unit Conversion} -\label{sec:org75a0192} +\label{sec:org721af5f} \begin{enumerate} \item Select the "Convert Unit Expressions" if it is not already selected. You should see a screen like in figure \ref{main-interface-expression}: \begin{figure}[htbp] @@ -77,7 +78,7 @@ \includegraphics[height=250px]{../screenshots/main-interface-expression-converter.png} \caption{\label{main-interface-expression}Taken in version 0.3.0} \end{figure} -\item Enter a \hyperref[sec:org3724d84]{unit expression} in the From box. This can be something like "\texttt{7 km}" or "\texttt{6 ft - 2 in}" or "\texttt{3 kg m + 9 lb ft + (35 mm)\textasciicircum{}2 * (85 oz) / (20 in)}". +\item Enter a \hyperref[sec:orgfffe912]{unit expression} in the From box. This can be something like "\texttt{7 km}" or "\texttt{6 ft - 2 in}" or "\texttt{3 kg m + 9 lb ft + (35 mm)\textasciicircum{}2 * (85 oz) / (20 in)}". \item Enter a unit name (or another unit expression) in the To box. \item Press the Convert button. This will calculate the value of the first expression, and convert it to a multiple of the second unit (or expression). \begin{figure}[htbp] @@ -87,7 +88,7 @@ \end{figure} \end{enumerate} \section{7Units Settings} -\label{sec:orgae2806f} +\label{sec:org437288e} All settings can be accessed in the tab with the gear icon. \begin{figure}[htbp] \centering @@ -95,7 +96,7 @@ All settings can be accessed in the tab with the gear icon. \caption{The settings menu, as of version 0.4.0} \end{figure} \subsection{Rounding Settings} -\label{sec:org6d3e49c} +\label{sec:orgc275b0f} These settings control how the output of a unit conversion is rounded. \begin{description} \item[{Fixed Precision}] Round to a fixed number of \href{https://en.wikipedia.org/wiki/Significant\_figures}{significant digits}. The number of significant digits is controlled by the precision slider below. @@ -103,7 +104,7 @@ These settings control how the output of a unit conversion is rounded. \item[{Scientific Precision}] Intelligent rounding which uses the precision of the input value(s) to determine the output precision. Not affected by the precision slider. \end{description} \subsection{Prefix Repetition Settings} -\label{sec:org9aa98f8} +\label{sec:org1789e5a} These settings control when you are allowed to repeat unit prefixes (e.g. kilokilometre) \begin{description} \item[{No Repetition}] Units may only have one prefix. @@ -118,7 +119,7 @@ These settings control when you are allowed to repeat unit prefixes (e.g. kiloki \end{itemize} \end{description} \subsection{Search Settings} -\label{sec:org2745ba0} +\label{sec:orgfcf1ac1} These settings control which prefixes are shown in the "Convert Units" tab. Only coherent SI units (e.g. metre, second, newton, joule) will get prefixes. Some prefixed units are created in the unitfile, and will stay regardless of this setting (though they can be removed from the unitfile). \begin{description} \item[{Never Include Prefixed Units}] Prefixed units will only be shown if they are explicitly added to the unitfile. @@ -126,13 +127,15 @@ These settings control which prefixes are shown in the "Convert Units" tab. Onl \item[{Include All Single Prefixes}] Every coherent unit will have every prefixed version of it included in the list. \end{description} \subsection{Miscellaneous Settings} -\label{sec:orgeabb2df} +\label{sec:org2a48ec0} \begin{description} \item[{Convert One Way Only}] In the simple conversion tab, only imperial/customary units will be shown on the left, and only metric units\footnote{7Units's definition of "metric" is stricter than the SI, but all of the common units that are commonly considered metric but not included in 7Units's definition are included in the exceptions file.} will be shown on the right. Units listed in the exceptions file (\texttt{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. \item[{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. +\item[{Use Default Datafiles}] If unchecked, the default units, prefixes and diension names will not be loaded (except for SI base units and their dimensions). +\item[{Locale}] Which language is used for the interface of 7Units. Custom locales can be added. \end{description} \subsection{Configuration File} -\label{sec:org4cc2874} +\label{sec:orgd976cbf} The settings are saved in a configuration file. On Windows, this is located at \\[0pt] \texttt{\%USERPROFILE\%/AppData/Local/SevenUnits/config.txt}. On other operating systems, this is located at \texttt{\$HOME/.config/SevenUnits/config.txt}. The directory containing the \texttt{SevenUnits} directory can be overridden with the environment variables \texttt{\$LOCALAPPDATA} on Windows or \texttt{\$XDG\_CONFIG\_HOME} elsewhere. @@ -147,23 +150,26 @@ or \texttt{COMPLEX\_REPETITION}. \item[{\texttt{include\_duplicates}}] Whether duplicate units should be shown; can be either \texttt{true} or \texttt{false}. \item[{\texttt{search\_prefix\_rule}}] The prefix search rule; can be \texttt{NO\_PREFIXES}, \texttt{COMMON\_PREFIXES}, \\[0pt] or \texttt{ALL\_METRIC\_PREFIXES}. +\item[{\texttt{use\_default\_datafiles}}] Whether default datafiles should be used; can be either \texttt{true} or \texttt{false}. +\item[{\texttt{locale}}] The name of the locale to use. +This is the name of a locale file, excluding the extension, in one of the directories specified in the data specification. For example, if this is 'en', 7Units will look for a file called 'en.txt' in either \texttt{src/main/resources/locales/} or \texttt{[CONFIG]/locales/}. \end{description} You can also use the special setting names \texttt{custom\_unit\_file}, \texttt{custom\_dimension\_file} and \texttt{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. \section{Appendices} -\label{sec:org60385a7} +\label{sec:orgec4e8a9} \subsection{Unit Expressions} -\label{sec:org3724d84} +\label{sec:orgfffe912} 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): \begin{itemize} -\item Exponentiation (\^{}); the exponent must be an integer. Both units and numbers can be raised to an exponent -\item Multiplication (*) and division (/). Multiplication can also be done with a space (so "15 meter" is the same thing as "15 * meter"). +\item Exponentiation (\^{}); the exponent must be an integer. Both units and numbers can be raised to an exponent. +\item Multiplication (*) and division (/). Multiplication can also be done with a space (so "15 meter" is the same thing as "15 * meter"), and multiplication using spaces has higher precedence than division. Therefore, "2 m / 1 m" is the number 2, while "2 * m / 1 * m" is equal to 2 m\textsuperscript{2}. You can also divide with \texttt{|} to create fractions. Using \texttt{|} instead of \texttt{/} gives the division a higher precedence than any other operator. For example, "2|5\textsuperscript{2}" evaluates to 4/25, not 2/25. -\item 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. -\end{itemize} +\item 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. \textbf{You must use spaces between terms when adding or subtracting - "1 + 2" is valid, "1+2" is not. This only applies to addition and subtraction - other operators do not need spaces between them.} This is done to avoid complex rules when working with negative numbers and e-notation. -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 \textdegree{} C +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 \textdegree{}C +\end{itemize} \subsection{Other Expressions} -\label{sec:orgc72a672} +\label{sec:org5d2d129} There are also a simplified version of expressions for prefixes and dimensions. Only multiplication, division and exponentation are supported. Currently, exponentation is not supported for dimensions, but that may be fixed in the future. \end{document} |