0

I'm wondering if there is a way to write the name of a windows file by using LaTeX. I looked for a solution online, but without success. For example, for a pdf file, I'd like to write the name in LaTeX and the extension should be .pdf.

  • Trying to clarify the question: (1) You are writing LaTeX on Windows and would like to have some code in the .tex file that prints its own filename (or the name of the resulting pdf), automatically, in the pdf document? (2) You would like to manually type an arbitrary file name in LaTeX and have it displayed in a specific format? Or (3) some other request? – marquinho Feb 06 '22 at 10:42
  • Hello @marquinho I'm going to explain better the question: imagine to create a new .txt file on your desktop and to rename it pippo.txt. My goal is to rename it by inserting a LaTeX formula in its name, for example x^2.txt or \int{x^2}.txt etc – Gennaro Arguzzi Feb 06 '22 at 10:45
  • 1
    your question is very hard to understand and does not appear to be about latex a all but about the windows filesystem are you just asking if it is possible to have a file with name x^2.pdf in Windows? – David Carlisle Feb 06 '22 at 10:49
  • Hi @DavidCarlisle yes this is my question. Sorry for the confusion. – Gennaro Arguzzi Feb 06 '22 at 10:50
  • 1
    why do you need to ask here (it's mostly off topic here) just right click on a file in the windows file explorer and rename the file, if you try an illegal name (eg with ") it will tell you, if the name is legal the file will be renamed – David Carlisle Feb 06 '22 at 10:55
  • @DavidCarlisle Maybe someone knows a workaround to write the name of a file in LaTeX (which is for sure illegal) by modifying something in Windows. I posted the question here because on other forums it's difficult to find latex experts. Do you think that I should migrate the question? – Gennaro Arguzzi Feb 06 '22 at 10:58
  • 1
    I do not think the question is related to latex at all is it? are you not just asking if ^ , { and } are legal in windows filenames, You can not use \ as that is the directory separator. – David Carlisle Feb 06 '22 at 11:01
  • @DavidCarlisle yes, it's not directly related to latex, but indirectly because the goal is to write in latex a file name in Windows. For this reason I used only the Windows tag. – Gennaro Arguzzi Feb 06 '22 at 11:05
  • given that a\log b is the file log b in the folder a it is clear that you can only use a very limited subset (you can have a file x^2.pdf if you want though as far as I can see – David Carlisle Feb 06 '22 at 11:40

0 Answers0