LaTeX forum ⇒ Text Formattingstarting from scratch with atom Topic is solved

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
ExecutorElassus
Posts: 91
Joined: Wed Sep 07, 2011 3:14 pm

starting from scratch with atom

Postby ExecutorElassus » Tue Mar 20, 2018 10:30 am

I'm dipping my toes into the (I expect long) process of migrating from producing documents with Lyx to writing straight LaTeX using atom. My first task is the relatively simple invoice environment within an scrlttr2 class. I have the following .tex file:

Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \documentclass{scrlttr2}
  2. \usepackage{invoice}
  3. %%\usepackage{polyglossia}
  4. %%\setdefaultlanguage[variant=german,spelling=new,babelshorthands=true]{german}
  5.  
  6. %%\setkomavar{toaddress}
  7.  
  8. \begin{document}
  9.  
  10. \begin{letter}{addressee}
  11. \opening{Dear Mrs~Canary}
  12.  
  13. This is an imaginary letter.
  14.  
  15. This is the second paragraph of the letter.
  16.  
  17. \begin{invoice}{Euro}{0}
  18. \ProjectTitle{,,text``}%
  19. % contents rate/unit count
  20. \Fee{translation} {0.08} {1465}
  21.  
  22. \end{invoice}
  23.  
  24. \closing{Yours sincerely}
  25.  
  26. \ps PS: this is a postscript.
  27.  
  28. \encl{Photocopy of something interesting\\
  29. Photocopy of something rather dull}
  30.  
  31. \cc{Prof Important Person\\
  32. Dr Bor Ing}
  33. \end{letter}
  34.  
  35. \end{document}


That compiles fine, until I uncomment the line for polyglossia, at which point atom returns the following errors:

Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. /usr/share/texmf-dist/tex/latex/l3packages/xparse/xparse.sty:26: LaTeX Error: Missing \begin{document}. [\RequirePackage{expl3}[]
  2. /usr/share/texmf-dist/tex/latex/l3packages/xparse/xparse.sty:27: Missing number, treated as zero. [\@ifpackagelater{expl3}{2017/04/01}]
  3. /usr/share/texmf-dist/tex/latex/l3packages/xparse/xparse.sty:27: Missing = inserted for \ifnum. [\@ifpackagelater{expl3}{2017/04/01}]
  4. /usr/share/texmf-dist/tex/latex/l3packages/xparse/xparse.sty:27: Missing number, treated as zero. [\@ifpackagelater{expl3}{2017/04/01}]
  5. /usr/share/texmf-dist/tex/latex/l3packages/xparse/xparse.sty:38: Package xparse Error: Supportpackagel3kerneltooold. [ }]


