Top Description Inners Fields Constructors Methods
org.jabref.latexconv

public final Record ConversionOptions

extends Record
Class Inheritance
Record Components
convertScripts:boolean
whether \textsuperscript{..}, \textsubscript{..}, and math ^/_ are converted to Unicode super-/subscript characters. Disable to keep them verbatim so that a later Unicode→LaTeX conversion can round-trip (see JabRef issue 3644)
mathMode:ConversionOptions.MathMode
how $...$ / \[...\] spans are handled
unknownCommandPolicy:ConversionOptions.UnknownCommandPolicy
how commands absent from the conversion table are handled

Tuning knobs for LaTeX conversions. Obtain via defaults() and derive variants with the with* methods.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
ConversionOptions.MathMode

Handling of math spans.

public static enum
ConversionOptions.UnknownCommandPolicy

Handling of commands that neither the parser's vocabulary nor the conversion table covers.

Field Summary

Modifier and TypeField and Description
private final boolean
convertScripts

Record Component accessed by convertScripts().

whether \textsuperscript{..}, \textsubscript{..}, and math ^/_ are converted to Unicode super-/subscript characters.
private final ConversionOptions.MathMode
mathMode

Record Component accessed by mathMode().

how $...$ / \[...\] spans are handled
private final ConversionOptions.UnknownCommandPolicy
unknownCommandPolicy

Record Component accessed by unknownCommandPolicy().

how commands absent from the conversion table are handled

Constructor Summary

AccessConstructor and Description
public
ConversionOptions(boolean convertScripts, ConversionOptions.MathMode mathMode, ConversionOptions.UnknownCommandPolicy unknownCommandPolicy)

Method Summary

Modifier and TypeMethod and Description
public boolean
convertScripts()

Record Component getter of convertScripts.

Record Component whether \textsuperscript{..}, \textsubscript{..}, and math ^/_ are converted to Unicode super-/subscript characters.

public static ConversionOptions
public final boolean
equals(Object o)

Implements abstract java.lang.Record.equals.

Indicates whether some other object is "equal to" this one.

public final int
hashCode()

Implements abstract java.lang.Record.hashCode.

Returns a hash code value for the record.

public ConversionOptions.MathMode
mathMode()

Record Component getter of mathMode.

Record Component how $...$ / \[...\] spans are handled

public final String
toString()

Implements abstract java.lang.Record.toString.

Returns a string representation of the record.

public ConversionOptions.UnknownCommandPolicy
unknownCommandPolicy()

Record Component getter of unknownCommandPolicy.

Record Component how commands absent from the conversion table are handled

public ConversionOptions
withConvertScripts(boolean convertScripts)

public ConversionOptions
public ConversionOptions

Field Detail

convertScriptsback to summary
private final boolean convertScripts

Record Component accessed by convertScripts().

whether \textsuperscript{..}, \textsubscript{..}, and math ^/_ are converted to Unicode super-/subscript characters. Disable to keep them verbatim so that a later Unicode→LaTeX conversion can round-trip (see JabRef issue 3644)

mathModeback to summary
private final ConversionOptions.MathMode mathMode

Record Component accessed by mathMode().

how $...$ / \[...\] spans are handled

unknownCommandPolicyback to summary
private final ConversionOptions.UnknownCommandPolicy unknownCommandPolicy

Record Component accessed by unknownCommandPolicy().

how commands absent from the conversion table are handled

Constructor Detail

ConversionOptionsback to summary
public ConversionOptions(boolean convertScripts, ConversionOptions.MathMode mathMode, ConversionOptions.UnknownCommandPolicy unknownCommandPolicy)

Method Detail

convertScriptsback to summary
public boolean convertScripts()

Record Component getter of convertScripts.

Record Component
whether \textsuperscript{..}, \textsubscript{..}, and math ^/_ are converted to Unicode super-/subscript characters. Disable to keep them verbatim so that a later Unicode→LaTeX conversion can round-trip (see JabRef issue 3644)
defaultsback to summary
public static ConversionOptions defaults()

convertScripts = true, MathMode#UNICODE, UnknownCommandPolicy#KEEP_COMMAND.

equalsback to summary
public final boolean equals(Object o)

Implements abstract java.lang.Record.equals.

Doc from java.lang.Record.equals.

Indicates whether some other object is "equal to" this one. In addition to the general contract of Object.equals, record classes must further obey the invariant that when a record instance is "copied" by passing the result of the record component accessor methods to the canonical constructor, as follows:

    R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
hashCodeback to summary
public final int hashCode()

Implements abstract java.lang.Record.hashCode.

Doc from java.lang.Record.hashCode.

Returns a hash code value for the record. Obeys the general contract of Object.hashCode. For records, hashing behavior is constrained by the refined contract of Record.equals, so that any two records created from the same components must have the same hash code.

mathModeback to summary
public ConversionOptions.MathMode mathMode()

Record Component getter of mathMode.

Record Component
how $...$ / \[...\] spans are handled
toStringback to summary
public final String toString()

Implements abstract java.lang.Record.toString.

Doc from java.lang.Record.toString.

Returns a string representation of the record. In accordance with the general contract of Object#toString(), the toString method returns a string that "textually represents" this record. The result should be a concise but informative representation that is easy for a person to read.

In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.

unknownCommandPolicyback to summary
public ConversionOptions.UnknownCommandPolicy unknownCommandPolicy()

Record Component getter of unknownCommandPolicy.

Record Component
how commands absent from the conversion table are handled
withConvertScriptsback to summary
public ConversionOptions withConvertScripts(boolean convertScripts)
withMathModeback to summary
public ConversionOptions withMathMode(ConversionOptions.MathMode mathMode)
withUnknownCommandPolicyback to summary
public ConversionOptions withUnknownCommandPolicy(ConversionOptions.UnknownCommandPolicy unknownCommandPolicy)
org.jabref.latexconv back to summary

public final Enum ConversionOptions.MathMode

extends Enum<ConversionOptions.MathMode>
Class Inheritance

Handling of math spans.

Field Summary

Modifier and TypeField and Description
public static final ConversionOptions.MathMode
PASSTHROUGH

Math spans are emitted verbatim, delimiters included, for a downstream math renderer

public static final ConversionOptions.MathMode
UNICODE

Best-effort conversion of math content to Unicode ($\pi$ → π)

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static ConversionOptions.MathMode
public static ConversionOptions.MathMode[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

PASSTHROUGHback to summary
public static final ConversionOptions.MathMode PASSTHROUGH

Math spans are emitted verbatim, delimiters included, for a downstream math renderer

UNICODEback to summary
public static final ConversionOptions.MathMode UNICODE

Best-effort conversion of math content to Unicode ($\pi$ → π)

Constructor Detail

MathModeback to summary
private MathMode()

Method Detail

valueOfback to summary
public static ConversionOptions.MathMode valueOf(String name)
valuesback to summary
public static ConversionOptions.MathMode[] values()
org.jabref.latexconv back to summary

public final Enum ConversionOptions.UnknownCommandPolicy

extends Enum<ConversionOptions.UnknownCommandPolicy>
Class Inheritance

Handling of commands that neither the parser's vocabulary nor the conversion table covers.

Field Summary

Modifier and TypeField and Description
public static final ConversionOptions.UnknownCommandPolicy
DROP

Drop the command including its arguments

public static final ConversionOptions.UnknownCommandPolicy
KEEP_COMMAND

Emit the command and its brace arguments exactly as written (\aaaa{bbbb})

public static final ConversionOptions.UnknownCommandPolicy
UNWRAP

Drop the command but keep its argument content (\aaaa{bbbb} → bbbb)

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static ConversionOptions.UnknownCommandPolicy
public static ConversionOptions.UnknownCommandPolicy[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

DROPback to summary
public static final ConversionOptions.UnknownCommandPolicy DROP

Drop the command including its arguments

KEEP_COMMANDback to summary
public static final ConversionOptions.UnknownCommandPolicy KEEP_COMMAND

Emit the command and its brace arguments exactly as written (\aaaa{bbbb})

UNWRAPback to summary
public static final ConversionOptions.UnknownCommandPolicy UNWRAP

Drop the command but keep its argument content (\aaaa{bbbb} → bbbb)

Constructor Detail

UnknownCommandPolicyback to summary
private UnknownCommandPolicy()

Method Detail

valueOfback to summary
public static ConversionOptions.UnknownCommandPolicy valueOf(String name)
valuesback to summary
public static ConversionOptions.UnknownCommandPolicy[] values()