wanglongqi/WriteTeX

Problem using the fourier package

jmcarm opened this issue · 6 comments

Many thanks for writing this package, it is really useful.
I have the following issue:
When using the fourier package in the preamble (in order to use the Utopia font) something weird happens: the equals sign ("=") does not appear in the equations.
Accoding to https://tex.stackexchange.com/questions/196025/sign-not-properly-displayed
this may be due to a conflict between the fourier package and the lmodern package. However, I do not know how to implement the solution showed there.
2017-11-22_1212

Can try to use preamble file instead of "trade above as contents". Giving a path for the preamble file, and implementing the solution on stack overflow.

Thanks for the quick answer. I have tried a preamble file, but the result is the same. The proposed solution on stack overflow is that "The problem are the packages fourier and lmodern. You have lo load lmodern before fourier". However, I do not use the package lmodern. Is it possible that this package is loaded by the script writetex.py after my entry of fourier? In fact, reading the code of writetex.py, I guess the only package loaded by writetex.py is geometry.sty, is that right? I have tried also to put \usepackage{fourier} directly on writetex.py after or before \usepackage{geometry} (to see whether there might be some incompatibility between both packages) but the result is the same.

Because this plugin only automating the work flow, you problem should be something wrong with the TeX code. You can first try to produce the result you want in a TeX file, then copy to the plugin.

The TeX code is very simple:
\usepackage{fourier} in the preamble, and
$a=2$ in the body of the TeX file.
Compiling this outside the WriteTex plugin displays this equation correctly; inside WriteTex, however, the "=" sign disappears.
Thank you in any case for your fantastic plugin.

I have tried again your idea of trying to produce first the result in a TeX file. The problem I find is that the Preamble File that WriteTeX asks for is not completely independent of writetex.py. For example, I write the file header.inc, put it in the extensions folder of Inkscape (where I have writetex.py) and ask WriteTeX to load it by putting "header.inc" in the field "Preamble File". My "header.inc" file starts with "\documentclass{memoir}". When I run WriteTeX, it gives the message

"C:\Program Files\MiKTeX 2.9\tex\latex\base\article.cls"
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
! LaTeX Error: Two \documentclass or \documentstyle commands.
See the LaTeX manual or LaTeX Companion for explanation.
Type H for immediate help.
l.4 \documentclass{
memoir}

Therefore, WriteTeX loads something (at least the documentclass) before executing the Preamble File. Since I do not know what exactly WriteTeX loads (which packages) before executing the Preamble, I cannot tell it to reproduce exactly the code that works independently in a TeX file.

If this is the case, I think the problem maybe from the document class. You can try to change the template lines in writetex.py to see whether the symbol can display.