Is there a wiki-style "Playground" on this site?

It seems that most Markdown implementations allow the definition of reference-style links. Does this work here?

The LibreOffice suite is free software and is cross-platform.

Yes, it does work! The definition of the link is hidden as it should be. It goes like this:

[libo-on-wikipedia]: "LibreOffice on Wikipedia"

Just to be clear for others, the link text anchor in the above is [LibreOffice][libo-on-wikipedia] which is then followed later by the link citation shown in the code example.

Syntax test (fdo#1234) here (@qubit)

Comment on an old answer

new comment with fdo#1234 and blo#2345 in it.

quoting styles


foo@bar:~/$ for i in blah; do echo harumph; done

Let’s play with code!

Here is some code within backticks(0).

Does this mark as code?
I = 5; Hope = 0; So = "period"

Yep, that works. Now for syntax highlighting?

a = 5
puts "Superdog " + 5
a.each{|beach, ball|
  some = stuff = here
  puts "is important"

Nope, doesn’t seem to have support for syntax highlighting like on GitHub

Note to self: Maybe just file request w/upstream now…

Code commenting styles – what works, what doesn’t work, etc.

    /* Some C-style code */
    #include <stdio.h>
    int main(void) {
      printf("hello, world\n"); /* End of line comment */

C works pretty well.


    // Some Java code
    class HelloLibO {
      public static void main(String[] args) {
        System.out.println("Hello World!"); // End of line comment

Java looks pretty good!

How about Python?

    # A Hello-world function (with some extra stuff thrown in).
    def HelloWorld(s):
        print("Hello world")
        for foo in bar
          if passes(foo)
            print '%s' % foo
            print "Fails!"

Multi-line comments?

    """ Multi-line comment in Python
    probably isn't going to work right now

No, not working too well.

LibreOffice Basic?

    ' This is a Hello World snippet.
    print "Hello, world!"

Hmm… the formatter hates the unclosed single-quote. Let’s try again using ‘REM’

    REM This is a Hello World snippet.
    print "Hello, world!"

A little better, but the comment is still being highlighted like code, not a comment. Let’s try again, using either a C+±style or Bash-style comment.

    REM // This is a Hello World function.
    REM # Hopefully these comments will render as expected!
    Sub Main
      print "Hello, world!" REM # End of line comment.
    End Sub

Here’s some more LO Basic as a formatting example (from this question):

    Sub Main
      Set thisBook = ThisComponent
      studentsSheet = thisBook.Sheets.getByName("Students")

      i = 0
        c = studentsSheet.getCellByPosition(0, i)

        REM // Stop creating sheets for students once we find a
        REM // row with no name.
        If c.Type = Then
          print "Exiting: Found row with no student name."
          Exit Do

        studentName = c.String
        sNew = thisBook.createInstance("")
        thisBook.Sheets.insertByName(studentName, sNew)
        i = i + 1

      REM // Sanity-check on looping forever. We don't expect 
      REM // to have over 1000 students.
      Loop Until i > 1000
    End Sub

Here’s an upstream post about the code behind the syntax highlighting:

Looks like it’s

Also see – looks like it might be possible to pass-along the language name and get a bit better highlighting. We might need to add a new language handler if LO Basic and Visual Basic use a different grammar.

I don’t know how it is here, but in StackOverflow, you can put in a comment tag to hint at what language should be used by prettify: <!-- language: lang-c++ -->

Testing out how long it takes to post a new answer!

Let’s put at least a little content in here…

Comment #1. AAAAnd test!

Another one!

blah (2x Shift+Enter)

  1. blah

  2. blah




Hey @manj_k, I’m now hanging out in #libreoffice-ask on freenode. It’s not an official channel, but it’ll work if anyone wants to chat :slight_smile:

testing this one out – cool, that worked.

Like lightning he darted off to the left right and disappeared between the two warehouses almost falling over the trash can lying in the middle of the sidewalk.

He tried to nervously tap his way along in the inky darkness and suddenly stiffened: it was a dead-end, he would have to go back the way he had come.

test upload.odt

Hey @manj_k, Is there a way to see change-tracking on comments? I poked around, but I didn’t seem to find a link for such a thing…

@manj_k – Oh, and congrats on 4000+ karma :slight_smile: