cvs: peardoc /en/package/structures structures-bibtex.xml /en/package/structures/structures-bibtex exporting.xml intro.xml warnings.xml

From: Date: Fri, 28 Jul 2006 17:43:38 +0000
Subject: cvs: peardoc /en/package/structures structures-bibtex.xml /en/package/structures/structures-bibtex exporting.xml intro.xml warnings.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-8181@lists.php.net to get a copy of this message
hugoki Fri Jul 28 17:43:38 2006 UTC Added files: /peardoc/en/package/structures/structures-bibtex exporting.xml Modified files: /peardoc/en/package/structures/structures-bibtex intro.xml warnings.xml /peardoc/en/package/structures structures-bibtex.xml Log: - Corrected the Revision Number - Added a page about exporting

http://cvs.php.net/viewvc.cgi/peardoc/en/package/structures/structures-bibtex/intro.xml?r1=1.3&r2=1.4&diff_format=u Index: peardoc/en/package/structures/structures-bibtex/intro.xml diff -u peardoc/en/package/structures/structures-bibtex/intro.xml:1.3 peardoc/en/package/structures/structures-bibtex/intro.xml:1.4 --- peardoc/en/package/structures/structures-bibtex/intro.xml:1.3 Sat Jul 22 08:34:17 2006 +++ peardoc/en/package/structures/structures-bibtex/intro.xml Fri Jul 28 17:43:38 2006 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id="package.structures.structures-bibtex.intro"> <refnamediv> <refname>Introduction</refname> http://cvs.php.net/viewvc.cgi/peardoc/en/package/structures/structures-bibtex/warnings.xml?r1=1.2&r2=1.3&diff_format=u Index: peardoc/en/package/structures/structures-bibtex/warnings.xml diff -u peardoc/en/package/structures/structures-bibtex/warnings.xml:1.2 peardoc/en/package/structures/structures-bibtex/warnings.xml:1.3 --- peardoc/en/package/structures/structures-bibtex/warnings.xml:1.2 Sat Jul 22 08:34:17 2006 +++ peardoc/en/package/structures/structures-bibtex/warnings.xml Fri Jul 28 17:43:38 2006 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="package.structures.structures-bibtex.warnings"> <refnamediv> <refname>Warnings</refname> @@ -122,6 +122,11 @@ <parameter>WARNING_MULTIPLE_ENTRIES</parameter> - Every entry is identified by a unique string. This warning is created if there are at least two entries with the same identification. </para> </listitem> + <listitem> + <para> + <parameter>WARNING_LINE_WAS_NOT_CONVERTED</parameter> - This warning is created if during exporting (for example in RTF or HTML) one entry was ignored because of no matching data in the entry. At least one of the following entries have to exist in the entry to get converted: title, journal, year or authors. + </para> + </listitem> </itemizedlist> </para> </refsect1> http://cvs.php.net/viewvc.cgi/peardoc/en/package/structures/structures-bibtex.xml?r1=1.2&r2=1.3&diff_format=u Index: peardoc/en/package/structures/structures-bibtex.xml diff -u peardoc/en/package/structures/structures-bibtex.xml:1.2 peardoc/en/package/structures/structures-bibtex.xml:1.3 --- peardoc/en/package/structures/structures-bibtex.xml:1.2 Sat Jul 15 16:07:00 2006 +++ peardoc/en/package/structures/structures-bibtex.xml Fri Jul 28 17:43:38 2006 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <sect1 id="package.structures.structures-bibtex"> <title>Structures_BibTex</title> @@ -10,6 +10,7 @@ &package.structures.structures-bibtex.intro; &package.structures.structures-bibtex.warnings; + &package.structures.structures-bibtex.exporting; </sect1> http://cvs.php.net/viewvc.cgi/peardoc/en/package/structures/structures-bibtex/exporting.xml?view=markup&rev=1.1 Index: peardoc/en/package/structures/structures-bibtex/exporting.xml +++ peardoc/en/package/structures/structures-bibtex/exporting.xml <?xml version="1.0" encoding="iso-8859-1" ?> <!-- $Revision: 1.1 $ --> <refentry id="package.structures.structures-bibtex.exporting"> <refnamediv> <refname>Exporting</refname> <refpurpose> Possibility to export the data using <classname>Structures_BibTex</classname> </refpurpose> </refnamediv> <refsect1 id="package.structures.structures-bibtex.exporting.overview"> <title>Overview</title> <para> The class <classname>Structures_BibTex</classname> provides some methods to export the data stored in the class. Currently the class exports the data in the following formats: <itemizedlist> <listitem> <para> <parameter>BibTeX</parameter> - The whole data in BibTeX </para> </listitem> <listitem> <para> <parameter>RTF</parameter> - The data with enough matching data as a short list in RTF format </para> </listitem> <listitem> <para> <parameter>HTML</parameter> - The data with enough matching data as a short list in HTML format </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.structures.structures-bibtex.exporting.bibtex"> <title>BibTeX</title> <para> One of the basic features is of course the export in BibTeX format. This is simply done by invoking the <function>bibTex</function> method. <example> <title>Exporting in BibTeX format</title> <programlisting role="php"> <![CDATA[ require_once 'Structures/BibTex.php'; $bibtex = new Structures_BibTex(); $ret = $bibtex->loadFile('foo.bib'); if (PEAR::isError($ret)) { die($ret->getMessage()); } $bibtex->parse(); echo 'The data in BibTeX format:<br />'; echo $bibtex->bibTex(); ]]> </programlisting> </example> </para> </refsect1> <refsect1 id="package.structures.structures-bibtex.exporting.rtf"> <title>RTF</title> <para> This feature was introduced to enable some kind of import into Word. Word (of course also Open Office or kword) understands the RTF format. It is simply possible to save the output as 'somefile.rtf' and be opened in Word. This will satisfy the Windows users. To use it simply call the method <function>rtf</function>. <example> <title>Exporting in RTF format</title> <programlisting role="php"> <![CDATA[ require_once 'Structures/BibTex.php'; $bibtex = new Structures_BibTex(); $ret = $bibtex->loadFile('foo.bib'); if (PEAR::isError($ret)) { die($ret->getMessage()); } $bibtex->parse(); echo 'The data in RTF format:<br />'; echo $bibtex->rtf(); ]]> </programlisting> </example> </para> <para> The default format for every entry is first the authors, then the title bold and in double quotes, then the journal italic and finally the year. To change the default format you should override the class variable rtfstring. The default rtfstring looks like this: 'AUTHORS, "{\b TITLE}", {\i JOURNAL}, YEAR'. The string AUTHORS, TITLE, JOURNAL and YEAR are substituted with the corresponding values. <example> <title>Exporting in RTF format with different RTF string</title> <programlisting role="php"> <![CDATA[ require_once 'Structures/BibTex.php'; $bibtex = new Structures_BibTex(); $ret = $bibtex->loadFile('foo.bib'); if (PEAR::isError($ret)) { die($ret->getMessage()); } $bibtex->parse(); $bibtex->rtfstring = 'AUTHORS, "TITLE", JOURNAL, YEAR'; echo 'The data in RTF format (but this time plain):<br />'; echo $bibtex->rtf(); ]]> </programlisting> </example> </para> </refsect1> <refsect1 id="package.structures.structures-bibtex.exporting.html"> <title>HTML</title> <para> This feature is just a simple HTML generation. The default formatting is the same as in rtf. To use it call the method <function>html</function>. <example> <title>Exporting in HTML format</title> <programlisting role="php"> <![CDATA[ require_once 'Structures/BibTex.php'; $bibtex = new Structures_BibTex(); $ret = $bibtex->loadFile('foo.bib'); if (PEAR::isError($ret)) { die($ret->getMessage()); } $bibtex->parse(); echo 'The data in HTML format:<br />'; echo $bibtex->html(); ]]> </programlisting> </example> </para> <para> As with the RTF export it is possible to override the default HTML string.The default string is stored in the class variable htmlstring and looks like this: <![CDATA[AUTHORS, "<strong>TITLE</strong>", <em>JOURNAL</em>, YEAR<br />]]>. <example> <title>Exporting in HTML format with different HTML string</title> <programlisting role="php"> <![CDATA[ require_once 'Structures/BibTex.php'; $bibtex = new Structures_BibTex(); $ret = $bibtex->loadFile('foo.bib'); if (PEAR::isError($ret)) { die($ret->getMessage()); } $bibtex->parse(); $bibtex->htmlstring = 'AUTHORS, "TITLE", JOURNAL, YEAR'; echo 'The data in HTML format (but this time plain):<br />'; echo $bibtex->html(); ]]> </programlisting> </example> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->
« previous php.pear.doc (#8181) next »