On 2010-11-19, Georg Baum wrote:

> Hi,

> after I needed to explain several times lately why one should not use the 
> menu entries for sub/superscript in text and what to do instead, I finally 
> sat down and completed a fix for bug 3008 that I started years ago. It 
> implements a new inset for subscript and superscript in text mode, including 
> correct output for all backends. There are some other ideas discussed in 
> http://www.lyx.org/trac/ticket/3008, but the inset approach is the best one 
> IMO.

...  
  
> +    # these classes provide a \textsubscript command:
> +    # FIXME: Would be nice if we could use the information of the .layout 
> file here
> +    classes = ["memoir", "scrartcl", "scrbook", "scrlttr2", "scrreprt"]
> +    if foundsubscript and find_token_exact(classes, document.textclass, 0) 
> == -1:
> +        add_to_preamble(document, ['\\usepackage{subscript}'])

Please use the fixltx2e package for \textsubscript:

  Provides a command \textsubscript , which is a modified version the
  command \textsuperscript that's part of LaTeX.  The command is also
  (now) provided by the fixltx2e package distributed with LaTeX itself;
  if you are running a LaTeX distribution no earlier than 2005/12/01, you
  will have a more satisfactory means of using the command.

  -- http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=subscript

I argue, that LyX-2 should by default *always* insert
\usepackage{fixltx2e}. This package collects a range of fixes and
improvements that are not not in the LaTeX core due to backwards
compatibility issues. The "quantum-leap" from 1 to 2 would be a good
place for this change:

  Identifier    fixltx2e
  
  Caption       Patches for LaTeX.
  
  Description   
  
    LaTeX policy is that things should not change, between releases, in a
    way that will cause incompatibility with old documents, or will cause
    typesetting of an unchanged document to change.
  
    Nevertheless, there are problems in LaTeX that it “would be nice” to
    correct; fixltx2e provides a home for these corrections.  Corrections
    in the current version are:
  
      * ensure one-column floats don't get ahead of two-column floats;
  
      * correct page headers in twocolumn documents;
  
      * stop spaces disappearing in moving arguments;
  
      * allowing  \fnysmbol  to use text symbols;
  
      * allow the first word after a float to hyphenate;
  
      * \emph  can produce caps/small caps text;
  
      * bugs in  \setlength  and flushbottom.
  
    -- http://tug.ctan.org/pkg/fixltx2e
    
Günter

Reply via email to