מאת: Jean-Marc Lasgouttes
נשלח: יום רביעי א אלול תשע"ז 13:31
אל: haim.ros...@gmail.com; LyX Mechanics
נושא: Re: LyX truncates spacing in Local Layout and in Listings

Le 23/08/2017 à 11:55, Jean-Marc Lasgouttes a écrit :
> This is what the code tries to do, but there are bugs (see notes below).
[...]
> [*] the original code only considered spaces, which is of course wrong 
> and should be corrected.
> [**] a further random change was added to remove all leading tabs 
> (6bba977f42), which is probably the bug you are seeing.

I would add the amusing
[***] the code removes all the spaces of the prefix except one.

All in all, I would propose to apply the following âtch, although I am 
not completely sure I understood what issues Haim was encountering.

Richard, could you test it a bit?

JMarc

I mentioned that when editing in LyX the Local Layout, the leading tabs are 
remopved. I learnt from the above discussion that this is similar to the weird 
LaTeX output

\theoremstyle{plain}
\newtheorem{thm}{\protect\theoremname}
  \theoremstyle{plain}
  \newtheorem{lem}[thm]{\protect\lemmaname}
  \theoremstyle{plain}
  \newtheorem{cor}[thm]{\protect\corollaryname}
 \theoremstyle{definition}
 \newtheorem*{defn*}{\protect\definitionname}
  \theoremstyle{remark}
  \newtheorem*{rem*}{\protect\remarkname}
  \theoremstyle{plain}
  \newtheorem{lyxalgorithm}[thm]{\protect\algorithmname}

Where the thm's lines have no indent, the defn's have one leading space, and 
the rest has two leading spaces. Similar behavior is in the commandnames 
section,

\usepackage{babel}
  \providecommand{\algorithmname}{Algorithm}
  \providecommand{\corollaryname}{Corollary}
  \providecommand{\definitionname}{Definition}
  \providecommand{\lemmaname}{Lemma}
  \providecommand{\remarkname}{Remark}
\providecommand{\theoremname}{Theorem}

This was generated with the file theorems-ams.inc, which has so many different 
leading spaces.

Haim

Attachment: theorems-ams.inc
Description: Binary data

Reply via email to