I would like to typeset an operator like the one used to specify substitutions of variables with values in computer science. This is a sketch, just keep in mind that all this should span about on a single line, not two:

```
v /
/ x
v1, v_2 /
/ x1, x2
```

Obviously a simple `v/x`

does not solve my problem, since `v`

and `x`

are written on the same exact line while I would like to have them smaller, with the `v`

part aligned to the top of the `/`

and the `x`

aligned to the bottom.

Can you help me solving my problem please?

## Best Answer

It seems like you might be after so-called "vulgar fractions". One such package that provides this is

`xfrac`

by means of`\sfrac{<num>}{<denom>}`

. A similar functionality is provided by`nicefrac`

that supplies an analogous`\nicefrac{<num>}{<denom>}`

. With package options one is also able to choose between "ugly" and "nice" (default) fractions. And finally there's`faktor`

that produces similar-style fractions using`\faktor{<num>}{<denom>}`

(it requires the`amssymb`

package though). Here are some comparisons:The choice of

`lmodern`

was because of minor font substitutions when it comes to typesetting the denominator & numerator. It is also possible to write a macro that would typeset these respective entries differently, if needed. My choice of`\mathbf{...}`

for the numerator was just a style choice.