Hi I am having some confusion with code block macro.

Krupesh Desai January 10, 2012

Please have a look at the code block on this page, http://www.oracle-base.com/articles/11g/QueryResultCache_11gR1.php

I am not able to configure code block macro in such manner, I want to show some code on documentation in the same manner.

please give some suggestions.

4 answers

1 accepted

0 votes
Answer accepted
Krupesh Desai January 11, 2012

done.. thnaks a lot

0 votes
muschol January 11, 2012

Ok, I see what you are after now. Indenting is a little tricky in Confluence, but not impossible. What you can do is create a section with two columns. The first column you make something like 5 or 10% width and leave empty (it effectively creates the indent). You then make the second column 90% width and put your code into it.

So in the rich text editor, you would do this as follows:

  • Select Insert->Other Macro and search for "section". Then create one of those
  • Click inside the section and select Insert->Other Macro and search for "column". Make it 5%, then click Insert.
  • Then click blow the Column that you've just created but inside the Section and select Insert->Other Macro and search for "column" again. Make it 95% width and then click Insert.
  • You then place your code box into the second column.

Hope this helps.

Matt

0 votes
Krupesh Desai January 11, 2012

hi, thanks for quick reply, but it was not much helpful.

please have a look at this web page ,http://www.oracle-base.com/articles/11g/QueryResultCache_11gR1.php

I can achive this no syntax and light grey background with panel macro but the till now impossible task for me was to have some margein on left hand side as you can see in the above web page , this macro boxes never move a bit. sometimes in editing window they accept left indent commnad and move but while you previw it or save it , in comes exactly from where text starts I want it to have some left indent. no syntax highlight is not a problem for me , it just the left indentation.!! please give some suggestions.

0 votes
muschol January 10, 2012

The "noformat" macro might help in this case. It will show the code as formatted by yourself without any syntax highlighting. We use this a lot for our own documentation, which we generate directly from Confluence.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events