[TW5] Suppressing formatting

346 views
Skip to first unread message

Robert Edwards

unread,
Oct 23, 2014, 3:04:09 PM10/23/14
to tiddl...@googlegroups.com
I've searched and experimented but can't find quite the right combination of things to do what I want. I'm trying to create a tiddler that looks like the following (colored blue here just for clarity):

text

ssh://user@
bogushostname.com

text


I cannot seem to suppress the italicization of everything after the double slash. If I do the following:

"""
text

ssh://us...@bogushostname.com

text
"""


I get:

text

ssh:user@
bogushostname.com text

(I hope that renders correctly when I post it -- everything after the colon is italicized  and the line breaks between the second and third lines are removed)

I tried various permutations of tildes and triple-double quotes but no joy. Suggestions?

Thanks!



Jeremy Ruston

unread,
Oct 23, 2014, 3:19:35 PM10/23/14
to TiddlyWiki
Hi Robert

The usual way to handle this is to use a monospaced block for the command line:

text texttext texttext texttext texttext texttext texttext text

```
```

text texttext texttext texttext texttext texttext texttext text

Would that meet your needs?

Best wishes

Jeremy


--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.



--
Jeremy Ruston
mailto:jeremy...@gmail.com

Robert Edwards

unread,
Oct 23, 2014, 3:41:30 PM10/23/14
to tiddl...@googlegroups.com, jeremy...@gmail.com
Thanks Jeremy!

My actual tiddler is a bit more complicated than the simple example I posted but what you've suggested might be workaround.

Cheers!

Robert Edwards

unread,
Oct 23, 2014, 4:04:59 PM10/23/14
to tiddl...@googlegroups.com, jeremy...@gmail.com
Hmm -- not sure if this is a bug. the three backticks have to be preceded by two newlines. This works as expected:
clone from

```
ssh://h...@repolocationbogus.com
```
Lorum ipsum


But this does not:
clone from
```
ssh://h...@repolocationbogus.com
```
Lorum ipsum

