LyXsubscript | PDF Output using Child Document not possible

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
Paul Richards
Posts: 13
Joined: Mon Jan 31, 2011 5:16 pm

subscript | PDF Output using Child Document not possible

Post by Paul Richards »

I am using Windows 7 and Lyx 2.0.3 with MikTex 2.9 and when I used child documents I can’t produce a PDF.

The problem

I have a main document which just consists of the following:
Input chapter 1
Input chapter 2
Input chapter 3
BibTeX bibliography
Index

When I try to produce the PDF of this, I get a fatal error:
LaTeX Error: File `subscript.sty' not found.

Description:
*** (cannot \read from terminal in nonstop modes)

If chapter 3 is removed from the main document, the PDF is created with no problem.

Curiously, if the child document chapter 3 is opened by itself, then a PDF of it can be created with no problem.

My attempts at resolution

I have obtained subscript.sty and put it in its own subfolder , under the same folder that the other LaTeX .sty files are.

C:\Program Files (x86)\MiKTeX 2.9\tex\latex\subscript

Then I have gone into MiKTeX Options (under MiKTeX maintenance) and pressed ‘Refresh FNDB’. Then when I go into LyX I choose Tools.. Reconfigure. This did not help.

Subscript is not listed in the MiKTeX Package Manager. I tried to install it using the ‘Change Package Repository’ option by choosing ‘install from a directory’ and then picking the folder that had subscript.sty in it, but it said it ‘does not seem to be a local package repository’.

I have tried changing the location of subscript.sty, but that did not help.

In MiKTeX options, I have tried changing ‘install missing packages on-the-fly’ to No, and then repeating the above, but that did not help.

I have tried executing mktexlsr from the cmd prompt then reconfiguring LyX, restarting it but this was no help.

I found these references but none gave a working fix:

http://www.latex-community.org/forum/vi ... 19&t=13191

http://comments.gmane.org/gmane.editors ... eral/72597


Discussion

This appears to be a known bug:
http://www.mail-archive.com/lyx-devel@l ... 64300.html
http://comments.gmane.org/gmane.editors ... vel/130989

Is there a workaround to the bug? I can’t find a successful workaround.

Why is it that the bug only affects the main document, and not the child document?

What is subscript.sty actually used for? Some parts of my document were written a long time ago and I can’t remember exactly what I have done. How can I find what feature in my document causes this error? If I can isolate it, perhaps I can remove it or do it a different way to prevent the error occurring.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

subscript | PDF Output using Child Document not possible

Post by Stefan Kottwitz »

Hi Paul,

subscript.sty contains just 4 lines of code, it defines the macro \textsubscript similarly to \textsuperscript which is originally defined in LaTeX:

Code: Select all

\DeclareRobustCommand*\textsubscript[1]{%
  \@textsubscript{\selectfont#1}}
\def\@textsubscript#1{%
  {\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}}
Somewhere in your code, it's loaded or that command is used (perhaps LyX loads it then). Just search for this macro name or that package name.

You could also try placing subscript.sty in the same directory as your document, as a quick fix.

Stefan
LaTeX.org admin
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

subscript | PDF Output using Child Document not possible

Post by localghost »

Use the fixltx2e package instead.


Thorsten
Paul Richards
Posts: 13
Joined: Mon Jan 31, 2011 5:16 pm

Re: subscript | PDF Output using Child Document not possible

Post by Paul Richards »

Thanks Stefan, putting the .sty file in the same location as the document was an effective (albeit ugly) fix.

I had a look at the raw LaTeX that LyX produces and it is adding subscript.sty at the top. The thing is, I don't think this gets me any further forward at all. I don't use any native/raw LaTeX code, I do it all via the LyX GUI. Searching for 'subscript' in the LyX document yielded no results.

So, in summary, LyX is using subscript.sty, I don't know why it is using it or how to get it to use the alternative (fixltx2e), but it does not matter so much since I have found a workaround.
Post Reply