@@ -738,78 +738,80 @@ Markup:
738
738
_<new-branch-name>_
739
739
_<template-directory>_
740
740
741
- A placeholder is not enclosed in backticks, as it is not a literal.
742
-
743
741
When needed, use a distinctive identifier for placeholders, usually
744
742
made of a qualification and a type:
745
743
_<git-dir>_
746
744
_<key-id>_
747
745
748
- When literal and placeholders are mixed, each markup is applied for
749
- each sub-entity. If they are stuck, a special markup, called
750
- unconstrained formatting is required.
751
- Unconstrained formating for placeholders is __<like-this>__
752
- Unconstrained formatting for literal formatting is ++like this++
753
- `--jobs` _<n>_
754
- ++--sort=++__<key>__
755
- __<directory>__++/.git++
756
- ++remote.++__<name>__++.mirror++
746
+ Git's Asciidoc processor has been tailored to treat backticked text
747
+ as complex synopsis. When literal and placeholders are mixed, you can
748
+ use the backtick notation which will take care of correctly typesetting
749
+ the content.
750
+ `--jobs <n>`
751
+ `--sort=<key>`
752
+ `<directory>/.git`
753
+ `remote.<name>.mirror`
754
+ `ssh://[<user>@]<host>[:<port>]/<path-to-git-repo>`
757
755
758
- caveat: ++ unconstrained format is not verbatim and may expand
759
- content. Use Asciidoc escapes inside them .
756
+ As a side effect, backquoted placeholders are correctly typeset, but
757
+ this style is not recommended .
760
758
761
759
Synopsis Syntax
762
760
763
- Syntax grammar is formatted neither as literal nor as placeholder.
761
+ The synopsis (a paragraph with [synopsis] attribute) is automatically
762
+ formatted by the toolchain and does not need typesetting.
764
763
765
764
A few commented examples follow to provide reference when writing or
766
765
modifying command usage strings and synopsis sections in the manual
767
766
pages:
768
767
769
768
Possibility of multiple occurrences is indicated by three dots:
770
- _ <file>_ ...
769
+ <file>...
771
770
(One or more of <file>.)
772
771
773
772
Optional parts are enclosed in square brackets:
774
- [_ <file>_ ...]
773
+ [<file>...]
775
774
(Zero or more of <file>.)
776
775
777
- ++--exec-path++[++=++__<path>__]
776
+ An optional parameter needs to be typeset with unconstrained pairs
777
+ [<repository>]
778
+
779
+ --exec-path[=<path>]
778
780
(Option with an optional argument. Note that the "=" is inside the
779
781
brackets.)
780
782
781
- [_ <patch>_ ...]
783
+ [<patch>...]
782
784
(Zero or more of <patch>. Note that the dots are inside, not
783
785
outside the brackets.)
784
786
785
787
Multiple alternatives are indicated with vertical bars:
786
- [`-q` | ` --quiet` ]
787
- [` --utf8` | ` --no-utf8` ]
788
+ [-q | --quiet]
789
+ [--utf8 | --no-utf8]
788
790
789
791
Use spacing around "|" token(s), but not immediately after opening or
790
792
before closing a [] or () pair:
791
- Do: [`-q` | ` --quiet` ]
792
- Don't: [`-q`|` --quiet` ]
793
+ Do: [-q | --quiet]
794
+ Don't: [-q| --quiet]
793
795
794
796
Don't use spacing around "|" tokens when they're used to separate the
795
797
alternate arguments of an option:
796
- Do: ++ --track++[++=++(` direct`|` inherit`)]`
797
- Don't: ++ --track++[++=++(` direct` | ` inherit` )]
798
+ Do: --track[=( direct| inherit)]
799
+ Don't: --track[=( direct | inherit)]
798
800
799
801
Parentheses are used for grouping:
800
- [(_ <rev>_ | _ <range>_ )...]
802
+ [(<rev>| <range>)...]
801
803
(Any number of either <rev> or <range>. Parens are needed to make
802
804
it clear that "..." pertains to both <rev> and <range>.)
803
805
804
- [(`-p` _ <parent>_ )...]
806
+ [(-p <parent>)...]
805
807
(Any number of option -p, each with one <parent> argument.)
806
808
807
- ` git remote set-head` _ <name>_ (`-a` | `-d` | _ <branch>_ )
809
+ git remote set-head <name> (-a|-d| <branch>)
808
810
(One and only one of "-a", "-d" or "<branch>" _must_ (no square
809
811
brackets) be provided.)
810
812
811
813
And a somewhat more contrived example:
812
- ` --diff-filter=[(A|C|D|M|R|T|U|X|B)...[*]]`
814
+ --diff-filter=[(A|C|D|M|R|T|U|X|B)...[*]]
813
815
Here "=" is outside the brackets, because "--diff-filter=" is a
814
816
valid usage. "*" has its own pair of brackets, because it can
815
817
(optionally) be specified only when one or more of the letters is
0 commit comments