<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:src="http://nwalsh.com/xmlns/litprog/fragment" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ss="http://docbook.sf.net/xmlns/string.subst/1.0" version="5.0" xml:id="man.string.subst.map"> <refmeta> <refentrytitle>man.string.subst.map</refentrytitle> <refmiscinfo class="other" otherclass="datatype">rtf</refmiscinfo> </refmeta> <refnamediv> <refname>man.string.subst.map</refname> <refpurpose>Specifies a set of string substitutions</refpurpose> </refnamediv> <refsynopsisdiv> <src:fragment xml:id="man.string.subst.map.frag"> <xsl:param name="man.string.subst.map"> <!-- * remove no-break marker at beginning of line (stylesheet artifact) --> <ss:substitution oldstring="▒▀" newstring="▒"/> <!-- * replace U+2580 no-break marker (stylesheet-added) w/ no-break space --> <ss:substitution oldstring="▀" newstring="\ "/> <!-- ==================================================================== --> <!-- * squeeze multiple newlines before a roff request --> <ss:substitution oldstring=" ." newstring=" ."/> <!-- * remove any .sp instances that directly precede a .PP --> <ss:substitution oldstring=".sp .PP" newstring=".PP"/> <!-- * remove any .sp instances that directly follow a .PP --> <ss:substitution oldstring=".sp .sp" newstring=".sp"/> <!-- * squeeze multiple .sp instances into a single .sp--> <ss:substitution oldstring=".PP .sp" newstring=".PP"/> <!-- * squeeze multiple newlines after start of no-fill (verbatim) env. --> <ss:substitution oldstring=".nf " newstring=".nf "/> <!-- * squeeze multiple newlines after REstoring margin --> <ss:substitution oldstring=".RE " newstring=".RE "/> <!-- * U+2591 is a marker we add before and after every Parameter in --> <!-- * Funcprototype output --> <ss:substitution oldstring="░" newstring=" "/> <!-- * U+2592 is a marker we add for the newline before output of <sbr>; --> <ss:substitution oldstring="▒" newstring=" "/> <!-- * --> <!-- * Now deal with some other characters that are added by the --> <!-- * stylesheets during processing. --> <!-- * --> <!-- * bullet --> <ss:substitution oldstring="•" newstring="\(bu"/> <!-- * left double quote --> <ss:substitution oldstring="“" newstring="\(lq"/> <!-- * right double quote --> <ss:substitution oldstring="”" newstring="\(rq"/> <!-- * left single quote --> <ss:substitution oldstring="‘" newstring="\(oq"/> <!-- * right single quote --> <ss:substitution oldstring="’" newstring="\(cq"/> <!-- * copyright sign --> <ss:substitution oldstring="©" newstring="\(co"/> <!-- * registered sign --> <ss:substitution oldstring="®" newstring="\(rg"/> <!-- * ...servicemark... --> <!-- * There is no groff equivalent for it. --> <ss:substitution oldstring="℠" newstring="(SM)"/> <!-- * ...trademark... --> <!-- * We don't do "\(tm" because for console output, --> <!-- * groff just renders that as "tm"; that is: --> <!-- * --> <!-- * Product™ -> Producttm --> <!-- * --> <!-- * So we just make it to "(TM)" instead; thus: --> <!-- * --> <!-- * Product™ -> Product(TM) --> <ss:substitution oldstring="™" newstring="(TM)"/> </xsl:param> </src:fragment> </refsynopsisdiv> <refsection><info><title>Description</title></info> <para>The <parameter>man.string.subst.map</parameter> parameter contains <link linkend="map">a map</link> that specifies a set of string substitutions to perform over the entire roff source for each man page, either just before generating final man-page output (that is, before writing man-page files to disk) or, if the value of the <parameter>man.charmap.enabled</parameter> parameter is non-zero, before applying the roff character map.</para> <para>You can use <parameter>man.string.subst.map</parameter> as a “lightweight” character map to perform “essential” substitutions -- that is, substitutions that are <emphasis>always</emphasis> performed, even if the value of the <parameter>man.charmap.enabled</parameter> parameter is zero. For example, you can use it to replace quotation marks or other special characters that are generated by the DocBook XSL stylesheets for a particular locale setting (as opposed to those characters that are actually in source XML documents), or to replace any special characters that may be automatically generated by a particular customization of the DocBook XSL stylesheets.</para> <warning> <para>Do you not change value of the <parameter>man.string.subst.map</parameter> parameter unless you are sure what you are doing. First consider adding your string-substitution mappings to either or both of the following parameters: <variablelist> <varlistentry> <term><parameter>man.string.subst.map.local.pre</parameter></term> <listitem><para>applied before <parameter>man.string.subst.map</parameter></para></listitem> </varlistentry> <varlistentry> <term><parameter>man.string.subst.map.local.post</parameter></term> <listitem><para>applied after <parameter>man.string.subst.map</parameter></para></listitem> </varlistentry> </variablelist> By default, both of those parameters contain no string substitutions. They are intended as a means for you to specify your own local string-substitution mappings.</para> <para>If you remove any of default mappings from the value of the <parameter>man.string.subst.map</parameter> parameter, you are likely to end up with broken output. And be very careful about adding anything to it; it’s used for doing string substitution over the entire roff source of each man page – it causes target strings to be replaced in roff requests and escapes, not just in the visible contents of the page.</para> </warning> <refsection xml:id="map"> <info> <title>Contents of the substitution map</title> </info> <para>The string-substitution map contains one or more <tag>ss:substitution</tag> elements, each of which has two attributes: <variablelist> <varlistentry> <term>oldstring</term> <listitem> <simpara>string to replace</simpara> </listitem> </varlistentry> <varlistentry> <term>newstring</term> <listitem> <simpara>string with which to replace <tag class="attribute">oldstring</tag></simpara> </listitem> </varlistentry> </variablelist> It may also include XML comments (that is, delimited with "<literal><!--</literal>" and "<literal>--></literal>"). </para> </refsection> </refsection> </refentry>
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 13895 | Paul Allen | Copying using p4convert-docbook | ||
//guest/perforce_software/doc_build/main/docbook-xsl-ns-1.78.1/params/man.string.subst.map.xml | |||||
#1 | 12728 | eedwards |
Upgrade ANT doc build infrastructure to assemble PDFs: - remove non-namespaced DocBook source and add namespaced DocBook source. - add Apache FOP 1.1 - copy fonts, images, XSL into _build, establishing new asset structure. The original structure remains until all guides using it can be upgraded, and several other issues can be resolved. - updated build.xml to allow for per-target build properties. - upgraded the P4SAG to use the new infrastructure. - tweaked admonition presentation in PDFs to remove admonition graphics, and resemble closely the presentation used in the new HTML layout, including the same colors. With these changes, building PDFs involves using a shell, navigating into the guide's directory (just P4SAG for now), and executing "ant pdf". Issues still to be resolved: - PDF generation encounters several warnings about missing fonts (bold versions of Symbol and ZapfDingbats), and a couple of locations where the page content exceeds the defined content area. - Due to issues within Apache FOP, PDF generation emits a substantial amount of output that is not easily suppressed without losing important warning information. - Apache FOP's interface to ANT does not expose a way to set the font base directory. The current configuration does work under Mac OSX, but further testing on Windows will need to be done to determine if the relative paths defined continue to work. The workaround is for Windows users to customize the fop-config.xml to provide absolute system paths to the required fonts. - HTML generation needs further browser testing, and exhibits broken navigation on iOS browsers within the TOC sidebar. - A number of PDF and HTML presentation tweaks still need to be made, for example: sidebars, gui* DocBook tags, whitespace, section separation, etc. |