summaryrefslogtreecommitdiff
path: root/Documentation/asciidoc.conf
AgeCommit message (Collapse)AuthorFilesLines
2012-09-11Merge branch 'jk/docs-docbook-monospace-display' into maint-1.7.11Libravatar Junio C Hamano1-2/+2
* jk/docs-docbook-monospace-display: docs: monospace listings in docbook output
2012-08-07docs: monospace listings in docbook outputLibravatar Jeff King1-2/+2
When asciidoc converts a listing block like: ---------------------- $ git log --merge ---------------------- it marks it to be displayed in a monospace font. This works fine when generating HTML output. However, when generating docbook output, we override the expansion of a listingblock to work around bugs in some versions of the docbook toolchain. Our override did not mark the listingblock with the "monospaced" class. The main output that uses docbook as an intermediate format is the manpages. We didn't notice any issue there because the monospaced class seems to be ignored when generating roff from the docbook manpages. However, when generating texinfo to make info pages, docbook does respect this class. The resulting texinfo output properly uses "@example" blocks to display the listing in this case. Besides possibly looking prettier in some texinfo backends, one important effect is that the monospace font suppresses texinfo's expansion of "--" and "---" into en-dashes and em-dashes. With the current code, the example above ends up looking like "git log -merge", which is confusing and wrong. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-20docs: always define git-relative-html-prefix attributeLibravatar Jeff King1-0/+2
Commit fe77b41 introduced a new attribute to let the linkgit macro create cross-directory HTML references from the technical/ and howto/ subdirectories back to the main documentation. We define that attribute to "../" on the command-line when building inside those subdirectories, and otherwise leave it unset under the assumption that it would default to being blank. Instead, asciidoc omits the link entirely, leading to broken documentation. Fix this by defining git-relative-html-prefix to blank in asciidoc.conf (and an instance on the command-line, when present, will override it). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-08docs: fix cross-directory linkgit referencesLibravatar Jeff King1-1/+1
Most of our documentation is in a single directory, so using linkgit:git-config[1] just generates a relative link in the same directory. However, this is not the case with the API documentation in technical/*, which need to refer to git-config from the parent directory. We can fix this by passing a special prefix attribute when building in a subdirectory, and respecting that prefix in our linkgit definitions. We only have to modify the html linkgit definition. For manpages, we can ignore this for two reasons: 1. we do not generate actual links to the file in manpages, but instead just give the name and section of the linked manpage 2. we do not currently build manpages for subdirectories, only html Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-09-03Merge branch 'jc/maint-doc-em-dash'Libravatar Junio C Hamano1-0/+1
* jc/maint-doc-em-dash: Work around em-dash handling in newer AsciiDoc
2010-08-24Work around em-dash handling in newer AsciiDocLibravatar Junio C Hamano1-0/+1
Older versions of AsciiDoc used to literally pass double dashes when we used them in our linkgit macros and manpage titles, but newer ones (the issue was first reported with AsciiDoc 8.5.2) turn them into em dashes. Define litdd (literal double-dash) custom attribute in asciidoc.conf to work this around. While we are at it, fix a few double-dashes (e.g. the description of "project--devo--version" convention used by tla, among other things) that used to be incorrectly written as em dashes in the body text to also use this attribute. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-20Documentation: unbreak regex in show-ref manualLibravatar Jonathan Nieder1-0/+1
I am not sure why, but the regular expression "(?:\^\{\})" gets rendered by asciidoc as "(?:\{})". The intent seems to be a regex matching the literal string "^{}", so this rewrites the markup to produce "(?:\^{})" as output. Cc: Julian Phillips <julian@quantumfyre.co.uk> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-20Documentation: quoting trouble in "git rm" discussionLibravatar Jonathan Nieder1-0/+1
The current output (with Asciidoc 8.5.2) seems a bit broken: given two directories ‘d` and d2, there is a difference between using git rm 'd*’ and ‘git rm 'd/\*\’`, as the former will also remove all of directory d2. In other words, the markup parses as given two directories << d` and _d2_, there is a difference between using _git rm 'd* >>_ and << git rm 'd/\*\ >> `. I suspect there is an asciidoc bug involved (why is ' a candidate closing-quote mark when it is preceded by a backslash?) but with all the meanings of ` and ' involved I do not want to track it down. Better to use unambiguous {asterisk} and {apostrophe} entities. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-30git-submodule documentation: fix foreach exampleLibravatar Miklos Vajna1-0/+1
Backtick and apostrophe are asciidoc markup, so they should be escaped in order to get the expected result in the rendered manual page. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-27Documentation: asciidoc.conf: fix verse block with block titlesLibravatar Chris Johnsen1-1/+2
No files use the variant of block-title with verse-block, but such a case would have generated broken docbook XML (<simpara> is not allowed inside <para>). This fixes the potential deviation from valid docbook XML. Testing done with asciidoc 8.3.1 and docbook-xsl 1.74.0. Signed-off-by: Chris Johnsen <chris_johnsen@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-27Documentation: asciidoc.conf: always use <literallayout> for [blocktext]Libravatar Chris Johnsen1-2/+2
Make the docbook-xsl-no-raw-roff variant match the no-docbook-xsl-no-raw-roff variant in terms of which XML tag is used to wrap listing block text (delimited with lines of dashes). e920b56 (Tweak asciidoc output to work with broken docbook-xsl, 2006-03-05) says docbook-xsl 1.68 needs <literallayout>. This <screen> usages was in the old, 1.72-only section. But since it is now the "roff-less" section, it probably makes sense to make it symmetric with the "roff-ful" section. Testing done with asciidoc 8.3.1 and docbook-xsl 1.74.0. Signed-off-by: Chris Johnsen <chris_johnsen@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-27Documentation: rename docbook-xsl-172 attribute to git-asciidoc-no-roffLibravatar Chris Johnsen1-4/+4
It seems that the ability to use raw roff codes in asciidoc.conf was eliminated by docbook-xsl 1.72.0 _and later_. Unlike the 1.72.0-specific XSLT problem, this behavior was not reverted in later releases. This patch aims to make it clear that the affected asciidoc attribute (flag) can be reasonably used with docbook-xsl versions other than 1.72.0. Also, document which make variables should be set for various versions of asciidoc and docbook-xsl. Testing done with asciidoc 8.3.1 and docbook-xsl 1.74.0. Signed-off-by: Chris Johnsen <chris_johnsen@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-08Define linkgit macro in [macros] sectionLibravatar Alexey Borzenkov1-0/+3
Starting with asciidoc 8.3.0 linkgit macro is no longer recognized by asciidoc and user guide suggests (http://www.methods.co.nz/asciidoc/userguide.html#_macro_definitions) that macros are supposed to be defined in [macros] section. I'm not sure whether undefined linkgit macro was working by pure chance or it is a regression in asciidoc 8.3.0, but this patch adds proper definition for the linkgit macro, allowing it to work on 8.3.0. Signed-off-by: Alexey Borzenkov <snaury@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-10-30asciidoc: add minor workaround to add an empty line after code blocksLibravatar Jonas Fonseca1-0/+20
Insert an empty <simpara> in manpages after code blocks to force and empty line. The problem can be seen on the manpage for the git tutorial, where an example command and the following paragraph is printed with no empty line between them: First, note that you can get documentation for a command such as git log --graph with: $ man git-log It is a good idea to introduce yourself to git [...] Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-06-25pack.indexversion config option now defaults to 2Libravatar Nicolas Pitre1-0/+1
As announced for 1.6.0. Git older than version 1.5.2 (or any other git version with this option set to 1) may revert to version 1 of the pack index by manually deleting all .idx files and recreating them using 'git index-pack'. Communication over the git native protocol is unaffected since the pack index is never transferred. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-06Documentation: rename gitlink macro to linkgitLibravatar Dan McGee1-4/+4
Between AsciiDoc 8.2.2 and 8.2.3, the following change was made to the stock Asciidoc configuration: @@ -149,7 +153,10 @@ # Inline macros. # Backslash prefix required for escape processing. # (?s) re flag for line spanning. -(?su)[\\]?(?P<name>\w(\w|-)*?):(?P<target>\S*?)(\[(?P<attrlist>.*?)\])= + +# Explicit so they can be nested. +(?su)[\\]?(?P<name>(http|https|ftp|file|mailto|callto|image|link)):(?P<target>\S*?)(\[(?P<attrlist>.*?)\])= + # Anchor: [[[id]]]. Bibliographic anchor. (?su)[\\]?\[\[\[(?P<attrlist>[\w][\w-]*?)\]\]\]=anchor3 # Anchor: [[id,xreflabel]] This default regex now matches explicit values, and unfortunately in this case gitlink was being matched by just 'link', causing the wrong inline macro template to be applied. By renaming the macro, we can avoid being matched by the wrong regex. Signed-off-by: Dan McGee <dpmcgee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-14Documentation: Fix man page breakage with DocBook XSL v1.72Libravatar Jonas Fonseca1-0/+3
From version 1.72 it will replace all dots in roff requests with U+2302 ("house" character), and add escaping in output for all instances of dot that are not in roff requests. This caused the ".ft" hack forcing monospace font in listingblocks to end up as "\&.ft" and being visible in the resulting man page. The fix adds a DOCBOOK_XSL_172 build variable that will disable the hack. To allow this variable to be defined in config.mak it also moves build variable handling below the inclusion of config.mak. Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-07-18Merge branch 'maint'Libravatar Junio C Hamano1-0/+6
* maint: Force listingblocks to be monospaced in manpages Do not expect unlink(2) to fail on a directory.
2007-07-18Force listingblocks to be monospaced in manpagesLibravatar Julian Phillips1-0/+6
For the html output we can use a stylesheet to make sure that the listingblocks are presented in a monospaced font. For the manpages do it manually by inserting a ".ft C" before and ".ft" after the block in question. In order for these roff commands to get through to the manpage they have to be element encoded to prevent quoting. Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-16Merge branch 'maint' to sync with GIT 1.5.2.2Libravatar Junio C Hamano1-1/+2
2007-06-16Documentation: adjust to AsciiDoc 8Libravatar Junio C Hamano1-1/+2
It turns out that the attribute definition we have had for a long time to hide "^" character from AsciiDoc 7 was not honored by AsciiDoc 8 even under "-a asciidoc7compatible" mode. There is a similar breakage with the "compatible" mode with + characters. The double colon at the end of definition list term needs to be attached to the term, without a whitespace. After this minimum fixups, AsciiDoc 8 (I used 8.2.1 on Debian) with compatibility mode seems to produce reasonably good results. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-07War on whitespaceLibravatar Junio C Hamano1-2/+0
This uses "git-apply --whitespace=strip" to fix whitespace errors that have crept in to our source files over time. There are a few files that need to have trailing whitespaces (most notably, test vectors). The results still passes the test, and build result in Documentation/ area is unchanged. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-02Documentation: robustify asciidoc GIT_VERSION replacementLibravatar Jeff King1-1/+1
Instead of using sed on the resulting file, we now have a git_version asciidoc attribute. This means that we don't pipe the output of asciidoc, which means we can detect build failures. Problem reported by Scott Lamb, solution suggested by Jonas Fonseca. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-28Documentation: unbreak user-manual.Libravatar Junio C Hamano1-0/+2
The previous one broke generated xml files for anything but manpages, as it took the header for manpage unconditionally. This fixes it. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-03-28Documentation: Add version information to man pagesLibravatar Frank Lichtenheld1-0/+17
Override the [header] macro of asciidoc's docbook backend to add version information to the generated man pages. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-03escape tilde in Documentation/git-rev-parse.txtLibravatar Junio C Hamano1-0/+1
Fixes a failure to build the git-rev-parse manpage, seen with asciidoc 8.0.0 We would love to use nicer quoting $$~$$ but alas asciidoc 7 does not know about it. So use asciidoc.conf and define {tilde} to be &#126;. Signed-off-by: Junio C Hamano <junkio@cox.net> Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2006-07-14Documentation/urls.txt: Use substitution to escape square bracketsLibravatar Jonas Fonseca1-0/+2
This changes "[user@]" to use {startsb} and {endsb} to insert [ and ], similar to how {caret} is used in git-rev-parse.txt. [jc: Removed a well-intentioned comment that broke the final formatting from the original patch. While we are at it, updated the paragraph that claims to be equivalent to the section that was updated earlier without making matching changes.] Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-05Tweak asciidoc output to work with broken docbook-xslLibravatar Francis Daly1-0/+10
docbook-xsl v1.68 incorrectly converts "<screen>" from docbook to manpage by not rendering it verbatim. v1.69 handles it correctly, but not many current popular distributions ship with it. asciidoc by default converts "listingblock" to "<screen>". This change causes asciidoc in git to convert "listingblock" to "<literallayout>", which both old and new docbook-xsl handle correctly. The difference can be seen in any manpage which includes a multi-line example, such as git-branch. [jc: the original patch was an disaster for html backends, so I made it apply only to docbook backends. ] Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-05Fix usage of carets in git-rev-parse(1)Libravatar Jonas Fonseca1-0/+5
... but using a {caret} attribute. Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-20[PATCH] Documentation: Add asciidoc.conf file and gitlink: macroLibravatar Sergey Vlasov1-0/+21
Introduce an asciidoc.conf file with the purpose of adding a gitlink: macro which will improve the manpage output. Original cogito patch by Jonas Fonseca <fonseca@diku.dk>; asciidoc.conf from that patch was further enhanced to use the proper DocBook tag <citerefentry> for references to man pages. Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Junio C Hamano <junkio@cox.net>