summaryrefslogtreecommitdiff
path: root/doc/ledger3.texi
diff options
context:
space:
mode:
Diffstat (limited to 'doc/ledger3.texi')
-rw-r--r--doc/ledger3.texi518
1 files changed, 332 insertions, 186 deletions
diff --git a/doc/ledger3.texi b/doc/ledger3.texi
index c112ba86..52fac242 100644
--- a/doc/ledger3.texi
+++ b/doc/ledger3.texi
@@ -325,7 +325,7 @@ variations between shells to give concrete examples for each.
@node Balance Report, Register Report, Run Some Reports, Run Some Reports
@subsection Balance Report
@cindex balance report
-@findex balance (bal)
+@findex balance
To find the balances of all of your accounts, run this command:
@@ -381,7 +381,7 @@ $ ledger -f drewr3.dat balance Assets Liabilities
@node Register Report, Cleared Report, Balance Report, Run Some Reports
@subsection Register Report
@cindex register report
-@findex register (reg)
+@findex register
To show all transactions and a running total:
@@ -3464,7 +3464,6 @@ something like
Income: Client name
@end smallexample
-@noindent
Then, when you receive the payment, you change it to
@smallexample
@@ -3525,11 +3524,11 @@ really knows that it debited $225 this month.
@node Periodic Transactions, Concrete Example of Automated Transactions, Effective Dates, Automated Transactions
@subsection Periodic Transactions
-A periodic transaction starts with a ~ followed by a period expression.
-Periodic transactions are used for budgeting and forecasting only, they
-have no effect without the @code{--budget} option specified.
-
-See @ref{Budgeting and Forecasting} for examples and details.
+A periodic transaction starts with a ~ followed by a period
+expression. Periodic transactions are used for budgeting and
+forecasting only, they have no effect without the @code{--budget}
+option specified. @xref{Budgeting and Forecasting} for examples and
+details.
@node Concrete Example of Automated Transactions, , Periodic Transactions, Automated Transactions
@subsection Concrete Example of Automated Transactions
@@ -3921,9 +3920,8 @@ asking for the current balances of the account in the ``Allocation''
tree, using a special formatter.
@cindex depth_spacer
-@findex depth_spacer
-@findex display_total
-@findex parent.total
+@cindex display_total
+@cindex parent.total
The magic is in the formatter. The second line simply tells Ledger to
print the partial account name indented by its depth in the tree. The
third line is where we calculate and display the percentages. The
@@ -4006,7 +4004,8 @@ part of the balance.
@end menu
@node The balance Command, The equity Command, Primary Financial Reports, Primary Financial Reports
-@subsection The @code{balance} Command
+@subsection The @code{balance} command
+@findex balance
The @command{balance} command reports the current balance of all
accounts. It accepts a list of optional regexps, which confine the
@@ -4015,14 +4014,16 @@ multiple types of commodities, each commodity's total is reported
separately.
@node The equity Command, The register Command, The balance Command, Primary Financial Reports
-@subsection The @code{equity} Command
+@subsection The @code{equity} command
+@findex equity
The @command{equity} command prints out accounts balances as if they
were transactions. This makes it easy to establish the starting
balances for an account, such as when @ref{Archiving Previous Years}.
@node The register Command, The print Command, The equity Command, Primary Financial Reports
-@subsection The @code{register} Command
+@subsection The @code{register} command
+@findex register
The @command{register} command displays all the postings occurring
in a single account, line by line. The account regexp must be
@@ -4043,7 +4044,8 @@ add either @code{-j} or @code{-J} to your register command, in
order to plot either the amount or total column, respectively.
@node The print Command, , The register Command, Primary Financial Reports
-@subsection The @code{print} Command
+@subsection The @code{print} command
+@findex print
The @command{print} command prints out ledger transactions in a textual
format that can be parsed by Ledger. They will be properly formatted,
@@ -4077,6 +4079,7 @@ file whose formatting has gotten out of hand.
@node The csv command, The convert command, Comma Separated Values files, Comma Separated Values files
@subsubsection The @code{csv} command
+@findex csv
The @command{csv} command will output print out the desired ledger
transactions in a csv format suitable for import into other programs.
@@ -4088,6 +4091,7 @@ limiting and searching functions.
@cindex csv conversion
@cindex reading csv
@cindex comma separated variable file reading
+@findex convert
The @code{convert} command parses a comma separated value (csv) file
and outputs Ledger transactions. Many banks offer csv file downloads.
@@ -4186,6 +4190,7 @@ used.
@node The lisp command, Emacs Org mode, Comma Separated Values files, Reports in other Formats
@subsection The @code{lisp} command
+@findex lisp
The @command{lisp} command outputs results in a form that can be read
directly by Emacs Lisp. The format of the @code{sexp} is:
@@ -4536,7 +4541,8 @@ have been illustrated; please refer to the Ledger documentation for
examples of more complex operations with a ledger.
@node The pricemap Command, The xml Command, Org mode with Babel, Reports in other Formats
-@subsection The @code{pricemap} Command
+@subsection The @code{pricemap} command
+@findex pricemap
If you have the @code{graphviz} graph visualization package installed,
ledger can generate a graph of the relationship between your various
@@ -4547,7 +4553,8 @@ commodities valued in terms of each other. For example, multiple
currencies and multiples investments valued in those currencies.
@node The xml Command, prices and pricedb, The pricemap Command, Reports in other Formats
-@subsection The @code{xml} Command
+@subsection The @code{xml} command
+@findex xml
By default, Ledger uses a human-readable data format, and displays its
reports in a manner meant to be read on screen. For the purpose of
@@ -4697,7 +4704,9 @@ output such data if the @command{xml} command is used, and can read
the same data.
@node prices and pricedb, , The xml Command, Reports in other Formats
-@subsection @code{prices} and @code{pricedb}
+@subsection @code{prices} and @code{pricedb} commands
+@findex prices
+@findex pricedb
The @command{prices} command displays the price history for matching
commodities. The @code{-A} flag is useful with this report, to
@@ -4722,6 +4731,7 @@ pricedb database files.
@node accounts, payees, Reports about your Journals, Reports about your Journals
@subsection @code{accounts}
+@findex accounts
The @command{accounts} reports all of the accounts in the journal.
Following the command with a regular expression will limit the output
@@ -4731,6 +4741,7 @@ account.
@node payees, commodities, accounts, Reports about your Journals
@subsection @code{payees}
+@findex payees
The @command{payees} reports all of the unique payees in the
journal. To filter the payees displayed you must use the prefix:
@@ -4745,6 +4756,7 @@ macbook-2:$
@node commodities, tags, payees, Reports about your Journals
@subsection @command{commodities}
+@findex commodities
Report all commodities present in the journals under consideration.
The output is sorted by name. Using the @code{--count} option will
@@ -4752,6 +4764,7 @@ tell you how many entries use each commodity.
@node tags, entry and xact, commodities, Reports about your Journals
@subsection @command{tags}
+@findex tags
The @command{tags} reports all of the tags in the journal. The output
is sorted by name. Using the @code{--count} option will tell you how
@@ -4760,6 +4773,9 @@ report the values used by each tag.
@node entry and xact, , tags, Reports about your Journals
@subsection @command{draft}, @command{entry} and @command{xact}
+@findex draft
+@findex entry
+@findex xact
The @code{draft}, @code{entry} and @command{xact} commands simplify
the creation of new transactions. It works on the principle that 80%
@@ -4883,134 +4899,260 @@ commands.
@node Reporting Commands Quick Reference, Basic Options Quick Reference, Command Line Quick Reference, Command Line Quick Reference
@subsection Reporting Commands
-@multitable @columnfractions .2 .8
-@headitem Report @tab Description
-@item @code{balance} @tab Show account balances
-@item @code{register} @tab Show all transactions with running total
-@item @code{csv} @tab Show transactions in csv format, for exporting to other programs
-@item @code{print} @tab Print transaction in a ledger readable format
-@item @code{xml} @tab Produce XML output of the register command
-@item @code{emacs} @tab Produce Emacs lisp output
-@item @code{equity} @tab Print account balances as transactions
-@item @code{prices} @tab Print price history for matching commodities
-@item @code{pricedb} @tab Print price history for matching commodities in ledger readable format
-@item @code{xact} @tab Generate transactions based on previous postings
-@end multitable
+@ftable @code
+@item balance
+Show account balances
+@item register
+Show all transactions with running total
+@item csv
+Show transactions in csv format, for exporting to other programs
+@item print
+Print transaction in a ledger readable format
+@item xml
+Produce XML output of the register command
+@item emacs
+Produce Emacs lisp output
+@item equity
+Print account balances as transactions
+@item prices
+Print price history for matching commodities
+@item pricedb
+Print price history for matching commodities in ledger readable format
+@item xact
+Generate transactions based on previous postings
+@end ftable
@node Basic Options Quick Reference, Report Filtering Quick Reference, Reporting Commands Quick Reference, Command Line Quick Reference
@subsection Basic Options
-@multitable @columnfractions .1 .25 .65
-@headitem Short @tab Long @tab Description
-@item @code{-h} @tab @code{--help} @tab Print summary of all options
-@item @code{-v} @tab @code{--version} @tab Print version of ledger executable
-@item @code{-f FILE} @tab @code{--file FILE} @tab Read @file{FILE} as a ledger file
-@item @code{-o FILE} @tab @code{--output FILE} @tab Redirect output to @file{FILE}
-@item @code{-i FILE} @tab @code{--init-file FILE} @tab Specify options file
-@item @code{-a NAME} @tab @code{--account NAME} @tab Specify default account name for QIF file postings
-@end multitable
+@ftable @code
+@item --help
+@itemx -h
+Print summary of all options
+
+@item --version
+@itemx -v
+Print version of ledger executable
+
+@item --file FILE
+@itemx -f FILE
+Read @file{FILE} as a ledger file
+
+@item --output FILE
+@itemx -o FILE
+Redirect output to @file{FILE}
+
+@item --init-file FILE
+@itemx -i FILE
+Specify options file
+
+@item --account NAME
+@itemx -a NAME
+Specify default account name for QIF file postings
+@end ftable
@node Report Filtering Quick Reference, Error Checking and Calculation Options, Basic Options Quick Reference, Command Line Quick Reference
@subsection Report Filtering
-@multitable @columnfractions .1 .25 .65
-@headitem Short @tab Long @tab Description
-@item @code{-c} @tab @code{--current} @tab Display transaction on or before the current date
-@item @code{-b DATE} @tab @code{--begin DATE} @tab Begin reports on or after @code{DATE}
-@item @code{-e DATE} @tab @code{--end DATE} @tab Limit end date of transactions for report
-@item @code{-p STR} @tab @code{--period} @tab Set report period to STR
-@item @code{ } @tab @code{--period-sort} @tab Sort postings within each period
-@item @code{-C} @tab @code{--cleared} @tab Display only cleared postings
-@item @code{} @tab @code{--dc} @tab Display register or balance in debit/credit format
-@item @code{-U} @tab @code{--uncleared} @tab Display only uncleared postings
-@item @code{-R} @tab @code{--real} @tab Display only real postings
-@item @code{-L} @tab @code{--actual} @tab Display only actual postings, not automated
-@item @code{-r} @tab @code{--related} @tab Display related postings
-@item @code{} @tab @code{--budget} @tab Display how close your postings meet your budget
-@item @code{} @tab @code{--add-budget} @tab Show un-budgeted postings
-@item @code{} @tab @code{--unbudgeted} @tab Show only un-budgeted postings
-@item @code{} @tab @code{--forecast} @tab Project balances into the future
-@item @code{-l EXPR} @tab @code{--limit EXPR} @tab Limit postings in calculations
-@item @code{-t EXPR} @tab @code{--amount} @tab Change value expression reported in register report
-@item @code{-T EXPR} @tab @code{--total} @tab Change the value expression used for ``totals'' column in register and balance reports
-@end multitable
+@ftable @code
+@item --current
+@itemx -c
+Display transaction on or before the current date
+@item --begin DATE
+@itemx -b DATE
+Begin reports on or after @code{DATE}
+@item --end DATE
+@itemx -e DATE
+Limit end date of transactions for report
+@item --period
+@itemx -p STR
+Set report period to STR
+@item --period-sort
+Sort postings within each period
+@item --cleared
+@itemx -C
+Display only cleared postings
+@item --dc
+Display register or balance in debit/credit format
+@item --uncleared
+@itemx -U
+Display only uncleared postings
+@item --real
+@itemx -R
+Display only real postings
+@item --actual
+@itemx -L
+Display only actual postings, not automated
+@item --related
+@itemx -r
+Display related postings
+@item --budget
+Display how close your postings meet your budget
+@item --add-budget
+Show un-budgeted postings
+@item --unbudgeted
+Show only un-budgeted postings
+@item --forecast
+Project balances into the future
+@item --limit EXPR
+@itemx -l EXPR
+Limit postings in calculations
+@item --amount
+@itemx -t EXPR
+Change value expression reported in register report
+@item --total
+@itemx -T EXPR
+Change the value expression used for ``totals'' column in register and
+balance reports
+@end ftable
@node Error Checking and Calculation Options, Output Customization Quick Reference, Report Filtering Quick Reference, Command Line Quick Reference
@subsection Error Checking and Calculation Options
-@multitable @columnfractions .1 .25 .65
-@headitem Short @tab Long @tab Description
-@item @code{} @tab @code{--strict} @tab Accounts, tags or commodities not previously declared will cause warnings
-@item @code{} @tab @code{--pedantic} @tab Accounts, tags or commodities not previously declared will cause errors
-@item @code{} @tab @code{--check-payees} @tab Enable strict and pedantic checking for payees as well as accounts, commodities and tags
-@item @code{} @tab @code{--immediate} @tab Instruct ledger to evaluate calculations immediately rather than lazily
-@end multitable
+@ftable @code
+@item --strict
+Accounts, tags or commodities not previously declared will cause warnings
+@item --pedantic
+Accounts, tags or commodities not previously declared will cause errors
+@item --check-payees
+Enable strict and pedantic checking for payees as well as accounts, commodities and tags
+@item --immediate
+Instruct ledger to evaluate calculations immediately rather than lazily
+@end ftable
@node Output Customization Quick Reference, Grouping Options, Error Checking and Calculation Options, Command Line Quick Reference
@subsection Output Customization
-@multitable @columnfractions .15 .4 .45
-@headitem Short @tab Long @tab Description
-@item @code{-n} @tab @code{--collapse} @tab Collapse transactions with multiple postings
-@item @code{-s} @tab @code{--subtotal} @tab Report register as a single subtotal
-@item @code{-P} @tab @code{--by-payee} @tab Report subtotals by payee
-@item @code{-E} @tab @code{--empty} @tab Include empty accounts in report
-@item @code{-W} @tab @code{--weekly} @tab Report posting totals by week
-@item @code{-Y} @tab @code{--yearly} @tab Report posting totals by year
-@item @code{} @tab @code{--dow} @tab Report Posting totals by day of week
-@item @code{-S EXPR} @tab @code{--sort EXPR} @tab Sort a report using @code{EXPR}
-@item @code{-w} @tab @code{--wide} @tab Assume 132 columns instead of 80
-@item @code{} @tab @code{--head N} @tab Report the first N postings
-@item @code{} @tab @code{--tail N} @tab Report the last N postings
-@item @code{} @tab @code{--pager PATH} @tab Direct output to @code{PATH} pager program
-@item @code{-A} @tab @code{--average} @tab Report average posting value
-@item @code{-D} @tab @code{--deviation} @tab Report each posting deviation from the average
-@item @code{-%} @tab @code{--percent} @tab Show subtotals in the balance report as percentages
-@c @item @code{} @tab @code{--totals} @tab Include running total in the @code{xml} report
-@item @code{} @tab @code{--pivot TAG} @tab Produce a pivot table of the tag type specified
-@item @code{-j} @tab @code{--amount-data} @tab Show only date and value column to format the output for plots
-@item @tab @code{--plot-amount-format STR} @tab Specify the format for the plot output
-@item @code{-J} @tab @code{--total-data} @tab Show only dates and totals to format the output for plots
-@item @tab @code{--plot-total-format STR} @tab Specify the format for the plot output
-@item @code{-d EXPR} @tab @code{--display EXPR} @tab Display only posting that meet the criterias in the EXPR
-@item @code{-y STR} @tab @code{--date-format STR} @tab Change the basic date format used in reports
-@item @code{-F STR} @tab @code{--format STR} @tab Set reporting format
-@item @code{} @tab @code{--balance-format STR} @tab
-@item @code{} @tab @code{--register-format STR} @tab
-@item @code{} @tab @code{--prices-format STR} @tab
-@item @code{-w register} @tab @code{--wide-register-format STR} @tab
-@item @code{} @tab @code{--anon} @tab Print the ledger register with anonymized accounts and payees, useful for filing bug reports
-@end multitable
+@ftable @code
+@item --collapse
+@itemx -n
+Collapse transactions with multiple postings
+@item --subtotal
+@itemx -s
+Report register as a single subtotal
+@item --by-payee
+@itemx -P
+Report subtotals by payee
+@item --empty
+@itemx -E
+Include empty accounts in report
+@item --weekly
+@itemx -W
+Report posting totals by week
+@item --yearly
+@itemx -Y
+Report posting totals by year
+@item --dow
+Report Posting totals by day of week
+@item --sort EXPR
+@itemx -S EXPR
+Sort a report using @code{EXPR}
+@item --wide
+@itemx -w
+Assume 132 columns instead of 80
+@item --head N
+Report the first N postings
+@item --tail N
+Report the last N postings
+@item --pager PATH
+Direct output to @code{PATH} pager program
+@item --average
+@itemx -A
+Report average posting value
+@item --deviation
+@itemx -D
+Report each posting deviation from the average
+@item --percent
+@itemx -%
+Show subtotals in the balance report as percentages
+@c @item --totals
+@c Include running total in the @code{xml} report
+@item --pivot TAG
+Produce a pivot table of the tag type specified
+@item --amount-data
+@itemx -j
+Show only date and value column to format the output for plots
+@item --plot-amount-format STR
+Specify the format for the plot output
+@item --total-data
+@itemx -J
+Show only dates and totals to format the output for plots
+@item --plot-total-format STR
+Specify the format for the plot output
+@item --display EXPR
+@itemx -d EXPR
+Display only posting that meet the criterias in the EXPR
+@item --date-format STR
+@itemx -y STR
+Change the basic date format used in reports
+@item --format STR
+@itemx --balance-format STR
+@itemx --register-format STR
+@itemx --prices-format STR
+@itemx -F STR
+Set reporting format
+@item --wide-register-format STR
+@itemx -w
+Wide
+@item --anon
+Print the ledger register with anonymized accounts and payees, useful for filing bug reports
+@end ftable
@node Grouping Options, Commodity Reporting Quick Reference, Output Customization Quick Reference, Command Line Quick Reference
@subsection Grouping Options
-@multitable @columnfractions .1 .25 .65
-@headitem Short @tab Long @tab Description
-@item @code{-P} @tab @code{--by-payee} @tab Group postings by common payee names
-@item @code{-D} @tab @code{--daily} @tab Group postings by day
-@item @code{-W} @tab @code{--weekly} @tab Group postings by week
-@item @code{-M} @tab @code{--monthly} @tab Group postings by month
-@item @code{} @tab @code{--quarterly} @tab Group postings by quarter
-@item @code{-Y} @tab @code{--yearly} @tab Group postings by year
-@item @code{} @tab @code{--dow} @tab Group by day of weeks
-@item @code{-s} @tab @code{--subtotal} @tab Group posting together, similar to balance report
-@end multitable
+@ftable @code
+@item --by-payee
+@itemx -P
+Group postings by common payee names
+@item --daily
+@itemx -D
+Group postings by day
+@item --weekly
+@itemx -W
+Group postings by week
+@item --monthly
+@itemx -M
+Group postings by month
+@item --quarterly
+Group postings by quarter
+@item --yearly
+@itemx -Y
+Group postings by year
+@item --dow
+Group by day of weeks
+@item --subtotal
+@itemx -s
+Group posting together, similar to balance report
+@end ftable
@node Commodity Reporting Quick Reference, , Grouping Options, Command Line Quick Reference
@subsection Commodity Reporting
-@multitable @columnfractions .1 .25 .65
-@headitem Short @tab Long @tab Description
-@item @code{} @tab @code{--price-db FILE} @tab Use @file{FILE} for retrieving stored commodity prices
-@item @code{-L MINS} @tab @code{--price-exp MINS} @tab Set expected freshness of prices in minutes
-@item @code{-Q} @tab @code{--download} @tab Download quotes using @code{getquote}
-@item @code{} @tab @code{--getquote} @tab Sets path to a user defined script to download commodity prices.
-@item @code{-O} @tab @code{--quantity} @tab Report commodity totals without conversion
-@item @code{-B} @tab @code{--basis} @tab Report cost basis
-@item @code{-V} @tab @code{--market} @tab Report last known market value
-@item @code{-G} @tab @code{--gain} @tab Report net gain loss for commodities that have a price history
-@end multitable
+@ftable @code
+@item --price-db FILE
+Use @file{FILE} for retrieving stored commodity prices
+@item --price-exp MINS
+@itemx -L MINS
+Set expected freshness of prices in minutes
+@item --download
+@itemx -Q
+Download quotes using @code{getquote}
+@item --getquote
+Sets path to a user defined script to download commodity prices.
+@item --quantity
+@itemx -O
+Report commodity totals without conversion
+@item --basis
+@itemx -B
+Report cost basis
+@item --market
+@itemx -V
+Report last known market value
+@item --gain
+@itemx -G
+Report net gain loss for commodities that have a price history
+@end ftable
@node Detailed Options Description, Period Expressions, Command Line Quick Reference, Command-line Syntax
@section Detailed Option Description
@@ -5103,7 +5245,7 @@ GUIs, which would make use of the different scopes by keeping an
instance of Ledger running in the background and running multiple
sessions with multiple reports per session.
-@table @code
+@ftable @code
@item --decimal-comma
Direct Ledger to parse journals using the European standard comma as
decimal separator, vice a period.
@@ -5177,7 +5319,7 @@ Ledger interprets all cleared transactions as correct, and if it finds
a new account or commodity (same as a misspelled commodity or account)
it will issue a warning giving you the file and line number of the
problem.
-@end table
+@end ftable
@node Report Options, Basic options, Session Options, Detailed Options Description
@subsection Report Options
@@ -5189,7 +5331,7 @@ GUIs, which would make use of the different scopes by keeping an
instance of Ledger running in the background and running multiple
sessions with multiple reports per session.
-@table @code
+@ftable @code
@item --abbrev-len <INT>
Set the minimum
length an account can be abbreviated to if it doesn't fit inside the
@@ -5782,7 +5924,7 @@ Let the register report use 132 columns. Identical to @code{--columns
@item --yearly
Synonym for @code{--period "yearly"}
-@end table
+@end ftable
@node Basic options, Report Filtering, Report Options, Detailed Options Description
@subsection Basic options
@@ -5791,32 +5933,32 @@ These are the most basic command options. Most likely, the user will
want to set them using environment variables (see @ref{Environment
Variables}), instead of using actual command-line options:
-@table @code
+@ftable @code
@item --help
-@item -h
+@itemx -h
Print a summary of all the options, and what they are used for. This
can be a handy way to remember which options do what. This help screen
is also printed if ledger is run without a command.
@item --version
-@item -v
+@itemx -v
Print the current version of ledger and exits. This is useful for
sending bug reports, to let the author know which version of ledger you
are using.
@item --file FILE
-@item -f FILE
+@itemx -f FILE
Read FILE as a ledger file. This command may be used multiple times.
Typically, the environment variable @env{LEDGER_FILE} is set, rather
than using this command-line option.
@item --output FILE
-@item -o FILE
+@itemx -o FILE
Redirect output from any command to @var{FILE}. By default, all output
goes to standard output.
@item --init-file FILE
-@item -i FILE
+@itemx -i FILE
Causes @code{FILE} to be read by ledger before any other ledger file.
This file may not contain any postings, but it may contain option
settings. To specify options in the init file, use the same syntax as
@@ -5833,10 +5975,10 @@ Option settings on the command-line or in the environment always take
precedence over settings in the init file.
@item --account NAME
-@item -a NAME
+@itemx -a NAME
Specify the default account which QIF file postings are assumed to
relate to.
-@end table
+@end ftable
@node Report Filtering, Output Customization, Basic options, Detailed Options Description
@subsection Report filtering
@@ -5844,13 +5986,13 @@ relate to.
These options change which postings affect the outcome of a
report, in ways other than just using regular expressions:
-@table @code
+@ftable @code
@item --current
-@item -c
+@itemx -c
Display only transactions occurring on or before the current date.
@item --begin DATE
-@item -b DATE
+@itemx -b DATE
Constrain the report to transactions on or after @var{DATE}. Only
transactions after that date will be calculated, which means that the
running total in the balance report will always start at zero with the
@@ -5858,12 +6000,12 @@ first matching transaction. (Note: This is different from using
@code{--display} to constrain what is displayed).
@item --end DATE
-@item -e DATE
+@itemx -e DATE
Constrain the report so that transactions on or after @var{DATE} are
not considered. The ending date is inclusive.
@item --period STR
-@item -p STR
+@itemx -p STR
Set the reporting period to @var{STR}. This will subtotal all matching
transactions within each period separately, making it easy to see
weekly, monthly, quarterly, etc., posting totals. A period string can
@@ -5882,28 +6024,28 @@ ledger -M --period-sort -At reg ^Expenses
@end smallexample
@item --cleared
-@item -C
+@itemx -C
Display only postings whose transaction has been marked ``cleared''
(by placing an asterisk to the right of the date).
@item --uncleared
-@item -U
+@itemx -U
Display only postings whose transaction has not been marked ``cleared''
(i.e., if there is no asterisk to the right of the date).
@item --real
-@item -R
+@itemx -R
Display only real postings, not virtual. (A virtual posting is
indicated by surrounding the account name with parentheses or brackets;
see @ref{Virtual postings} for more information).
@item --actual
-@item -L
+@itemx -L
Display only actual postings, and not those created due to automated
postings.
@item --related
-@item -r
+@itemx -r
Display postings that are related to whichever postings would
otherwise have matched the filtering criteria. In the register
report, this shows where money went to, or the account it came from.
@@ -5940,21 +6082,21 @@ option that projects your budget into the future, showing how it will
affect future balances. @xref{Budgeting and Forecasting}.
@item --limit EXPR
-@item -l EXPR
+@itemx -l EXPR
Limit which postings take part in the calculations of a report.
@item --amount EXPR
-@item -t EXPR
+@itemx -t EXPR
Change the value expression used to calculate the ``value'' column in
the @command{register} report, the amount used to calculate account
totals in the @command{balance} report, and the values printed in the
@command{equity} report. @xref{Value Expressions}.
@item --total EXPR
-@item -T EXPR
+@itemx -T EXPR
Set the value expression used for the ``totals'' column in the
@command{register} and @command{balance} reports.
-@end table
+@end ftable
@c @node Search Terms, Output Customization, Report Filtering, Detailed Options Description
@c @subsection Search Terms
@@ -6006,37 +6148,37 @@ Set the value expression used for the ``totals'' column in the
These options affect only the output, but not which postings are
used to create it:
-@table @code
+@ftable @code
@item --collapse
-@item -n
+@itemx -n
Cause transactions in a @command{register} report with multiple
postings to be collapsed into a single, subtotaled transaction.
@item --subtotal
-@item -s
+@itemx -s
Cause all transactions in a @command{register} report to be collapsed
into a single, subtotaled transaction.
@item --by-payee
-@item -P
+@itemx -P
Report subtotals by payee.
@item --empty
-@item -E
+@itemx -E
Include even empty accounts in the @command{balance} report.
@item --weekly
-@item -W
+@itemx -W
Report posting totals by the week. The week begins on whichever day of
the week begins the month containing that posting. To set a specific
begin date, use a period string, such as @code{weekly from DATE}.
@item --monthly
-@item -M
+@itemx -M
Report posting totals by month;
@item --yearly
-@item -Y
+@itemx -Y
Report posting totals by year. For more complex period, using the
@item --period
@@ -6047,7 +6189,7 @@ Report postings totals for each day of the week. This is an easy way
to see if weekend spending is more than on weekdays.
@item --sort EXPR
-@item -S EXPR
+@itemx -S EXPR
Sort a report by comparing the values determined using the value
expression @var{EXPR}. For example, using @code{-S -UT} in the
balance report will sort account balances from greatest to least, using
@@ -6059,7 +6201,7 @@ Produce a pivot table around the tag provided. This requires meta data
using valued tags.
@item --wide
-@item -w
+@itemx -w
Cause the default @command{register} report to assume 132 columns
instead of 80.
@@ -6078,16 +6220,16 @@ when the output is especially long. This behavior can be made the
default by setting the @env{LEDGER_PAGER} environment variable.
@item --average
-@item -A
+@itemx -A
Report the average posting value.
@item --deviation
-@item -D
+@itemx -D
Report each posting's deviation from the average. It is only
meaningful in the @command{register} and @command{prices} reports.
@item --percent
-@item -%
+@itemx -%
Show account subtotals in the @command{balance} report as percentages
of the parent account.
@@ -6095,7 +6237,7 @@ of the parent account.
@c @command{xml} report.
@item --amount-data
-@item -j
+@itemx -j
Change the @command{register} report so that it outputs nothing but the
date and the value column, and the latter without commodities. This is
only meaningful if the report uses a single commodity. This data can
@@ -6103,12 +6245,12 @@ then be fed to other programs, which could plot the date, analyze it,
etc.
@item --total-data
-@item -J
+@itemx -J
Change the @command{register} report so that it outputs nothing but the
date and totals column, without commodities.
@item --display EXPR
-@item -d EXPR
+@itemx -d EXPR
Limit which postings or accounts or actually displayed in a report.
They might still be calculated, and be part of the running total of a
register report, for example, but they will not be displayed. This is
@@ -6132,7 +6274,7 @@ amount for the reporting range (@code{-p}), or simply a display
restricted to the reporting range (using @code{-d}).
@item --date-format STR
-@item -y STR
+@itemx -y STR
Change the basic date format used by reports. The default uses a date
like @code{2004/08/01}, which represents the default date format of
@code{%Y/%m/%d}. To change the way dates are printed in general, the
@@ -6141,7 +6283,7 @@ initialization file @file{~/.ledgerrc} (or the file referred to by
@env{LEDGER_INIT}).
@item --format STR
-@item -F STR
+@itemx -F STR
Set the reporting format for whatever report ledger is about to make.
@xref{Format Strings}. There are also specific format commands for
each report type:
@@ -6264,14 +6406,14 @@ Set the format for the @command{prices} report. The default is:
@item --wide-register-format STR
(-w @command{register})
-@end table
+@end ftable
@node Commodity Reporting, Environment Variables, Output Customization, Detailed Options Description
@subsection Commodity Reporting
These options affect how commodity values are displayed:
-@table @code
+@ftable @code
@item --price-db FILE
Set the file that is used for recording downloaded commodity prices.
It is always read on startup, to determine historical prices. Other
@@ -6294,7 +6436,7 @@ The format of the file can be changed by telling ledger to use the
@code{--pricedb-format} you define.
@item --price-exp MINS
-@item -L MINS
+@itemx -L MINS
Set the expected freshness of price quotes, in minutes. That is, if
the last known quote for any commodity is older than this value, and if
@code{--download} is being used, then the Internet will be consulted
@@ -6302,7 +6444,7 @@ again for a newer price. Otherwise, the old price is still considered
to be fresh enough.
@item --download
-@item -Q
+@itemx -Q
Cause quotes to be automagically downloaded, as needed, by running a
script named @command{getquote} and expecting that script to return a
value understood by ledger. A sample implementation of a
@@ -6310,7 +6452,7 @@ value understood by ledger. A sample implementation of a
distribution. Downloaded quote price are then appended to the price
database, usually specified using the environment variable
@env{LEDGER_PRICE_DB}.
-@end table
+@end ftable
There are several different ways that ledger can report the totals it
displays. The most flexible way to adjust them is by using value
@@ -6318,20 +6460,24 @@ expressions, and the @code{-t} and @code{-T} options. However,
there are also several ``default'' reports, which will satisfy most
users basic reporting needs:
-@table @code
-@item -O, --quantity
+@ftable @code
+@item --quantity
+@itemx -O
Report commodity totals (this is the default)
-@item -B, --basis
+@item --basis
+@itemx -B
Report the cost basis for all postings.
-@item -V, --market
+@item --market
+@itemx -V
Use the last known value for commodities to calculate final values.
-@item -G, --gain
+@item --gain
+@itemx -G
Report the net gain/loss for all commodities in the report that have
a price history.
-@end table
+@end ftable
Often you will be more interested in the value of your entire holdings,
in your preferred currency. It might be nice to know you hold 10,000
@@ -6937,17 +7083,17 @@ An amount in braces can be any kind of amount supported by ledger,
with or without a commodity. Use this for decimal values.
@item /REGEXP/
-@item W/REGEXP/
+@itemx W/REGEXP/
A regular expression that matches against an account's full name. If
a posting, this will match against the account affected by the
posting.
@item //REGEXP/
-@item p/REGEXP/
+@itemx p/REGEXP/
A regular expression that matches against a transaction's payee name.
@item ///REGEXP/
-@item w/REGEXP/
+@itemx w/REGEXP/
A regular expression that matches against an account's base name. If
a posting, this will match against the account affected by the
posting.
@@ -8193,7 +8339,7 @@ found.
These options are primarily for Ledger developers, but may be of some
use to a user trying something new.
-@table @code
+@ftable @code
@item --args-only
Ignore init
files and environment variables for the ledger run.
@@ -8258,7 +8404,7 @@ Print detailed information on the execution of Ledger.
@item --version
Print version information and exit.
-@end table
+@end ftable
@node Pre-commands, , Debug Options, Developer Commands
@subsection Pre-Commands
@@ -8266,7 +8412,7 @@ Print version information and exit.
Pre-commands are useful when you aren't sure how a command or option
will work.
-@table @code
+@ftable @code
@item args
Evaluate the given arguments against the following model transaction:
@@ -8365,7 +8511,7 @@ true
@item template
Shows the insertion template that a @code{draft} or @code{xact}
sub-command generates. This is a debugging command.
-@end table
+@end ftable
@node Ledger Development Environment, , Developer Commands, Ledger for Developers
@section Ledger Development Environment
@@ -8542,12 +8688,12 @@ ledger register Checking --sort d -d 'd>[2011/04/01]' until 2011/05/25
@end smallexample
@node Concept Index, Command Index, Miscellaneous Notes, Top
-@unnumbered Concept Index
+@unnumbered Concepts Index
@printindex cp
@node Command Index, , Concept Index, Top
-@unnumbered Command Index
+@unnumbered Commands & Options Index
@printindex fn