Debian Codegraph @

docs/pis/latex.xml

raw
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
3 <refentry id="pi-latex">
4 <refmeta>
5 <refentrytitle>latex</refentrytitle>
6 </refmeta>
7 <refnamediv>
8 <refname><sgmltag class="xmlpi">latex</sgmltag>, <sgmltag class="xmlpi">db2latex</sgmltag></refname>
9 <refpurpose>Insert Arbitrary text into the LaTeX file</refpurpose>
10 </refnamediv>
11 <refsynopsisdiv>
12 <programlisting><![CDATA[<?latex ]]><replaceable>content</replaceable><![CDATA[ ?>]]></programlisting>
13 </refsynopsisdiv>
14 <refsection>
15 <title>Description</title>
16 <para>These Processing Instructions are unusual in that they have no
17 <quote>attribute</quote>. Instead, the
18 <replaceable>content</replaceable> is put directly into the
19 generated LaTeX document.</para>
20
21 <para>The <sgmltag class="xmlpi">db2latex</sgmltag> PI is deprecated
22 and should not be used anymore. It was provided for backward
23 compatibility. Use the <sgmltag class="xmlpi">latex</sgmltag> PI
24 instead.</para>
25
26 <para>This can provide the ultimate in customization, but can be
27 very dangerous since it breaks the abstractions provided by
28 dblatex.</para>
29
30 <warning>
31 <para>These Processing Instructions can be used
32 to inject arbitrary LaTeX into the output stream. Please check if a
33 safer customization method can be used instead. See the other
34 <link linkend="sec-custom">customization methods</link>.</para>
35
36 <para>While it is pretty clear that insertion of certain sorts
37 of LaTeX text, at some points within the document, will always
38 be expected to work, there is no guarantee that
39 <emphasis>any</emphasis> inserted LaTeX will continue to work in
40 the future with newer versions of dblatex or its underlying
41 software stack.</para>
42
43 <para>Inserting LaTeX into <code>CDATA</code>, i.e. in places
44 where document text appears, is likely to be more robust than
45 inserting LaTeX elsewhere. But again, no guarantees are
46 made.</para>
47 </warning>
48
49 <para>Care must be taken with whitespace. Leading and trailing
50 spaces matter within the processing instruction. The
51 <replaceable>content</replaceable> consists of everything
52 following the first space and before the closing
53 <literal>?&gt;</literal>. Further care must be taken with any
54 whitespace which follows the processing instruction -- the TeX
55 tokenization scan may consume whitespace which follows the
56 processing instruction. One possible solution when this happens
57 is to end your <replaceable>content</replaceable> with the
58 <literal>\</literal> character.</para>
59
60 <para>The <sgmltag class="xmlpi">latex</sgmltag> Processing Instruction
61 takes special steps to work in verbatim blocks,
62 <sgmltag>screen</sgmltag>, <sgmltag>programlisting</sgmltag>, and
63 <sgmltag>literallayout</sgmltag> elements, while
64 <sgmltag class="xmlpi">db2latex</sgmltag> is directly written as is.</para>
65 </refsection>
66
67 <refsection id="sec-safe-latex">
68 <title>Safe LaTeX Insertions</title>
69
70 <para>Although the <package>latex</package> processing instruction
71 can be dangerous there are a few <package>latex</package>
72 <parameter>content</parameter> values that are safe to use within
73 <code>CDATA</code> words, within the words of the actual text of
74 your document. The following <parameter>content</parameter>
75 values provide LaTeX with information it can use to improve your
76 document's formatting:</para>
77
78 <variablelist>
79 <varlistentry id="latex_softhyphen">
80 <term><literal>\-</literal></term>
81 <listitem>
82 <para>Soft hyphen. A backslash followed by a dash indicates
83 a soft hyphen. LaTeX may or may not break the line and
84 hyphenate at this point. Useful when over-long variable
85 names and similar fail to hyphenate and thereby cause lines
86 to exceed their normal lengths.</para>
87
88 <para>Once a soft hyphen is inserted into a word the
89 insertion point becomes the only place at which hyphenation
90 is permitted in that occurrence of the word.</para>
91 </listitem>
92 </varlistentry>
93
94 <varlistentry id="latex_no-kern">
95 <term><literal>{}</literal></term>
96 <listitem>
97 <para>Do not kern (join together) characters. An empty pair
98 of curly braces placed between two characters indicates that
99 the characters should not be joined together. Depending on
100 the font and the characters, some pairs of characters may be
101 joined together. E.g. a pair of lower-case
102 <literal>f</literal> characters may be have a their
103 crossbars joined. This may not be desirable, as when each
104 of the characters is a component of a separate word within a
105 larger compound word. Placing this PI between the
106 characters which are to remain separated prevents the two
107 characters from kerning.</para>
108 </listitem>
109 </varlistentry>
110
111 <varlistentry id="latex_no-kern-really">
112 <term><literal>{\kern0pt}</literal></term>
113 <listitem>
114 <para>Really, do not kern (join together) characters. A
115 stronger version of <literal>{}</literal>.</para>
116 </listitem>
117 </varlistentry>
118
119 <varlistentry id="latex_end-of-sentence">
120 <term><literal>\@</literal></term>
121 <listitem>
122 <para>A backslash followed by the at sign, when placed after
123 a capital letter and before a period, indicates that the
124 period is the end of a sentence. Periods following capital
125 letters do not otherwise end sentences and sentences may be
126 used by LaTeX when determining layout.</para>
127
128 <!-- <para><literal>\@</literal> has no effect when <xref
129 linkend="latex.frenchspacing"/> is on.</para> -->
130 </listitem>
131 </varlistentry>
132 </variablelist>
133 </refsection>
134
135 <refsection>
136 <title>Context</title>
137 <para>Recognized in all elements.</para>
138 </refsection>
139 </refentry>