Skip to main content
Routine clean-up
Source Link
m_goldberg
  • 108.2k
  • 16
  • 104
  • 259

ToString: how to How can I convert fractionsa fraction to a string that can be used in a file name?

Simple as that, I tried to look up something but didn't find anything useful.

I want to putadd an index to the file names of my exported images, so I'm using ToString, but it's a bit of. But I have a problem when my index is a fraction, asbecause then the filenamegenerated file name includes characters not recognised by my system.

Is it possible to make $2\pi/5$ become, for example, 2Pi--5 or something similar when put into ToStringconverting it to a string?

ToString: how to convert fractions

Simple as that, I tried to look up something but didn't find anything useful.

I want to put an index to my exported images, so I'm using ToString, but it's a bit of a problem when my index is a fraction, as the filename includes characters not recognised by my system.

Is it possible to make $2\pi/5$ become, for example, 2Pi--5 or something similar when put into ToString?

How can I convert a fraction to a string that can be used in a file name?

I want add an index to the file names of my exported images, so I'm using ToString. But I have a problem when my index is a fraction, because then the generated file name includes characters not recognised by my system.

Is it possible to make $2\pi/5$ become, for example, 2Pi--5 or something similar when converting it to a string?

Source Link
Enzo
  • 361
  • 1
  • 15

ToString: how to convert fractions

Simple as that, I tried to look up something but didn't find anything useful.

I want to put an index to my exported images, so I'm using ToString, but it's a bit of a problem when my index is a fraction, as the filename includes characters not recognised by my system.

Is it possible to make $2\pi/5$ become, for example, 2Pi--5 or something similar when put into ToString?