git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 1/2] doc: add an option to have Asciidoctor build man pages directly

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
May 14, 2021, 19:57 UTC
Message-ID
<609ed62a3ad1d_4312720825@natae.notmuch>
In-Reply-To
<xmqqbl9e7yqz.fsf@gitster.g>
Junio C Hamano wrote:
Show 29 quoted lines
> > diff --git a/Documentation/Makefile b/Documentation/Makefile
> > index 2aae4c9cbb..891181c0f3 100644
> > --- a/Documentation/Makefile
> > +++ b/Documentation/Makefile
> > @@ -192,10 +192,16 @@ ASCIIDOC_HTML = xhtml5
> >  ASCIIDOC_DOCBOOK = docbook5
> >  ASCIIDOC_EXTRA += -acompat-mode -atabsize=8
> >  ASCIIDOC_EXTRA += -I. -rasciidoctor-extensions
> > -ASCIIDOC_EXTRA += -alitdd='&\#x2d;&\#x2d;'
> > +TXT_TO_HTML += -alitdd='&\#x2d;&\#x2d;'
> > +TXT_TO_XML  += -alitdd='&\#x2d;&\#x2d;'
> >  DBLATEX_COMMON =
> >  XMLTO_EXTRA += --skip-validation
> >  XMLTO_EXTRA += -x manpage.xsl
> > +ifdef USE_ASCIIDOCTOR_MANPAGE
> > +TXT_TO_MAN = $(ASCIIDOC_COMMON) -b manpage
> > +TXT_TO_MAN += -aplus='+'
> > +TXT_TO_MAN += -alitdd='\--'
> > +endif
> >  endif
> 
> This hunk is wholly inside USE_ASCIIDOCTOR and deals with {litdd}
> and {plus}, which are defined in asciidoc.conf that is not read by
> Asciidoctor, so we'd need to be careful to keep these three places
> (i.e. TXT_TO_HTML, TXT_TO_XML and TXT_TO_MAN) in sync with the
> asciidoct.conf file.
> 
> It is curious that {plus} for Asciidoctor is deffined only for
> manpages and HTML/XML side lacks the definition.  Intended?

Yes. It is a temporary workaround for a bug in asciidoctor. Eventually we don't want to do this.

It's much more clearer in my patch, that contains the hack to a single place inside asciidoctor-extensions.rb [1].

[1] https://lore.kernel.org/git/20210514121435.504423-8-felipe.contreras@gmail.com/T/#u
-- 
Felipe Contreras
Previous: Felipe ContrerasNext: Felipe Contreras
Message 38 of 45 in “doc: use asciidoctor to build man pages directly”
  1. doc: use asciidoctor to build man pages directlyFelipe Contreras, May 11, 2021
  2. brian m. carlsonMay 11, 2021
  3. Felipe ContrerasMay 12, 2021
  4. 1/2 doc: add an option to have Asciidoctor build man pages directlybrian m. carlson, May 12, 2021
  5. 2/2 doc: remove GNU_ROFF optionbrian m. carlson, May 12, 2021
  6. Eric SunshineMay 12, 2021
  7. brian m. carlsonMay 12, 2021
  8. Felipe ContrerasMay 12, 2021
  9. brian m. carlsonMay 14, 2021
  10. Felipe ContrerasMay 15, 2021
  11. Martin ÅgrenMay 13, 2021
  12. Bagas SanjayaMay 12, 2021
  13. Felipe ContrerasMay 12, 2021
  14. brian m. carlsonMay 13, 2021
  15. Felipe ContrerasMay 14, 2021
  16. Felipe ContrerasMay 15, 2021
  17. Felipe ContrerasMay 12, 2021
  18. brian m. carlsonMay 13, 2021
  19. Felipe ContrerasMay 14, 2021
  20. Bagas SanjayaMay 12, 2021
  21. brian m. carlsonMay 13, 2021
  22. Jeff KingMay 12, 2021
  23. Jeff KingMay 12, 2021
  24. Jeff KingMay 12, 2021
  25. Felipe ContrerasMay 12, 2021
  26. Martin ÅgrenMay 13, 2021
  27. Felipe ContrerasMay 13, 2021
  28. Eric SunshineMay 12, 2021
  29. Jeff KingMay 12, 2021
  30. Martin ÅgrenMay 14, 2021
  31. 0/2 Asciidoctor native manpage buildsbrian m. carlson, May 14, 2021
  32. 1/2 doc: add an option to have Asciidoctor build man pages directlybrian m. carlson, May 14, 2021
  33. Junio C HamanoMay 14, 2021
  34. Jeff KingMay 14, 2021
  35. Felipe ContrerasMay 14, 2021
  36. brian m. carlsonMay 14, 2021
  37. Felipe ContrerasMay 14, 2021
  38. Felipe ContrerasMay 14, 2021
  39. Felipe ContrerasMay 14, 2021
  40. brian m. carlsonMay 14, 2021
  41. Felipe ContrerasMay 14, 2021
  42. 2/2 doc: remove GNU_ROFF optionbrian m. carlson, May 14, 2021
  43. Felipe ContrerasMay 14, 2021
  44. brian m. carlsonMay 14, 2021
  45. Felipe ContrerasMay 14, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.