forum Quote text and Code display

If you are having a problem with logging into the site or with registering, then post under this forum to try to get help, or just use the "contact us" link at the bottom of the page to notify the Site Administrators.
Message
Author
User avatar
tradonal
Posts: 69
Joined: Mon Sep 25, 2017 11:43 am

forum Quote text and Code display

#1 Post by tradonal »

Hello all,
It's just to know which method to use for the output of a command on the forum :p

like this:

Code: Select all

$ apt search linux-* 3.16.0-6-586
En train de trier... Fait
Recherche en texte intégral... Fait
linux-headers-3.16.0-6-586/oldstable 3.16.56-1+deb8u1 i386
Header files for Linux 3.16.0-6-586

linux-image-3.16.0-6-586/oldstable,now 3.16.56-1+deb8u1 i386 [installé]
Linux 3.16 for older PCs
or like that

Code: Select all

$ apt search linux-* 3.16.0-6-586
En train de trier... Fait
Recherche en texte intégral... Fait
linux-headers-3.16.0-6-586/oldstable 3.16.56-1+deb8u1 i386
  Header files for Linux 3.16.0-6-586

linux-image-3.16.0-6-586/oldstable,now 3.16.56-1+deb8u1 i386  [installé]
  Linux 3.16 for older PCs
THX

User avatar
Eadwine Rose
Administrator
Posts: 11894
Joined: Wed Jul 12, 2006 2:10 am

Re: forum Quote text and Code display

#2 Post by Eadwine Rose »

The code one :) Sometimes outputs can run quite lengthy, code leaves formatting of the command as is, and makes a nice scroll bar on longer entries.
MX-23.2_x64 July 31 2023 * 6.1.0-18-amd64 ext4 Xfce 4.18.1 * 8core AMD Ryzen 7 2700
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 525.147.05 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 860EVO * Samsung S24D330 & P2250 * HP Envy 5030

User avatar
fehlix
Developer
Posts: 10303
Joined: Wed Apr 11, 2018 5:09 pm

Re: forum Quote text and Code display

#3 Post by fehlix »

Please do use code-tags ( the icon above the editor window </>) and paste between
the code-tags [code] paste output here[/code].
For short quotes is probably ok to use quote-tags ( quote-icon above editor window " and paste between [quote] paste quotes here [/quote].
Hint: When you mark text and press the tag-icon above the editor the text goes into the tags.
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
tradonal
Posts: 69
Joined: Mon Sep 25, 2017 11:43 am

Re: forum Quote text and Code display

#4 Post by tradonal »

;)
Thank you for your return, if I understand correctly there is no well defined rule for that ...
if not, is it possible to color, if so how?
For example,
For have this
Image

Code: Select all

# ls
#.bash_history#  directory.txt  geany-themes  LGPL     packaging           RESULTS1.txt  Téléchargements
Bureau           Documents      Images        Modèles  Public              RESULTS2.txt  usr
Desktop          dwhelper       infogrub.txt  Musique  recherches emplois  RESULTS.txt   Vidéos
thank you

User avatar
fehlix
Developer
Posts: 10303
Joined: Wed Apr 11, 2018 5:09 pm

Re: forum Quote text and Code display

#5 Post by fehlix »

tradonal wrote: Sat Jun 16, 2018 11:43 am ;)
Thank you for your return, if I understand correctly there is no well defined rule for that ...
if not, is it possible to color, if so how?
Well, it is a polite moderator request, and in this sense it is well spelled out. :happy:

In addition, do please consult the FAQ above,
esp. Can I use HTML?
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
tradonal
Posts: 69
Joined: Mon Sep 25, 2017 11:43 am

Re: forum Quote text and Code display

#6 Post by tradonal »

fehlix wrote: Sat Jun 16, 2018 11:53 am
tradonal wrote: Sat Jun 16, 2018 11:43 am ;)
Thank you for your return, if I understand correctly there is no well defined rule for that ...
if not, is it possible to color, if so how?
Well, it is a polite moderator request, and in this sense it is well spelled out. :happy:

In addition, do please consult the FAQ above,
esp. Can I use HTML?
;)
yes, I knew for the html
But it is possible to color bbcode, but this is not easy to do ...
for example, is it possible to redirect the output of a command to bbcode .... for html I use ccze ... ??

Image
with this https://www.stuffbydavid.com/textcolorizer it's not top ....
root@mx1:~
# ls
#.bash_history# Documents infogrub.txt Modèles recherches emplois systemctlperso
Bureau dwhelper iwlistperso Musique RESULTS1.txt Téléchargements
Desktop geany-themes LGPL packaging RESULTS2.txt usr
directory.txt Images lshw.html Public RESULTS.txt Vidéos

thank you

User avatar
fehlix
Developer
Posts: 10303
Joined: Wed Apr 11, 2018 5:09 pm

Re: forum Quote text and Code display

#7 Post by fehlix »

You mean like this bbcolor code:
Hello world!

Seems to work.
Thank you for this info.
Quoted:
Hello world!
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
cyrilus31
Posts: 629
Joined: Thu Nov 03, 2016 3:24 pm

Re: forum Quote text and Code display

#8 Post by cyrilus31 »

C'est psychédélique.
I think it's bearable (and even funny) once in a while but too often and you get a big headache :frustrated:

User avatar
tradonal
Posts: 69
Joined: Mon Sep 25, 2017 11:43 am

Re: forum Quote text and Code display

#9 Post by tradonal »

fehlix wrote: Sun Jun 17, 2018 4:31 pm You mean like this bbcolor code:
Hello world!

Seems to work.
Thank you for this info.
Quoted:
Hello world!

cyrilus31 wrote: Mon Jun 18, 2018 3:17 am C'est psychédélique.
I think it's bearable (and even funny) once in a while but too often and you get a big headache :frustrated:
;)

yes and this is not the goal, but just a parenthesis .... :hitmyhead:
-) for color, I was thinking of something like this, which does not work on MX forum ...
source of the example: https://www.debian-fr.org/c/support
-) With code
</code></pre>
<pre><code class="lang-auto">$ cat /isos/00_isoboot.cfg

</code></pre>
<pre><code class="lang-auto">menuentry "bl-Deuterium-i386 install" {
set root='hd0,msdos1'
set isofile="/isos/bl-Deuterium-i386+NonPAE_20170429.iso"
loopback loop (hd0,msdos1)$isofile
linux (loop)/install/gtk/vmlinuz findiso=${isofile} video=vesa:ywrap,mtrr vga=788 -- quiet
initrd (loop)/install/gtk/initrd.gz
}</code></pre>
-) we get a color output like this
Image

;)

User avatar
Eadwine Rose
Administrator
Posts: 11894
Joined: Wed Jul 12, 2006 2:10 am

Re: forum Quote text and Code display

#10 Post by Eadwine Rose »

I'd kindly request leaving the colors out of posts, it's easier to read when posts are in plain jane text. Thanks :)
MX-23.2_x64 July 31 2023 * 6.1.0-18-amd64 ext4 Xfce 4.18.1 * 8core AMD Ryzen 7 2700
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 525.147.05 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 860EVO * Samsung S24D330 & P2250 * HP Envy 5030

Post Reply

Return to “Site Help”