more than 1 class in tw5

120 views
Skip to first unread message

Fco Javier González Domínguez

unread,
Dec 24, 2017, 6:30:32 AM12/24/17
to TiddlyWiki
Hi guys
Hello
I am trying to pass my tiddlywiki classic to tw5 and I run into the following problem:

in tiddlywiki classic I use the following


This is a {{bold {{{red {test}}} how to use}}} css class
or so
This is a {{bold red {test how to use}}} css class
and it looks

This is a test how to use css class

This is a test how to use css class

in tw5 i do this

This is a @@.bold @@.red test@@ how to use@@ css class

and it looks


This is a .red test how to use css class

where is the problem?

please help

Jed Carty

unread,
Dec 24, 2017, 7:21:49 AM12/24/17
to TiddlyWiki
I believe that the problem there is that it is being parsed as two separate sections instead of nested sections.

I don't know much about how the inline css works in tiddlywiki so I don't have a solution using that, but I am pretty certain that this gets parses

@@.bold @@

as a complete thing and

@@ how to use@@

as something completely separate.

Birthe C

unread,
Dec 24, 2017, 7:55:37 AM12/24/17
to TiddlyWiki
I needed to write
This is a @@.bold.red test@@ @@.bold how to use@@ css class
To see the bold

Also I guess in tiddlywiki classic you used StyleSheetShortcuts (Eric Shulman)

Birthe

Ton Gerner

unread,
Dec 24, 2017, 8:03:34 AM12/24/17
to TiddlyWiki
Try (your examples):

This is a ''@@.red test@@ how to use'' css class

This is a ''@@.red test how to use@@'' css class

Cheers,

Ton


Fco Javier González Domínguez

unread,
Dec 25, 2017, 4:42:32 AM12/25/17
to TiddlyWiki
Thank you Birthe C
Of course i use StyleSheetShortcuts (Eric Shulman)
It's a preety way to format the text output. It's similar to how it is done in html using css3. That's why a like it.
In TW5 it's diferent. The pair "@@" to open and close the format, you don't know if the second "@@" is a new style. Evidently allways is a close to the style.
You are not able to nested styles.
I use this commonly:
example of a typical paragraph

{{pr1{
Lorem Ipsum es simplemente el texto de relleno de las imprentas y archivos de texto. {{lr{Lorem Ipsum ha sido el texto de relleno estándar de las industrias desde el año 1500}}}, cuando un impresor (N. del T. persona que se dedica a la imprenta) desconocido usó una galería de textos y los mezcló de tal manera que logró hacer un libro de textos especimen. No sólo sobrevivió 500 años, sino que tambien ingresó como texto de relleno en documentos electrónicos, quedando esencialmente igual al original. Fue popularizado en los 60s con la creación de las hojas "Letraset", las cuales contenian pasajes de Lorem Ipsum, y más recientemente con software de autoedición, como por ejemplo Aldus PageMaker, el cual incluye versiones de Lorem Ipsum.
}}}

Explication
{{pr1{ is a style por a paragraph, indented, justified, etc.
{{lr{ is a style for a part of text undelined in red.

How can a I make this in TW5
Thank you

Eric Shulman

unread,
Dec 25, 2017, 4:58:51 AM12/25/17
to TiddlyWiki
On Monday, December 25, 2017 at 1:42:32 AM UTC-8, Fco Javier González Domínguez wrote:
Thank you Birthe C
Of course i use StyleSheetShortcuts (Eric Shulman)
It's a preety way to format the text output. It's similar to how it is done in html using css3. That's why a like it.
In TW5 it's diferent. The pair "@@" to open and close the format, you don't know if the second "@@" is a new style. Evidently allways is a close to the style.
You are not able to nested styles.

It's a bit ugly, but you can use normal HTML syntax which, of course, *does* nest.... i.e., replace
{{classname {
with
<span class="classname">
and
}}}
with
</span>

Thus, for your example text:
<span class="pr1">

Lorem Ipsum es simplemente el texto de relleno de las imprentas y archivos de texto. 
<span class="lr">Lorem Ipsum ha sido el texto de relleno estándar de las industrias desde el año 1500</span>, cuando un impresor (N. del T. persona que se dedica a la imprenta) desconocido usó una galería de textos y los mezcló de tal manera que logró hacer un libro de textos especimen. No sólo sobrevivió 500 años, sino que tambien ingresó como texto de relleno en documentos electrónicos, quedando esencialmente igual al original. Fue popularizado en los 60s con la creación de las hojas "Letraset", las cuales contenian pasajes de Lorem Ipsum, y más recientemente con software de autoedición, como por ejemplo Aldus PageMaker, el cual incluye versiones de Lorem Ipsum.
</span>

It's not quite as abbreviated as the TWClassic curly bracket syntax, but it gets the job done.

enjoy,
-e
Eric Shulman
TiddlyTools.com: "Small Tools for Big Ideas!" (tm)
InsideTiddlyWiki: The Missing Manuals

Fco Javier González Domínguez

unread,
Dec 25, 2017, 11:26:53 AM12/25/17
to TiddlyWiki

Thank you Eric. I do it so, but as you say it's a bit ugly. I thought there was an other way to do it.
Thank you
Reply all
Reply to author
Forward
0 new messages