wireshark/docbook
Guy Harris 11c9896a77 We don't support VS prior to 2015 in the master branch.
Change-Id: I16380ca9205832960c0b2e7f43e237797d7671b6
Reviewed-on: https://code.wireshark.org/review/30188
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-10-12 22:04:19 +00:00
..
asciidoctor-macros Revert "docbook: remove equivalent case." 2018-06-27 17:07:37 +00:00
common_graphics
common_src AsciiDoc: Convert some comments. 2018-02-05 17:02:27 +00:00
examples
wsdg_graphics
wsdg_src We don't support VS prior to 2015 in the master branch. 2018-10-12 22:04:19 +00:00
wsug_graphics WSUG: Update the main and filter toolbar sections. 2018-08-21 23:13:11 +00:00
wsug_src *shark: Update help and manpage for name resolving 2018-10-05 13:19:05 +00:00
CMakeLists.txt Update tools help using a script. 2018-09-05 15:28:43 +00:00
README.adoc Docs: Add a live preview section to the docbook README. 2018-05-31 18:24:44 +00:00
attributes.asciidoc WSDG: Miscellaneous fixups. 2018-08-22 04:07:40 +00:00
custom_layer_chm.xsl
custom_layer_single_html.xsl Switch from AsciiDoc to Asciidoctor. 2018-02-11 18:22:09 +00:00
developer-guide-docinfo.xml 2.5 → 2.9. 2018-04-02 19:30:15 +00:00
developer-guide.asciidoc AsciiDoctor markup updates. 2018-07-20 06:43:24 +00:00
make-wsluarm.pl wslua: Convert more comment markup to Asciidoctor. 2018-02-11 17:12:52 +00:00
release-notes.asciidoc Qt: Add copy from another profile for UAT frames 2018-10-08 21:07:58 +00:00
user-guide-docinfo.xml 2.5 → 2.9. 2018-04-02 19:30:15 +00:00
user-guide.asciidoc AsciiDoctor markup updates. 2018-07-20 06:43:24 +00:00
ws.css CSS: Add a margin. 2018-03-16 17:08:51 +00:00
wsluarm.asciidoc Lua: Switch from disable_lua to enable_lua. 2018-07-20 06:42:38 +00:00

README.adoc

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

= Introduction

This directory contains the source files needed to build the:

- Wireshark Users Guide
- Wireshark Developers Guide
- Release notes (NEWS)
- Lua Reference

To build everything, build the `all_guides` target, e.g. `ninja
all_guides` or `msbuild all_guides.vcxproj`. Requirements are listed
below.

The guides and release notes are written in
http://asciidoctor.org/docs/asciidoc-syntax-quick-reference/[Asciidoctor syntax].
For more information see http://asciidoctor.org.

Conversions from Asciidoctor markup to each of our supported output
formats is done via the following steps:

- HTML: Asciidoctor → DocBook XML → xsltproc + DocBook XSL
- Chunked HTML: Asciidoctor → DocBook XML → xsltproc + DocBook XSL
- PDF: Asciidoctor
- HTMLHelp: Asciidoctor → DocBook XML → xsltproc + DocBook XSL → HHC
- Text: [HTML output] → elinks

= Requirements

Ultimately we'd like to reduce the toolchain requirements to AsciidoctorJ
alone, but that's not yet possible. Additional tooling is required for
the HTML and HTMLHelp targets. See the Developer's Guide for instructions
on installing required packages for your platform.

== AsciidoctorJ (recommended) or Asciidoctor

Text markup format and publishing toolchain:
http://asciidoctor.org/

AsciidoctorJ is a self-contained bundle which includes Asciidoctor and
JRuby. It can be installed via Chocolatey on Windows, Homebrew on macOS,
or a .zip extraction anywhere
(https://bintray.com/asciidoctor/maven/asciidoctorj).

== DocBook XML and XSL

Converting from DocBook to HTML and CHM requires the DocBook DTD
(http://www.sagehill.net/docbookxsl/ToolsSetup.html) and DocBook
stylesheets
(http://www.sagehill.net/docbookxsl/InstallStylesheets.html).
These are available via installable packages on most Linux distributions,
and Homebrew.

== xsltproc

http://xmlsoft.org/xslt/[xsltproc] converts DocBook XML to various
formats based on XSL stylesheets. It either ships as part of the
operating system or is available via an installable package on
most Linux distributions.

== HTML Help Workshop (Windows only)

The HTML Help compiler is part of the
http://www.microsoft.com/en-us/download/details.aspx?id=21138[HTML Help Workshop]
from Microsoft. It is used to generate the documentation shipped with
the Windows installers.

= Asciidoctor Markup

The Users and Developers Guides were originally written in DocBook and
were later converted to http://asciidoc.org/[AsciiDoc]. We subsequently
switched from AsciiDoc to Asciidoctor. As a result we currently use
http://asciidoctor.org/docs/migration/[compat mode], but may switch
to Asciidoctors modern markup at a later date.

Please use the following conventions when writing documentation:

- Window and dialog box names should be in “curly quotes”.

- Use Asciidoctor macros for buttons, keys, and menus. Note that these
  are currently experimental:

** The button:[Start] button
** Press kbd:[Shift+Ctrl+P] to open the preferences dialog.
** Select menu:File[Open] from the main menu.

This ensures that UI elements are shown consistently and lets us apply styles
to each type of element.

- Command line examples should reflect the OS:
+
----
$ echo Linux and UNIX
----
+
----
C:\> echo Windows
----

Admonitions ([NOTE], [TIP], and [WARNING]) can be used to highlight important
information. Keep in mind that they interrupt the flow of text by design. Too
many (especially in a row) are distracting and annoying.

== Asciidoctor Live Preview

The Asciidoctor project provides a JavaScript version of Asciidoctor
(asciidoctor.js), which enables live previews in many web browsers and
text editors. See the
https://asciidoctor.org/docs/editing-asciidoc-with-live-preview/[Live
Preview] documentation for more information.

Note that our documentation depends on attributes defined in
_attributes.asciidoc_. The Users Guide and Developers Guide are split
across several files, and only the top-level _user-guide.asciidoc_ and
_developer-guide.asciidoc_ include _attributes.asciidoc_. As a result,
some markup will be incomplete. You can work around this somewhat by
adding some attributes such as `compat-mode experimental` to your Live
Preview settings.

= HTML Help Alternatives

Ideally we would ship documentation with Wireshark that is pleasant to
read, browsable, and searchable. Unfortunately we don't have an easy way
to do this. The closest we've been able to come is by shipping an HTML
Help (.chm) file on Windows. However, HTML Help a) is limited to Windows,
b) crusty on normal displays, and c) really crusty on HiDPI displays.

The following alternative formats are available, each with advantages
and disadvantages:

== WebHelp

https://en.wikipedia.org/wiki/Web_help[WebHelp] has three main
dependencies:

- DocBook XSL, including...
- webhelpindexer.jar
- The user's local web browser

This format generates both HTML pages and JavaScript, which might not run
reliably on end user machines.

== PDF

PDF output is page oriented, with static page sizes. This _usually_ isn't
a problem with modern reader software. However it doesn't look like we
can reliably load a PDF file and jump to specific section on some
platforms. For example, loading +++file:///path/to/user_guide.pdf#location+++
works in Firefox & Chrome, but not in Safari, Preview, or Internet Explorer.

== Qt Help

Qt provides an extensive http://doc.qt.io/qt-5/qthelp-framework.html[help system].
However, to use it we need to generate a Qt Help Project (.qhp) file,
which isn't currently supported by Asciidoctor or via DocBook XSL.

The default help application (Qt Assistant) is ugly. We'd probably want
to write our own help viewer app or integrate help directly via
QHelpEngine.