You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been playing around with various syntax to allow for manipulate the indentation and alignment of single paragraphs.
The need re-emerged after I just read a book that uses it to illustrate when something is read from a signe (centred text) or some written correspondence is quoted (larger margins). These are quite useful features to have, and should be available in the editor.
The syntax I've come up with is rather simple and intuitive I think. Essentially it consists of using the > and < symbols at the start or end of the paragraph to "push" it away from the edge. A single > or < will indent the text by a tab-stop width. A double of either will push it maximally way from the edge. Effectively, the combinations will result in:
> some text will result in a left-indented paragraph.
some text < will result in a right-indented paragraph.
> some text < will result in a left- and right-indented paragraph.
>> some text will result in a right-aligned paragraph.
some text << will result in a left-aligned paragraph.
>> some text << will result in a centred paragraph.
These can also be combined, for instance:
>> some text < will result in a right-aligned paragraph with a wider right margin.
The left alignment is not only added for completeness. Title pages and partition pages are by default centre-aligned, so if you want to add text to them that isn't centred, you need to apply left alignment.
These are almost trivial to implement. The highlighter will give the correctly used tags a control character colour. Parsing it in the tokenizer class will set the paragraph alignment. The HTML and ODT generators already have all the code to handle alignment as alignment is already a part of the code, so all that is needed is detecting the leading and trailing angle brackets in the text line.
The syntax is also fairly clean, and since it will not be used much in a project, not very intrusive.
I've been playing around with various syntax to allow for manipulate the indentation and alignment of single paragraphs.
The need re-emerged after I just read a book that uses it to illustrate when something is read from a signe (centred text) or some written correspondence is quoted (larger margins). These are quite useful features to have, and should be available in the editor.
The syntax I've come up with is rather simple and intuitive I think. Essentially it consists of using the
>
and<
symbols at the start or end of the paragraph to "push" it away from the edge. A single>
or<
will indent the text by a tab-stop width. A double of either will push it maximally way from the edge. Effectively, the combinations will result in:> some text
will result in a left-indented paragraph.some text <
will result in a right-indented paragraph.> some text <
will result in a left- and right-indented paragraph.>> some text
will result in a right-aligned paragraph.some text <<
will result in a left-aligned paragraph.>> some text <<
will result in a centred paragraph.These can also be combined, for instance:
>> some text <
will result in a right-aligned paragraph with a wider right margin.The left alignment is not only added for completeness. Title pages and partition pages are by default centre-aligned, so if you want to add text to them that isn't centred, you need to apply left alignment.
These are almost trivial to implement. The highlighter will give the correctly used tags a control character colour. Parsing it in the tokenizer class will set the paragraph alignment. The HTML and ODT generators already have all the code to handle alignment as alignment is already a part of the code, so all that is needed is detecting the leading and trailing angle brackets in the text line.
The syntax is also fairly clean, and since it will not be used much in a project, not very intrusive.
This feature would effectively replace #595.
The text was updated successfully, but these errors were encountered: