Re: layout with Parindent not working

ken rector via lyx-users <[email protected]>
Newsgroups gmane.editors.lyx.general
Message-ID <[email protected]>
Hi Riki,

Thanks for your help.  You can probably tell that I'm new at this and 
I've used chatgpt for help.

I think the parIndent, Parskip and BottomSep only affect the edit window 
so I nopped them.

I think {} indicates title text string.

I'm puzzled by how {\vspace{n\baselineskip}} works.  I seem to need both 
\vspace before and after the {}.  If there is no \vspace following the 
{} the \vspace before {} has no effect.

If there is a \vspace following the {}, {\vspace{n\baselineskip}} before 
{} seems to define the number of lines following the text in the PDF.

Can you suggest any reference material to explain some of this stuff?

Regards
Ken


Format 60

Style grammertitle

Category MainText

LatexType Environment

LatexName grammertitle

Margin First_Dynamic

# ParIndent 0

# ParSkip 0

# BottomSep 1.0

Preamble

\newenvironment{grammertitle}{\setlength{\parindent}{0pt}}

{\vspace{1\baselineskip}}

{}

{\vspace{4\baselineskip}}

EndPreamble

End




Richard Kimberly Heck wrote on 8/10/26 9:16 AM:
> On 8/9/26 12:57 AM, ken rector via lyx-users wrote:
>> Using Lyx 2.3.0. and Local Layout I would like to make a paragraph 
>> with no indentation, some text and followed by a single blank line to 
>> separate it from the next paragraph.  Below is layout language 
>> suggested by chatgpt.  The Lyx Layout validate operation says 'Layout 
>> is valid!'.
>>
>> I type:
>> "Title
>> Grammar description sentence."
>>
>> This gives two paragraphs of type 'Standard' seperated by a simple 
>> return.
>> Put the cursor on the word "Title" and select type grammertitle from 
>> the drop down.
>>
>> The edit window shows a blank line inserted between "Title" and 
>> "Grammar description" as it should, but with a default indent (about 
>> 6em).
>>
>> The PDF document shows "Title Grammar description." all on one line 
>> with the default indent.
>>
>> It seems that ParIndent has no effect and BottomSep 1.0 only affects 
>> the edit window.
>>
>> Is there a better way?
>
> You need to provide some LaTeX code for this new style. ParIndent and 
> BottomSep only affect the LyX display. So you need something like:
>
> Format 60
>
> Style grammertitle
>     Category MainText
>     LatexType command
>     LatexName grammartitle
>     Margin First_Dynamic
>     ParIndent 0
>     BottomSep 1.0
>     Preamble
>         \newcommand[1]\grammartitle{ YOUR LATEX HERE }
>     EndPreamble
> End
>
> By the way, LyX 2.3.0 is WAY out of date. It was released over 8 years 
> ago.
>
> Riki
>
>

-- 
lyx-users mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.