\noindent Error in compiled LaTex version

83 views
Skip to first unread message

Zheng-Chao Han

unread,
Jun 21, 2021, 4:34:44 PM6/21/21
to PreTeXt support
Hi, 

I am new to PreTeXt. In compiling  a simple PreTeXt file into a LaTeX/pdf file, I ran into an error message:

! Undefined control sequence.
l.386 \noindentHere
                   's one possible general solution (there are multiple, bas...

In examining the generated LaTeX file, I see that line, but don't understand how the PreTeXt engine generated this line. I can manually fix this error in the LaTeX file, but
PreTeXt engine would generate the same error again, if I convert the xml to tex directly. The simple xml file is attached.

I use TeXShop on a Mac. Separately, Richard Koch's instruction on section 5 of his PreTeXt with TeXShop no longer works:

"It isn't even necessary to remember the three magic lines, Place the cursor between the first and second lines and in the Macros pulldown menu select PreTeXt Header. The magic lines will automatically be written to the source."

Following this instruction would place 

% !TEX TS-program = PreTeXt-LaTeX

in the top line, instead of between <!-- and -->. I wonder if anybody knows an update on this?


Thanks,

Zheng-Chao

PreTeXtTest.xml

Alex Jordan

unread,
Jun 21, 2021, 5:17:41 PM6/21/21
to pretext...@googlegroups.com
Hello Zheng-Chao,

Your PreTeXt source file is structured like this:

section
title
p
answer
p

The source of the issue is that you have an "answer" element as a
child of a "section". That's not "schema compliant". Here are some
general tools and information about schema compliance:

https://pretextbook.org/doc/guide/html/schema.html
https://pretextbook.org/documentation.html#p-36

Reading your source file, maybe what you want to use is:

section
title
exercise
statement
p
answer
p
> --
> You received this message because you are subscribed to the Google Groups "PreTeXt support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pretext-suppo...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-support/1a9d16fb-30fa-4abf-a949-e4b15988aebdn%40googlegroups.com.

Zheng-Chao Han

unread,
Jun 21, 2021, 5:43:40 PM6/21/21
to PreTeXt support
Thank you!  Indeed that was the cause. The file compiled into html without any issue, but ran into that issue when compiled into pdf.
Reply all
Reply to author
Forward
0 new messages