# Configuration

## Configuring Annote

• Annote Cascading Style Sheet (CSS)
This file contains the style sheet to personalize the appearance of the HTML notes generated by the cb2Bib. The cb2Bib distribution includes the tex2html.css file as a CSS template.
The mathematical notation in the text notes is displayed by jsMath. or its successor MathJax. The MathJax is a Java Script library. Its location and configuration must be specified inside the HTML files in order to be known by the browser.
• Include CSS in HTML
Styles for the notes will be included, if checked, into the HTML file. In this way, all the information, text and layout, is contained in one single file.
If checked, linked local files will be set relative to the current HTML document.
• Annote Viewer Fonts
Selects default and monospaced fonts for the Annote viewer. Changes in the fonts might need restarting the viewer unless using some of the latest QtWebKit libraries. The viewer is disabled if the cb2Bib was not compiled and linked against WebKit. Note also that fonts specified in the CSS prevail over this selection.

## Configuring BibTeX

• CiteID Pattern
Specifies the pattern for formatting cite's ID. Predefined placeholders are available as a context menu, by right-clicking this edit line. Placeholders will be substituted by the actual reference field values. See Predefined cite and document ID placeholders for descriptions.
• Author and Editor Name Format
Sets Authors and Editor names in abbreviated or full form, if the latter is available.
• Journal Name Format
Sets output journal names in abbreviated or full form. Note that this feature only works if journal names are found in the Journal Abbreviation List file.
• Number Separator
Sets number separator, e.g., ' - ' or ' -- '. Spaces count. It applies to pages, multiple volume, number, and year cases.
• Convert entry strings to LaTeX
If checked, cb2Bib converts special characters to LaTeX commands. Most BibTeX import filters do not process LaTeX escaped characters. Therefore, keeping this box unchecked can be appropriate when using cb2Bib as a temporary media to transfer references to non BibTeX reference managers.
• Set 'title' in double braces
If checked, it writes extra braces in title. This will keep capitalization as is, when processed by BibTeX.
• Postprocess 'month'
If checked, cb2Bib elaborates the 'month' string on a BibTeX fashion. E.g., 'April 1' becomes '"1~" # apr'. No processing is done if the input string is not written in English.
• Try Heuristic Guess if recognition fails
If checked, when automatic recognition fails, cb2Bib tries to catch some of the fields of the reference through an heuristic set of rules. See Field Recognition Rules.
• Check Repeated On Save
If checked, cb2Bib looks for existing references in the BibTeX directory similar to the one being saved. The search is based on exact cite ID match, or on reference contents, by considering title and author field values, or, if empty, booktitle and editor, and using the approximate string search pattern. If similar references are found, the current reference is not saved, and the similar ones are displayed. Pressing the save button one second time will proceed to actually saving the current reference. Note that this feature is not applied in command line mode, when using cb2bib --txt2bib or cb2bib --doc2bib. See also Additional, Keyboard Functionality.
• External BibTeX Postprocessing
Use this box to select a BibTeX postprocessing external tool. The name of the executable, the command arguments and the output file extension are required fields. Arguments, any number, are passed to the executable. For the sake of generality, it is required to specify the %finput and %foutput placeholders. The first one is later substituted by the current BibTeX filename. The second one is substituted by the current filename with the specified output extension. Caution: Be careful if using the same file extension for input and output, e.g., using bib because you want to use a beautifier or a sorting script. The cb2Bib has no control on external disk modifications. Therefore, if the script failed, the input data would possibly be lost. See also Additional, Keyboard Functionality.

## Configuring Clipboard

• Replace/Remove from Input Stream
If checked, input stream is preprocessed by performing a customizable set of string substitutions/removals. This option is mainly intended to remove image HTML alt tags. Although not visible, alt tags reach the clipboard when selecting and copying text. Author lists with email icons may contain alt strings that would interfere with the author names processing. In addition, this option is also appropriate to help translating special characters to Unicode and LaTeX. Use it carefully, as to avoid unwanted or unsuspected substitutions. See also Extracting data from the clipboard.
• External Clipboard Preparsing Command
Preparses input stream through an external, user-defined tool. Use the box bellow to specify its name and path. cb2Bib executes the command tool_name tmp_inputfile tmp_outputfile. You might consider a wrapper shell script to fullfill this particular syntax requirement. Two examples, isi2bib and ris2bib are provided. To test them, make sure the BibUtils Package is available on your machine. Otherwise, modify these scripts according to your needs. See also Additional, Keyboard Functionality, Extracting data from the clipboard, and the examples ISI Reference Format and RIS Reference Format.
• Perform always, as part of an automatic extraction
Performs preparsing each time the recognition engine is invoked. Caution: cb2Bib, when not in disconnected mode, starts the recognition engine each time the clipboard changes. Thus, it might send arbitrary data to the external parsing tool. The tool might not be prepared to handle 'any data' and might fall into a sort of 'infinite loop'. cb2Bib kills the external tool after a reasonable waiting. But, if the tool is called through a wrapper script, killing the script will not end the tool itself. Therefore, check this box only when needed. If you write your own preparser, design it as to write no data to output file whenever it can not process an input properly. When the preparser produces no data, the cb2Bib sends instead the input stream to the recognition engine. In this way, preparsing and normal cb2Bib functioning will work harmoniously.
• Do not show log
If unchecked, the external process messages, and the input and output streams are shown in a log window. Showing output logs is useful for debugging purposes.

## Configuring Documents

• Rename and Copy/Move document files to Directory
If selected, each file 'drag and dropped' onto the cb2Bib main window is renamed to DocumentID.pdf (or DocumentID.ps, DocumentID.dvi, etc.) and moved to the storage directory. If unselected, the file URL is written to the file BibTeX keyword, without any renaming or moving of the file. The actual copy/move action is scheduled and performed once the reference is accepted, e.g., once it is saved.
• Copy or Move document files
Choose whether copy or move Network Files dropped onto the cb2Bib main window. See also Use External Network Client.
• Set directory relative to the BibTeX File Directory
If checked, the document file is copied/moved to the current BibTeX file directory. If the Documents Directory box contains a relative directory it will be added to the file name. For example, if it contains articles, files will be copied to /current_bibtex_path/articles/. An absolute path in the Documents Directory box will be ignored in this context. Note that the file dialog returns here relative file addresses. Consequently, only the necessary portion of the full name, instead of the fullpath filename, is written to the BibTeX entry. File retrieving from within the cb2Bib browser will be relative to the BibTeX file absolute location.
Use this option if you plan to store in a same or a related directory the BibTeX and document files. This option is appropriate for storing bibliographic collections in removal devices. Likewise, when the cb2Bib is launched in USB mode, by means of the command line switch '--conf', the alternate option is not available. See Release Note cb2Bib 0.8.4 and Export Selected Entries.
• Insert BibTeX metadata to document files
• DocumentID Pattern
Specifies the pattern for formatting the document's filenames. Predefined placeholders are available as a context menu, by right-clicking this edit line. Placeholders will be substituted by the actual reference field values. See Predefined cite and document ID placeholders for descriptions.
The cb2Bib uses ExifTool for writing bibliographic metadata to the attached documents. Select here the ExifTool path name. On Windows, remember renaming exiftool(-k).exe to exiftool.exe for command line use. See also Writing metadata.

## Configuring Files

• Journal Abbreviation List File
This file contains a list of journal names equivalences: a capital-letter acronym, standard abbreviated form, and full name of the journal. If an input journal name is recognized, cb2Bib will use the standard abbreviated form for the journal bibkey. If your usual journal were not within the distributed, default abbreviations.txt, you could edit this file, or point to a personalized abbreviation file. Note: Changes in the abbreviation file only take place after reestarting cb2Bib.
• Regular Expression List File
The cb2Bib distribution includes the file regexps.txt with a few set of rules for reference extraction. This includes most of the scientific literature. Extracting from email alerts or publisher abstract pages is a volatile task. Information does not follow a standardized structure. Extraction pattern may then change as often as the web design needs to. Besides, such extraction from the clipboard is system dependent, in a way that produces different formatting of the text copies on different systems. You can use your personalized regexps.txt file, for testing, debugging -regular expressions are reloaded each time the automatic recognition engine executes-, and fullfiling your particular extraction needs.
• Bookmarks and Network Query Info File
The cb2Bib distribution includes the file netqinf.txt that contains bookmarks data, and server related information for bibliographic querying. Note that the cb2Bib treats bibliographic queries as generalized net bookmarks. This allows accessing almost any online bibliographic resource. Check this file for implementations details and customization.
• Browser Cascading Style Sheet (CSS)
This file contains the style sheet to configure the appearance of the bibliographic references when viewed in browser mode. The cb2Bib distribution includes the references.css and references-dark.css file as a CSS examples.
• Part Of Speech (POS) Lexicon
This box must contain the address to the cb2Bib distribution file lexicon.pos. This file contains a set of patterns and related POS information required to Index Documents, i. e., to extract keywords from documents for the c2bCiter module.
• Search In Files Cache Directory
Directory containing internal data for Search In Files functionality. If an existing directory is selected the cb2Bib will write all internal data on it. If otherwise, cache data will be written on the same directory from where BibTeX are searched. It might be, therefore, convenient to group all this files in a separate directory that does not need to be backup, and that can easily be deleted whenever desired.

## Configuring Fonts

• Font Selector
Selects the main window and editor font family and size.
• Context Colors
Doubleclick on context color items to select syntax highlighter font color. Besides syntax highlighting, and to ease manual bibliographic extractions, cb2Bib has the following coloring convention. 'cb2Bib unrelevant text' colors non-word, non-digit, and cb2Bib's internal tags. 'cb2Bib relevant text' refers to the reference's year. 'cb2Bib highly relevant' attempts to guess text sectioning, highlighting 'abstract', 'introduction', and 'keywords'.

## Configuring Network

• Use External Network Client
The cb2Bib manages local and network files in an equivalent manner. Network file retrieving, however, requires sometimes password and/or cookies administration. The KDE desktop incorporates kfmclient utility. A command kfmclient (copy|move|exec) source [destination] permits copying or moving files, with kfmclient taking care of advanced browsing preferences. By checking this box, cb2Bib will use the specified file manger client.
• Use Proxy
If checked, the cb2Bib will access the network through a proxy host. Set the Host name, the Port, and the proxy Type. A login dialog will appear if the proxy requires authentication. Login data is not stored, it must be entered at each session.
• Perform Network Queries after automatic reference extractions
Network queries can be used to complete a partial reference extraction. For instance, provided a reference 'J. Name, 25, 103' and an appropriate pattern to extract it, cb2Bib will attempt to complete the reference automatically. No query is performed if automatic reference extraction was tagged as BibTeX.
If checked, cb2Bib downloads document files to the directory specified in Rename and Copy/Move document files to Directory. See also the file netqinf.txt for details. Download is scheduled and performed once the reference is accepted, e.g., once it is saved. Note that when document file is local, e.g., when PDFImport or switch --doc2bib is used, no document is downloaded.
• Keep Query temporary files (Debug Only)
cb2Bib may use up to three temporary files to perform a network query. If this box is checked, the temporary files are not deleted. This facilitates the testing and customization of the information file netqinf.txt.

## Configuring Shortcuts

• Customizes most key sequences for actions shortcuts. Concretely, cb2Bib specific actions are configurable, but not standard actions such as 'Open', 'Exit', 'Copy', or 'Paste', which are already predefined to the standard, specific key sequences for each platform. Shortcuts are customizable for the cb2Bib main panel, editor, and reference list actions. Single-key shortcuts, i.e., for manual reference extraction and shortcuts in c2bCiter, are non-configurable, since they they closely map non-translatable BibTeX keywords.

## Configuring Utilities

• To plain text converter
Selects the external some_format_to_text tool that cb2Bib uses to convert document files prior to reference extraction and searching. cb2Bib executes the line command converter [options] inputfile tmp_output.txt, where [options] are user defined arguments. As a default, cb2Bib launches pdf2cb, a modified PDF to text utility found in the XPDF package. Modifications are available at xpdf/ directory in the cb2Bib sources. Default arguments are -q -f 1 -l 1 to extract only the first, title page when used within PDFImport, and -q, to convert the complete document when used within Search in Files. Appropriate for PDFImport could also be a document metadata extractor. Often metadata contains structured information regarding document authors, title, and source. A simple shell script wrapper could be the following any2text_search:
   #!/bin/csh
# Convert documents to text according to filename extension
# any2text_search input_fn.ext output_fn.txt
set ext = $1:e if ($ext == 'djvu' ) then
/usr/bin/djvutxt "$1" "$2"
if ($status) exit 1 else if ($ext == 'chm' ) then
(/usr/local/bin/archmage -c text "$1" "$2") >& /dev/null
if ($status) exit 1 else # If using pdf2cb /path/to/pdf2cb -q "$1" "$2" # If using pdftotex # /usr/bin/pdftotext -enc UTF-8 "$1" "$2" if ($status) exit 1
endif