Fix consistency of alignment of @smallexample
This commit is contained in:
parent
423acc73ee
commit
20865d1bde
1 changed files with 498 additions and 499 deletions
127
doc/ledger3.texi
127
doc/ledger3.texi
|
|
@ -260,7 +260,7 @@ To build and install once you have these libraries on your system,
|
|||
enter these commands:
|
||||
|
||||
@smallexample
|
||||
./configure && make install
|
||||
$ ./configure && make install
|
||||
@end smallexample
|
||||
|
||||
@node Getting Help, , Building the Program, Introduction to Ledger
|
||||
|
|
@ -330,7 +330,7 @@ variations between shells to give concrete examples for each.
|
|||
To find the balances of all of your accounts, run this command:
|
||||
|
||||
@smallexample
|
||||
ledger -f drewr3.dat balance
|
||||
$ ledger -f drewr3.dat balance
|
||||
@end smallexample
|
||||
|
||||
Ledger will generate:
|
||||
|
|
@ -386,7 +386,7 @@ $ ledger -f drewr3.dat balance Assets Liabilities
|
|||
To show all transactions and a running total:
|
||||
|
||||
@smallexample
|
||||
ledger -f drewr3.dat register
|
||||
$ ledger -f drewr3.dat register
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
|
|
@ -1219,14 +1219,14 @@ postings related to a specific fund. So, to see the current
|
|||
monetary balances of all funds, the command would be:
|
||||
|
||||
@smallexample
|
||||
ledger --code-as-payee -P reg ^Assets
|
||||
$ ledger --code-as-payee -P reg ^Assets
|
||||
@end smallexample
|
||||
|
||||
Or to see a particular funds expenses, the @code{School} fund in this
|
||||
case:
|
||||
|
||||
@smallexample
|
||||
ledger --code-as-payee -P reg ^Expenses @@School
|
||||
$ ledger --code-as-payee -P reg ^Expenses @@School
|
||||
@end smallexample
|
||||
|
||||
Both approaches yield different kinds of flexibility, depending on how
|
||||
|
|
@ -1400,7 +1400,6 @@ Block comments can be made by use @code{@!comment} ... @code{@!end
|
|||
comment}
|
||||
|
||||
@smallexample
|
||||
|
||||
; This is a single line comment,
|
||||
# and this,
|
||||
% and this,
|
||||
|
|
@ -1783,7 +1782,7 @@ Using the @code{--strict} option will cause Ledger to complain if any
|
|||
accounts are not previously defined:
|
||||
|
||||
@smallexample
|
||||
15:27:39 ~/ledger (next) > ledger bal --strict
|
||||
$ ledger bal --strict
|
||||
Warning: "FinanceData/Master.dat", line 6: Unknown account 'Liabilities:Tithe Owed'
|
||||
Warning: "FinanceData/Master.dat", line 8: Unknown account 'Liabilities:Tithe Owed'
|
||||
Warning: "FinanceData/Master.dat", line 15: Unknown account 'Allocation:Equities:Domestic'
|
||||
|
|
@ -1793,7 +1792,7 @@ If you have a large Ledger register already created use the
|
|||
@code{accounts} command to get started:
|
||||
|
||||
@smallexample
|
||||
ledger accounts >> Accounts.dat
|
||||
$ ledger accounts >> Accounts.dat
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
|
|
@ -2176,6 +2175,7 @@ tag to all. Tags can have values and may be nested.
|
|||
@smallexample
|
||||
apply tag hastag
|
||||
apply tag nestedtag: true
|
||||
|
||||
2011/01/25 Tom's Used Cars
|
||||
Expenses:Auto $ 5,500.00
|
||||
; :nobudget:
|
||||
|
|
@ -2190,6 +2190,7 @@ end apply tag nestedtag
|
|||
2011/12/01 Sale
|
||||
Assets:Checking:Business $ 30.00
|
||||
Income:Sales
|
||||
|
||||
end apply tag hastag
|
||||
@end smallexample
|
||||
|
||||
|
|
@ -2349,15 +2350,15 @@ leaving just 2003 and 2004 in the current file. So, use
|
|||
called @file{ledger-old.dat}:
|
||||
|
||||
@smallexample
|
||||
ledger -f ledger.dat -b 2000 -e 2001 print > ledger-old.dat
|
||||
$ ledger -f ledger.dat -b 2000 -e 2001 print > ledger-old.dat
|
||||
@end smallexample
|
||||
|
||||
To delete older data from the current ledger file, use @command{print}
|
||||
again, this time specifying year 2002 as the starting date:
|
||||
|
||||
@smallexample
|
||||
ledger -f ledger.dat -b 2002 print > x
|
||||
mv x ledger.dat
|
||||
$ ledger -f ledger.dat -b 2002 print > x
|
||||
$ mv x ledger.dat
|
||||
@end smallexample
|
||||
|
||||
However, now the current file contains @emph{only} postings from 2002
|
||||
|
|
@ -2367,10 +2368,10 @@ compensate for this, we must append an equity report for the old ledger
|
|||
at the beginning of the new one:
|
||||
|
||||
@smallexample
|
||||
ledger -f ledger-old.dat equity > equity.dat
|
||||
cat equity.dat ledger.dat > x
|
||||
mv x ledger.dat
|
||||
rm equity.dat
|
||||
$ ledger -f ledger-old.dat equity > equity.dat
|
||||
$ cat equity.dat ledger.dat > x
|
||||
$ mv x ledger.dat
|
||||
$ rm equity.dat
|
||||
@end smallexample
|
||||
|
||||
Now the balances reported from @file{ledger.dat} are identical to what
|
||||
|
|
@ -3484,14 +3485,14 @@ and add something like
|
|||
Now
|
||||
|
||||
@smallexample
|
||||
ledger --subtotal --begin 2008/01/01 --end 2008/01/14 bal Income
|
||||
$ ledger --subtotal --begin 2008/01/01 --end 2008/01/14 bal Income
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
gives you your accrued income in the first two weeks of the year, and
|
||||
|
||||
@smallexample
|
||||
ledger --effective --subtotal --begin 2008/01/01 --end 2008/01/14 bal Income
|
||||
$ ledger --effective --subtotal --begin 2008/01/01 --end 2008/01/14 bal Income
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
|
|
@ -3570,7 +3571,7 @@ That's it. To see how much Huqúq is currently owed based on your
|
|||
ledger transactions, use:
|
||||
|
||||
@smallexample
|
||||
ledger balance Liabilities:Huquq
|
||||
$ ledger balance Liabilities:Huquq
|
||||
@end smallexample
|
||||
|
||||
This works fine, but omits one aspect of the law: that Huquq is only
|
||||
|
|
@ -3581,7 +3582,7 @@ value of 2.22 ounces of gold. This can be accomplished using the
|
|||
command:
|
||||
|
||||
@smallexample
|
||||
ledger -Q -t "/Liab.*Huquq/?(a/P@{2.22 AU@}<=@{-1.0@}&a):a" -s bal liab
|
||||
$ ledger -Q -t "/Liab.*Huquq/?(a/P@{2.22 AU@}<=@{-1.0@}&a):a" -s bal liab
|
||||
@end smallexample
|
||||
|
||||
With this command, the current price for gold is downloaded, and the
|
||||
|
|
@ -3590,7 +3591,7 @@ of gold. If you wish the liability to be reflected in the parent
|
|||
subtotal either way, use this instead:
|
||||
|
||||
@smallexample
|
||||
ledger -Q -T "/Liab.*Huquq/?(O/P@{2.22 AU@}<=@{-1.0@}&O):O" -s bal liab
|
||||
$ ledger -Q -T "/Liab.*Huquq/?(O/P@{2.22 AU@}<=@{-1.0@}&O):O" -s bal liab
|
||||
@end smallexample
|
||||
|
||||
In some cases, you may wish to refer to the account of whichever
|
||||
|
|
@ -3643,7 +3644,7 @@ The balance report is the most commonly used report. The simplest
|
|||
invocation is:
|
||||
|
||||
@smallexample
|
||||
ledger balance -f drewr3.dat
|
||||
$ ledger balance -f drewr3.dat
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
|
|
@ -3677,7 +3678,7 @@ specific accounts is as easy as entering the names of the accounts
|
|||
after the command.
|
||||
|
||||
@smallexample
|
||||
20:37:53 ~/ledger/test/input > ledger balance -f drewr3.dat Auto MasterCard
|
||||
$ ledger balance -f drewr3.dat Auto MasterCard
|
||||
$ 5,500.00 Expenses:Auto
|
||||
$ -20.00 Liabilities:MasterCard
|
||||
--------------------
|
||||
|
|
@ -3693,7 +3694,7 @@ If you want the entire contents of a branch of your account tree, use
|
|||
the highest common name in the branch:
|
||||
|
||||
@smallexample
|
||||
20:39:21 ~/ledger/test/input > ledger balance -f drewr3.dat Income
|
||||
$ ledger balance -f drewr3.dat Income
|
||||
$ -2,030.00 Income
|
||||
$ -2,000.00 Salary
|
||||
$ -30.00 Sales
|
||||
|
|
@ -3706,8 +3707,8 @@ You can use general regular expressions in nearly anyplace Ledger
|
|||
needs a string:
|
||||
|
||||
@smallexample
|
||||
20:40:28 ~/ledger/test/input > ledger balance -f drewr3.dat ^Bo
|
||||
21:13:29 ~/ledger/test/input > ledger balance -f drewr3.dat Bo
|
||||
$ ledger balance -f drewr3.dat ^Bo
|
||||
$ ledger balance -f drewr3.dat Bo
|
||||
$ 20.00 Expenses:Books
|
||||
@end smallexample
|
||||
|
||||
|
|
@ -3721,8 +3722,8 @@ If you want to know exactly how much you have spent in a particular
|
|||
account on a particular payee, the following are equivalent:
|
||||
|
||||
@smallexample
|
||||
> ledger balance Auto:Fuel and Chevron
|
||||
> ledger balance --limit "(account=~/Fuel/) & (payee=~/Chev/)"
|
||||
$ ledger balance Auto:Fuel and Chevron
|
||||
$ ledger balance --limit "(account=~/Fuel/) & (payee=~/Chev/)"
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
|
|
@ -3736,7 +3737,7 @@ If you want to exclude specific accounts from the report, you can
|
|||
exclude multiple accounts with parentheses:
|
||||
|
||||
@smallexample
|
||||
ledger -s bal Expenses and not \(Expenses:Drinks or Expenses:Candy or Expenses:Gifts\)
|
||||
$ ledger -s bal Expenses and not \(Expenses:Drinks or Expenses:Candy or Expenses:Gifts\)
|
||||
@end smallexample
|
||||
|
||||
@node Controlling formatting, , Controlling the Accounts and Payees, Balance Reports
|
||||
|
|
@ -4137,7 +4138,7 @@ line in the data above with:
|
|||
Then execute ledger like this:
|
||||
|
||||
@smallexample
|
||||
ledger convert download.csv --input-date-format "%m/%d/%Y"
|
||||
$ ledger convert download.csv --input-date-format "%m/%d/%Y"
|
||||
@end smallexample
|
||||
|
||||
Where the @code{--input-date-format} option tells ledger how to
|
||||
|
|
@ -4747,11 +4748,11 @@ The @command{payees} reports all of the unique payees in the
|
|||
journal. To filter the payees displayed you must use the prefix:
|
||||
|
||||
@smallexample
|
||||
macbook-2:$ ledger payees 'Tar.+t'
|
||||
El Dorade Restaurant
|
||||
My Big Fat Greek Restaurant
|
||||
Target
|
||||
macbook-2:$
|
||||
$ ledger payees @Nic
|
||||
Nicolas
|
||||
Nicolas BOILABUS
|
||||
Oudtshoorn Municipality
|
||||
Vaca Veronica
|
||||
@end smallexample
|
||||
|
||||
@node commodities, tags, payees, Reports about your Journals
|
||||
|
|
@ -4796,7 +4797,7 @@ Italiano} again. The exact amounts are different, but the overall
|
|||
form is the same. With the @command{xact} command you can type:
|
||||
|
||||
@smallexample
|
||||
ledger entry 2004/4/9 viva food 11 tips 2.50
|
||||
$ ledger entry 2004/4/9 viva food 11 tips 2.50
|
||||
@end smallexample
|
||||
|
||||
This produces the following output:
|
||||
|
|
@ -4818,12 +4819,12 @@ Here are a few more examples of the @command{xact} command, assuming
|
|||
the above journal transaction:
|
||||
|
||||
@smallexample
|
||||
ledger entry 4/9 viva 11.50
|
||||
ledger entry 4/9 viva 11.50 checking # (from `checking')
|
||||
ledger entry 4/9 viva food 11.50 tips 8
|
||||
ledger xact 4/9 viva food 11.50 tips 8 cash
|
||||
ledger xact 4/9 viva food $11.50 tips $8 cash
|
||||
ledger xact 4/9 viva dining "DM 11.50"
|
||||
$ ledger entry 4/9 viva 11.50
|
||||
$ ledger entry 4/9 viva 11.50 checking # (from `checking')
|
||||
$ ledger entry 4/9 viva food 11.50 tips 8
|
||||
$ ledger xact 4/9 viva food 11.50 tips 8 cash
|
||||
$ ledger xact 4/9 viva food $11.50 tips $8 cash
|
||||
$ ledger xact 4/9 viva dining "DM 11.50"
|
||||
@end smallexample
|
||||
|
||||
@command{xact} is identical to @command{entry} and is provide for
|
||||
|
|
@ -4852,7 +4853,7 @@ a large number of options for refining the output from those commands.
|
|||
The basic syntax of any ledger command is:
|
||||
|
||||
@smallexample
|
||||
ledger [OPTIONS...] COMMAND [ARGS...]
|
||||
$ ledger [OPTIONS...] COMMAND [ARGS...]
|
||||
@end smallexample
|
||||
|
||||
After the command word there may appear any number of arguments. For
|
||||
|
|
@ -4868,14 +4869,14 @@ example, the following balance command reports account totals for
|
|||
rent, food and movies, but only those whose payee matches Freddie:
|
||||
|
||||
@smallexample
|
||||
ledger bal rent food movies payee freddie
|
||||
$ ledger bal rent food movies payee freddie
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
or
|
||||
|
||||
@smallexample
|
||||
ledger bal rent food movies @@freddie
|
||||
$ ledger bal rent food movies @@freddie
|
||||
@end smallexample
|
||||
|
||||
There are many, many command options available with the
|
||||
|
|
@ -5196,7 +5197,7 @@ Display the options in effect for this Ledger invocation, along with
|
|||
their values and the source of those values, for example:
|
||||
|
||||
@smallexample
|
||||
14:15:02 > ledger --options bal --cleared -f ~/ledger/test/input/drewr3.dat
|
||||
$ ledger --options bal --cleared -f ~/ledger/test/input/drewr3.dat
|
||||
===========================================================================
|
||||
[Global scope options]
|
||||
|
||||
|
|
@ -5267,7 +5268,7 @@ information.
|
|||
Specify the input date format for journal entries. For example,
|
||||
|
||||
@smallexample
|
||||
ledger convert Export.csv --input-date-format "%m/%d/%Y"
|
||||
$ ledger convert Export.csv --input-date-format "%m/%d/%Y"
|
||||
@end smallexample
|
||||
|
||||
Would convert the @file{Export.csv} file to ledger format, assuming
|
||||
|
|
@ -5409,7 +5410,7 @@ Print the entire line in bold if the given
|
|||
value expression is true (@pxref{Value Expressions}).
|
||||
|
||||
@smallexample
|
||||
ledger reg Expenses --begin Dec --bold-if "amount > 100"
|
||||
$ ledger reg Expenses --begin Dec --bold-if "amount > 100"
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
|
|
@ -5596,7 +5597,7 @@ calculations occur.
|
|||
group transactions by the day of the week.
|
||||
|
||||
@smallexample
|
||||
ledger reg Expenses --dow --collapse
|
||||
$ ledger reg Expenses --dow --collapse
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
|
|
@ -5664,7 +5665,7 @@ a grouped report. Only has effect with a @code{--group-by} register
|
|||
report.
|
||||
|
||||
@smallexample
|
||||
ledger reg Expenses --group-by "payee" --group-title-format "------------------------ %-20(value) ---------------------\n"
|
||||
$ ledger reg Expenses --group-by "payee" --group-title-format "------------------------ %-20(value) ---------------------\n"
|
||||
------------------------ 7-Eleven ---------------------
|
||||
2011/08/13 7-Eleven Expenses:Auto:Misc $ 5.80 $ 5.80
|
||||
|
||||
|
|
@ -6020,7 +6021,7 @@ monthly expenses, in order to view the highest expense categories at
|
|||
the top of each month:
|
||||
|
||||
@smallexample
|
||||
ledger -M --period-sort -At reg ^Expenses
|
||||
$ ledger -M --period-sort -At reg ^Expenses
|
||||
@end smallexample
|
||||
|
||||
@item --cleared
|
||||
|
|
@ -6063,7 +6064,7 @@ this transaction:
|
|||
And the register command was:
|
||||
|
||||
@smallexample
|
||||
ledger -r register food
|
||||
$ ledger -r register food
|
||||
@end smallexample
|
||||
|
||||
The following would be output, showing the postings related to the
|
||||
|
|
@ -6258,7 +6259,7 @@ useful for seeing last month's checking postings, against a running
|
|||
balance which includes all posting values:
|
||||
|
||||
@smallexample
|
||||
ledger -d "d>=[last month]" reg checking
|
||||
$ ledger -d "d>=[last month]" reg checking
|
||||
@end smallexample
|
||||
|
||||
The output from this command is very different from the following,
|
||||
|
|
@ -6266,7 +6267,7 @@ whose running total includes only postings from the last month
|
|||
onward:
|
||||
|
||||
@smallexample
|
||||
ledger -p "last month" reg checking
|
||||
$ ledger -p "last month" reg checking
|
||||
@end smallexample
|
||||
|
||||
Which is more useful depends on what you're looking to know: the total
|
||||
|
|
@ -6624,7 +6625,6 @@ option settings in the file @file{~/.ledgerrc}, for example:
|
|||
|
||||
@smallexample
|
||||
--pager /bin/cat
|
||||
|
||||
@end smallexample
|
||||
|
||||
@node Period Expressions, , Detailed Options Description, Command-line Syntax
|
||||
|
|
@ -6879,7 +6879,7 @@ command shows only transactions from the beginning of the current month,
|
|||
while still calculating the running balance based on all transactions:
|
||||
|
||||
@smallexample
|
||||
ledger -d "d>[this month]" register checking
|
||||
$ ledger -d "d>[this month]" register checking
|
||||
@end smallexample
|
||||
|
||||
This advantage to this command's complexity is that it prints the
|
||||
|
|
@ -6888,7 +6888,7 @@ following, simpler command is similar, but totals only the displayed
|
|||
postings:
|
||||
|
||||
@smallexample
|
||||
ledger -b "this month" register checking
|
||||
$ ledger -b "this month" register checking
|
||||
@end smallexample
|
||||
|
||||
@menu
|
||||
|
|
@ -7671,7 +7671,6 @@ and PeriodicTransaction's, etc.
|
|||
Here is how you would traverse all the postings in your data file:
|
||||
|
||||
@smallexample
|
||||
|
||||
import ledger
|
||||
|
||||
for xact in ledger.read_journal("sample.dat").xacts:
|
||||
|
|
@ -8450,7 +8449,7 @@ and apply it against a model transaction.
|
|||
Evaluate the given period and report how Ledger interprets it:
|
||||
|
||||
@smallexample
|
||||
20:22:21 ~/ledger (next)> ledger period "this year"
|
||||
$ ledger period "this year"
|
||||
--- Period expression tokens ---
|
||||
TOK_THIS: this
|
||||
TOK_YEAR: year
|
||||
|
|
@ -8473,7 +8472,7 @@ Evaluate the given query and report how Ledger interprets it against
|
|||
the model transaction:
|
||||
|
||||
@smallexample
|
||||
20:25:42 ~/ledger (next)> ledger query "/Book/"
|
||||
$ ledger query "/Book/"
|
||||
--- Input arguments ---
|
||||
("/Book/")
|
||||
|
||||
|
|
@ -8666,11 +8665,11 @@ to the main body of the documentation.
|
|||
@subsection Invoking Ledger
|
||||
|
||||
@smallexample
|
||||
ledger --group-by "tag('trip')" bal
|
||||
legder reg --sort "tag('foo')" %foo
|
||||
ledger cleared VWCU NFCU Tithe Misentry
|
||||
ledger register Joint --uncleared
|
||||
ledger register Checking --sort d -d 'd>[2011/04/01]' until 2011/05/25
|
||||
$ ledger --group-by "tag('trip')" bal
|
||||
$ legder reg --sort "tag('foo')" %foo
|
||||
$ ledger cleared VWCU NFCU Tithe Misentry
|
||||
$ ledger register Joint --uncleared
|
||||
$ ledger register Checking --sort d -d 'd>[2011/04/01]' until 2011/05/25
|
||||
@end smallexample
|
||||
|
||||
@node Ledger Files, , Invoking Ledger, Cookbook
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue