Zotero support
git-svn-id: svn://svn.code.sf.net/p/writer2latex/code/trunk@74 f0f2a975-2e09-46c8-9428-3b39399b9f3c
This commit is contained in:
parent
e2f5e3ed59
commit
e4eafbf87c
7 changed files with 107 additions and 24 deletions
|
@ -16,11 +16,11 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*
|
||||
* Copyright: 2002-2009 by Henrik Just
|
||||
* Copyright: 2002-2010 by Henrik Just
|
||||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Version 1.2 (2009-06-18)
|
||||
* Version 1.2 (2010-10-25)
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -142,7 +142,7 @@ public class Mouth {
|
|||
if (nIndex+3<nLen && isHex(c1)) {
|
||||
char c2 = sLine.charAt(nIndex+3);
|
||||
if (isHex(c2)) {
|
||||
// Found ^^ and a lower case hexidecimal number
|
||||
// Found ^^ and a lower case hexadecimal number
|
||||
if (bMove) { nIndex+=4; }
|
||||
char[] digits = {c1, c2};
|
||||
return (char) Integer.parseInt(new String(digits), 16);
|
||||
|
@ -220,7 +220,7 @@ public class Mouth {
|
|||
|
||||
/** Get the next token
|
||||
*
|
||||
* @return the token (for convenince; the same object is returned by {@link Mouth#getTokenObject}).
|
||||
* @return the token (for convenience; the same object is returned by {@link Mouth#getTokenObject}).
|
||||
* @throws IOException if we fail to read the underlying stream
|
||||
*/
|
||||
public Token getToken() throws IOException {
|
||||
|
@ -231,7 +231,7 @@ public class Mouth {
|
|||
case ESCAPE:
|
||||
token.setType(TokenType.COMMAND_SEQUENCE);
|
||||
token.clearChars();
|
||||
// TODO: The description in the TeXBook is not completely clear,
|
||||
// TODO: The description in the TeXBook is not completely clear (to me anyway),
|
||||
// (as long as \r and no other character has catcode END_OF_LINE this should be correct)
|
||||
if (catcodes.get(eyes.peekChar())==Catcode.LETTER) {
|
||||
state = State.S;
|
||||
|
@ -253,15 +253,19 @@ public class Mouth {
|
|||
}
|
||||
return token;
|
||||
case BEGIN_GROUP:
|
||||
state = State.M;
|
||||
token.set(c, TokenType.BEGIN_GROUP);
|
||||
return token;
|
||||
case END_GROUP:
|
||||
state = State.M;
|
||||
token.set(c, TokenType.END_GROUP);
|
||||
return token;
|
||||
case MATH_SHIFT:
|
||||
state = State.M;
|
||||
token.set(c, TokenType.MATH_SHIFT);
|
||||
return token;
|
||||
case ALIGNMENT_TAB:
|
||||
state = State.M;
|
||||
token.set(c, TokenType.ALIGNMENT_TAB);
|
||||
return token;
|
||||
case END_OF_LINE:
|
||||
|
@ -285,12 +289,15 @@ public class Mouth {
|
|||
}
|
||||
break;
|
||||
case PARAMETER:
|
||||
state = State.M;
|
||||
token.set(c, TokenType.PARAMETER);
|
||||
return token;
|
||||
case SUPERSCRIPT:
|
||||
state = State.M;
|
||||
token.set(c, TokenType.SUPERSCRIPT);
|
||||
return token;
|
||||
case SUBSCRIPT:
|
||||
state = State.M;
|
||||
token.set(c, TokenType.SUBSCRIPT);
|
||||
return token;
|
||||
case IGNORED:
|
||||
|
@ -305,12 +312,15 @@ public class Mouth {
|
|||
// In state N and S the space character is ignored
|
||||
break;
|
||||
case LETTER:
|
||||
state = State.M;
|
||||
token.set(c, TokenType.LETTER);
|
||||
return token;
|
||||
case OTHER:
|
||||
state = State.M;
|
||||
token.set(c, TokenType.OTHER);
|
||||
return token;
|
||||
case ACTIVE:
|
||||
state = State.M;
|
||||
token.set(c, TokenType.ACTIVE);
|
||||
return token;
|
||||
case COMMENT:
|
||||
|
|
|
@ -16,11 +16,11 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*
|
||||
* Copyright: 2002-2009 by Henrik Just
|
||||
* Copyright: 2002-2010 by Henrik Just
|
||||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Version 1.2 (2009-06-18)
|
||||
* Version 1.2 (2010-10-25)
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -153,5 +153,15 @@ public class Token implements Cloneable {
|
|||
return Character.toString(getChar());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override public Object clone() {
|
||||
Token newToken = new Token();
|
||||
newToken.type = this.type;
|
||||
newToken.nTokenLen = this.nTokenLen;
|
||||
newToken.nCapacity = this.nCapacity;
|
||||
newToken.tokenChars = new char[newToken.nCapacity];
|
||||
System.arraycopy(this.tokenChars, 0, newToken.tokenChars, 0, newToken.nCapacity);
|
||||
return newToken;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -3,24 +3,24 @@
|
|||
<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="Bibliography" dlg:left="139" dlg:top="84" dlg:width="260" dlg:height="185" dlg:closeable="true" dlg:moveable="true" dlg:title="Writer4LaTeX Bibliography Configuration" dlg:withtitlebar="false" dlg:help-url="org.openoffice.da.writer4latex.oxt:BibliographyDialog">
|
||||
<dlg:bulletinboard>
|
||||
<dlg:text dlg:id="ZoteroLabel" dlg:tab-index="0" dlg:left="6" dlg:top="4" dlg:width="244" dlg:height="12" dlg:value="Zotero Support"/>
|
||||
<dlg:checkbox dlg:id="ConvertZoteroCitations" dlg:tab-index="1" dlg:left="10" dlg:top="18" dlg:width="240" dlg:height="12" dlg:value="Convert Zotero ciations (requires natbib.sty)" dlg:checked="false" dlg:help-url="org.openoffice.da.writer2latex.oxt:BibliographyConvertZoteroCitations">
|
||||
<dlg:checkbox dlg:id="ConvertZoteroCitations" dlg:tab-index="1" dlg:left="10" dlg:top="18" dlg:width="240" dlg:height="12" dlg:value="Convert Zotero ciations (requires natbib.sty)" dlg:checked="false" dlg:help-url="org.openoffice.da.writer4latex.oxt:BibliographyConvertZoteroCitations">
|
||||
<script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.UNO:ConvertZoteroCitationsChange" script:language="UNO"/>
|
||||
</dlg:checkbox>
|
||||
<dlg:text dlg:id="ZoteroBibTeXDirLabel" dlg:tab-index="2" dlg:left="10" dlg:top="32" dlg:width="60" dlg:height="12" dlg:value="BibTeX folder"/>
|
||||
<dlg:textfield dlg:id="ZoteroBibTeXDir" dlg:tab-index="3" dlg:left="70" dlg:top="30" dlg:width="130" dlg:height="12" dlg:help-url="org.openoffice.da.writer2latex.oxt:ZoteroBibTeXDir"/>
|
||||
<dlg:button dlg:id="ZoteroBibTeXDirButton" dlg:tab-index="4" dlg:left="210" dlg:top="30" dlg:width="40" dlg:height="12" dlg:value="Browse..." dlg:help-url="org.openoffice.da.writer2latex.oxt:ZoteroBibTeXDirButton">
|
||||
<dlg:textfield dlg:id="ZoteroBibTeXDir" dlg:tab-index="3" dlg:left="70" dlg:top="30" dlg:width="130" dlg:height="12" dlg:help-url="org.openoffice.da.writer4latex.oxt:BibliographyZoteroBibTeXDir"/>
|
||||
<dlg:button dlg:id="ZoteroBibTeXDirButton" dlg:tab-index="4" dlg:left="210" dlg:top="30" dlg:width="40" dlg:height="12" dlg:value="Browse..." dlg:help-url="org.openoffice.da.writer4latex.oxt:BibliographyZoteroBibTeXDirButton">
|
||||
<script:event script:event-name="on-mouseup" script:macro-name="vnd.sun.star.UNO:ZoteroBibTeXDirClick" script:language="UNO"/>
|
||||
</dlg:button>
|
||||
<dlg:text dlg:id="NatbibOptionsLabel" dlg:tab-index="5" dlg:left="10" dlg:top="46" dlg:width="50" dlg:height="12" dlg:value="Natbib options"/>
|
||||
<dlg:textfield dlg:id="NatbibOptions" dlg:tab-index="6" dlg:left="70" dlg:top="44" dlg:width="180" dlg:height="12" dlg:help-url="org.openoffice.da.writer2latex.oxt:NatbibOptions"/>
|
||||
<dlg:textfield dlg:id="NatbibOptions" dlg:tab-index="6" dlg:left="70" dlg:top="44" dlg:width="180" dlg:height="12" dlg:help-url="org.openoffice.da.writer4latex.oxt:BibliographyNatbibOptions"/>
|
||||
|
||||
<dlg:text dlg:id="ExternalBibTeXLabel" dlg:tab-index="7" dlg:left="6" dlg:top="60" dlg:width="244" dlg:height="12" dlg:value="External BibTeX files"/>
|
||||
<dlg:checkbox dlg:id="UseExternalBibTeXFiles" dlg:tab-index="8" dlg:left="10" dlg:top="74" dlg:width="240" dlg:height="12" dlg:value="Use external BibTeX files" dlg:checked="false" dlg:help-url="org.openoffice.da.writer2latex.oxt:UseExternalBibTeXFiles" >
|
||||
<dlg:checkbox dlg:id="UseExternalBibTeXFiles" dlg:tab-index="8" dlg:left="10" dlg:top="74" dlg:width="240" dlg:height="12" dlg:value="Use external BibTeX files" dlg:checked="false" dlg:help-url="org.openoffice.da.writer4latex.oxt:BibliographyUseExternalBibTeXFiles" >
|
||||
<script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.UNO:UseExternalBibTeXFilesChange" script:language="UNO"/>
|
||||
</dlg:checkbox>
|
||||
<dlg:text dlg:id="ExternalBibTeXDirLabel" dlg:tab-index="9" dlg:left="10" dlg:top="88" dlg:width="60" dlg:height="12" dlg:value="BibTeX folder"/>
|
||||
<dlg:textfield dlg:id="ExternalBibTeXDir" dlg:tab-index="10" dlg:left="70" dlg:top="86" dlg:width="130" dlg:height="12" dlg:help-url="org.openoffice.da.writer2latex.oxt:ExternalBibTeXDir"/>
|
||||
<dlg:button dlg:id="ExternalBibTeXDirButton" dlg:tab-index="11" dlg:left="210" dlg:top="86" dlg:width="40" dlg:height="12" dlg:value="Browse..." dlg:help-url="org.openoffice.da.writer2latex.oxt:ExternalBibTeXDirButton">
|
||||
<dlg:textfield dlg:id="ExternalBibTeXDir" dlg:tab-index="10" dlg:left="70" dlg:top="86" dlg:width="130" dlg:height="12" dlg:help-url="org.openoffice.da.writer4latex.oxt:BibliographyExternalBibTeXDir"/>
|
||||
<dlg:button dlg:id="ExternalBibTeXDirButton" dlg:tab-index="11" dlg:left="210" dlg:top="86" dlg:width="40" dlg:height="12" dlg:value="Browse..." dlg:help-url="org.openoffice.da.writer4latex.oxt:BibliographyExternalBibTeXDirButton">
|
||||
<script:event script:event-name="on-mouseup" script:macro-name="vnd.sun.star.UNO:ExternalBibTeXDirClick" script:language="UNO"/>
|
||||
</dlg:button>
|
||||
</dlg:bulletinboard>
|
||||
|
|
|
@ -2,7 +2,10 @@
|
|||
<tree_view version="14-feb-2010">
|
||||
<help_section application="writer4latex" id="w4l01" title="Writer4LaTeX">
|
||||
<topic id="writer4latex/org.openoffice.da.writer4latex.oxt/introduction.xhp">Introduction</topic>
|
||||
<topic id="writer4latex/org.openoffice.da.writer4latex.oxt/configuration.xhp">Configuration</topic>
|
||||
<node id="w2l01_writer_configuration" title="Configuration">
|
||||
<topic id="writer4latex/org.openoffice.da.writer4latex.oxt/applications.xhp">Applications</topic>
|
||||
<topic id="writer4latex/org.openoffice.da.writer4latex.oxt/bibliography.xhp">Bibliography</topic>
|
||||
</node>
|
||||
<topic id="writer4latex/org.openoffice.da.writer4latex.oxt/menu.xhp">Menu reference</topic>
|
||||
<topic id="writer4latex/org.openoffice.da.writer4latex.oxt/guidelines.xhp">Guidelines</topic>
|
||||
<topic id="writer4latex/org.openoffice.da.writer4latex.oxt/templates.xhp">Using the templates</topic>
|
||||
|
|
|
@ -1,20 +1,18 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<helpdocument version="1.0">
|
||||
<meta>
|
||||
<topic id="writer4latex-configuration" indexer="include">
|
||||
<title xml-lang="en-US">Configuration</title>
|
||||
<filename>org.openoffice.da.writer4latex.oxt/configuration.xhp</filename>
|
||||
<topic id="writer4latex-applications" indexer="include">
|
||||
<title xml-lang="en-US">Applications</title>
|
||||
<filename>org.openoffice.da.writer4latex.oxt/applications.xhp</filename>
|
||||
</topic>
|
||||
</meta>
|
||||
<body>
|
||||
<bookmark xml-lang="en-US" branch="hid/org.openoffice.da.writer4latex.oxt:ConfigurationDialog" id="bm_configurationdialog"/>
|
||||
<paragraph role="heading" level="1" xml-lang="en-US">Configuration</paragraph>
|
||||
<paragraph role="heading" level="1" xml-lang="en-US">Configuration of applications</paragraph>
|
||||
<paragraph role="paragraph" xml-lang="en-US">Before you can use Writer4LaTeX you must configure it to use your LaTeX
|
||||
distribution as well as viewers for the different output formats.</paragraph>
|
||||
<section id="howtoget" xml-lang="en-US">
|
||||
Select <emph>Tools - Extension Manager - Writer4LaTeX</emph>
|
||||
and click <emph>Configure</emph><br/>
|
||||
Select <emph>Tools - Options - %PRODUCTNAME Writer - Writer4LaTeX</emph>
|
||||
Select <emph>Tools - Options - %PRODUCTNAME Writer - Writer4LaTeX - Applications</emph>
|
||||
</section>
|
||||
|
||||
<bookmark xml-lang="en-US" branch="hid/org.openoffice.da.writer4latex.oxt:ConfigurationAutoButton" id="bm_configurationautobutton"/>
|
|
@ -0,0 +1,62 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<helpdocument version="1.0">
|
||||
<meta>
|
||||
<topic id="writer4latex-bibliography" indexer="include">
|
||||
<title xml-lang="en-US">Bibliography</title>
|
||||
<filename>org.openoffice.da.writer4latex.oxt/bibliography.xhp</filename>
|
||||
</topic>
|
||||
</meta>
|
||||
<body>
|
||||
<bookmark xml-lang="en-US" branch="hid/org.openoffice.da.writer4latex.oxt:BibliographyDialog" id="bm_bibliographydialog"/>
|
||||
<paragraph role="heading" level="1" xml-lang="en-US">Configuration of bibliography</paragraph>
|
||||
<paragraph role="paragraph" xml-lang="en-US">On this page you can define .</paragraph>
|
||||
<section id="howtoget" xml-lang="en-US">
|
||||
Select <emph>Tools - Options - %PRODUCTNAME Writer - Writer4LaTeX - Bibliography</emph>
|
||||
</section>
|
||||
|
||||
<paragraph role="heading" level="2" xml-lang="en-US">Zotero support</paragraph>
|
||||
<paragraph role="paragraph" xml-lang="en-US"><link href="http://www.zotero.org" name="Link to the Zotero Website">Zotero</link>
|
||||
is a free, easy-to-use tool to help you collect, organize, cite, and share your research sources.
|
||||
Zotero provides a plugin for %PRODUCTNAME which permits you to insert citations from Zotero in your %PRODUCTNAME Writer document
|
||||
using a selection of citation schemes.</paragraph>
|
||||
|
||||
<bookmark xml-lang="en-US" branch="hid/org.openoffice.da.writer4latex.oxt:BibliographyConvertZoteroCitations" id="bm_convertzoterocitations"/>
|
||||
<paragraph role="heading" level="3" xml-lang="en-US">Convert Zotero citations</paragraph>
|
||||
<paragraph role="paragraph" xml-lang="en-US">Check this if you want to convert Zotero citations to LaTeX using the package natbib.sty.
|
||||
This enables you to format the citations using a BibTeX style of your choice. If you do not check this option, the original
|
||||
citation text inserted by Zotero will be used.</paragraph>
|
||||
<paragraph role="paragraph" xml-lang="en-US"><ahelp hid="org.openoffice.da.writer4latex.oxt:BibliographyConvertZoteroCitations" visibility="hidden">Check this to convert Zotero citations using natbib.sty</ahelp></paragraph>
|
||||
|
||||
<bookmark xml-lang="en-US" branch="hid/org.openoffice.da.writer4latex.oxt:BibliographyZoteroBibTeXDir" id="bm_zoterobibtexdir"/>
|
||||
<paragraph role="heading" level="3" xml-lang="en-US">BibTeX folder</paragraph>
|
||||
<paragraph role="paragraph" xml-lang="en-US">To use this feature you also have to export your Zotero bibliography databse to BibTeX.
|
||||
(TODO).</paragraph>
|
||||
<paragraph role="paragraph" xml-lang="en-US">Type the full path to the directory containing the exported database or click
|
||||
<emph>Browse</emph> to find the directory in your file system.</paragraph>
|
||||
<paragraph role="paragraph" xml-lang="en-US"><ahelp hid="org.openoffice.da.writer4latex.oxt:BibliographyZoteroBibTeXDir" visibility="hidden">Enter the path to the directory containing the BibTeX file exported from Zotero</ahelp></paragraph>
|
||||
|
||||
<bookmark xml-lang="en-US" branch="hid/org.openoffice.da.writer4latex.oxt:BibliographyNatbibOptions" id="bm_natbiboptions"/>
|
||||
<paragraph role="heading" level="3" xml-lang="en-US">Natbib Options</paragraph>
|
||||
<paragraph role="paragraph" xml-lang="en-US">Enter any options to the package natbib.sty here.</paragraph>
|
||||
<paragraph role="paragraph" xml-lang="en-US"><ahelp hid="org.openoffice.da.writer4latex.oxt:BibliographyNatbibOptions" visibility="hidden">Enter any options to the package natbib.sty here</ahelp></paragraph>
|
||||
|
||||
<paragraph role="heading" level="2" xml-lang="en-US">External BibTeX files</paragraph>
|
||||
|
||||
<bookmark xml-lang="en-US" branch="hid/org.openoffice.da.writer4latex.oxt:BibliographyUseExternalBibTeXFiles" id="bm_useexternalbibtexfiles"/>
|
||||
<paragraph role="heading" level="3" xml-lang="en-US">Use external BibTeX files</paragraph>
|
||||
<paragraph role="paragraph" xml-lang="en-US">Check this if the citations in your document refers to one or more external BibTeX files.
|
||||
(The keys used in the document must match up with the keys in the external BibTeX files.)</paragraph>
|
||||
<paragraph role="paragraph" xml-lang="en-US">This feature is for users that maintain their references in BibTeX, for example using
|
||||
a tool like <link href="http://jabref.sourceforge.net/" name="Link to the JabRef Website">JabRef</link>.
|
||||
It enables you to use the original BibTeX files in the LaTeX document rather than converting the inserted
|
||||
references back into BibTeX.</paragraph>
|
||||
<paragraph role="paragraph" xml-lang="en-US"><ahelp hid="org.openoffice.da.writer4latex.oxt:BibliographyUseExternalBibTeXFiles" visibility="hidden">Check this if your citations refer to external BibTeX file(s)</ahelp></paragraph>
|
||||
|
||||
<bookmark xml-lang="en-US" branch="hid/org.openoffice.da.writer4latex.oxt:BibliographyExternalBibTeXDir" id="bm_externalbibtexdir"/>
|
||||
<paragraph role="heading" level="3" xml-lang="en-US">BibTeX folder</paragraph>
|
||||
<paragraph role="paragraph" xml-lang="en-US">Type the full path to the directory containing the BibTeX database(s) or click
|
||||
<emph>Browse</emph> to find the directory in your file system.</paragraph>
|
||||
<paragraph role="paragraph" xml-lang="en-US"><ahelp hid="org.openoffice.da.writer4latex.oxt:Bibliography" visibility="hidden">Enter the path to the directory containing the BibTeX files</ahelp></paragraph>
|
||||
|
||||
</body>
|
||||
</helpdocument>
|
|
@ -53,7 +53,7 @@
|
|||
|
||||
<paragraph role="heading" level="2" xml-lang="en-US">Before you start</paragraph>
|
||||
<paragraph role="paragraph" xml-lang="en-US">Before you can use Writer4LaTeX, you need to
|
||||
<link href="org.openoffice.da.writer4latex.oxt/configuration.xhp" name="Configuration">configure</link> it.
|
||||
<link href="org.openoffice.da.writer4latex.oxt/applications.xhp" name="Applications">configure</link> it.
|
||||
This requires that you have installed certain software on your system.</paragraph>
|
||||
<switch select="sys">
|
||||
<case select="WIN">
|
||||
|
|
Loading…
Add table
Reference in a new issue