;update manuals

This commit is contained in:
Simon Michael 2020-11-09 17:13:57 -08:00
parent 94b01dd19d
commit 86fac4236d
6 changed files with 336 additions and 316 deletions

View File

@ -584,7 +584,8 @@ commodity INR 9,99,99,999.00
commodity 1 000 000.9455 commodity 1 000 000.9455
\f[R] \f[R]
.fi .fi
.SS Amount display style .PP
.SS Commodity display style
.PP .PP
For each commodity, hledger chooses a consistent format to use when For each commodity, hledger chooses a consistent format to use when
displaying amounts. displaying amounts.
@ -613,11 +614,10 @@ journal, with the max observed number of decimal places.
If you want to see fewer decimal places in reports, use a commodity If you want to see fewer decimal places in reports, use a commodity
directive to override that. directive to override that.
.PP .PP
hledger uses banker\[aq]s rounding: it rounds to the nearest even Note, hledger uses banker\[aq]s rounding: it rounds to the nearest even
number, eg 0.5 displayed with zero decimal places is \[dq]0\[dq]). number, eg 0.5 displayed with zero decimal places is \[dq]0\[dq]).
(Note, prior to hledger 1.17.1 this could vary if hledger happened to be (Guaranteed since hledger 1.17.1; in older versions this could vary if
built with an old version of Decimal (<0.5.1); since 1.17.1 it\[aq]s hledger was built with Decimal < 0.5.1.)
guaranteed.)
.SS Transaction prices .SS Transaction prices
.PP .PP
Within a transaction, you can note an amount\[aq]s price in another Within a transaction, you can note an amount\[aq]s price in another
@ -1198,7 +1198,7 @@ your data.
(Without this, hledger will parse both \f[C]1,000\f[R] and (Without this, hledger will parse both \f[C]1,000\f[R] and
\f[C]1.000\f[R] as 1). \f[C]1.000\f[R] as 1).
.IP "3." 3 .IP "3." 3
It declares the amount display style to use in output - decimal and It declares a commodity\[aq]s display style in output - decimal and
digit group marks, number of decimal places, symbol placement etc. digit group marks, number of decimal places, symbol placement etc.
.PP .PP
You are likely to run into one of the problems solved by commodity You are likely to run into one of the problems solved by commodity
@ -1244,7 +1244,7 @@ followed by 0 or more decimal digits.
.PP .PP
Note hledger normally uses banker\[aq]s rounding, so 0.5 displayed with Note hledger normally uses banker\[aq]s rounding, so 0.5 displayed with
zero decimal digits is \[dq]0\[dq]. zero decimal digits is \[dq]0\[dq].
(More at Amount display style.) (More at Commodity display style.)
.SS Default commodity .SS Default commodity
.PP .PP
The \f[C]D\f[R] directive sets a default commodity, to be used for The \f[C]D\f[R] directive sets a default commodity, to be used for

View File

@ -487,10 +487,10 @@ EUR 1E3
* Menu: * Menu:
* Digit group marks:: * Digit group marks::
* Amount display style:: * Commodity display style::
 
File: hledger_journal.info, Node: Digit group marks, Next: Amount display style, Up: Amounts File: hledger_journal.info, Node: Digit group marks, Next: Commodity display style, Up: Amounts
1.8.1 Digit group marks 1.8.1 Digit group marks
----------------------- -----------------------
@ -523,10 +523,10 @@ commodity INR 9,99,99,999.00
commodity 1 000 000.9455 commodity 1 000 000.9455
 
