Change alignment of columns in table
Hi,
We want to have top aligned Name column in the table for our generated macro documents. The reason for this is because sometimes we have quite much text in the Description column and then the Name is hard to see when it's aligned in the middle.
We have tried to keep the Markdown format in the template and achieve this but have failed with that. Instead of:
| Name | Description | Default Value |
| :------------- | :------------- | :------------- |
#foreach ($param in $funcInfo.getParameterList())
| <a id="${funcInfo.functionName}-${param.name}"></a>$param.name | #if(!$param.docString.isEmpty()) ${util.markdownCellFormat($param.docString)} #else <p align="center"> - </p> #end | #if(!$param.getDefaultValue().isEmpty()) <code>$param.getDefaultValue()</code> #else none #end|
#end
We have now added html to be able to get the alignment:
<table>
<tr>
<th align="left">Name</th>
<th align="left">Description</th>
<th align="left">Mandatory</th>
<th align="left">Default Value</th>
</tr>
#foreach ($param in $funcInfo.getParameterList())
<tr>
<td valign="top" align="left"><a id="${funcInfo.functionName}-${param.name}"></a>$param.name </td>
<td align="left">
#if(!$param.docString.isEmpty()) ${util.markdownCellFormat($param.docString)}#else <p align="center"> - </p> #end
</td>
<td align="left"> $param.mandatory </td>
<td align="left"> #if(!$param.getDefaultValue().isEmpty())<code>$param.getDefaultValue()</code> #else none #end </td>
</tr>
#end
</table>
It's not what we prefer since it will not be as nice to read as Markdown.
Do you have any idea how to fix this and still keep the Markdown format?
We can live with our html in the template but it's not the preferred solution.
Thanks!
Hi @lisaonduty,
Sorry for the delay in a response to this and other issues you've filed. At the moment we have plans to rework how Stardoc integrates with Bazel so that it's less brittle. This unfortunately means that we're not prioritizing feature requests and formatting issues unless they majorly impact Stardoc's usability or are clear regressions.
Thanks @brandjon for your response, This is not the most prioritized task with our own documentation. As I said previous, we can live with our html-template. I think that it will be great if Stardoc gets improved and uses a Bazel evaluation then I think/hope that using Stardoc rules will work the same as using Bazel. In another ticket I have filed about dependencies for example shows how it differs. So I look forward to the updated Stardoc :-)