from the log, the specific error is:

Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. (/usr/share/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
  2.  
  3. ! LaTeX Error: Missing \begin{document}.
  4.  
  5. See the LaTeX manual or LaTeX Companion for explanation.
  6. Type H <return> for immediate help.
  7. ...
  8.  
  9. l.26 \RequirePackage{expl3}[
  10. 2017/04/01]
  11. You're in trouble here. Try typing <return> to proceed.
  12. If that doesn't work, type X <return> to quit.
  13.  
  14. ! Missing number, treated as zero.
  15. <to be read again>
  16. \ver@expl3.sty


So, I think my general problem is setting up a document to load classes and definitions explicitly (rather than having Lyx handle it in the background), but I'm not sure how to set this up properly. Atom is set to use `latexmk` to build, and using lualatex as the latex variant. But atom also gave me some error about not being able to convert to latex format when I first saved the file that I didn't catch.

For those with experience setting up .tex files to edit from scratch (or anybody else, really), what am I doing wrong here?

Cheers,

EE

Tags:

User avatar
Johannes_B
Site Moderator
Posts: 4141
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Tue Mar 20, 2018 10:41 am

Make an update of your TeX distribution.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

ExecutorElassus
Posts: 91
Joined: Wed Sep 07, 2011 3:14 pm

Postby ExecutorElassus » Tue Mar 20, 2018 12:58 pm

all right, I've now installed the texlive distribution separately from my distro's own texlive packages (fwiw I'm on gentoo). I have my local texlive distribution in /usr/local/tex. How do I set atom to use this, and not my system-wide tex distribution?

Cheers,

EE

User avatar
Johannes_B
Site Moderator
Posts: 4141
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Tue Mar 20, 2018 1:36 pm

Honestly, I don't know. I never used atom.
I suggest looking at an atom forum. It is certainly somewhere in the preferences.
You could also remove the old path from the system variable and add the new path. But this operation dependent.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

ExecutorElassus
Posts: 91
Joined: Wed Sep 07, 2011 3:14 pm

Postby ExecutorElassus » Tue Mar 20, 2018 4:24 pm

I've done a bit of digging through the logfile, and have found this:

The file as it is in the first post compiles fine, but if I invoke \usepackage{polyglossia} I get errors on the following files:

csquotes.sty
xkeyval.sty
fontspec.sty
xparse.sty
fontspec-luatex.sty

in the case of the first three, the error is "Missing \begin{document}" at:

\NeedsTeXFormat{LaTeX2e}[
2005/12/01]

In xparse, the error is:

xparse.sty:38: Package xparse Error: Supportpackagel3kerneltooold.

the fontspec package returns three different errors:

Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \l__fontspec_tmpa_dim=\dimen136
  2. \l__fontspec_tmpb_dim=\dimen137
  3. \l__fontspec_tmpc_dim=\dimen138
  4. \g__file_internal_ior=\read1
  5.  
  6. ~/tex-local/texlive/2017/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty:452: I can't find file `[.sty'.
  7. \FP@in@ ...es {\FP@loadedfiles ,#1} \input #1.sty
  8. l.452 \RequirePackage[
  9. \g_fontspec_encoding_tl]{fontenc}
  10. (Press Enter to retry, or Control-D to exit)
  11. Please type another input file name
  12. ~/tex-local/texlive/2017/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty:452: Emergency stop.
  13. \FP@in@ ...es {\FP@loadedfiles ,#1} \input #1.sty
  14.  
  15. l.452 \RequirePackage[
  16. \g_fontspec_encoding_tl]{fontenc}
  17. *** (job aborted, file error in nonstop mode)


So at least now it's loading the local distribution, but so far as I can tell with tlmg, everything is up to date. Am I perhaps mistaken?

Cheers

Addendum: also, my texlive installation is the 2017 release, which has apparently been frozen and is no longer updating. Is that the reason for the errors about old versions, and the reason why you say I should "update" my distribution?
Last edited by ExecutorElassus on Tue Mar 20, 2018 4:32 pm, edited 1 time in total.

User avatar
Stefan Kottwitz
Site Admin
Posts: 9561
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Tue Mar 20, 2018 4:29 pm

Hi,

perhaps post your .log file here, as attachment. When you write a post, the "Attachments" link is below the text edit field, next to the "Options".

Stefan
LaTeX.org admin

ExecutorElassus
Posts: 91
Joined: Wed Sep 07, 2011 3:14 pm

Postby ExecutorElassus » Tue Mar 20, 2018 4:34 pm

here's the logfile. enjoy?

Cheers
Attachments
rechnung 2018-03-05 - blogpost 21.log
updated log file
(17.73 KiB) Downloaded 115 times

User avatar
Stefan Kottwitz
Site Admin
Posts: 9561
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Tue Mar 20, 2018 5:03 pm

I had a quick look, this looks like an issue:

(/home/.../texlive/2017/texmf-dist/tex/latex/xkeyval/xke
yval.sty

! LaTeX Error: Missing \begin{document}.
...
\GenericError ...
\endgroup
<to be read again>
[
l.36 \NeedsTeXFormat{LaTeX2e}[
1995/12/01]


Either xkeyval is broken, or there's an issue in your document preamble. Can you post the preamble too?

Stefan
LaTeX.org admin

ExecutorElassus
Posts: 91
Joined: Wed Sep 07, 2011 3:14 pm

Postby ExecutorElassus » Tue Mar 20, 2018 5:08 pm

I have no preamble; this is from the MWE I posted at the top. That's the error I get just for uncommenting '\usepackage{polyglossia}'.

If that's the case, then csquotes, xkeyval, fontspec, xparse, and fontspec-luatex are all broken.

If I'm using a local (ie, manually installed directly from ctan, using the now-frozen texlive-2017 release) texlive installation, how do I go about "fixing" these packages?

Cheers,

EE

User avatar
Johannes_B
Site Moderator
Posts: 4141
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Tue Mar 20, 2018 5:14 pm

Reproducable with latest update before frozen:
Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \documentclass{article}
  2. \usepackage{invoice}
  3. \usepackage{polyglossia}
  4. \begin{document}
  5. \end{document}


It should be mentioned, the very very first error is important. I didn't look any closer into this, but the rest of the error messages are just ramblings of a confused computer program. The first one is important.

Edit: David Carlisle already answered how to fix this in invoice package and graphicx
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.


Return to “Text Formatting”

Who is online

Users browsing this forum: No registered users and 1 guest