I'm trying to change a font size at some arbitrary point in my document, and I'm using pylatex to create the file. I've gotten it to change manually by putting after the header:
\begin{document}%
\fontsize{15}{12}\selectfont
However when pylatex creates the file it puts in:
\begin{document}%
\normalsize%
\fontsize{15}{12}%
I've manually tested it by taking our \normalsize%
and the font changes. How do I get rid of `normalsize? Also, is there a better way to do this?
Here's my code:
doc = pylatex.Document('basic',inputenc = 'utf8x', lmodern = False, fontenc = None, textcomp = None)
packages = [Package('babel', options = ['english', 'hebrew']), Package('inputenc', options = 'utf8enc')]
doc.packages.append(Package('babel', options = ['english', 'hebrew']))
doc.preamble.append(pylatex.Command('selectlanguage', 'hebrew'))
doc.append(pylatex.Command('fontsize', arguments = ['15', '12']))
doc.append(text[0].decode('utf-8'))
doc.append(pylatex.Command('selectlanguage', 'english'))
doc.append(text[1].decode('utf-8'))
doc.generate_pdf(clean_tex=False, compiler = "pdflatex ")
doc.generate_tex()
.tex
document showing what you want to do? – cfr Aug 9 '17 at 22:57\selectfont
? Does the wrapper throw that away for some reason? That seems rather problematic. – cfr Aug 9 '17 at 22:58\fontsize{15}{12}
you get a 15pt font over a baseline skip of 12pt, so you will get variability in the distance between the baselines depending on ascenders or descenders. Have you a particular reason for doing so? – egreg Aug 11 '17 at 8:18