-
Notifications
You must be signed in to change notification settings - Fork 81
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
Weird interaction with lots of previous equations when generating PDF - flextable "fails" #636
Comments
I tried removing equations in turn, and it fails with a particular equation (as seen in the revised MWE). This equation tried to render a subscript symbol (theta). |
And the "winner" is a simple equation of The error must be caused when the font for "exp" conflicts somehow with the font specification used by flextable if flextable calls occurs after this. Again, if I put a call to flextable before the equation by changing the include: false to include: true , everything works out fine Very odd. Carl. |
Just adding a comment to confirm that I experienced this with the \ln tex command when rendering to pdf. Equations without this work fine, but running a document with flextables as well as equations with \ln fail with a similar error message to the above. |
I experience the same problem. My document compiles without issues when I remove the equations but fails as soon as I introduce them. |
I suspect that it will fail any time you use a "function" in latex such as
sin, cos etc that uses the roman font when typesetting...
Carl
…On Wed, Aug 28, 2024 at 9:36 AM Arthur Heim ***@***.***> wrote:
Just adding a comment to confirm that I experienced this with the \ln tex
command when rendering to pdf. Equations without this work fine, but
running a document with flextables as well as equations with \ln fail with
a similar error message to the above.
I experience the same problem. My document compiles without issues when I
remove the equations but fails as soon as I introduce them.
—
Reply to this email directly, view it on GitHub
<#636 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABXIXRV2FFSHT2VBQP2NHQLZTX4BLAVCNFSM6AAAAABIQFJMEKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJVHAYTAMJZGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
@cschwarz-stat-sfu-ca My knowledge of latex is not great, do you have any idea of what to do to solve this problem? |
Sorry, but this is above my pay-grade.
From what I understand, math fonts are treated differently in latex than
other fonts and this may the root of the issue. However, that is just a
guess.
About all I can suggest is to construct a small .tex file that crashes and
try submitting to the tex stackexchange groups for advice.
Carl
…On Mon, Sep 2, 2024 at 3:00 PM David Gohel ***@***.***> wrote:
@cschwarz-stat-sfu-ca <https://github.com/cschwarz-stat-sfu-ca> My
knowledge of latex is not great, do you have any idea of what to do to
solve this problem?
—
Reply to this email directly, view it on GitHub
<#636 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABXIXRSPFANVM3TF6YD5IADZUTNZLAVCNFSM6AAAAABIQFJMEKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRVGMZTENBVHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Very strange issue that appears to be flextable related.
I have a quarto document (included at end). Compiles fine into HTML.
When I try and compile into PDF, I get a LateX error:
==> quarto preview testing2.qmd --to pdf --no-watch-inputs --no-browse
....
Rendering PDF
running xelatex - 1
This is XeTeX, Version 3.141592653-2.6-0.999995 (TeX Live 2023) (preloaded format=xelatex)
restricted \write18 enabled.
entering extended mode
updating tlmgr
updating existing packages
ERROR:
compilation failed- error
Extra \else.
\SetMathAlphabet ...g #1\space \endcsname #1\else
@latex@error {Encoding sc...
l.304 ...{\global\setmainfont{Helvetica}{speed}}}}
& \multicolumn{1}{>{\ragg...
see testing2.log for more information.
THe log file has the following error message:
...
LaTeX Font Info: Overwriting math alphabet
\mathrm' in version
normal'(Font) non@alpherr\relax \GenericError { }{LaTeX
Error: \mathrm allowed only in math mode}{See the LaTeX manual or LaTeX Compan
ion for explanation.}{You're in trouble here. Try typing to proceed
.
(Font) If that doesn't work, type X to quit.}\math@bgro
up __um_switch_to:n {literal}_um_mathgroup_set:n {6}\egroup \math@bgroup _
um_switch_to:n {literal}__um_mathgroup_set:n {6}-\egroup -> TU/Helvetica(1)/m/
n on input line 323.
! Extra \else.
\SetMathAlphabet ...g #1\space \endcsname #1\else
@latex@error {Encoding sc...
l.323 ...al\setmainfont{Helvetica}{name_model}}}}
& \multicolumn{1}{>{\ragg...
...
This comes from the final flextable call.
If I reduce the number of previous equations, it eventually compiles.
If I run the same chunk BEFORE the equations (e.g. change the third chunk include: to true in the MWE), then it compiles just fine as well.
Session Info
Here is the example file (change suffix from qmd.txt to qmd(
testing2.qmd.txt
The text was updated successfully, but these errors were encountered: