Automatic line breaks in reStructuredText list tables? [duplicate] - list

I use Sphinx to generate the docs for my project, with the extension autosummary. It generates a table with the names of my modules and their summary.
Here is an image of the result :
However, the lines are too long and we have to use the slider to read the whole description.
I would like to wrap the description text, to get rid of the slider bar. I have searched everywhere and found nothing.
I tried putting | xxxx or <br /> xxxx in my description but it did not work.
Thank you in advance !

Override the CSS on the table with your own styles. Specifically:
.wy-table-responsive table td,
.wy-table-responsive table th {
white-space: normal;
}
should take care of most of the problems. Or use a theme that does not use scrolling tables in its styles.

Related

how to increase apex 5.0.3 report font size

I have an interactive report retrieving numbers and I want to make these numbers a little bigger.
How can I do that? Is that even a thing in apex?
How can I increase the report overall font size or a specific column font size?
I tried changing the region item size to Large and XLarge but that changed nothing.
I keep finding posts suggesting something like this:
<style type="text/css">
.apexir_WORKSHEET_DATA td{
font-size: 18px;
font-weight: bold;
}
</style>
but I don't know where to put it to apply it to the report/region or column I want to apply that font to.
There are several possibilies to do this. You need to open column properties and find there a Column formatting section. There are following fields:
HTML Expression. Here you can put an HTML code, which will be inserted in a table cell. For example:
<div style="font-size: 18px; font-weight: bold;">#COLUMN_NAME#</div>
#COLUMN_NAME# here is a substitution string, it will be replaced with the value of sql column with name COLUMN_NAME. Put the name of your column here. You can even make column formatting dependent on value of another column.
CSS Classes. A name of a CSS class, which is be described in a css file or in page's properties (for example, CSS -> Inline). This class will be applied to the table cell.
CSS Style. Inline css style, will be added directly to the sell. For example, put there
font-size: 18px; font-weight: bold;
You can use one of these ways or combine them.
Thinking aloud: if this particular IR has "small font" and you want to enlarge it, I presume that all other pages in your application use the same, small font. Is that so? If YES, an out-of-a-box solution: why wouldn't you simply enlarge the whole page in your browser? In Mozilla Firefox, shortcut keys for that are [Ctrl +] (press Ctrl, hold it and press "plus" sign). Because, maybe you made it smaller by accident and didn't notice it.

Single Row View, Interactive Grid - express differences with font colors

I have a interactive grid, made from a full join on the title from the table wwv_flow_qb_saved_query and apex_collection. The result looks like this:
The first three columns are the queries built with the query builder from the wwv_flow_qb_saved_query. The last three columns are from an uploaded query to the apex_collections. The column "qb_sql" is a clob filled with the whole sql statement from the query, which looks in the single row view like this:
Now the end user should be able to see the differences in the column group "imported queries" => "qb_sql" with different colors. So that the part, that is different in the second qb_sql is for example red.
Is there any possibility to achieve this?
Thanks..
In grid view you can give all the cells in a column a special class using the declarative attribute Appearance: CSS Classes. But this does not apply to single row view.
The attribute Advanced: CSS Classes applies just to the editable field. Which is the same in both grid and single row view.
There is an advanced column option property, fieldCssClasses, that applies to the field in single row view. So for each of the fields/columns you want to look different add this to the Advanced: JavaScript Code attribute:
function(config) {
config.defaultGridColumnOptions = {
fieldCssClasses: "special"
}
return config;
}
Then add a CSS rule for .special to the page attribute CSS: Inline or add the rule to your application css file if you have one. For example:
.special {
font-weight: bold;
color: green;
}
Use whatever name you like for the css class; "special" is just an example.

Apex - Interactive Report - Hide Column in CSV Download?

I've got an interactive report in Apex with some columns.
The user has the option to download the report as CSV file with the standard functionality.
Is there a way to hide a column in the export but display it on the screen.
(Background: one column is a custom link that should not be exported into the CSV)
Thank you !
Paul
You can hide it by putting a condition on the column of type PL/SQL Expression and using the following as the expression:
NVL(:REQUEST,'EMPTY') NOT IN('CSV','XLS','PDF','XML','RTF','HTMLD')
That will check the APEX bind variable "REQUEST", and if it is CSV, XLS, PDF, XML, RTF or HTML then the column will not be shown!
More info
To stop a column from showing up for an email, you can use the following:
NVL(wwv_flow.g_widget_action, 'EMPTY') != 'SEND_EMAIL'
This one did not work for me:
NVL(:REQUEST,'EMPTY') NOT IN('CSV','XLS','PDF','XML','RTF','HTMLD')
So another workaround could be the following:
instr(nvl(:REQUEST,'~'),'XLS') = 0 and instr(nvl(:REQUEST,'~'),'PDF') = 0 and instr(nvl(:REQUEST,'~'),'HTMLD') = 0
Same logic applies for csv, rtf, etc.
The most upvoted answer didn't work for me.
The workaround from #George worked for me as well:
instr(nvl(:REQUEST,'~'),'XLS') = 0 and
instr(nvl(:REQUEST,'~'),'CSV') = 0
I applied this at an Interactive Report column (APEX 21.2)

