diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /biblio/bibtex/utils/JavaBib |
Initial commit
Diffstat (limited to 'biblio/bibtex/utils/JavaBib')
-rw-r--r-- | biblio/bibtex/utils/JavaBib/JavaBib1.jpg | bin | 0 -> 83258 bytes | |||
-rw-r--r-- | biblio/bibtex/utils/JavaBib/describe.html | 142 | ||||
-rw-r--r-- | biblio/bibtex/utils/JavaBib/docs.html | 270 | ||||
-rw-r--r-- | biblio/bibtex/utils/JavaBib/index.html | 47 | ||||
-rw-r--r-- | biblio/bibtex/utils/JavaBib/screen.html | 29 |
5 files changed, 488 insertions, 0 deletions
diff --git a/biblio/bibtex/utils/JavaBib/JavaBib1.jpg b/biblio/bibtex/utils/JavaBib/JavaBib1.jpg Binary files differnew file mode 100644 index 0000000000..09379f87fc --- /dev/null +++ b/biblio/bibtex/utils/JavaBib/JavaBib1.jpg diff --git a/biblio/bibtex/utils/JavaBib/describe.html b/biblio/bibtex/utils/JavaBib/describe.html new file mode 100644 index 0000000000..30581cbaf6 --- /dev/null +++ b/biblio/bibtex/utils/JavaBib/describe.html @@ -0,0 +1,142 @@ +<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <meta name="Author" content="John Janmaat"> + <meta name="GENERATOR" content="Mozilla/4.76 [en] (X11; U; Linux 2.2.16-22 i686) [Netscape]"> +</head> +<body> + +<center> +<h1> +JavaBib III</h1></center> + +<h2> +Background</h2> +JavaBib is my attempt to make it easy to manage BibTeX files for the LaTeX +document processing environment. BibTeX files are files which contain +bibliographic information which the BibTeX program can use to generate +citation and reference information in LaTeX documents. As for everything +else associated with TeX, the data files themselves are bare text. +This has the tremendous advantage of making the documents system independent. +However, flat text files are a rather unwieldy way to manage a database. +<p>My own experience with document preparation has been in part an exercise +in locating references lost under a stack of papers in some office of mine. +I have found that I waste a lot of time looking for that perfect reference, +and often just give up in the search. To make this situation a little +better, I have tried to write a reference manager. The first incarnation +was a simple database under MicroSoft Access. This was O.K. for storing +the information, but rather useless for anything else. When I began +to use LaTeX, I found that the Access program was just a waste of hard +disk space, as I ended up working in Linux. Thus began my attempt +to build a nice GUI front end for BibTeX. +<p>The first incarnation of JavaBib was a command line based processor +that could search and modify databases. I stuck some GUI components +on top of this, but overall it was not all that effective. A second +pass was built from the ground up to be a GUI application. It was +somewhat better, but remained a little buggy. Rather than fix the +bugs, I vowed to develop a third version that both fixed the bugs and dealt +with some issues not appropriately handled in the first version. +These issues included the fact that Java can be quite slow when filling +memory with arrays of non-native Java objects. JavaBib and JavaBib +II both loaded an entire JavaBib file into memory as a vector of BibTeX +records. This can be quite slow to load. Since most of the +time using JavaBib is simply adding extra entries to an existing file, +the speed issue proved to be a great inconvenience. +<p>JavaBib III follows a completely different format. Rather than +reading an entire file into memory, it builds an index for the file. +This index allows access to specific entries in the file. Once the +index has been built, it is all that is loaded for subsequent uses, so +long as the underlying data file is not changed. Startup is much +faster this way, and most operations are not slowed up too much by accessing +the file on the disk. The two operations that are considerably slowed +by this approach are finding and searching. However, I think this +is an appropriate tradeoff given the other benefits. +<h2> +How It Works</h2> +A JavaBib session begins by invoking the program. This is usually +done from the command line, as I have not yet figured out an easy way to +run it as a click-able icon on a desktop. On startup, JavaBib looks +for a configuration file. This configuration file contains a history +of files that have been worked on and dimensions for the JavaBib window. +The parameters are loaded if found, or default values are set if the configuration +file is missing. +<p>At this point, JavaBib displays a blank main window. In front +of this window a startup dialog is shown. This dialog lists the names +of up to ten previously opened files. You can select one of these, +or choose to open a new or unlisted file. Once it has a file name, +JavaBib checks to see if there is an index file to go along with the file +you selected. Index files have the extension '.bdx'. If it +finds an index file, the index information is loaded. The index file +stores the last modification time and file size of the BibTeX file to which +it refers. If these match the conditions of the file, then the index +is used to locate the first entry, which is displayed in the main window. +<p>If an index file is invalid or cannot be found, then JavaBib will construct +one. To construct an index, JavaBib reads the entire BibTeX file. +The index contains the file position of the first character after a valid +record, the key of the next record in the file and the key of the last +record in the file. Once the index is built, then the first record +is displayed. If the file itself cannot be found, then a new file +is opened and made ready to receive records. +<p>Records are copied from the file to the display panel. One copy +is maintained in memory, and another displayed. When the user chooses +to add a new record or display a different record, the information in the +display panel is converted into a BibTeX record which is compared to the +one in memory. If they do not match, then the user is asked about +saving the changes. Before saving, the record is checked for validity. +All required fields must contain information, and the record must have +a unique key. If there is a cross reference entry, it must exist +and it must not be nested. +<p>When writing new entries or changes, these are appended to the end of +the file. For records that have been changed, the record in the file +is deleted. Deleting an entry consists of replacing its information +with a line of '%' symbols. TeX and BibTeX consider the '%' as a +marker for comments, and thus ignores these lines. If the new record +contains a cross reference entry, then the information for the cross reference +is deleted from the inside of the file and rewritten at the end of the +file. This operation is required to ensure that any entry which is +referred to in a cross reference appears after the reference. Also, +when a referenced record is moved, the field 'BOOKTITLE' is added. +Clearly, using cross references extensively will result in a file that +is full of empty records. To clean up such a file, the compress operation +recreates the file and removes any extraneous material between records. +Since BibTeX records are written to the file with each edit, if JavaBib +does crash, only the record being worked on will not be recorded. +All previous work will have been added to the file. +<p>Search and find operations proceed through the file. Find operations +move forward from record to record as they are displayed in the list on +the left side of the main window. Since the alphabetical list need +not reflect the order in the file, this operation involves much disk access. +The search operation is a little more efficient. It begins by constructing +its own index with the keys ordered by file position. The search +then begins at the beginning of the file and reads forward through this +index list. The file pointer is always moving in one direction. +If the system on which JavaBib is run reads ahead and buffers disk information, +this search should not be too slow. +<p>Cutting, copying, and pasting records is done via a clipboard. +On a Windows system, the system clipboard is used. Thus, the text +representation of BibTeX records can be copied and pasted between JavaBib +and other applications. Note that this can be dangerous if information +being pasted into JavaBib does not conform with the required BibTeX record +format. +<p>When JavaBib shuts down, it closes the BibTeX file. It then reads +the last modification date and file size which it stores in the index file. +The index file is written to the disk as a text file. Once completed, +the window is closed. On exiting the program, the parameter file +is written to the disk. +<h2> +Download</h2> +JavaBib is packaged as a .jar file. These files are readable by Java +directly. Thus, to install and run JavaBib, just download JavaBib.jar. +To run the program, simply type "java -jar JavaBib.jar" at the command +line. I leave the installation of a Java runtime environment to you. +To find out about this, go to <a href="www.sunsoft.com">www.sunsoft.com</a>. +<p><a href="JavaBib.jar">JavaBib.jar</a> +<p>Note: You may need to right click on the link and then select 'save +link as' to get the download to work. +<h2> +Feedback</h2> +If you have any comments about this program, please feel free to contact +me at <a href="mailto:jjanmaat@acadiau.ca">jjanmaat@acadiau.ca</a>. +</body> +</html> diff --git a/biblio/bibtex/utils/JavaBib/docs.html b/biblio/bibtex/utils/JavaBib/docs.html new file mode 100644 index 0000000000..729d577e40 --- /dev/null +++ b/biblio/bibtex/utils/JavaBib/docs.html @@ -0,0 +1,270 @@ +<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <meta name="Author" content="John Janmaat"> + <meta name="GENERATOR" content="Mozilla/4.76 [en] (X11; U; Linux 2.2.16-22 i686) [Netscape]"> +</head> +<body> + +<center> +<h1> +JavaBib III Documentation</h1></center> + +<h2> +Contents</h2> + +<ul> +<li> +<b><font size=+1><a href="#startup">Startup</a></font></b></li> + +<li> +<b><font size=+1><a href="#file">File Menu</a></font></b></li> + +<li> +<b><font size=+1><a href="#edit">Edit Menu</a></font></b></li> + +<li> +<b><font size=+1><a href="#records">Records Menu</a></font></b></li> + +<li> +<b><font size=+1>Search Menu</font></b></li> + +<li> +<b><font size=+1>Cite Menu</font></b></li> + +<li> +<b><font size=+1>Window Menu</font></b></li> + +<li> +<b><font size=+1>Help Menu</font></b></li> +</ul> + +<h2> +<a NAME="startup"></a>Startup</h2> +The method by which JavaBib is started depends on the installation you +choose. If you are running the program from a '.jar' file, type '<b>java +-jar JavaBib.jar</b>' The '.jar' file contains a manifest file which +indicates which class contains the 'main' method. Alternatively, +you can unpack the '.jar' file into a directory. The class files +will then be present as separate files. This method of loading the +files may be slightly faster as each file does not need to be unpacked. +However, since the Java interpreter only loads each class once, the performance +benefit will be quite small. If you have installed JavaBib in this +way, execute it by typing '<b>java JavaBib</b>'. For both types of +execution, one can add a file name to indicate which file JavaBib is to +open. +<p>Once JavaBib has been launched, the main window with a blank edit panel +appears. In front of this the startup dialog is displayed. +The startup dialog shows a list of files that have previously been opened. +To open one of the listed files, you can either double click on it or select +it, choose 'open listed file', and press continue. The selected file +is then opened. If the file you want to edit is not listed, or you +want to start a new file, select 'open new or unlisted file' and press +continue. A file dialog will be displayed, where you can select a +file to open or type in a new file name. Note that the file name +must have a '.bib' extension. If the selected file does not have +a '.bib' or '.bdx' extension, then the selected file name will have '.bib' +appended to it. +<p>JavaBib tries to open the named file. The first step in opening +the file is to look for an index file. Index files have the extension +'.bdx'. The index file contains the name of the associated BibTeX +file as well as the length of the file and the date when it was lasted +edited. If the index file is found, it is opened. If the matching +BibTeX file exists and if the length and last modified date are correct, +the index is loaded into memory. The index file contains the location +of each entry in the '.bib' file, as well as pointers to the previous and +next entry. If the index file is not present, then the BibTeX file +itself is checked for. If it is found, then an index is generated +for the file. If the BibTeX file is also missing, then a new BibTeX +file is opened and made ready for writing. +<h2> +<a NAME="file"></a>File Menu</h2> + +<ul> +<li> +<b><font size=+1><a href="#file->open">Open</a></font></b></li> + +<li> +<b><font size=+1><a href="#file->close">Close</a></font></b></li> + +<li> +<b><font size=+1><a href="#file->compact">Compact</a></font></b></li> + +<li> +<b><font size=+1><a href="#file->import">Import</a></font></b></li> + +<li> +<b><font size=+1><a href="#file->export">Export</a></font></b></li> + +<li> +<b><font size=+1><a href="#file->exit">Exit</a></font></b></li> +</ul> + +<h3> +<a NAME="file->open"></a>Open</h3> +Opening a file repeats the operation that occurs when JavaBib is first +launched. Upon selecting open, a startup dialog is displayed. +This dialog lists the names of recently opened files. The user may +select one of these or open a new file. Note that only one file can +be accessed at one time. JavaBib does not load the BibTeX file into +memory. Rather, the file is accessed one record at a time, as needed. +Simultaneous access on the same file can lead to problems whenever new +records are added. Thus, it is not advisable to have one file open +more than once. +<h3> +<a NAME="file->close"></a>Close</h3> +The close operation closes the displayed window. If the file does +not have any records, it is deleted from the disk and the index is not +written. If the file has records, then after the file is closed the +index file is also written. If the window being closed is the last +window, then the application is closed. On closing, the properties +file is also written to the disk, storing the dimensions of the window +and the list of files that have been worked on. +<h3> +<a NAME="file->compact"></a>Compact</h3> +The compact operation removes extra space from the database. When +records are deleted or modified, they are overwritten with a line of comment +characters. New records are always added to the end of the file. +Records which contain cross references are added to the end of the file, +after which the referred to record is moved to the new end of the file. +This ensures that BibTeX conventions are satisfied. However, it also +means that files will end up full of spaces. The compact operation +removes this extraneous space from between the records. +<h3> +<a NAME="file->import"></a>Import</h3> +Records from other BibTeX files can be imported into an open file. +To this point, text files are the only source of import. When this +option is selected, a file dialog is displayed so that the user can select +which file to open from. Note that if you try to import records from +a file which is not a BibTeX data file, you may crash JavaBib. Be +careful importing data. +<h3> +<a NAME="file->export"></a>Export</h3> +The export operation writes selected entries to a new file. When +export is selected, a file dialog is opened. Enter the name of the +file to export to. The selected entries will then be written to this +file. +<h3> +<a NAME="file->exit"></a>Exit</h3> +Selecting exit closes all windows and shuts down JavaBib. On exit, +the index files for each open database is written. +<h2> +<a NAME="edit"></a>Edit Menu</h2> + +<ul> +<li> +<b><font size=+1><a href="#edit->new">New</a></font></b></li> + +<li> +<b><font size=+1><a href="#edit->clear">Clear</a></font></b></li> + +<li> +<b><font size=+1><a href="#edit->reset">Reset</a></font></b></li> + +<li> +<b><font size=+1><a href="#edit->cancel">Cancel</a></font></b></li> + +<li> +<b><font size=+1><a href="#edit->options">Options</a></font></b></li> +</ul> + +<h3> +<a NAME="edit->new"></a>New</h3> +Selecting New clears the entry panel and presents a blank record for to +record a new entry. Before displaying the new entry however, any +currently displayed information is checked for changes. If changes +have been made, then the user is prompted for confirmation on writing or +trashing any changed. If the record is to be written, it is checked +for consistency with the requirements for this record type. The checks +include the presence of all required fields as well as a unique key. +If this entry is a cross reference, the presence of a cross reference key +is checked, and a check is made to ensure that the cross reference does +not itself contain a cross reference. Once all checks are passed, +the record is written. +<h3> +<a NAME="edit->clear"></a>Clear</h3> +Clears the information in the active record. All data fields are +cleared. The record type, citation key and crossreference field are +not changed by this operation. +<h3> +<a NAME="edit->reset"></a>Reset</h3> +Restore the initial values for this field, before any changes were made. +<h3> +<a NAME="edit->cancel"></a>Cancel</h3> +Cancel the current edit operation. If an existing record is being +acted upon, then this operation is the same as reset. If a new record +is being created, cancel causes the edits to be lost and displays the most +recently selected record. +<h3> +<a NAME="edit->options"></a>Options</h3> +Not yet implemented. In future, this selection will enable various +program options to be modified. +<h2> +<a NAME="records"></a>Records Menu</h2> + +<ul> +<li> +<b><font size=+1>Cut</font></b></li> + +<li> +<b><font size=+1>Copy</font></b></li> + +<li> +<b><font size=+1>Paste</font></b></li> + +<li> +<b><font size=+1>Delete</font></b></li> + +<li> +<b><font size=+1>Select All</font></b></li> + +<li> +<b><font size=+1>Deselect All</font></b></li> +</ul> + +<h3> +Cut</h3> +The records cut menu option deletes the selected records from this file +and puts the contents of the deleted records into the clipboard. +All the selected records are transferred to the clipboard as well as any +required cross referenced records which are not included in the selection. +This ensures that any pasted records will take with them the cross references +that are needed. When the records are deleted, they are removed permanently +from the file. They are overwritten with '%' characters, permanently +removing the record information from the file. +<h3> +Copy</h3> +Copy the information in the selected records into the clipboard. +Any additional cross reference information is also copied into the clipboard. +The records that are placed in the clipboard are passed as plain text. +The records can thereby be pasted into any other application that shares +the system clipboard. On the Windows operating system, this works. +On Linux, the X windows system clipboard does not seem to be the same clipboard +that Java accesses. +<h3> +Paste</h3> +Paste takes the contents of the system clipboard and reads it as BibTeX +records. If any records are found, they are added to the file. +On addition, duplicate keys are checked for. If a duplicate key is +found, then the user is asked to enter a new key. Selecting cancel +in response to this operation results in the record not being added. +If the key is changed, then any records with a cross reference pointing +at this record will also have their key changed. +<h3> +Delete</h3> +Delete removes the selected entries from the file. The selected records +are replaced by TeX comment characters, '%'. Selecting delete removes +the records permanently from the file. +<h3> +Select All</h3> +Select the keys for all the records. When all the records are selected, +cut, copy, paste, and delete operations can be performed on all the records +in the file. Selecting this menu option will switch the selection +mode to multiple if that has not already been done. +<h3> +Deselect All</h3> +Deselct all the records in the file. This method is useful to ensure +that records in a large file are not subject to undesired operations. +</body> +</html> diff --git a/biblio/bibtex/utils/JavaBib/index.html b/biblio/bibtex/utils/JavaBib/index.html new file mode 100644 index 0000000000..3b03cce7c3 --- /dev/null +++ b/biblio/bibtex/utils/JavaBib/index.html @@ -0,0 +1,47 @@ +<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <meta name="Author" content="John Janmaat"> + <meta name="GENERATOR" content="Mozilla/4.76 [en] (X11; U; Linux 2.2.16-22 i686) [Netscape]"> +</head> +<body> + +<center> +<h1> +<b><font size=+4>JavaBib III</font></b></h1></center> + +<ul> +<li> +<font size=+2><a href="describe.html">Description</a></font></li> + +<br> +<li> +<font size=+2><a href="docs.html">Documentation</a> - in process.</font></li> + +<br> +<li> +<font size=+2><a href="screen.html">Screen Shots</a></font></li> + +<br> +<li> +<font size=+2>Download</font></li> + +<br> +<ul> +<li> +<font size=+2><a href="JavaBib.jar">JavaBib.jar</a> - run from command +line with "java -jar JavaBib.jar".</font></li> + +<br> +<li> +<font size=+2>JavaBib.zip - MS Windows zip file, JavaBib.jar and the documentation.</font></li> + +<br> +<li> +<font size=+2>JavaBib.tar.gz - Gzipped tar file, JavaBib.jar and the documentation.</font></li> +</ul> +</ul> + +</body> +</html> diff --git a/biblio/bibtex/utils/JavaBib/screen.html b/biblio/bibtex/utils/JavaBib/screen.html new file mode 100644 index 0000000000..484ff7491f --- /dev/null +++ b/biblio/bibtex/utils/JavaBib/screen.html @@ -0,0 +1,29 @@ +<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <meta name="Author" content="John Janmaat"> + <meta name="GENERATOR" content="Mozilla/4.76 [en] (X11; U; Linux 2.2.16-22 i686) [Netscape]"> +</head> +<body> + +<center> +<h1> +JavaBib III Screen Shots</h1></center> + +<h3> +Main Window</h3> +<img SRC="JavaBib1.jpg" height=597 width=707> +<p>The main window is where most of the work on BibTeX records is conducted. +The menu bar provides a range of options, from opening new files to modifying +the existing record. On the left, one can choose which records to +view. Selecting a record updates the edit panel on the right. +The control panel at the bottom of the window allows you to move between +records and some shortcut buttons for record editing. The text field +at the bottom of the control panel displays a LaTeX citation entry. +This entry can be copied from this text field. Alternatively, it +can be copied to the system clipboard by using the 'cite' menu. Unfortunately, +on some systems Java does not access the same system clipboard as the application +into which you might want to paste the entry. +</body> +</html> |