Re: onehalfspace

2020-04-09 Thread Daniel

On 2020-04-08 08:23, Daniel wrote:

On 2019-08-08 20:19, Patrick Dupre wrote:

Hello,

It seems that there is an issue with: onehalfspace

Can I get some feedback?

See attached file.

=== 


  Patrick DUPRÉ | | email: pdu...@gmx.com
  Laboratoire interdisciplinaire Carnot de Bourgogne
  9 Avenue Alain Savary, BP 47870, 21078 DIJON Cedex FRANCE
  Tel: +33 (0)380395988
=== 





It seems that beamer has problems with the spacing environments. A 
workaround seems to be to use the \setstretch command. 
(https://felix11h.github.io/blog/line-spacing-beamer)


Note that this will only add space above a paragraph, so you might need 
to add additional instances depending on your needs.


I have also attached a minimal example of the problem in case you want 
to file a bug report. I guess the spacing environments should be 
disabled or replaced by suitable \setstretch commands when beamer is used.


Daniel


Bug report filed at https://www.lyx.org/trac/ticket/11820.

Daniel


--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: onehalfspace

2020-04-07 Thread Daniel

On 2019-08-08 20:19, Patrick Dupre wrote:

Hello,

It seems that there is an issue with: onehalfspace

Can I get some feedback?

See attached file.

===
  Patrick DUPRÉ | | email: pdu...@gmx.com
  Laboratoire interdisciplinaire Carnot de Bourgogne
  9 Avenue Alain Savary, BP 47870, 21078 DIJON Cedex FRANCE
  Tel: +33 (0)380395988
===



It seems that beamer has problems with the spacing environments. A 
workaround seems to be to use the \setstretch command. 
(https://felix11h.github.io/blog/line-spacing-beamer)


Note that this will only add space above a paragraph, so you might need 
to add additional instances depending on your needs.


I have also attached a minimal example of the problem in case you want 
to file a bug report. I guess the spacing environments should be 
disabled or replaced by suitable \setstretch commands when beamer is used.


Daniel
#LyX 2.3 created this file. For more info see http://www.lyx.org/
\lyxformat 544
\begin_document
\begin_header
\save_transient_properties true
\origin unavailable
\textclass beamer
\begin_preamble
\usepackage[orientation=landscape,size=a4,debug]{}% poster only, by default A0  
with beamer

\usetheme{Madrid}%[compress]

\usepackage{setspace}
%%\usepackage{doublespace}
\end_preamble
\use_default_options false
\maintain_unincluded_children false
\begin_local_layout
Format 35
Provides bm 1
Provides mathrsfs 1
#1 for true
#See customization Chapter 5
\end_local_layout
\language english
\language_package default
\inputencoding auto
\fontencoding global
\font_roman "default" "default"
\font_sans "default" "default"
\font_typewriter "default" "default"
\font_math "auto" "auto"
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100 100
\font_tt_scale 100 100
\use_microtype false
\use_dash_ligatures true
\graphics default
\default_output_format default
\output_sync 0
\bibtex_command default
\index_command default
\paperfontsize default
\spacing single
\use_hyperref false
\pdf_title "Saturated Absorption by Frequency Modulation Spectroscopy, HD and 
C2H2"
\pdf_author "P. Dupr\\'e"
\pdf_subject "Poster Dijon 2019"
\pdf_bookmarks true
\pdf_bookmarksnumbered false
\pdf_bookmarksopen false
\pdf_bookmarksopenlevel 1
\pdf_breaklinks false
\pdf_pdfborder false
\pdf_colorlinks false
\pdf_backref false
\pdf_pdfusetitle true
\papersize default
\use_geometry true
\use_package amsmath 2
\use_package amssymb 2
\use_package cancel 0
\use_package esint 0
\use_package mathdots 0
\use_package mathtools 0
\use_package mhchem 0
\use_package stackrel 0
\use_package stmaryrd 0
\use_package undertilde 0
\cite_engine basic
\cite_engine_type default
\biblio_style plain
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date true
\justification true
\use_refstyle 0
\use_minted 0
\index Index
\shortcut idx
\color #008000
\end_index
\secnumdepth 0
\tocdepth 1
\paragraph_separation indent
\paragraph_indentation default
\is_math_indent 0
\math_numbering_side default
\quotes_style english
\dynamic_quotes 0
\papercolumns 1
\papersides 1
\paperpagestyle default
\bullet 1 0 6 -1
\bullet 2 0 0 -1
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\end_header

\begin_body

\begin_layout Frame

\lang american
\begin_inset Argument 4
status open

\begin_layout Plain Layout

\lang american
H
\end_layout

\end_inset


\end_layout

\begin_deeper
\begin_layout Itemize

\series bold
\lang american
Choic
\end_layout

\begin_deeper
\begin_layout Itemize
\noindent

\lang american
\begin_inset ERT
status open

\begin_layout Plain Layout

{
\backslash
setstretch{1.5}
\end_layout

\end_inset

is the
\begin_inset ERT
status open

\begin_layout Plain Layout


\backslash

\backslash
}
\end_layout

\end_inset


\end_layout

\end_deeper
\end_deeper
\begin_layout Standard
\begin_inset Separator plain
\end_inset


\end_layout

\end_body
\end_document
#LyX 2.3 created this file. For more info see http://www.lyx.org/
\lyxformat 544
\begin_document
\begin_header
\save_transient_properties true
\origin unavailable
\textclass beamer
\use_default_options false
\maintain_unincluded_children false
\language english
\language_package default
\inputencoding auto
\fontencoding global
\font_roman "default" "default"
\font_sans "default" "default"
\font_typewriter "default" "default"
\font_math "auto" "auto"
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100 100
\font_tt_scale 100 100
\use_microtype false
\use_dash_ligatures true
\graphics default
\default_output_format default
\ou

Re: onehalfspace

2020-04-05 Thread Scott Kostyshak
On Thu, Aug 08, 2019 at 08:19:29PM +0200, Patrick Dupre wrote:
> Hello,
> 
> It seems that there is an issue with: onehalfspace
> 
> Can I get some feedback?
> 
> See attached file.

You might want to file a bug report so we don't forget about this
(please remove the preamble code when you attach the file). I can
reproduce that I get an error with the .lyx file, but I don't know what
the root issue is.

Scott


signature.asc
Description: PGP signature
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


onehalfspace

2019-08-08 Thread Patrick Dupre
Hello,

It seems that there is an issue with: onehalfspace

Can I get some feedback?

See attached file.

===
 Patrick DUPRÉ | | email: pdu...@gmx.com
 Laboratoire interdisciplinaire Carnot de Bourgogne
 9 Avenue Alain Savary, BP 47870, 21078 DIJON Cedex FRANCE
 Tel: +33 (0)380395988
===


test.lyx
Description: application/lyx


Re: onehalfspace mystery

2008-01-11 Thread Donn
Bump. Apropos my last post.
Any suggestions for the search/replace of the lyx file in a text editor?

\d


Re: onehalfspace mystery

2008-01-10 Thread Donn
Hi - my net went down suddenly and I don't know when it will come up. This is 
in the outbox waiting to go. There may have been replies since that make it 
redundant.

On Wednesday, 09 January 2008 15:07:39 Juergen Spitzmueller wrote:
> For the time being, you can use the ERT workarounds outlines on the wiki
> page I referred to.
Okay, so I have to try search/replace in an editor. I get this kind of thing-

In the lyx file (in a text editor) it was:
\begin_layout Standard
\paragraph_spacing double
\align center
\size largest
\begin_inset Formula $\thickapprox$
\end_inset
\newpage
\end_layout

I change it to (see second line from top):
\begin_layout Standard
\DoubleSpacing
\align center
\size largest
\begin_inset Formula $\thickapprox$
\end_inset
\newpage
\end_layout

I get an error:
Unknown token:
Unknown token: \DoubleSpacing \align center

It's ignoring the newline between the two.

What's the best way to repair the entire file because it's too long to go to 
each element and format to 'spacing default' via the gui.

\d
-- 
Fonty Python and other dev news at:
http://otherwiseingle.blogspot.com/


Re: onehalfspace mystery

2008-01-09 Thread Eran Kaplinsky

Thanks for the work! Harmonizing LyX and memoir is tremendously useful.

Eran


Re: onehalfspace mystery

2008-01-09 Thread Jean-Marc Lasgouttes
Juergen Spitzmueller <[EMAIL PROTECTED]> writes:

> Do you like to have a go?

It would look like this. I define the new feature "SetSpace" that is
provided by memoir.layout, and act on it.

JMarc

svndiff src/ lib/layouts/

Index: src/Spacing.h
===
--- src/Spacing.h	(revision 22451)
+++ src/Spacing.h	(working copy)
@@ -58,10 +58,12 @@ public:
 	void set(Spacing::Space sp, std::string const & val);
 	///
 	void writeFile(std::ostream &, bool para = false) const;
-	///
-	std::string const writeEnvirBegin() const;
-	///
-	std::string const writeEnvirEnd() const;
+	/// useSetSpace is true when using the variant supported by
+	/// the memoir class.
+	std::string const writeEnvirBegin(bool useSetSpace) const;
+	/// useSetSpace is true when using the variant supported by
+	/// the memoir class.
+	std::string const writeEnvirEnd(bool useSetSpace) const;
 
 private:
 	///
Index: src/LaTeXFeatures.cpp
===
--- src/LaTeXFeatures.cpp	(revision 22451)
+++ src/LaTeXFeatures.cpp	(working copy)
@@ -637,9 +637,10 @@ string const LaTeXFeatures::getPackages(
 	// setspace.sty
 	if ((params_.spacing().getSpace() != Spacing::Single
 	 && !params_.spacing().isDefault())
-	|| isRequired("setspace")) {
-		packages << "\\usepackage{setspace}\n";
+	|| (isRequired("setspace") && !tclass.provides("SetSpace"))) {
+		packages << "\\usepackage{setspace}\n";
 	}
+	bool const upcase = tclass.provides("SetSpace");
 	switch (params_.spacing().getSpace()) {
 	case Spacing::Default:
 	case Spacing::Single:
@@ -647,13 +648,13 @@ string const LaTeXFeatures::getPackages(
 		//packages += "\\singlespacing\n";
 		break;
 	case Spacing::Onehalf:
-		packages << "\\onehalfspacing\n";
+		packages << (upcase ? "\\OnehalfSpacing\n" : "\\onehalfspacing\n");
 		break;
 	case Spacing::Double:
-		packages << "\\doublespacing\n";
+		packages << (upcase ? "\\DoubleSpacing\n" : "\\doublespacing\n");
 		break;
 	case Spacing::Other:
-		packages << "\\setstretch{"
+		packages << (upcase ? "\\setSingleSpace{" : "\\setstretch{")
 			 << params_.spacing().getValue() << "}\n";
 		break;
 	}
Index: src/Spacing.cpp
===
--- src/Spacing.cpp	(revision 22451)
+++ src/Spacing.cpp	(working copy)
@@ -89,20 +89,24 @@ void Spacing::writeFile(ostream & os, bo
 }
 
 
-string const Spacing::writeEnvirBegin() const
+string const Spacing::writeEnvirBegin(bool useSetSpace) const
 {
 	switch (space) {
 	case Default: break; // do nothing
 	case Single:
-		return "\\begin{singlespace}";
+		return (useSetSpace ? "\\begin{SingleSpace}"
+			: "\\begin{singlespace}");
 	case Onehalf:
-		return "\\begin{onehalfspace}";
+		return (useSetSpace ? "\\begin{OnehalfSpace}"
+			: "\\begin{onehalfspace}");
 	case Double:
-		return "\\begin{doublespace}";
+		return (useSetSpace ? "\\begin{DoubleSpace}" 
+			: "\\begin{doublespace}");
 	case Other:
 	{
 		ostringstream ost;
-		ost << "\\begin{spacing}{"
+		ost << (useSetSpace ? "\\begin{Spacing}{"
+			: "\\begin{spacing}{" )
 		<< getValueAsString() << '}';
 		return ost.str();
 	}
@@ -111,18 +115,21 @@ string const Spacing::writeEnvirBegin() 
 }
 
 
-string const Spacing::writeEnvirEnd() const
+string const Spacing::writeEnvirEnd(bool useSetSpace) const
 {
 	switch (space) {
 	case Default: break; // do nothing
 	case Single:
-		return "\\end{singlespace}";
+		return (useSetSpace ? "\\end{SingleSpace}"
+			: "\\end{singlespace}");
 	case Onehalf:
-		return "\\end{onehalfspace}";
+		return (useSetSpace ? "\\end{OnehalfSpace}"
+			: "\\end{onehalfspace}");
 	case Double:
-		return "\\end{doublespace}";
+		return (useSetSpace ? "\\end{DoubleSpace}" 
+			: "\\end{doublespace}");
 	case Other:
-		return "\\end{spacing}";
+		return (useSetSpace ? "\\end{Spacing}" : "\\end{spacing}") ;
 	}
 	return string();
 }
Index: src/output_latex.cpp
===
--- src/output_latex.cpp	(revision 22451)
+++ src/output_latex.cpp	(working copy)
@@ -491,6 +491,7 @@ TeXOnePar(Buffer const & buf,
 
 	// In an inset with unlimited length (all in one row),
 	// don't allow any special options in the paragraph
+	bool const useSetSpace = bparams.getTextClass().provides("SetSpace");
 	if (!pit->forceDefaultParagraphs()) {
 		if (pit->params

Re: onehalfspace mystery

2008-01-09 Thread Jean-Marc Lasgouttes
Juergen Spitzmueller <[EMAIL PROTECTED]> writes:

> Jean-Marc Lasgouttes wrote:
>
>> \DisemulatePackage{setspace}
>> \usepackage{setspace}
>> but there is still an error.
>
> Too bad.
> And if "Provides setspace 1" is set additionally?

It would not help, we need to actually load setspace.

JMarc


Re: onehalfspace mystery

2008-01-09 Thread Juergen Spitzmueller
Jean-Marc Lasgouttes wrote:

> \DisemulatePackage{setspace}
> \usepackage{setspace}
> but there is still an error.

Too bad.
And if "Provides setspace 1" is set additionally?

Jürgen



Re: onehalfspace mystery

2008-01-09 Thread Jean-Marc Lasgouttes
Juergen Spitzmueller <[EMAIL PROTECTED]> writes:

> Jean-Marc Lasgouttes wrote:
>
>> Try to add
>> \DisemulatePackage{setspace}
>> in the preamble of your document.
>
> I seem to remember that LyX adds this too late in the game, but my memory
> might be wrong

Indeed. It is a bit better with
\DisemulatePackage{setspace}
\usepackage{setspace}
but there is still an error.

JMarc


Re: onehalfspace mystery

2008-01-09 Thread Juergen Spitzmueller
Jean-Marc Lasgouttes wrote:

> Try to add
> \DisemulatePackage{setspace}
> in the preamble of your document.

I seem to remember that LyX adds this too late in the game, but my memory
might be wrong

Jürgen



Re: onehalfspace mystery

2008-01-09 Thread Jean-Marc Lasgouttes
Donn <[EMAIL PROTECTED]> writes:

> Um, does this mean I should hang-on a while and compile a new version? I 
> don't 
> mind doing that, just don't grok what you are chatting about :)

Try to add
\DisemulatePackage{setspace}
in the preamble of your document.

JMarc


Re: onehalfspace mystery

2008-01-09 Thread Juergen Spitzmueller
Donn wrote:

> Um, does this mean I should hang-on a while and compile a new version? I
> don't mind doing that, just don't grok what you are chatting about :)

It might be that this fix will have to wait for the next major release
(1.6.0), because it might entail a file format change (we need to discuss
this).

For the time being, you can use the ERT workarounds outlines on the wiki
page I referred to.

Jürgen



Re: onehalfspace mystery

2008-01-09 Thread Donn
Um, does this mean I should hang-on a while and compile a new version? I don't 
mind doing that, just don't grok what you are chatting about :)

\d

-- 
Fonty Python and other dev news at:
http://otherwiseingle.blogspot.com/


Re: onehalfspace mystery

2008-01-09 Thread Juergen Spitzmueller
Jean-Marc Lasgouttes wrote:

> Juergen, what shall we do? I remember messages from you about memoir
> incompatibility, but I cannot see a reference.

I think there's no bug report yet, but there is a wiki page:
http://wiki.lyx.org/LyX/UsingMemoirInLyX

> One solution would be to have memoir.layout provide "SetSpace" and act
> of the require to change the spacing commands as needed.

Yes, I guess we need this. I have recently tried to solve it by
redefinitions of setspace commands in the preamble and "Provides setspace
1", but this does not work, since the global commands are put before the
Class preamble.

Do you like to have a go?

(we probably need to check since when these memoir SetSpace stuff exists,
and require a certain version).

Jürgen



Re: onehalfspace mystery

2008-01-09 Thread Donn
> OK, the problem is that you use the memoir class, which has its own
> implementation of the setspace functionality in newer editions.
> However, this functionality is offered as capitalized commands like
> DoubleSpace environment.

Okay, I'll take a break and await advice. Thanks for looking into it.
\d

-- 
I have a low-traffic blog for basic news:
http://otherwiseingle.blogspot.com/


Re: onehalfspace mystery

2008-01-09 Thread Jean-Marc Lasgouttes
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:
> Juergen, what shall we do? I remember messages from you about memoir
> incompatibility, but I cannot see a reference.

I found that:
http://www.mail-archive.com/lyx-users@lists.lyx.org/msg52814.html

Would adding \DisemulatePackage{setspace} fix some of our problems (at
the price of not so good spacing?)

I suspect there is a problem with parskip.sty also.

JMarc


Re: onehalfspace mystery

2008-01-09 Thread Jean-Marc Lasgouttes
Donn <[EMAIL PROTECTED]> writes:

>> So probably LyX does not output the \usepackage{setspace} command that
>> it needs in the preamble.
> Tried that too, still no effect.
>
>> Did you set spacing globally or in a given paragraph? Could you send
>> an example file?
> I don't think I did anything special globally. I attach a cut-down sample of 
> the file that gives me the errors.

OK, the problem is that you use the memoir class, which has its own
implementation of the setspace functionality in newer editions.
However, this functionality is offered as capitalized commands like
DoubleSpace environment.

Juergen, what shall we do? I remember messages from you about memoir
incompatibility, but I cannot see a reference.

One solution would be to have memoir.layout provide "SetSpace" and act
of the require to change the spacing commands as needed.

JMarc


Re: onehalfspace mystery

2008-01-09 Thread Donn
> So probably LyX does not output the \usepackage{setspace} command that
> it needs in the preamble.
Tried that too, still no effect.

> Did you set spacing globally or in a given paragraph? Could you send
> an example file?
I don't think I did anything special globally. I attach a cut-down sample of 
the file that gives me the errors.

Thanks.
\d


error_sample.lyx
Description: application/lyx


Re: onehalfspace mystery

2008-01-09 Thread Jean-Marc Lasgouttes
Donn <[EMAIL PROTECTED]> writes:

> Repeating this here as it's the start of the day for me and I'd like to get 
> past this error:
> onehalfspace and doublespace missing environments.

So probably LyX does not output the \usepackage{setspace} command that
it needs in the preamble.

Did you set spacing globally or in a given paragraph? Could you send
an example file?

JMarc


Re: onehalfspace mystery

2008-01-08 Thread Donn
Repeating this here as it's the start of the day for me and I'd like to get 
past this error:
onehalfspace and doublespace missing environments.

> you need the package setspace.sty.
Thanks, I found it in:
/usr/share/texmf-texlive/tex/latex/setspace/setspace.sty

To clarify, I compiled Lyx 1.5.2 into $HOME/bin/lyx152 and :
Copied setspace.sty to my share/tex folder (only place I could find other sty 
files) as well as share/layouts but still getting the same error, what am I 
missing?

\d


Re: onehalfspace mystery

2008-01-08 Thread Donn
> you need the package setspace.sty.
Thanks, I found it in:
/usr/share/texmf-texlive/tex/latex/setspace/setspace.sty
Copied it to my lyx/share/tex folder (only place I could find other sty files) 
as well as /share/layouts but still getting the same error, what am I 
missing?

\d
-- 
I have a low-traffic blog for basic news:
http://otherwiseingle.blogspot.com/


Re: onehalfspace mystery

2008-01-08 Thread Jürgen Spitzmüller
Donn wrote:
> Hi,
> Opening a file from a few months ago (in Lyx 1.5.2 same as used to create
> it) and I get error Environment onehalfspace undefined. As well as
> Environment doublespace, on these:
> \begin{onehalfspace}
> \begin{doublespace}

you need the package setspace.sty.

Jürgen


onehalfspace mystery

2008-01-08 Thread Donn
Hi,
Opening a file from a few months ago (in Lyx 1.5.2 same as used to create it) 
and I get error Environment onehalfspace undefined. As well as Environment 
doublespace, on these:
\begin{onehalfspace}
\begin{doublespace}

I can't recall the details, do these have to exist as files in the layouts 
directory? I did a search, but found no real info so thought I'd bother the 
list.

\d
-- 
I have a low-traffic blog for basic news:
http://otherwiseingle.blogspot.com/