CFCHART Title dynamically populated

I'm using CFCHART to generate awesome charts on the fly.
It would be nice to dynamically change the title of the chart based on selection criteria.... and I've been attempting to do that by setting a string, graphTitle, that conditionally populates based on selections. All I want to do is simply start a new line for each criterion.
For instance: Suppose I have a chart that has a large number of selection criteria in it. I would want the chart title to look like this: (Break, of course, indicates the end of a line)
Fiscal Year 2006 to projected 2013 (Break)
Hires of African American Heritage candidates (Break)
Whom are Female
From New Mexico, California, Texas and Colorado (Break)
With an Age of 29+ (Break)
With a breakdown of Degree Achievement:
I tried using the <SPAN> and <BR /> tags in the title. With no luck.
Any other ideas?
If you mean you want to add line breaks into the chart title so it "wraps" you might try adding ascii coded line breaks like so...
<Csfet linefeed = chr(10) & chr(13)/>
Then your variable would be
<cfset mytitle = "fiscal year 2006 to projected 2012 #linefeed# Hires of..."/>
And so on - you get the idea. Note: you might need "just" chr(10) or you might need both. you'll need to experiment. I don't "know" that this will work. If it were me and I wanted something that complex to decorate the chart I think I would draw a plain "undecorated" chart with only x and y axis labels present and then set up my title outside the chart using HTML. I would have better control that way.
Anyway if that doesn't work try fiddling with the "style" attribute. You can provide an XML () var with all sorts of options - but it is not well documented I'm afraid. Ray has some stuff on his blog regarding this.

Is it possible to create a mediawiki table where the columns are filled in by multiple templates?

Wikimedia explains how you can create a table based on multiple templates, where each row is formed from a single template.
Is there anyway to do the same for columns? It sounds easy but I could not get it to work. Instead my page displayed multiple tables instead of multiple columns.
Here's some code:
Row page
{|class="wikitable sortable" style="font-size:85%"
|+ table name
! Title 1
! Title 2
! Title 3
|-
{{R1}}
{{R2}}
{{R3}}
|}
Row template:
| Row 1, Column 1
| Row 1, Column 2
| Row 1, Column 3
|-
Column page
{{C1}}{{C2}}{{C3}}
Column template:
Don't know how this should work.
The only way I know of, other than creating a virtual table with floating <div>s, is using Labeled Section Transclusion (or its equivalent {{#dpl}} function if you have Extension:DynamicPageList). You separately label each cell of your "column template" using <section/> tags or headings, and then create a framework table that fills in each row by transcluding from the column templates. The structure would look something like this:
{|class="wikitable sortable" style="font-size:85%"
|+ table name
! Title 1
! Title 2
! Title 3
|- valign="top
| {{#lst:col1|row1}}
| {{#lst:col2|row1}}
| {{#lst:col3|row1}}
|- valign="top
| {{#lst:col1|row2}}
| {{#lst:col2|row2}}
| {{#lst:col3|row2}}
|- valign="top
| {{#lst:col1|row3}}
| {{#lst:col2|row3}}
| {{#lst:col3|row3}}
...
|}
This solution lacks the simplicity of tossing out columns the way you can toss out rows, but sadly HTML just isn't designed to create true column-based tables. However, with this layout at least all the information from each column is stored on the same page where you can edit it more easily ({{col1}}, {{col2}}, etc.), and if you're recording textual information then you can also read each column as a distinct page which might be handy.
If you plan on doing this a lot, you can further simplify this by creating a template that fills in each row so you only need to specify the row number, something like this: (assuming your columns are always placed as subpages of the article where they will appear)
template:col-based table row
{{!}}- valign="top"
{{!}} {{#lst: {{PAGENAME}}/col1 | row{{{1|}}} }}
{{!}} {{#lst: {{PAGENAME}}/col2 | row{{{1|}}} }}
{{!}} {{#lst: {{PAGENAME}}/col3 | row{{{1|}}} }}
Then under the header you'd just need to list:
{{col-based table row|1}}
{{col-based table row|2}}
{{col-based table row|3}}
...
Now, if you want to automatically-generate these rows until you exhaust the template (or in other words, have the table determine how many rows to create without you manually setting them up), that I don't think I can help you with. Perhaps you can do something clever with the DPL extension's table generation function, or install an extension that will allow you to create loops, but I think you'll probably be stuck creating each row manually as described above.
As a final note, because this is content and not formatting I'd advise that you put the column pages in the mainspace rather than the template namespace. In fact, this is the sort of thing that subpages are great for.
I think this is impossible. I thought about it for a bit, and I have no idea how to do it.
Maybe some sort of nested Templates that rearrange the order of the columns and rows. Seems very difficult, and I'm not sure it's theoretically possible.
you could get the columns filled by templates using DIVs, but you wil have to recreate and re-size each cell within each div manually