The latter yields (approximately):
clone from `
ssh://h...@repolocationbogus.com

Lorum ipsum

In the latter case, in my TW the code-block-interpreted part gets rendered in this pinky-red color. The red text also has the code-block boxes around it, including the one backtick on the first line. The former case does not get colorized when rendered and only the second line gets rendered in monospace.
 
I noticed in your example you have the two newlines before the first set of backticks. Is that correctly required? The docs here:
http://tiddlywiki.com/static/Code%2520Blocks%2520in%2520WikiText.html
...say only that the backticks must be at the start of the line and immediately followed by a newline.

Thanks for your help! I'm having a bit of a struggle transitioning from TWC to TW5 and I appreciate the hand-holding!


On Thursday, October 23, 2014 3:19:35 PM UTC-4, Jeremy Ruston wrote:

PMario

unread,
Oct 23, 2014, 7:37:08 PM10/23/14
to tiddl...@googlegroups.com, jeremy...@gmail.com

On Thursday, October 23, 2014 10:04:59 PM UTC+2, Robert Edwards wrote:
I noticed in your example you have the two newlines before the first set of backticks. Is that correctly required? The docs here:

yes. That's required for TW5 paragraph handling. So if there is no double linebreak, TW parser things everything belongs together.

clone from ... will be a paragraph

```
ssh: ...   will be a <pre><code> block
```

-m

Robert Edwards

unread,
Oct 24, 2014, 7:58:21 AM10/24/14
to tiddl...@googlegroups.com, jeremy...@gmail.com
Makes sense. Perhaps a note could be added in the docs mentioning that? As I mentioned in the other post, the docs say only that the triple-backticks  must be at the beginning of a line and followed by a newline, not that they must also be preceded by a newline.

Cheers!

Jeremy Ruston

unread,
Oct 24, 2014, 9:50:59 AM10/24/14
to Robert Edwards, TiddlyWiki
Hi Robert

This stuff gets tricky to explain. The problem with the following example isn't so much that there's a line break missing before the three backticks, as that the previous paragraph needs a terminating double line break in order for it to be recognised as a paragraph:

text of previous paragraph
```
monospaced
```

I've done my best to clarify things here:


Best wishes

Jeremy.


Robert Edwards

unread,
Oct 24, 2014, 10:25:38 AM10/24/14
to tiddl...@googlegroups.com, rced...@gmail.com, jeremy...@gmail.com
That makes is clearer. Thanks!

Robert Edwards

unread,
Sep 22, 2015, 8:04:15 PM9/22/15
to TiddlyWiki, rced...@gmail.com, jeremy...@gmail.com
Since this is somewhat related to the previous question I'll reply to my old post and add on to this thread. In the future someone might find both questions useful...

Anyway, suppose I want to have double-slashes in the body of a paragraph, and I don't want the paragraph formatted as block text (i.e. no font differences) e.g.:

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus augue urna, scelerisque vel pulvinar eget, tincidunt vitae tellus. Etiam at hendrerit lacus. Vivamus pulvinar porta lacinia. Apple //e Proin a lorem bibendum, egestas ipsum ut, accumsan quam. Vivamus sagittis laoreet ex in ullamcorper. Phasellus rhoncus orci condimentum orci aliquet, quis consectetur mauris vehicula. Sed nec eleifend felis.

(Text made red for emphasis but would be black in my tiddler). Any way to do this?

Thanks

Eric Shulman

unread,
Sep 22, 2015, 8:20:36 PM9/22/15
to TiddlyWiki, rced...@gmail.com, jeremy...@gmail.com
On Tuesday, September 22, 2015 at 5:04:15 PM UTC-7, Robert Edwards wrote:
Anyway, suppose I want to have double-slashes in the body of a paragraph, and I don't want the paragraph formatted as block text (i.e. no font differences) e.g.:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus augue urna, scelerisque vel pulvinar eget, tincidunt vitae tellus. Etiam at hendrerit lacus. Vivamus pulvinar porta lacinia. Apple //e Proin a lorem bibendum, egestas ipsum ut, accumsan quam. Vivamus sagittis laoreet ex in ullamcorper. Phasellus rhoncus orci condimentum orci aliquet, quis consectetur mauris vehicula. Sed nec eleifend felis.
(Text made red for emphasis but would be black in my tiddler). Any way to do this?

You can use the <$text> widget, like this:
<$text text="Apple //e" />

-e

Robert Edwards

unread,
Sep 22, 2015, 9:24:56 PM9/22/15
to TiddlyWiki, rced...@gmail.com, jeremy...@gmail.com
That works. Thanks!

Tobias Beer

unread,
Sep 23, 2015, 2:15:59 AM9/23/15
to TiddlyWiki, rced...@gmail.com, jeremy...@gmail.com
Hi Eric,
 
You can use the <$text> widget, like this:
<$text text="Apple //e" />

Thanks, that's a neat trick.

Added instructions here: Literal Text @ tb5

In addition, to avoid conflicts with quotes within the text, use ""tripple quotes"""...

<$text text="""Apple "Pear" //Peach""" />

Eventually, a simple wikitext shorthand will still be welcome...

#1473 New wikitext syntax for representing literal text
https://github.com/Jermolene/TiddlyWiki5/issues/1473

Best wishes,

— tb

Eric Shulman

unread,
Sep 23, 2015, 2:56:52 AM9/23/15
to TiddlyWiki, rced...@gmail.com, jeremy...@gmail.com
On Tuesday, September 22, 2015 at 11:15:59 PM UTC-7, Tobias Beer wrote:
Hi Eric,
You can use the <$text> widget, like this:
<$text text="Apple //e" />
Eventually, a simple wikitext shorthand will still be welcome...
#1473 New wikitext syntax for representing literal text
https://github.com/Jermolene/TiddlyWiki5/issues/1473

What if we just extend the existing <$text> widget so it could be used to enclose content, as an alternative to using the text="..." param.  Then, you could write something like this:
<$text>
This block of content is
to be treated as plain text
even if it contains wiki formatting syntax
Note: unlike a code block,
current CSS styles, block mode, and word-wrap are still applied
</$text>

-e

Tobias Beer

unread,
Sep 23, 2015, 3:18:45 AM9/23/15
to TiddlyWiki, rced...@gmail.com, jeremy...@gmail.com
Hi Eric,
 
What if we just extend the existing <$text> widget so it could be used to enclose content, as an alternative to using the text="..." param.

The convention would have to be that using TextWidget without any parameters, it would never create any child widgets it contains but only output whatever text is inside, as is.

Best wishes,

— tb 

Jeremy Ruston

unread,
Sep 23, 2015, 3:21:06 AM9/23/15
to Tobias Beer, TiddlyWiki, rced...@gmail.com
The trouble is that we'd need different parsing behaviour with the text widget. That breaks the layering; currently, the parser layer doesn't know about individual widgets.

Best wishes

Jeremy


Tobias Beer

unread,
Sep 23, 2015, 3:57:07 AM9/23/15
to TiddlyWiki, beert...@gmail.com, rced...@gmail.com
Hi Jeremy,
 
The trouble is that we'd need different parsing behaviour with the text widget. That breaks the layering; currently, the parser layer doesn't know about individual widgets.

So, custom wikitext markup would be the only way to go, right?

Best wishes,

— tb

Jeremy Ruston

unread,
Sep 23, 2015, 4:29:53 AM9/23/15
to tiddl...@googlegroups.com, TiddlyWiki, beert...@gmail.com, rced...@gmail.com
So, custom wikitext markup would be the only way to go, right?
​yes; we've actually already got one; triple double quotes yields a text widget.
​Best wishes
​Jeremy








Best wishes,

— tb

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.

Tobias Beer

unread,
Sep 23, 2015, 6:34:23 AM9/23/15
to TiddlyWiki, beert...@gmail.com, rced...@gmail.com
Hi Jeremy,
 
​yes; we've actually already got one; triple double quotes yields a text widget

Not sure what you mean, if I do...

"""
test//``''foo <bar baz
"""


I get scrambled eggs.

Best wishes,

— tb

BJ

unread,
Sep 23, 2015, 7:59:20 AM9/23/15
to TiddlyWiki, rced...@gmail.com, jeremy...@gmail.com
I think you can use 4 single quotes between the slashes /''''/ which renders as //

Cheers
BJ

Tobias Beer

unread,
Sep 23, 2015, 8:29:13 AM9/23/15
to tiddl...@googlegroups.com, rced...@gmail.com, jeremy...@gmail.com
Hi Metabele,
 
I think you can use 4 single quotes between the slashes /''''/ which renders as //

As said on Github, to me, the idea is to not at all mess about with the text that you just want as-is.
It might be long, it might be from somewhere else, it might update, it might have tons of code, whichever.
You want it look like regular text, not like a code-block, not like inline-code, just text.

Best wishes,

— tb

Robert Edwards

unread,
Sep 23, 2015, 8:59:41 AM9/23/15
to TiddlyWiki, rced...@gmail.com, jeremy...@gmail.com
Interesting discussion on Github -- thanks for the link. Eric's suggestion solved my immediate problem, and I sincerely appreciate his help! However as y'all discussed on Github I do think a simpler syntax would be helpful.

Cheers!


On Wednesday, September 23, 2015 at 8:29:13 AM UTC-4, Tobias Beer wrote:
Hi Metabele,
 
I think you can use 4 single quotes between the slashes /''''/ which renders as //

As said on Github, to me, the idea is to not at all mess about with the text that you just want as-is.
It might be long, it might be from somewhere else, it might update, it might have tons of code, whichever.
You want it look like regular text, not like a code-block, not like a codeline, just text.

Best wishes,

— tb

Jeremy Ruston

unread,
Sep 23, 2015, 11:49:21 AM9/23/15
to TiddlyWiki, Tobias Beer, Robert Edwards
Hi Tobias

Not sure what you mean, if I do...

My apologies, you're quite right; we ended up using triple double quotes to mark a block with hard line breaks.

Best wishes

Jeremy.

 

"""
test//``''foo <bar baz
"""


I get scrambled eggs.

Best wishes,

— tb

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages