X-Git-Url: https://git.toastfreeware.priv.at/debian/jabref.git/blobdiff_plain/0ebad218c247b05e6962fae9bbc089f0a4015e4c..a872b88085ac404d82a5fefbcff00c0ffe43071c:/src/help/CustomExports.html diff --git a/src/help/CustomExports.html b/src/help/CustomExports.html index 07d468d..29d4f69 100644 --- a/src/help/CustomExports.html +++ b/src/help/CustomExports.html @@ -99,9 +99,13 @@ This can be useful for some fomatters, e.g. the CurrentDate formatter (described

If none of the available formatters can do what you want to achieve, you can add your own by implementing @@ -127,7 +153,67 @@ to have been run earlier. into the net.sf.jabref.export.layout.format package, you can call the formatter by its class name only, like with the standard formatters. Otherwise, you must call the formatter by its fully qualified name (including package name). In any case, the formatter must be in your classpath when running - JabRef. + JabRef.

+ + +

Using Custom Name Formatters

+ +

With JabRef 2.2 it is now possible to define custom name formatters using the bibtex-sty-file syntax. +This allows ultimate flexibility, but is a cumbersome to write

+

You can define your own formatter in the preference tab "Name Formatter" using the following format +and then use it with the name given to it as any other name formatter

+ + + <case1>@<range11>@<format>@<range12>@<format>@<range13>...@@
+ <case2>@<range21>@... and so on. +
+ +

This format first splits the task to format a list of author into cases depending on +how many authors there are (this is since some formats differ depending on how many authors there are). +Each individual case is separated by @@ and contains instructions on how to format each author in the case. +These instructions are separated by a @.

+

Cases are identified using integers (1,2,3,etc.) or the character * (matches any number of authors) and will tell +the formatter to apply the following instructions if there are a number of less or equal of authors given. +

+

+ Ranges are either <integer>..<integer>, <integer> or the character * using a 1 based index for indexing + authors from the given list of authors. Integer indexes can be negative to denote them to start from + the end of the list where -1 is the last author. +

+ +

For instance with an authorlist of "Joe Doe and Mary Jane and Bruce Bar and Arthur Kay":

+ + +

The <format>-strings use the Bibtex formatter format:

+ +

+ The four letter v, f, l, j indicate the name parts von, first, last, jr which + are used within curly braces. A single letter v, f, l, j indicates that the name should be abbreviated. + If one of these letters or letter pairs is encountered JabRef will output all the respective names + (possibly abbreviated), but the whole expression in curly braces is only printed if the name part exists.

+ +

For instance if the format is "{ll} {vv {von Part}} {ff}" and the names are "Mary Kay and John von Neumann", + then JabRef will output "Kay Mary" (with two space between last and first) and "Neuman von von Part John".

+ +

I give two examples but would rather point you to the bibtex documentation.

+ +

Small example: "{ll}, {f.}" will turn "Joe Doe" into "Doe, J."

+ +

Large example:

+
+

To turn:

+

"Joe Doe and Mary Jane and Bruce Bar and Arthur Kay"

+

into

+

"Doe, J., Jane, M., Bar, B. and Kay, A."

+

you would use

+

1@*@{ll}, {f}.@@2@1@{ll}, {f}.@2@ and {ll}, {f}.@@*@1..-3@{ll}, {f}., @-2@{ll}, {f}.@-1@ and {ll}, {f}.

+
+

If somebody would like to write a better tutorial about this: Write a mail to one of the JabRef mailinglists!

Conditional output

@@ -159,7 +245,7 @@ field referred in the curly braces has changed value. your entries based on keyword. Now use the following commands to group by keyword:

\begingroup{keywords}New Category: \format[HTMLChars]{\keywords} -
\endgroup{keywords}
+
\endgroup{keywords}

Sharing your work