From 3842977eec61c356f347e3f20f0b5b2ce58d9f52 Mon Sep 17 00:00:00 2001
From: Adrien Hopkins <adrien.p.hopkins@gmail.com>
Date: Sat, 16 Sep 2023 16:06:33 -0500
Subject: Add config file info to user manual

---
 docs/manual.tex | 57 +++++++++++++++++++++++++++++++++++++--------------------
 1 file changed, 37 insertions(+), 20 deletions(-)

(limited to 'docs/manual.tex')

diff --git a/docs/manual.tex b/docs/manual.tex
index e82dac5..3ed9b35 100644
--- a/docs/manual.tex
+++ b/docs/manual.tex
@@ -1,16 +1,14 @@
-% Created 2022-07-17 Sun 16:22
+% Created 2023-09-16 Sat 16:05
 % Intended LaTeX compiler: pdflatex
 \documentclass[11pt]{article}
 \usepackage[utf8]{inputenc}
 \usepackage[T1]{fontenc}
 \usepackage{graphicx}
-\usepackage{grffile}
 \usepackage{longtable}
 \usepackage{wrapfig}
 \usepackage{rotating}
 \usepackage[normalem]{ulem}
 \usepackage{amsmath}
-\usepackage{textcomp}
 \usepackage{amssymb}
 \usepackage{capt-of}
 \usepackage{hyperref}
@@ -23,7 +21,7 @@
  pdftitle={7Units User Manual},
  pdfkeywords={},
  pdfsubject={},
- pdfcreator={Emacs 27.1 (Org mode 9.4.6)}, 
+ pdfcreator={Emacs 28.1 (Org mode 9.6.7)}, 
  pdflang={English}}
 \begin{document}
 
@@ -32,21 +30,21 @@
 
 \newpage
 \section{Introduction and Purpose}
-\label{sec:org24a029b}
+\label{sec:orgc38fb26}
 7Units is a program that can be used to convert units.  This document outlines how to use the program.
 \section{System Requirements}
-\label{sec:orgab28d01}
+\label{sec:org0d264f4}
 \begin{itemize}
-\item Works on all major operating systems \\
+\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
 \end{itemize}
 
 \newpage
 \section{How to Use 7Units}
-\label{sec:org23427ab}
+\label{sec:orgdf5e3e6}
 \subsection{Simple Unit Conversion}
-\label{sec:org91a1ab6}
+\label{sec:orga203874}
 \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]
@@ -71,7 +69,7 @@
 \end{figure}
 \end{enumerate}
 \subsection{Complex Unit Conversion}
-\label{sec:orgf8fd5b1}
+\label{sec:org488accc}
 \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]
@@ -79,7 +77,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:org7ac3fe5]{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:org0d36b62]{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]
@@ -89,7 +87,7 @@
 \end{figure}
 \end{enumerate}
 \section{7Units Settings}
-\label{sec:org72dc17b}
+\label{sec:org24852a4}
 All settings can be accessed in the tab with the gear icon.
 \begin{figure}[htbp]
 \centering
@@ -97,7 +95,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:org690a0a5}
+\label{sec:org49cb400}
 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.
@@ -105,7 +103,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:orgef19465}
+\label{sec:orgdad3f6a}
 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.
@@ -120,7 +118,7 @@ These settings control when you are allowed to repeat unit prefixes (e.g. kiloki
 \end{itemize}
 \end{description}
 \subsection{Search Settings}
-\label{sec:org038add7}
+\label{sec:orge892f5f}
 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.
@@ -128,15 +126,34 @@ 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:orgbd23cc6}
+\label{sec:orgf983011}
 \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.
 \end{description}
+\subsection{Configuration File}
+\label{sec:orgf29eb6d}
+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.
+
+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:
+\begin{description}
+\item[{\texttt{number\_display\_rule}}] The rounding rule.  This can be \texttt{FIXED\_DECIMALS}, \texttt{FIXED\_PRECISION}, or \texttt{FIXED\_UNCERTAINTY}.  The first two must have a space then a number after them to set the number of decimal places or significant digits.
+\item[{\texttt{prefix\_rule}}] The prefix repetition rule; Can be either \texttt{NO\_REPETITION}, \texttt{NO\_RESTRICTION}, \\[0pt]
+or \texttt{COMPLEX\_REPETITION}.
+\item[{\texttt{one\_way}}] Whether One-Way Conversion is enabled; can be either \texttt{true} or \texttt{false}.
+\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}.
+\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:org4ceffe9}
+\label{sec:org613821e}
 \subsection{Unit Expressions}
-\label{sec:org7ac3fe5}
+\label{sec:org0d36b62}
 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
@@ -146,6 +163,6 @@ A unit expression is simply a math expression where the values being operated on
 
 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
 \subsection{Other Expressions}
-\label{sec:orga66137e}
+\label{sec:org036b96f}
 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}
+\end{document}
\ No newline at end of file
-- 
cgit v1.2.3

