/[csv2latex]/csv2latex.sgml
ViewVC logotype

Annotation of /csv2latex.sgml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (hide annotations)
Thu Oct 8 09:54:13 2009 UTC (10 years, 2 months ago) by ben
File MIME type: text/x-sgml
File size: 13719 byte(s)
changed repository to herewe
1 ben 1 <!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
2    
3     <!--
4    
5     This document is free software; you can redistribute it and/or
6     modify it under the terms of the GNU General Public License
7     as published by the Free Software Foundation; version 2 only
8     of the License.
9    
10     This program is distributed in the hope that it will be useful,
11     but WITHOUT ANY WARRANTY; without even the implied warranty of
12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13     GNU General Public License for more details.
14    
15     You should have received a copy of the GNU General Public License
16     along with this document; if not, write to the Free Software
17     Foundation, Inc., 51 Franklin Street, Fifth Floor,
18     Boston, MA 02110-1301, USA.
19    
20     see the COPYING file included in the csv2latex package or
21     http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
22    
23     -->
24    
25     <!-- Process this file with docbook-to-man to generate an nroff manual
26     page: `docbook-to-man manpage.sgml > manpage.1'. You may view
27     the manual page with: `docbook-to-man manpage.sgml | nroff -man |
28     less'. A typical entry in a Makefile or Makefile.am is:
29    
30     manpage.1: manpage.sgml
31     docbook-to-man $< > $@
32    
33    
34     The docbook-to-man binary is found in the docbook-to-man package.
35     Please remember that if you create the nroff version in one of the
36     debian/rules file targets (such as build), you will need to include
37     docbook-to-man in your Build-Depends control field.
38    
39     -->
40    
41     <!-- Fill in your name for FIRSTNAME and SURNAME. -->
42     <!ENTITY dhfirstname "<firstname>BENOIT</firstname>">
43     <!ENTITY dhsurname "<surname>ROUITS</surname>">
44     <!-- Please adjust the date whenever revising the manpage. -->
45     <!ENTITY dhdate "<date>january 24, 2009</date>">
46     <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
47     allowed: see man(7), man(1). -->
48     <!ENTITY dhsection "<manvolnum>1</manvolnum>">
49     <!ENTITY dhemail "<email>brouits@free.fr</email>">
50     <!ENTITY dhusername "Benoit Rouits">
51     <!ENTITY dhucpackage "<refentrytitle>CSV2LATEX</refentrytitle>">
52     <!ENTITY dhpackage "csv2latex">
53    
54     <!ENTITY ubuntu "<productname>Ubuntu</productname>">
55     <!ENTITY debian "<productname>Debian</productname>">
56     <!ENTITY gnu "<acronym>GNU</acronym>">
57     <!ENTITY gpl "&gnu; <acronym>GPL</acronym>">
58     ]>
59    
60     <refentry>
61     <refentryinfo>
62     <address>
63     &dhemail;
64     </address>
65     <author>
66     &dhfirstname;
67     &dhsurname;
68     </author>
69     <copyright>
70     <year>2003</year>
71     <holder>&dhusername;</holder>
72     </copyright>
73     &dhdate;
74     </refentryinfo>
75     <refmeta>
76     &dhucpackage;
77    
78     &dhsection;
79     </refmeta>
80     <refnamediv>
81     <refname>&dhpackage;</refname>
82    
83     <refpurpose>convert a csv file into a LaTeX document</refpurpose>
84     </refnamediv>
85     <refsynopsisdiv>
86     <cmdsynopsis>
87     <command>&dhpackage;</command>
88     <arg><option>--nohead</option></arg>
89     <arg><option>--longtable</option></arg>
90     <arg><option>--noescape</option></arg>
91     <arg><option>--guess</option></arg>
92     <arg><option>--separator <replaceable>c</replaceable>|<replaceable>s</replaceable>|<replaceable>t</replaceable>|<replaceable>p</replaceable>|<replaceable>l</replaceable></option></arg>
93     <arg><option>--block <replaceable>q</replaceable>|<replaceable>d</replaceable>|<replaceable>n</replaceable></option></arg>
94     <arg><option>--lines <replaceable>#</replaceable></option></arg>
95     <arg><option>--position <replaceable>l</replaceable>|<replaceable>c</replaceable>|<replaceable>r</replaceable></option></arg>
96     <arg><option>--colorrows <replaceable>0-1</replaceable></option></arg>
97     <arg><option>--reduce <replaceable>1</replaceable>|<replaceable>2</replaceable>|<replaceable>3</replaceable>|<replaceable>4</replaceable></option></arg>
98     <arg>file</arg>
99     </cmdsynopsis>
100     </refsynopsisdiv>
101     <refsect1>
102     <title>DESCRIPTION</title>
103    
104     <para>This manual page documents the <command>&dhpackage;</command> program.</para>
105     <para><command>&dhpackage;</command> is a program that reads a "comma separated values" (csv) file
106     and outputs a LaTeX file with one or more tabular environments to display
107     the printable values of the csv file. The LaTeX code is flushed on the standard output.
108     </para>
109    
110     <para>So-called "comma separated values" files are common formats for exchanging two-dimensinal
111     tables between programs such as spreadsheets editors, to represent almost any kind of data.
112     By default, a csv file is made of printable data separated by commas (`,'), each comma
113     representing a `cell' separator, and each line representing a row. By extension, cell
114     separators can be represented by tabs if the comma is considered as printable data.
115     Moreover, some non true csv files can be assumed as two-dimensional tables as well.
116     In some circumstances, if the printable data includes the cell separator of the
117     exchange format, the latter can use a second extra character to embrace the printable
118     data into a block (e.g: quoted text). Thus, it is still possible to parse the file by
119     using the block delimiter (used twice to embrace the cell) instead of the separator.
120     </para>
121     <para><command>&dhpackage</command> aims to parse various csv formats plus formats that fits
122     into the above definiton, assuming the data is text, and to produce a yet simple LaTeX file
123     using the "tabular" environment for a table-style layout.
124     Some options of output will also use macros provided by extra
125     LaTeX packages that are commonly included in the main LaTeX distributions.
126     </para>
127     </refsect1>
128     <refsect1>
129     <title>OPTIONS</title>
130    
131     <para>This program follows the usual &gnu; command line syntax,
132     with long options starting with two dashes (`-'). A summary of
133     options is included below.</para>
134    
135     <variablelist>
136     <varlistentry>
137     <term><option>-h</option>
138     <option>--help</option>
139     </term>
140     <listitem>
141     <para>Show summary of options.</para>
142     </listitem>
143     </varlistentry>
144     <varlistentry>
145     <term><option>-v</option>
146     <option>--version</option>
147     </term>
148     <listitem>
149     <para>Show version of program.</para>
150     </listitem>
151     </varlistentry>
152     <varlistentry>
153     <term><option>-n</option>
154     <option>--nohead</option>
155     </term>
156     <listitem>
157     <para>Do not output the LaTeX document header.
158     This is useful when the output is to be included as a separate file into the master document.
159     </para>
160     </listitem>
161     </varlistentry>
162     <varlistentry>
163     <term><option>-t</option>
164     <option>--longtable</option>
165     </term>
166     <listitem>
167     <para>uses the 'longtable' package instead of the 'tabular' one.
168     This is useful when the input is long, with <option>--lines 0</option> option.
169     This option uses the extra `longtable' LaTeX package.
170     If you also use <option>--nohead</option> option, do not forget to add
171     the following line into the header of your master document: "\\usepackage{longtable}".
172     </para>
173     </listitem>
174     </varlistentry>
175     <varlistentry>
176     <term><option>-x</option>
177     <option>--noescape</option>
178     </term>
179     <listitem>
180     <para>Do not escape TeX control characters from the input.
181     This is useful when the input contains already TeX code.
182     </para>
183     </listitem>
184     </varlistentry>
185     <varlistentry>
186     <term><option>-g</option>
187     <option>--guess</option>
188     </term>
189     <listitem>
190     <para>Try to guess the csv format.
191     This is useful when the input is not strictly a comma separated set of printable data.
192     For example, a line like %Foo, Bar%:%Wizz: Hey% may be parsed as "Foo, Bar" then "Wizz: Hey".
193     </para>
194     </listitem>
195     </varlistentry>
196     <varlistentry>
197     <term><option>-s <replaceable>c</replaceable>|<replaceable>s</replaceable>|<replaceable>t</replaceable>|<replaceable>p</replaceable>|<replaceable>l</replaceable></option>
198     <option>--separator <replaceable>c</replaceable>|<replaceable>s</replaceable>|<replaceable>t</replaceable>|<replaceable>p</replaceable>|<replaceable>l</replaceable></option>
199     </term>
200     <listitem>
201     <para>Set the given separator as cell separator of the csv format.
202     `c' means a comma (default).
203     `s' means a semicolon.
204     `t' means a tab.
205     `p' means a space.
206     `l' means a colon.
207     </para>
208     </listitem>
209     </varlistentry>
210     <varlistentry>
211     <term><option>-b <replaceable>q</replaceable>|<replaceable>d</replaceable>|<replaceable>n</replaceable></option>
212     <option>--block <replaceable>q</replaceable>|<replaceable>d</replaceable>|<replaceable>n</replaceable></option>
213     </term>
214     <listitem>
215     <para>Set the given block delimiter that embraces the printable data of the csv format.
216     `q' means a simple quote.
217     `d' means a double quote.
218     `n' means no quoting at all (default).
219     </para>
220     </listitem>
221     </varlistentry>
222     <varlistentry>
223     <term><option>-l <replaceable>#</replaceable></option>
224     <option>--lines <replaceable>#</replaceable></option>
225     </term>
226     <listitem>
227     <para>Force to output multiple tabulars, each having a limited number of lines.
228     The given argument must be a POSITIVE INTEGER VALUE. This is useful when
229     the number of input rows is too big to fit into a single papersheet.
230     A good average for a4 paper is about 40 lines (default). 0 means infinity
231     (actualy about 2 Giga lines).
232     </para>
233     </listitem>
234     </varlistentry>
235     <varlistentry>
236     <term><option>-p <replaceable>l</replaceable>|<replaceable>c</replaceable>|<replaceable>r</replaceable></option>
237     <option>--position <replaceable>l</replaceable>|<replaceable>c</replaceable>|<replaceable>r</replaceable></option>
238     </term>
239     <listitem>
240     <para>Set the text position in all cells at once.
241     This simply uses one of the three basic cell formating options of the LaTeX tabular environment.
242     `l' means left-aligned (default).
243     `c' means centered.
244     `r' means right-aligned.
245     </para>
246     </listitem>
247     </varlistentry>
248     <varlistentry>
249     <term><option>-c <replaceable>0-1</replaceable></option>
250     <option>--colorrows <replaceable>0-1</replaceable></option>
251     </term>
252     <listitem>
253     <para>Alternate white/gray rows on the LaTeX output, having the given graylevel.
254     The given argument must be a REAL NUMBER BETWEEN 0 AND 1.
255     0 means black while 1 means white.
256     A nice looking value is 0.75 when printed on white paper.
257     This option uses the extra `colortbl' LaTeX package.
258     If you also use <option>--nohead</option> option, do not forget to add
259     the following line into the header of your master document: "\\usepackage{colortbl}".
260     </para>
261     </listitem>
262     </varlistentry>
263     <varlistentry>
264     <term><option>-r <replaceable>1</replaceable>|<replaceable>2</replaceable>|<replaceable>3</replaceable>|<replaceable>4</replaceable></option>
265     <option>--reduce <replaceable>1</replaceable>|<replaceable>2</replaceable>|<replaceable>3</replaceable>|<replaceable>4</replaceable></option>
266     </term>
267     <listitem>
268     <para>Reduce the size of the tabular and the font in the LaTeX output, given a reduction level.
269     The given argument must be one of 1, 2, 3 or 4.
270     The more the level is high, the more the tabular will appear small.
271     This is useful to shrink the table width when the printable data is made of very long text.
272     This option uses the extra `relsize' LaTeX package.
273     If you also use <option>--nohead</option> option, do not forget to add
274     the following line into the header of your master document: "\\usepackage{relsize}".
275     </para>
276     </listitem>
277     </varlistentry>
278     </variablelist>
279     </refsect1>
280     <refsect1>
281    
282     <title>EXAMPLES</title>
283    
284     <para>Create a PDF document with small text, alternate gray rows, 80 lines per table,
285     from a guessed csv format of the january stats that my boss created with his
286     super point-and-click spreadsheet program (which could not generate a PDF output!).
287     </para>
288     <para>
289     <command>&dhpackage; --guess --lines 80 --colorrows 0.75 --reduce 2 january_stats.csv > january_stats.tex && pdflatex january_stats.tex</command>
290     </para>
291    
292     <para>Quickly preview a phonebook from a file formated as "Surname" "Name" "Phone" "Cellular":
293     </para>
294     <para>
295     <command>&dhpackage; -s p -b d -l 42 phonebook-sorted.txt | latex</command>
296     </para>
297    
298     </refsect1>
299     <refsect1>
300    
301     <title>SEE ALSO</title>
302    
303     <para>tex (1), latex (1).</para>
304    
305     </refsect1>
306     </refentry>
307    
308     <!-- Keep this comment at the end of the file
309     Local variables:
310     mode: sgml
311     sgml-omittag:t
312     sgml-shorttag:t
313     sgml-minimize-attributes:nil
314     sgml-always-quote-attributes:t
315     sgml-indent-step:2
316     sgml-indent-data:t
317     sgml-parent-document:nil
318     sgml-default-dtd-file:nil
319     sgml-exposed-tags:nil
320     sgml-local-catalogs:nil
321     sgml-local-ecat-files:nil
322     End:
323     -->
324    
325    

  ViewVC Help
Powered by ViewVC 1.1.26