Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fontenc and inputenc should not be included #356

Open
petaflot opened this issue Sep 22, 2022 · 0 comments
Open

fontenc and inputenc should not be included #356

petaflot opened this issue Sep 22, 2022 · 0 comments

Comments

@petaflot
Copy link

I am using pylatex -> xelatex to generate some documents ; I notice that some symbols are not rendered correctly : in the present case, a ² (two as exponent) is rendered as an 'e' with a bottom-pointing hat (almost like ê but not quite). similarly, the ° (symbol used iie. for celsius degrees) is shown as an 'r' with the same downwards hat.

From a discussion on #latex (see below), it seems that

usepackage[T1]{fontenc}

and

usepackage[utf8]{inputenc}

must not be added to the tex file

22:45 < hrnz> leslie-bot only tries to compile files from the pastebin in the topic automatically
22:45 < hrnz> and the file doesn't look fine
22:46 < hrnz> @cx https://dpaste.com/EZT3Q5LVQ.txt
22:46 < leslie-bot> hrnz: The build failed. The build log is https://tex.builders/pue5d_nk.log
22:46 < hrnz> looks like something tries to interpret \ escape sequences in strings
22:48 < pavonia> As for the issues above, the cause seems to be \usepackage[T1]{fontenc}
22:48 < petaflot> on my machine it builds... no errors at all except those two characters
22:48 < pavonia> \usepackage[utf8]{inputenc} is als unnecessary, if not wrong
22:50 < petaflot> a while back, when I was writing my tex files manually, I found it to be absolultely necessary. if that has changed, I did not 
                  specify any encoding in my python script so it must have to do with pylatex
22:51 < petaflot> I manually deleted those two lines, and it works
22:52 < pavonia> Well, xelatex is different from pdflatex. It's necessary in pdflatex
22:53 < hrnz> (\usepackage[T1]{fontenc}, [utf8]inputenc is preloaded these days)
22:53 < hrnz> and "neccessary" also is debatable
22:54 < hrnz> both OT1 and T1 have drawbacks
22:54 < hrnz> so it's best to avoid them both :>

there.. it's almost fixed :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant