Skip to content

Commit

Permalink
Refine information on String constants
Browse files Browse the repository at this point in the history
  • Loading branch information
koppor authored Nov 8, 2019
1 parent 5cb9bbc commit 51e065d
Showing 1 changed file with 48 additions and 4 deletions.
52 changes: 48 additions & 4 deletions en/Strings.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,55 @@ helpCategories: ["Fields"]

*BibTeX* supports storing constant strings using `@String {key = value}`. JabRef supports managing them using **BibTeX → Edit strings**, which opens the [String Editor](StringEditor). These values can be used in fields. For example, you can have:

@String { kopp = "Kopp, Oliver" }
@String { kubovy = "Kubovy, Jan" }
@String { et = " and " }
```bibtex
@String { kopp = "Kopp, Oliver" }
@String { kubovy = "Kubovy, Jan" }
@String { et = " and " }
```

and then in some entry for example:

```bibtex
@Misc{m1,
author = kopp # et # kubovy,
}
```

or

```bibtex
@Misc{m2,
author = kopp # " and " # kubovy,
}
```

and then in some entry for example: `@Misc{m1, author = kopp # et # kubovy }` or `@Misc{m2, author = kopp # " and " # kubovy }`.
In the JabRef field editor, the author has to be inserted as `#kopp# #et# #kubovy#` or `#kopp# and #kubovy#`.

## Rendering of constants in JabRef's entry editor

Strings are rendered specially in the entry editor.
This is especially important in the case of months.
For instance, take the following BibTeX entry:

```bibtex
@Misc{m3,
month = may,
}
```

In JabRef, the entry editor then displays `#may#`.
In case the entry editor just displays `may`, this is written as follows:

```bibtex
@Misc{m4,
month = {may},
}
```

In other words: The character `#` indicates something special in the entry editor.

## JabRef's typed Strings

JabRef enhances the concept of Strings to add a type to those `@String`s.
The issue is how to preserve such type of a string in a BibTeX file.
JabRef adds the type though prefixes:
Expand All @@ -33,4 +75,6 @@ It can also happen that you will have the same institution for more types:

Even if the last example may appear contradicting the intention was to remove duplicity and unify the names of persons and institutions.

## Further reading

See <https://tex.stackexchange.com/questions/303467/bibliography-contents-journal-names-not-abbreviated-even-with-ieeeabrv/303489#303489> for a MWE for string constants.

0 comments on commit 51e065d

Please sign in to comment.