;doc: regen manuals

[ci skip]
This commit is contained in:
Simon Michael 2019-09-27 14:32:59 -10:00
parent 64f49a8c02
commit fd8c6935e8
3 changed files with 360 additions and 302 deletions

View File

@ -337,119 +337,134 @@ Account names can be aliased.
.SS Amounts .SS Amounts
.PP .PP
After the account name, there is usually an amount. After the account name, there is usually an amount.
Important: between account name and amount, there must be \f[B]two or (Important: between account name and amount, there must be \f[B]two or
more spaces\f[R]. more spaces\f[R].)
.PP .PP
Amounts consist of a number and (usually) a currency symbol or commodity hledger\[aq]s amount format is flexible, supporting several
name. international formats.
Some examples: Here are some examples.
Amounts have a number (the \[dq]quantity\[dq]):
.IP
.nf
\f[C]
1
\f[R]
.fi
.PP .PP
\f[C]2.00001\f[R] \&..and usually a currency or commodity name (the \[dq]commodity\[dq]).
.PD 0 This is a symbol, word, or phrase, to the left or right of the quantity,
.P with or without a separating space:
.PD .IP
\f[C]$1\f[R] .nf
.PD 0 \f[C]
.P $1
.PD 4000 AAPL
\f[C]4000 AAPL\f[R] \f[R]
.PD 0 .fi
.P
.PD
\f[C]3 \[dq]green apples\[dq]\f[R]
.PD 0
.P
.PD
\f[C]-$1,000,000.00\f[R]
.PD 0
.P
.PD
\f[C]INR 9,99,99,999.00\f[R]
.PD 0
.P
.PD
\f[C]EUR -2.000.000,00\f[R]
.PD 0
.P
.PD
\f[C]1 999 999.9455\f[R]
.PD 0
.P
.PD
\f[C]EUR 1E3\f[R]
.PD 0
.P
.PD
\f[C]1000E-6s\f[R]
.PP .PP
As you can see, the amount format is somewhat flexible: If the commodity name contains spaces, numbers, or punctuation, it must
.IP \[bu] 2 be enclosed in double quotes:
amounts are a number (the \[dq]quantity\[dq]) and optionally a currency .IP
symbol/commodity name (the \[dq]commodity\[dq]). .nf
.IP \[bu] 2 \f[C]
the commodity is a symbol, word, or phrase, on the left or right, with 3 \[dq]no. 42 green apples\[dq]
or without a separating space. \f[R]
If the commodity contains numbers, spaces or non-word punctuation it .fi
must be enclosed in double quotes.
.IP \[bu] 2
negative amounts with a commodity on the left can have the minus sign
before or after it
.IP \[bu] 2
digit groups (thousands, or any other grouping) can be separated by
space or comma or period and should be used as separator between all
groups
.IP \[bu] 2
decimal part can be separated by comma or period and should be different
from digit groups separator
.IP \[bu] 2
scientific E-notation is allowed.
Be careful not to use a digit group separator character in scientific
notation, as it\[aq]s not supported and it might get mistaken for a
decimal point.
(Declaring the digit group separator character explicitly with a
commodity directive will prevent this.)
.PP .PP
You can use any of these variations when recording data. Amounts can be negative.
However, there is some ambiguous way of representing numbers like The minus sign can be written before or after a left-side commodity
\f[C]$1.000\f[R] and \f[C]$1,000\f[R] both may mean either one thousand symbol:
or one dollar. .IP
By default hledger will assume that this is sole delimiter is used only .nf
for decimals. \f[C]
On the other hand commodity format declared prior to that line will help -$1
to resolve that ambiguity differently: $-1
\f[R]
.fi
.PP
Scientific E notation is allowed:
.IP
.nf
\f[C]
1E-6
EUR 1E3
\f[R]
.fi
.PP
A decimal mark (decimal point) can be written with a period or a comma:
.IP
.nf
\f[C]
1.23
1,23456780000009
\f[R]
.fi
.SS Digit group marks
.PP
In the integer part of the quantity (left of the decimal mark), groups
of digits can optionally be separated by a \[dq]digit group mark\[dq] -
a space, comma, or period (different from the decimal mark):
.IP
.nf
\f[C]
$1,000,000.00
EUR 2.000.000,00
INR 9,99,99,999.00
1 000 000.9455
\f[R]
.fi
.PP
Note, a number containing a single group mark and no decimal mark is
ambiguous.
Are these group marks or decimal marks ?
.IP
.nf
\f[C]
1,000
1.000
\f[R]
.fi
.PP
hledger will treat them both as decimal marks by default (cf #793).
If you use digit group marks, to prevent confusion and undetected typos
we recommend you write commodity directives at the top of the file to
explicitly declare the decimal mark (and optionally a digit group mark).
Note, these formats (\[dq]amount styles\[dq]) are specific to each
commodity, so if your data uses multiple formats, hledger can handle it:
.IP .IP
.nf .nf
\f[C] \f[C]
commodity $1,000.00 commodity $1,000.00
commodity EUR 1.000,00
2017/12/25 New life of Scrooge commodity INR 9,99,99,999.00
expenses:gifts $1,000 ;commodity \[dq]\[dq] 1 000 000.9455 ; can\[aq]t declare a format for the null commodity yet
assets
\f[R] \f[R]
.fi .fi
.SS Amount display format
.PP .PP
Though journal may contain mixed styles to represent amount, when For each commodity, hledger chooses a consistent format to use when
hledger displays amounts, it will choose a consistent format for each displaying amounts.
commodity. (Except price amounts, which are always displayed as written).
(Except for price amounts, which are always formatted as written).
The display format is chosen as follows: The display format is chosen as follows:
.IP \[bu] 2 .IP \[bu] 2
if there is a commodity directive specifying the format, that is used If there is a commodity directive for the commodity, that format is used
(see examples above).
.IP \[bu] 2 .IP \[bu] 2
otherwise the format is inferred from the first posting amount in that Otherwise the format of the first posting amount in that commodity seen
commodity in the journal, and the precision (number of decimal places) in the journal is used.
will be the maximum from all posting amounts in that commmodity But the number of decimal places (\[dq]precision\[dq]) will be the
maximum from all posting amounts in that commmodity.
.IP \[bu] 2 .IP \[bu] 2
or if there are no such amounts in the journal, a default format is used Or if there are no such amounts in the journal, a default format is used
(like \f[C]$1000.00\f[R]). (like \f[C]$1000.00\f[R]).
.PP .PP
Price amounts and amounts in \f[C]D\f[R] directives usually don\[aq]t Price amounts, and amounts in \f[C]D\f[R] directives don\[aq]t affect
affect amount format inference, but in some situations they can do so the amount display format directly, but occasionally they can do so
indirectly. indirectly.
(Eg when D\[aq]s default commodity is applied to a commodity-less (Eg when D\[aq]s default commodity is applied to a commodity-less
amount, or when an amountless posting is balanced using a price\[aq]s amount, or when an amountless posting is balanced using a price\[aq]s
commodity, or when -V is used.) If you find this causing problems, set commodity, or when -V is used.) If you find this causing problems, use a
the desired format with a commodity directive. commodity directive to set the display format.
.SS Virtual Postings .SS Virtual Postings
.PP .PP
When you parenthesise the account name in a posting, we call that a When you parenthesise the account name in a posting, we call that a

View File

@ -337,77 +337,109 @@ File: hledger_journal.info, Node: Amounts, Next: Virtual Postings, Prev: Acco
1.7 Amounts 1.7 Amounts
=========== ===========
After the account name, there is usually an amount. Important: between After the account name, there is usually an amount. (Important: between
account name and amount, there must be *two or more spaces*. account name and amount, there must be *two or more spaces*.)
Amounts consist of a number and (usually) a currency symbol or hledger's amount format is flexible, supporting several international
commodity name. Some examples: formats. Here are some examples. Amounts have a number (the
"quantity"):
'2.00001' 1
'$1'
'4000 AAPL'
'3 "green apples"'
'-$1,000,000.00'
'INR 9,99,99,999.00'
'EUR -2.000.000,00'
'1 999 999.9455'
'EUR 1E3'
'1000E-6s'
As you can see, the amount format is somewhat flexible: ..and usually a currency or commodity name (the "commodity"). This
is a symbol, word, or phrase, to the left or right of the quantity, with
or without a separating space:
* amounts are a number (the "quantity") and optionally a currency $1
symbol/commodity name (the "commodity"). 4000 AAPL
* the commodity is a symbol, word, or phrase, on the left or right,
with or without a separating space. If the commodity contains
numbers, spaces or non-word punctuation it must be enclosed in
double quotes.
* negative amounts with a commodity on the left can have the minus
sign before or after it
* digit groups (thousands, or any other grouping) can be separated by
space or comma or period and should be used as separator between
all groups
* decimal part can be separated by comma or period and should be
different from digit groups separator
* scientific E-notation is allowed. Be careful not to use a digit
group separator character in scientific notation, as it's not
supported and it might get mistaken for a decimal point.
(Declaring the digit group separator character explicitly with a
commodity directive will prevent this.)
You can use any of these variations when recording data. However, If the commodity name contains spaces, numbers, or punctuation, it
there is some ambiguous way of representing numbers like '$1.000' and must be enclosed in double quotes:
'$1,000' both may mean either one thousand or one dollar. By default
hledger will assume that this is sole delimiter is used only for 3 "no. 42 green apples"
decimals. On the other hand commodity format declared prior to that
line will help to resolve that ambiguity differently: Amounts can be negative. The minus sign can be written before or
after a left-side commodity symbol:
-$1
$-1
Scientific E notation is allowed:
1E-6
EUR 1E3
A decimal mark (decimal point) can be written with a period or a
comma:
1.23
1,23456780000009
* Menu:
* Digit group marks::
* Amount display format::

File: hledger_journal.info, Node: Digit group marks, Next: Amount display format, Up: Amounts
1.7.1 Digit group marks
-----------------------
In the integer part of the quantity (left of the decimal mark), groups
of digits can optionally be separated by a "digit group mark" - a space,
comma, or period (different from the decimal mark):
$1,000,000.00
EUR 2.000.000,00
INR 9,99,99,999.00
1 000 000.9455
Note, a number containing a single group mark and no decimal mark is
ambiguous. Are these group marks or decimal marks ?
1,000
1.000
hledger will treat them both as decimal marks by default (cf #793).
If you use digit group marks, to prevent confusion and undetected typos
we recommend you write commodity directives at the top of the file to
explicitly declare the decimal mark (and optionally a digit group mark).
Note, these formats ("amount styles") are specific to each commodity, so
if your data uses multiple formats, hledger can handle it:
commodity $1,000.00 commodity $1,000.00
commodity EUR 1.000,00
commodity INR 9,99,99,999.00
;commodity "" 1 000 000.9455 ; can't declare a format for the null commodity yet
2017/12/25 New life of Scrooge 
expenses:gifts $1,000 File: hledger_journal.info, Node: Amount display format, Prev: Digit group marks, Up: Amounts
assets
Though journal may contain mixed styles to represent amount, when 1.7.2 Amount display format
hledger displays amounts, it will choose a consistent format for each ---------------------------
commodity. (Except for price amounts, which are always formatted as
written). The display format is chosen as follows:
* if there is a commodity directive specifying the format, that is For each commodity, hledger chooses a consistent format to use when
used displaying amounts. (Except price amounts, which are always displayed
* otherwise the format is inferred from the first posting amount in as written). The display format is chosen as follows:
that commodity in the journal, and the precision (number of decimal
places) will be the maximum from all posting amounts in that * If there is a commodity directive for the commodity, that format is
commmodity used (see examples above).
* or if there are no such amounts in the journal, a default format is
* Otherwise the format of the first posting amount in that commodity
seen in the journal is used. But the number of decimal places
("precision") will be the maximum from all posting amounts in that
commmodity.
* Or if there are no such amounts in the journal, a default format is
used (like '$1000.00'). used (like '$1000.00').
Price amounts and amounts in 'D' directives usually don't affect Price amounts, and amounts in 'D' directives don't affect the amount
amount format inference, but in some situations they can do so display format directly, but occasionally they can do so indirectly.
indirectly. (Eg when D's default commodity is applied to a (Eg when D's default commodity is applied to a commodity-less amount, or
commodity-less amount, or when an amountless posting is balanced using a when an amountless posting is balanced using a price's commodity, or
price's commodity, or when -V is used.) If you find this causing when -V is used.) If you find this causing problems, use a commodity
problems, set the desired format with a commodity directive. directive to set the display format.
 
File: hledger_journal.info, Node: Virtual Postings, Next: Balance Assertions, Prev: Amounts, Up: FILE FORMAT File: hledger_journal.info, Node: Virtual Postings, Next: Balance Assertions, Prev: Amounts, Up: FILE FORMAT
@ -1733,91 +1765,95 @@ Node: Account names11337
Ref: #account-names11480 Ref: #account-names11480
Node: Amounts11967 Node: Amounts11967
Ref: #amounts12103 Ref: #amounts12103
Node: Virtual Postings15120 Node: Digit group marks13036
Ref: #virtual-postings15279 Ref: #digit-group-marks13185
Node: Balance Assertions16499 Node: Amount display format14174
Ref: #balance-assertions16674 Ref: #amount-display-format14331
Node: Assertions and ordering17633 Node: Virtual Postings15356
Ref: #assertions-and-ordering17819 Ref: #virtual-postings15515
Node: Assertions and included files18519 Node: Balance Assertions16735
Ref: #assertions-and-included-files18760 Ref: #balance-assertions16910
Node: Assertions and multiple -f options19093 Node: Assertions and ordering17869
Ref: #assertions-and-multiple--f-options19347 Ref: #assertions-and-ordering18055
Node: Assertions and commodities19479 Node: Assertions and included files18755
Ref: #assertions-and-commodities19709 Ref: #assertions-and-included-files18996
Node: Assertions and prices20865 Node: Assertions and multiple -f options19329
Ref: #assertions-and-prices21077 Ref: #assertions-and-multiple--f-options19583
Node: Assertions and subaccounts21517 Node: Assertions and commodities19715
Ref: #assertions-and-subaccounts21744 Ref: #assertions-and-commodities19945
Node: Assertions and virtual postings22068 Node: Assertions and prices21101
Ref: #assertions-and-virtual-postings22308 Ref: #assertions-and-prices21313
Node: Assertions and precision22450 Node: Assertions and subaccounts21753
Ref: #assertions-and-precision22641 Ref: #assertions-and-subaccounts21980
Node: Balance Assignments22908 Node: Assertions and virtual postings22304
Ref: #balance-assignments23089 Ref: #assertions-and-virtual-postings22544
Node: Balance assignments and prices24254 Node: Assertions and precision22686
Ref: #balance-assignments-and-prices24426 Ref: #assertions-and-precision22877
Node: Transaction prices24650 Node: Balance Assignments23144
Ref: #transaction-prices24819 Ref: #balance-assignments23325
Node: Comments27085 Node: Balance assignments and prices24490
Ref: #comments27219 Ref: #balance-assignments-and-prices24662
Node: Tags28389 Node: Transaction prices24886
Ref: #tags28507 Ref: #transaction-prices25055
Node: Directives29900 Node: Comments27321
Ref: #directives30043 Ref: #comments27455
Node: Comment blocks35651 Node: Tags28625
Ref: #comment-blocks35796 Ref: #tags28743
Node: Including other files35972 Node: Directives30136
Ref: #including-other-files36152 Ref: #directives30279
Node: Default year36560 Node: Comment blocks35887
Ref: #default-year36729 Ref: #comment-blocks36032
Node: Declaring commodities37136 Node: Including other files36208
Ref: #declaring-commodities37319 Ref: #including-other-files36388
Node: Default commodity38748 Node: Default year36796
Ref: #default-commodity38924 Ref: #default-year36965
Node: Market prices39558 Node: Declaring commodities37372
Ref: #market-prices39723 Ref: #declaring-commodities37555
Node: Declaring accounts40564 Node: Default commodity38984
Ref: #declaring-accounts40740 Ref: #default-commodity39160
Node: Account comments41665 Node: Market prices39794
Ref: #account-comments41828 Ref: #market-prices39959
Node: Account subdirectives42223 Node: Declaring accounts40800
Ref: #account-subdirectives42418 Ref: #declaring-accounts40976
Node: Account types42731 Node: Account comments41901
Ref: #account-types42915 Ref: #account-comments42064
Node: Account display order44557 Node: Account subdirectives42459
Ref: #account-display-order44727 Ref: #account-subdirectives42654
Node: Rewriting accounts45856 Node: Account types42967
Ref: #rewriting-accounts46041 Ref: #account-types43151
Node: Basic aliases46777 Node: Account display order44793
Ref: #basic-aliases46923 Ref: #account-display-order44963
Node: Regex aliases47627 Node: Rewriting accounts46092
Ref: #regex-aliases47799 Ref: #rewriting-accounts46277
Node: Combining aliases48517 Node: Basic aliases47013
Ref: #combining-aliases48695 Ref: #basic-aliases47159
Node: end aliases49971 Node: Regex aliases47863
Ref: #end-aliases50119 Ref: #regex-aliases48035
Node: Default parent account50220 Node: Combining aliases48753
Ref: #default-parent-account50386 Ref: #combining-aliases48931
Node: Periodic transactions51270 Node: end aliases50207
Ref: #periodic-transactions51468 Ref: #end-aliases50355
Node: Periodic rule syntax53340 Node: Default parent account50456
Ref: #periodic-rule-syntax53546 Ref: #default-parent-account50622
Node: Two spaces between period expression and description!54250 Node: Periodic transactions51506
Ref: #two-spaces-between-period-expression-and-description54569 Ref: #periodic-transactions51704
Node: Forecasting with periodic transactions55253 Node: Periodic rule syntax53576
Ref: #forecasting-with-periodic-transactions55558 Ref: #periodic-rule-syntax53782
Node: Budgeting with periodic transactions57584 Node: Two spaces between period expression and description!54486
Ref: #budgeting-with-periodic-transactions57823 Ref: #two-spaces-between-period-expression-and-description54805
Node: Auto postings / transaction modifiers58272 Node: Forecasting with periodic transactions55489
Ref: #auto-postings-transaction-modifiers58483 Ref: #forecasting-with-periodic-transactions55794
Node: Auto postings and dates60712 Node: Budgeting with periodic transactions57820
Ref: #auto-postings-and-dates60969 Ref: #budgeting-with-periodic-transactions58059
Node: Auto postings and transaction balancing / inferred amounts / balance assertions61144 Node: Auto postings / transaction modifiers58508
Ref: #auto-postings-and-transaction-balancing-inferred-amounts-balance-assertions61519 Ref: #auto-postings-transaction-modifiers58719
Node: Auto posting tags61897 Node: Auto postings and dates60948
Ref: #auto-posting-tags62136 Ref: #auto-postings-and-dates61205
Node: EDITOR SUPPORT62801 Node: Auto postings and transaction balancing / inferred amounts / balance assertions61380
Ref: #editor-support62919 Ref: #auto-postings-and-transaction-balancing-inferred-amounts-balance-assertions61755
Node: Auto posting tags62133
Ref: #auto-posting-tags62372
Node: EDITOR SUPPORT63037
Ref: #editor-support63155
 
End Tag Table End Tag Table

View File

@ -246,83 +246,93 @@ FILE FORMAT
Account names can be aliased. Account names can be aliased.
Amounts Amounts
After the account name, there is usually an amount. Important: between After the account name, there is usually an amount. (Important: be-
account name and amount, there must be two or more spaces. tween account name and amount, there must be two or more spaces.)
Amounts consist of a number and (usually) a currency symbol or commod- hledger's amount format is flexible, supporting several international
ity name. Some examples: formats. Here are some examples. Amounts have a number (the "quan-
tity"):
2.00001 1
$1
4000 AAPL
3 "green apples"
-$1,000,000.00
INR 9,99,99,999.00
EUR -2.000.000,00
1 999 999.9455
EUR 1E3
1000E-6s
As you can see, the amount format is somewhat flexible: ..and usually a currency or commodity name (the "commodity"). This is
a symbol, word, or phrase, to the left or right of the quantity, with
or without a separating space:
o amounts are a number (the "quantity") and optionally a currency sym- $1
bol/commodity name (the "commodity"). 4000 AAPL
o the commodity is a symbol, word, or phrase, on the left or right, If the commodity name contains spaces, numbers, or punctuation, it must
with or without a separating space. If the commodity contains num- be enclosed in double quotes:
bers, spaces or non-word punctuation it must be enclosed in double
quotes.
o negative amounts with a commodity on the left can have the minus sign 3 "no. 42 green apples"
before or after it
o digit groups (thousands, or any other grouping) can be separated by Amounts can be negative. The minus sign can be written before or after
space or comma or period and should be used as separator between all a left-side commodity symbol:
groups
o decimal part can be separated by comma or period and should be dif- -$1
ferent from digit groups separator $-1
o scientific E-notation is allowed. Be careful not to use a digit Scientific E notation is allowed:
group separator character in scientific notation, as it's not sup-
ported and it might get mistaken for a decimal point. (Declaring the
digit group separator character explicitly with a commodity directive
will prevent this.)
You can use any of these variations when recording data. However, 1E-6
there is some ambiguous way of representing numbers like $1.000 and EUR 1E3
$1,000 both may mean either one thousand or one dollar. By default
hledger will assume that this is sole delimiter is used only for deci- A decimal mark (decimal point) can be written with a period or a comma:
mals. On the other hand commodity format declared prior to that line
will help to resolve that ambiguity differently: 1.23
1,23456780000009
Digit group marks
In the integer part of the quantity (left of the decimal mark), groups
of digits can optionally be separated by a "digit group mark" - a
space, comma, or period (different from the decimal mark):
$1,000,000.00
EUR 2.000.000,00
INR 9,99,99,999.00
1 000 000.9455
Note, a number containing a single group mark and no decimal mark is
ambiguous. Are these group marks or decimal marks ?
1,000
1.000
hledger will treat them both as decimal marks by default (cf #793). If
you use digit group marks, to prevent confusion and undetected typos we
recommend you write commodity directives at the top of the file to ex-
plicitly declare the decimal mark (and optionally a digit group mark).
Note, these formats ("amount styles") are specific to each commodity,
so if your data uses multiple formats, hledger can handle it:
commodity $1,000.00 commodity $1,000.00
commodity EUR 1.000,00
commodity INR 9,99,99,999.00
;commodity "" 1 000 000.9455 ; can't declare a format for the null commodity yet
2017/12/25 New life of Scrooge Amount display format
expenses:gifts $1,000 For each commodity, hledger chooses a consistent format to use when
assets displaying amounts. (Except price amounts, which are always displayed
as written). The display format is chosen as follows:
Though journal may contain mixed styles to represent amount, when o If there is a commodity directive for the commodity, that format is
hledger displays amounts, it will choose a consistent format for each used (see examples above).
commodity. (Except for price amounts, which are always formatted as
written). The display format is chosen as follows:
o if there is a commodity directive specifying the format, that is used o Otherwise the format of the first posting amount in that commodity
seen in the journal is used. But the number of decimal places ("pre-
cision") will be the maximum from all posting amounts in that comm-
modity.
o otherwise the format is inferred from the first posting amount in o Or if there are no such amounts in the journal, a default format is
that commodity in the journal, and the precision (number of decimal
places) will be the maximum from all posting amounts in that commmod-
ity
o or if there are no such amounts in the journal, a default format is
used (like $1000.00). used (like $1000.00).
Price amounts and amounts in D directives usually don't affect amount Price amounts, and amounts in D directives don't affect the amount dis-
format inference, but in some situations they can do so indirectly. play format directly, but occasionally they can do so indirectly. (Eg
(Eg when D's default commodity is applied to a commodity-less amount, when D's default commodity is applied to a commodity-less amount, or
or when an amountless posting is balanced using a price's commodity, or when an amountless posting is balanced using a price's commodity, or
when -V is used.) If you find this causing problems, set the desired when -V is used.) If you find this causing problems, use a commodity
format with a commodity directive. directive to set the display format.
Virtual Postings Virtual Postings
When you parenthesise the account name in a posting, we call that a When you parenthesise the account name in a posting, we call that a
@ -667,11 +677,6 @@ FILE FORMAT
account any document account names, de- all entries in all account any document account names, de- all entries in all
text clare account types & dis- files, before or text clare account types & dis- files, before or
play order after play order after
alias end rewrite account names following in- alias end rewrite account names following in-
aliases line/included en- aliases line/included en-
tries until end of tries until end of
@ -727,6 +732,8 @@ FILE FORMAT
file.) file.)
display how to display amounts of a commodity in reports (symbol side display how to display amounts of a commodity in reports (symbol side
style and spacing, digit groups, decimal separator, decimal places) style and spacing, digit groups, decimal separator, decimal places)
directive which entries and (when there are multiple files) which files directive which entries and (when there are multiple files) which files
scope are affected by a directive scope are affected by a directive