@@ -820,78 +820,80 @@ Markup:
820
820
_<new-branch-name>_
821
821
_<template-directory>_
822
822
823
- A placeholder is not enclosed in backticks, as it is not a literal.
824
-
825
823
When needed, use a distinctive identifier for placeholders, usually
826
824
made of a qualification and a type:
827
825
_<git-dir>_
828
826
_<key-id>_
829
827
830
- When literal and placeholders are mixed, each markup is applied for
831
- each sub-entity. If they are stuck, a special markup, called
832
- unconstrained formatting is required.
833
- Unconstrained formating for placeholders is __<like-this>__
834
- Unconstrained formatting for literal formatting is ++like this++
835
- `--jobs` _<n>_
836
- ++--sort=++__<key>__
837
- __<directory>__++/.git++
838
- ++remote.++__<name>__++.mirror++
828
+ Git's Asciidoc processor has been tailored to treat backticked text
829
+ as complex synopsis. When literal and placeholders are mixed, you can
830
+ use the backtick notation which will take care of correctly typesetting
831
+ the content.
832
+ `--jobs <n>`
833
+ `--sort=<key>`
834
+ `<directory>/.git`
835
+ `remote.<name>.mirror`
836
+ `ssh://[<user>@]<host>[:<port>]/<path-to-git-repo>`
839
837
840
- caveat: ++ unconstrained format is not verbatim and may expand
841
- content. Use Asciidoc escapes inside them .
838
+ As a side effect, backquoted placeholders are correctly typeset, but
839
+ this style is not recommended .
842
840
843
841
Synopsis Syntax
844
842
845
- Syntax grammar is formatted neither as literal nor as placeholder.
843
+ The synopsis (a paragraph with [synopsis] attribute) is automatically
844
+ formatted by the toolchain and does not need typesetting.
846
845
847
846
A few commented examples follow to provide reference when writing or
848
847
modifying command usage strings and synopsis sections in the manual
849
848
pages:
850
849
851
850
Possibility of multiple occurrences is indicated by three dots:
852
- _ <file>_ ...
851
+ <file>...
853
852
(One or more of <file>.)
854
853
855
854
Optional parts are enclosed in square brackets:
856
- [_ <file>_ ...]
855
+ [<file>...]
857
856
(Zero or more of <file>.)
858
857
859
- ++--exec-path++[++=++__<path>__]
858
+ An optional parameter needs to be typeset with unconstrained pairs
859
+ [<repository>]
860
+
861
+ --exec-path[=<path>]
860
862
(Option with an optional argument. Note that the "=" is inside the
861
863
brackets.)
862
864
863
- [_ <patch>_ ...]
865
+ [<patch>...]
864
866
(Zero or more of <patch>. Note that the dots are inside, not
865
867
outside the brackets.)
866
868
867
869
Multiple alternatives are indicated with vertical bars:
868
- [`-q` | ` --quiet` ]
869
- [` --utf8` | ` --no-utf8` ]
870
+ [-q | --quiet]
871
+ [--utf8 | --no-utf8]
870
872
871
873
Use spacing around "|" token(s), but not immediately after opening or
872
874
before closing a [] or () pair:
873
- Do: [`-q` | ` --quiet` ]
874
- Don't: [`-q`|` --quiet` ]
875
+ Do: [-q | --quiet]
876
+ Don't: [-q| --quiet]
875
877
876
878
Don't use spacing around "|" tokens when they're used to separate the
877
879
alternate arguments of an option:
878
- Do: ++ --track++[++=++(` direct`|` inherit`)]`
879
- Don't: ++ --track++[++=++(` direct` | ` inherit` )]
880
+ Do: --track[=( direct| inherit)]
881
+ Don't: --track[=( direct | inherit)]
880
882
881
883
Parentheses are used for grouping:
882
- [(_ <rev>_ | _ <range>_ )...]
884
+ [(<rev>| <range>)...]
883
885
(Any number of either <rev> or <range>. Parens are needed to make
884
886
it clear that "..." pertains to both <rev> and <range>.)
885
887
886
- [(`-p` _ <parent>_ )...]
888
+ [(-p <parent>)...]
887
889
(Any number of option -p, each with one <parent> argument.)
888
890
889
- ` git remote set-head` _ <name>_ (`-a` | `-d` | _ <branch>_ )
891
+ git remote set-head <name> (-a|-d| <branch>)
890
892
(One and only one of "-a", "-d" or "<branch>" _must_ (no square
891
893
brackets) be provided.)
892
894
893
895
And a somewhat more contrived example:
894
- ` --diff-filter=[(A|C|D|M|R|T|U|X|B)...[*]]`
896
+ --diff-filter=[(A|C|D|M|R|T|U|X|B)...[*]]
895
897
Here "=" is outside the brackets, because "--diff-filter=" is a
896
898
valid usage. "*" has its own pair of brackets, because it can
897
899
(optionally) be specified only when one or more of the letters is
0 commit comments