This question about Missing functionality: Answered

How do I get a non-verbatim, non-pre box?

I don't even know exactly how to ask this, but I want to have a verbatim box, only I want Wiki Words to be turned into links, and have the regular markup stuff work.

I guess what I'm really looking for is for a way to draw a box, and then have the effect of every line ending with %BR% without actually having to add %BR% to the end of every line. This would help me immensely with my efforts to convert documents, and thus our users, from tikiwiki to foswiki.

<pre> doesn't work: It doesn't turn Wiki Words into links, for one.

I suppose that I create my own <div> box, with some CSS, but that's not the wiki way, and not something I want folks to see.

-- DougClaar - 13 Feb 2010

Do you want the whole topic content to be in that box or just a part of it?

In case you want the whole topic:
  • You can use VIEW_TEMPLATEs to hide your div/css stuff: Put your div/css around the %TEXT% macro.
In case you want to markup just a part of the topic:
  • Put your div/css stuff in a global variable (ie. in Main.SitePreferences):
   * Set STARTBOX = <div class='mybox'>
   * Set ENDBOX = </div>

Your users can use %STARTBOX% and %ENDBOX% instead of the full div/css markup.

-- OliverKrueger - 13 Feb 2010

Well, I mis-spoke, err, typed. A <div> box doesn't really do it, because it jams all the text together. I want all the markup to work, but not the line collapsing. So, in effect,

<box>
FourScore and seven years ago
our fathers brought forth on this continent a new nation,
conceived in Liberty, and dedicated to the proposition that all men are created equal.
</box>

creates the equivalent of:

FourScore and seven years ago %BR%
our fathers brought forth on this continent a new nation, %BR%
conceived in Liberty, and dedicated to the proposition that all men are created equal. %BR%

-- DougClaar - 16 Feb 2010

at times, i have also wanted the TeX equivalent of \obeylines. i can't wait to find out what the answer is...

-- WillNorris - 16 Feb 2010

There was an old man with some time, Whos answers were written in rhyme.

When asked about breaks, he said "yes you can!" As long as you don't expect my poems to scan.

The answer, you see, is white-space:pre The CSS styles can set you free. smile

-- CrawfordCurrie - 03 Mar 2010

I've needed something similar to capture IBM z/OS mainframe screens with:

  • Use %TERMINAL% in front of text pasted from an emulator screen to create a good facsimile of a screen, but with text that remains searchable, highlightable and link-able. You need to end the block with %ENDTERMINAL%
  • Set TERMINAL =
    If this terminal display looks odd, please refresh your browser
  • Set ENDTERMINAL =
and then:

If this terminal display looks odd, please refresh your browser
Menu Utilities Compilers Options Status Help
OS/390 Primary Option Menu Option ===>

0 Settings Terminal and user parameters User ID . : JML0001 1 View Display source data or listings Time. . . : 06:55 2 Edit Create or change source data Terminal. : 3278 3 Utilities Perform utility functions Screen. . : 6 4 Foreground Interactive language processing Language. : ENGLISH 5 Batch Submit job for language processing Appl ID . : ISR 6 Command Enter TSO or Workstation commands TSO logon : IKJTSO 7 Dialog Test Perform dialog testing TSO prefix: JML0001 8 SDSF Spool Display and Search Facility System ID : TSO1 9 TSO-MAIL Send TSO Datasets to MAIL MVS acct. : P000,408 10 SCLM SW Configuration Library Manager Release . : ISPF 5.9 11 Workplace ISPF Object/Action Workplace 12 OS/390 System OS/390 system programmer applications 13 OS/390 User OS/390 user applications G GROUP Group Option Menu U USER User defined panel

Enter X to Terminate using log/list defaults

-- JulianLevens - 03 Mar 2010

Also see the solutions at TWiki:Support.SID-00297

-- SeanMorgan - 04 Mar 2010

Cool! For reference, putting the above in verbatim:
   * Set TERMINAL = <table><tr><td style="font-size:small; font-style:italic; border:5px ridge lawngreen; ">If this terminal display looks odd, please refresh your browser</td></tr><tr><td style="white-space:pre; font-family:'Lucinda Console',monospace; background-color:black; color:lawngreen; margin-right:380px">
   * Set ENDTERMINAL = </td></tr></table>

A simpler definition would be:
   * Set BOX = <div style="white-space:pre;">
   * Set ENDBOX = </div>

With the end result of:

FourScore and seven years ago our fathers brought forth on this continent a new nation, conceived in Liberty, and dedicated to the proposition that all men are created equal.

Thanks for all the suggestions!

QuestionForm edit

Subject Missing functionality
Extension
Version Foswiki 1.0.9
Status Answered
Topic revision: r9 - 10 Mar 2010, DougClaar
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy