Not sure what your problem may be, the code preceding your problem clearly includes numbers and some special characters without a problem.
Then, I don’t know what the value would be for viewing code in a PDF, it will likely have to be converted to characters format (eg UTF-8) for the code to be useful.
So, perhaps the first question might be what are you using to view the PDF, and if you have the original files presumably in characters format whether that looks correct and works in Mathematica.
I’m making some assumptions about Mathematica because I haven’t used it but assume its most basic requirements should be common to other development environments.
Here is a ‘print-screen’ take of the program Mathematica: https://drive.google.com/open?id=1h_J2fFbrUS2IJ1HZUbTTAebQApin0KCi
In the program the numbers and special characters are printed correctly. The problem seems to be in the numbers of the “answer” of the calculation when the program generates the pdf. The special characters are not printed correctly in the text (PINK areas) and in comments (in RED before calculation)
I obtain the same behaviour in OKULAR, and other pdf viewers, and also in LibreOffice-Draw.
After thinking about this a bit,
I suspect a library related issue. The fact that only some special characters have problems and others not likely supports that suspicion.
Apparently special character rendering in Mathematica is a common issue through several versions, and indeed according to the following ArchWiki for Mathematica, various libraries (character sets) might be used, some system, some provided by the app and others perhaps independently installed. The ArchWiki suggests several ways to re-install or replace libraries, I’d suggest trying each
The information contained is for Mathematica version 9. The file changed a little bit in version 12.0.
The ArchWiki suggests several ways to re-install or replace libraries, I’d suggest trying each
I checked but there is no ‘font-mathematica’ file in version 12.0, as the ArchWicki suggests (or I didn’t find it using "Dolphin’). Also, in Tumbleweed, when I searched for the fonts there is no option for “anti-aliasing”.
Nontheless, I greatly thank you for your advice. Cheers:)
Now I have to ask you what you mean by “print,”
If you’re talking about printing as sending to a display and read by a PDF reader of some kind, then I’m not sure why that should happen, when text is in PDF form, characters are converted to a picture format which should be universally supported.
On the other hand, if by “print” you are talking about sending to a printer or a display that doesn’t support PDFs, then the characters are read from the source (PDF? Something else?) and your application needs to support those characters by installed libraries and configuration (eg UTF-8 which is today’s universal collection of characters).
So, those are the essentials…
You have to be very specific about what the source document is, where it was created in whatever application and in what format.
You need to be clear what you mean by “print”
You need to determine whether the “viewer” app has support for the necessary charactersets used to view the document.
I just need the PDF to look correctly, numbers, characters and from a to z. A “notebook” in Mathematica can be saved as “file.nb” (The format of Mathematica), as “file.pdf”, as “file.ps”, and some other formats. Do you know what libraries do I need to install in order to generate a PDF that looks like the “file.nb”, (which is the 2nd image I up loaded)? The problem appears when I save the notebook as PDF. Part of it is not ‘printed’ like in the original “notebook”.
I’m happy that you’re trying to find a solution for me. Thank you. Cheers.
I don’t know which library might be the critical problem, and even if I did more detailed study, that info might not apply to another person describing your problem because apparently the problem happens to different formats in different Mathematica versions.
You should try going through each troubleshooting attempt described in the ArchLinux link I posted.
Or, if you still have access to your original source info (and Mathematica version), you could try saving to a different format.
This is one reason virtualization can be very useful…
You can do your work in the original application, and keep it around for a long time, past time when you need to upgrade your physical machine.