File: hledger_journal.info, Node: Amount display style, Prev: Digit group marks, Up: Amounts File: hledger_journal.info, Node: Commodity display style, Prev: Digit group marks, Up: Amounts
1.8.2 Amount display style 1.8.2 Commodity display style
-------------------------- -----------------------------
For each commodity, hledger chooses a consistent format to use when For each commodity, hledger chooses a consistent format to use when
displaying amounts. (Except price amounts, which are always displayed displaying amounts. (Except price amounts, which are always displayed
@ -553,10 +553,10 @@ journal, with the max observed number of decimal places. If you want to
see fewer decimal places in reports, use a commodity directive to see fewer decimal places in reports, use a commodity directive to
override that. override that.
hledger uses banker's rounding: it rounds to the nearest even number, Note, hledger uses banker's rounding: it rounds to the nearest even
eg 0.5 displayed with zero decimal places is "0"). (Note, prior to number, eg 0.5 displayed with zero decimal places is "0"). (Guaranteed
hledger 1.17.1 this could vary if hledger happened to be built with an since hledger 1.17.1; in older versions this could vary if hledger was
old version of Decimal (<0.5.1); since 1.17.1 it's guaranteed.) built with Decimal < 0.5.1.)
 
File: hledger_journal.info, Node: Transaction prices, Next: Lot prices and lot dates, Prev: Amounts, Up: Transactions File: hledger_journal.info, Node: Transaction prices, Next: Lot prices and lot dates, Prev: Amounts, Up: Transactions
@ -1079,7 +1079,7 @@ The 'commodity' directive has several functions:
formats in your data. (Without this, hledger will parse both formats in your data. (Without this, hledger will parse both
'1,000' and '1.000' as 1). '1,000' and '1.000' as 1).
3. It declares the amount display style to use in output - decimal and 3. It declares a commodity's display style in output - decimal and
digit group marks, number of decimal places, symbol placement etc. digit group marks, number of decimal places, symbol placement etc.
You are likely to run into one of the problems solved by commodity You are likely to run into one of the problems solved by commodity
@ -1114,7 +1114,7 @@ significant. The number must include a decimal mark: either a period or
a comma, followed by 0 or more decimal digits. a comma, followed by 0 or more decimal digits.
Note hledger normally uses banker's rounding, so 0.5 displayed with Note hledger normally uses banker's rounding, so 0.5 displayed with
zero decimal digits is "0". (More at Amount display style.) zero decimal digits is "0". (More at Commodity display style.)
 
File: hledger_journal.info, Node: Default commodity, Next: Declaring market prices, Prev: Declaring commodities, Up: Directives File: hledger_journal.info, Node: Default commodity, Next: Declaring market prices, Prev: Declaring commodities, Up: Directives
@ -1889,96 +1889,96 @@ Node: Account names15177
Ref: #account-names15318 Ref: #account-names15318
Node: Amounts15805 Node: Amounts15805
Ref: #amounts15944 Ref: #amounts15944
Node: Digit group marks17052 Node: Digit group marks17055
Ref: #digit-group-marks17200 Ref: #digit-group-marks17206
Node: Amount display style18138 Node: Commodity display style18144
Ref: #amount-display-style18292 Ref: #commodity-display-style18307
Node: Transaction prices19729 Node: Transaction prices19711
Ref: #transaction-prices19901 Ref: #transaction-prices19883
Node: Lot prices and lot dates22332 Node: Lot prices and lot dates22314
Ref: #lot-prices-and-lot-dates22529 Ref: #lot-prices-and-lot-dates22511
Node: Balance assertions23017 Node: Balance assertions22999
Ref: #balance-assertions23203 Ref: #balance-assertions23185
Node: Assertions and ordering24236 Node: Assertions and ordering24218
Ref: #assertions-and-ordering24424 Ref: #assertions-and-ordering24406
Node: Assertions and included files25124 Node: Assertions and included files25106
Ref: #assertions-and-included-files25367 Ref: #assertions-and-included-files25349
Node: Assertions and multiple -f options25700 Node: Assertions and multiple -f options25682
Ref: #assertions-and-multiple--f-options25956 Ref: #assertions-and-multiple--f-options25938
Node: Assertions and commodities26088 Node: Assertions and commodities26070
Ref: #assertions-and-commodities26320 Ref: #assertions-and-commodities26302
Node: Assertions and prices27477 Node: Assertions and prices27459
Ref: #assertions-and-prices27691 Ref: #assertions-and-prices27673
Node: Assertions and subaccounts28131 Node: Assertions and subaccounts28113
Ref: #assertions-and-subaccounts28360 Ref: #assertions-and-subaccounts28342
Node: Assertions and virtual postings28684 Node: Assertions and virtual postings28666
Ref: #assertions-and-virtual-postings28926 Ref: #assertions-and-virtual-postings28908
Node: Assertions and precision29068 Node: Assertions and precision29050
Ref: #assertions-and-precision29261 Ref: #assertions-and-precision29243
Node: Balance assignments29528 Node: Balance assignments29510
Ref: #balance-assignments29702 Ref: #balance-assignments29684
Node: Balance assignments and prices30866 Node: Balance assignments and prices30848
Ref: #balance-assignments-and-prices31038 Ref: #balance-assignments-and-prices31020
Node: Directives31262 Node: Directives31244
Ref: #directives31421 Ref: #directives31403
Node: Directives and multiple files36919 Node: Directives and multiple files36901
Ref: #directives-and-multiple-files37102 Ref: #directives-and-multiple-files37084
Node: Comment blocks37766 Node: Comment blocks37748
Ref: #comment-blocks37949 Ref: #comment-blocks37931
Node: Including other files38125 Node: Including other files38107
Ref: #including-other-files38305 Ref: #including-other-files38287
Node: Default year39229 Node: Default year39211
Ref: #default-year39398 Ref: #default-year39380
Node: Declaring commodities39805 Node: Declaring commodities39787
Ref: #declaring-commodities39988 Ref: #declaring-commodities39970
Node: Default commodity41794 Node: Default commodity41775
Ref: #default-commodity41980 Ref: #default-commodity41961
Node: Declaring market prices42869 Node: Declaring market prices42850
Ref: #declaring-market-prices43064 Ref: #declaring-market-prices43045
Node: Declaring accounts43921 Node: Declaring accounts43902
Ref: #declaring-accounts44107 Ref: #declaring-accounts44088
Node: Account comments45032 Node: Account comments45013
Ref: #account-comments45195 Ref: #account-comments45176
Node: Account subdirectives45619 Node: Account subdirectives45600
Ref: #account-subdirectives45814 Ref: #account-subdirectives45795
Node: Account types46127 Node: Account types46108
Ref: #account-types46311 Ref: #account-types46292
Node: Account display order49357 Node: Account display order49338
Ref: #account-display-order49527 Ref: #account-display-order49508
Node: Rewriting accounts50678 Node: Rewriting accounts50659
Ref: #rewriting-accounts50863 Ref: #rewriting-accounts50844
Node: Basic aliases51620 Node: Basic aliases51601
Ref: #basic-aliases51766 Ref: #basic-aliases51747
Node: Regex aliases52470 Node: Regex aliases52451
Ref: #regex-aliases52642 Ref: #regex-aliases52623
Node: Combining aliases53361 Node: Combining aliases53342
Ref: #combining-aliases53554 Ref: #combining-aliases53535
Node: Aliases and multiple files54830 Node: Aliases and multiple files54811
Ref: #aliases-and-multiple-files55039 Ref: #aliases-and-multiple-files55020
Node: end aliases55618 Node: end aliases55599
Ref: #end-aliases55775 Ref: #end-aliases55756
Node: Default parent account55876 Node: Default parent account55857
Ref: #default-parent-account56044 Ref: #default-parent-account56025
Node: Periodic transactions56928 Node: Periodic transactions56909
Ref: #periodic-transactions57103 Ref: #periodic-transactions57084
Node: Periodic rule syntax58975 Node: Periodic rule syntax58956
Ref: #periodic-rule-syntax59181 Ref: #periodic-rule-syntax59162
Node: Two spaces between period expression and description!59885 Node: Two spaces between period expression and description!59866
Ref: #two-spaces-between-period-expression-and-description60204 Ref: #two-spaces-between-period-expression-and-description60185
Node: Forecasting with periodic transactions60888 Node: Forecasting with periodic transactions60869
Ref: #forecasting-with-periodic-transactions61193 Ref: #forecasting-with-periodic-transactions61174
Node: Budgeting with periodic transactions63248 Node: Budgeting with periodic transactions63229
Ref: #budgeting-with-periodic-transactions63487 Ref: #budgeting-with-periodic-transactions63468
Node: Auto postings63896 Node: Auto postings63877
Ref: #auto-postings64036 Ref: #auto-postings64017
Node: Auto postings and multiple files66215 Node: Auto postings and multiple files66196
Ref: #auto-postings-and-multiple-files66419 Ref: #auto-postings-and-multiple-files66400
Node: Auto postings and dates66628 Node: Auto postings and dates66609
Ref: #auto-postings-and-dates66902 Ref: #auto-postings-and-dates66883
Node: Auto postings and transaction balancing / inferred amounts / balance assertions67077 Node: Auto postings and transaction balancing / inferred amounts / balance assertions67058
Ref: #auto-postings-and-transaction-balancing-inferred-amounts-balance-assertions67428 Ref: #auto-postings-and-transaction-balancing-inferred-amounts-balance-assertions67409
Node: Auto posting tags67770 Node: Auto posting tags67751
Ref: #auto-posting-tags67985 Ref: #auto-posting-tags67966
 
End Tag Table End Tag Table

View File

@ -411,7 +411,7 @@ FILE FORMAT
commodity INR 9,99,99,999.00 commodity INR 9,99,99,999.00
commodity 1 000 000.9455 commodity 1 000 000.9455
Amount display style Commodity display style
For each commodity, hledger chooses a consistent format to use when For each commodity, hledger chooses a consistent format to use when
displaying amounts. (Except price amounts, which are always displayed displaying amounts. (Except price amounts, which are always displayed
as written). The display style is chosen as follows: as written). The display style is chosen as follows:
@ -437,10 +437,10 @@ FILE FORMAT
see fewer decimal places in reports, use a commodity directive to over- see fewer decimal places in reports, use a commodity directive to over-
ride that. ride that.
hledger uses banker's rounding: it rounds to the nearest even number, Note, hledger uses banker's rounding: it rounds to the nearest even
eg 0.5 displayed with zero decimal places is "0"). (Note, prior to number, eg 0.5 displayed with zero decimal places is "0"). (Guaranteed
hledger 1.17.1 this could vary if hledger happened to be built with an since hledger 1.17.1; in older versions this could vary if hledger was
old version of Decimal (<0.5.1); since 1.17.1 it's guaranteed.) built with Decimal < 0.5.1.)
Transaction prices Transaction prices
Within a transaction, you can note an amount's price in another commod- Within a transaction, you can note an amount's price in another commod-
@ -838,7 +838,7 @@ FILE FORMAT
formats in your data. (Without this, hledger will parse both 1,000 formats in your data. (Without this, hledger will parse both 1,000
and 1.000 as 1). and 1.000 as 1).
3. It declares the amount display style to use in output - decimal and 3. It declares a commodity's display style in output - decimal and
digit group marks, number of decimal places, symbol placement etc. digit group marks, number of decimal places, symbol placement etc.
You are likely to run into one of the problems solved by commodity di- You are likely to run into one of the problems solved by commodity di-
@ -873,7 +873,7 @@ FILE FORMAT
comma, followed by 0 or more decimal digits. comma, followed by 0 or more decimal digits.
Note hledger normally uses banker's rounding, so 0.5 displayed with Note hledger normally uses banker's rounding, so 0.5 displayed with
zero decimal digits is "0". (More at Amount display style.) zero decimal digits is "0". (More at Commodity display style.)
Default commodity Default commodity
The D directive sets a default commodity, to be used for amounts with- The D directive sets a default commodity, to be used for amounts with-

View File

@ -3805,6 +3805,10 @@ $ hledger print IMPORTFILE [--new] >> $LEDGER_FILE
.PP .PP
(If you think import should leave amounts implicit like print does, (If you think import should leave amounts implicit like print does,
please test it and send a pull request.) please test it and send a pull request.)
.SS Commodity display styles
.PP
Imported amounts will be formatted according to the canonical commodity
styles (declared or inferred) in the main journal file.
.SS incomestatement .SS incomestatement
.PP .PP
incomestatement, is incomestatement, is

View File

@ -3218,9 +3218,10 @@ $ hledger import --dry ... | hledger -f- print unknown --ignore-assertions
* Menu: * Menu:
* Importing balance assignments:: * Importing balance assignments::
* Commodity display styles::
 
File: hledger.info, Node: Importing balance assignments, Up: import File: hledger.info, Node: Importing balance assignments, Next: Commodity display styles, Up: import
3.18.1 Importing balance assignments 3.18.1 Importing balance assignments
------------------------------------ ------------------------------------
@ -3238,6 +3239,15 @@ $ hledger print IMPORTFILE [--new] >> $LEDGER_FILE
(If you think import should leave amounts implicit like print does, (If you think import should leave amounts implicit like print does,
please test it and send a pull request.) please test it and send a pull request.)

File: hledger.info, Node: Commodity display styles, Prev: Importing balance assignments, Up: import
3.18.2 Commodity display styles
-------------------------------
Imported amounts will be formatted according to the canonical commodity
styles (declared or inferred) in the main journal file.
 
File: hledger.info, Node: incomestatement, Next: notes, Prev: import, Up: COMMANDS File: hledger.info, Node: incomestatement, Next: notes, Prev: import, Up: COMMANDS
@ -4252,60 +4262,62 @@ Node: help111433
Ref: #help111533 Ref: #help111533
Node: import112614 Node: import112614
Ref: #import112728 Ref: #import112728
Node: Importing balance assignments113621 Node: Importing balance assignments113650
Ref: #importing-balance-assignments113769 Ref: #importing-balance-assignments113831
Node: incomestatement114418 Node: Commodity display styles114480
Ref: #incomestatement114551 Ref: #commodity-display-styles114651
Node: notes115896 Node: incomestatement114780
Ref: #notes116009 Ref: #incomestatement114913
Node: payees116377 Node: notes116258
Ref: #payees116483 Ref: #notes116371
Node: prices116903 Node: payees116739
Ref: #prices117009 Ref: #payees116845
Node: print117350 Node: prices117265
Ref: #print117460 Ref: #prices117371
Node: print-unique122256 Node: print117712
Ref: #print-unique122382 Ref: #print117822
Node: register122667 Node: print-unique122618
Ref: #register122794 Ref: #print-unique122744
Node: Custom register output127243 Node: register123029
Ref: #custom-register-output127372 Ref: #register123156
Node: register-match128709 Node: Custom register output127605
Ref: #register-match128843 Ref: #custom-register-output127734
Node: rewrite129194 Node: register-match129071
Ref: #rewrite129309 Ref: #register-match129205
Node: Re-write rules in a file131164 Node: rewrite129556
Ref: #re-write-rules-in-a-file131298 Ref: #rewrite129671
Node: Diff output format132508 Node: Re-write rules in a file131526
Ref: #diff-output-format132677 Ref: #re-write-rules-in-a-file131660
Node: rewrite vs print --auto133769 Node: Diff output format132870
Ref: #rewrite-vs.-print---auto133948 Ref: #diff-output-format133039
Node: roi134504 Node: rewrite vs print --auto134131
Ref: #roi134602 Ref: #rewrite-vs.-print---auto134310
Node: stats135614 Node: roi134866
Ref: #stats135713 Ref: #roi134964
Node: tags136501 Node: stats135976
Ref: #tags136599 Ref: #stats136075
Node: test137118 Node: tags136863
Ref: #test137226 Ref: #tags136961
Node: Add-on commands137973 Node: test137480
Ref: #add-on-commands138090 Ref: #test137588
Node: ui139433 Node: Add-on commands138335
Ref: #ui139521 Ref: #add-on-commands138452
Node: web139575 Node: ui139795
Ref: #web139678 Ref: #ui139883
Node: iadd139794 Node: web139937
Ref: #iadd139905 Ref: #web140040
Node: interest139987 Node: iadd140156
Ref: #interest140094 Ref: #iadd140267
Node: ENVIRONMENT140334 Node: interest140349
Ref: #environment140446 Ref: #interest140456
Node: FILES141431 Node: ENVIRONMENT140696
Ref: #files-1141534 Ref: #environment140808
Node: LIMITATIONS141747 Node: FILES141793
Ref: #limitations141866 Ref: #files-1141896
Node: TROUBLESHOOTING142608 Node: LIMITATIONS142109
Ref: #troubleshooting142721 Ref: #limitations142228
Node: TROUBLESHOOTING142970
Ref: #troubleshooting143083
 
End Tag Table End Tag Table

View File

@ -2777,6 +2777,10 @@ COMMANDS
(If you think import should leave amounts implicit like print does, (If you think import should leave amounts implicit like print does,
please test it and send a pull request.) please test it and send a pull request.)
Commodity display styles
Imported amounts will be formatted according to the canonical commodity
styles (declared or inferred) in the main journal file.
incomestatement incomestatement
incomestatement, is incomestatement, is
This command displays an income statement, showing revenues and ex- This command displays an income statement, showing revenues and ex-