daily pastebin goal
17%
SHARE
TWEET

Untitled

a guest Feb 16th, 2019 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff --git a/manual/cmds/ocamldoc.etex b/manual/cmds/ocamldoc.etex
  2. index 36819b0..563c6df 100644
  3. --- a/manual/cmds/ocamldoc.etex
  4. +++ b/manual/cmds/ocamldoc.etex
  5. @@ -754,13 +754,8 @@ text: {{text-element}}
  6.                 source code style.\\
  7.  @||@&@ '{v' string 'v}' @ & set the given @string@ in verbatim style. \\
  8.  @||@&@ '{%' string '%}' @ & take the given @string@ as raw \LaTeX\ code.\\
  9. -@||@&@ '{!' string '}' @ & insert a reference to the element named
  10. -@string@. @string@ must be a fully qualified element name,
  11. -for example "Foo.Bar.t". The kind of the referenced element can be forced
  12. -(useful when various elements have the same qualified name) with the following
  13. -syntax: @ '{!' @ \nt{kind} @ ':' string '}' @ where \nt{kind} can be
  14. -"module", "modtype", "class", "classtype", "val",
  15. -"type", "exception", "attribute", "method" or "section".\\
  16. +@||@&@ '{!' string '}' @ & insert a cross-reference to an element
  17. +       (see below \ref{sss:crossref} for the syntax of cross-references).\\
  18.  @||@&@ '{!modules:' string string ... '}' @ & insert an index table
  19.  for the given module names. Used in HTML only.\\
  20.  @||@&@ '{!indexlist}' @ & insert a table of links to the various indexes
  21. @@ -773,6 +768,8 @@ must be escaped by a '"\\"'\\
  22.  @||@& \nt{blank-line} & force a new line.
  23.  \end{tabular} \\
  24.  
  25. +\subsubsection*{List formatting}
  26. +
  27.  \begin{syntax}
  28.  list:
  29.  | {{ '{-' text '}' }}
  30. @@ -801,6 +798,40 @@ The same shortcut is available for enumerated lists, using '"+"'
  31.  instead of '"-"'.
  32.  Note that only one list can be defined by this shortcut in nested lists.
  33.  
  34. +\subsubsection*{Cross-reference formatting}
  35. +\label{sss:crossref}
  36. +
  37. +Cross-references are fully qualified element names, as in the example
  38. +"{!Foo.Bar.t}". This is an ambiguous reference as it may designate
  39. +a type name, a value name, a class name, etc. It is possible to make
  40. +explicit the intended syntactic class, using "{!type:Foo.Bar.t}" to
  41. +designate a type, and "{!val:Foo.Bar.t}" a value of the same name.
  42. +
  43. +The list of possible syntactic class is as follows:
  44. +\begin{itemize}
  45. +        \item["module:"] module
  46. +        \item["modtype:"] module type
  47. +        \item["class:"] class
  48. +        \item["classtype:"] class type
  49. +        \item["val:"] value
  50. +        \item["type:"] type
  51. +        \item["exception:"] exception
  52. +        \item["attribute:"] attribute
  53. +        \item["method:"] class method
  54. +        \item["section:"] ocamldoc section
  55. +        \item["const:"] variant constructor
  56. +        \item["recfield:"] record field
  57. +\end{itemize}
  58. +
  59. +In the case of variant constructors or record field, the constructor
  60. +or field name should be preceded by the name of the correspond type --
  61. +to avoid the ambiguity of several types having the same constructor
  62. +names. For example, the constructor "Node" of the type "tree" will be
  63. +referenced as "{!tree.Node}" or "{!const:tree.Node}", or possibly
  64. +"{!Mod1.Mod2.tree.Node}" from outside the module.
  65. +
  66. +\subsubsection*{First sentence}
  67. +
  68.  In the description of a value, type, exception, module, module type, class
  69.  or class type, the {\em first sentence} is sometimes used in indexes, or
  70.  when just a part of the description is needed. The first sentence
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top