EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024  2025  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024  2025 
<== Date ==> <== Thread ==>

Subject: RE: Question about Sphinx tables
From: Mark Rivers via Tech-talk <[email protected]>
To: "'Engbretson, Mark S.'" <[email protected]>, "Cobb, TM (Tom)" <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Mon, 17 Jun 2019 17:01:17 +0000

Hi Mark and Tom,

 

Thanks for the reply.  I found that this works well:

 

.. cssclass:: table-bordered table-striped table-hover

.. csv-table::

   :header: Record names, Record types, GenICam features

   :delim: |

   :widths: auto

 

I added the lines in red.  The table now appears as in the attachment.

 

I have another question.  The CSV table documentation here http://docutils.sourceforge.net/docs/ref/rst/directives.html#id4 says that csv-table takes a “width” option, which specifies the width in absolute units or relative to the current line length.  However, I get an error when I try to use that option.

 

/home/epics/devel/areaDetector-3-6/docs/_docs/ADGenICam/ADGenICam.rst:507: WARNING: Error in "csv-table" directive:

unknown option: "width".

 

.. csv-table::

   :header: Record names, Record types, GenICam features

   :delim: |

   :widths: auto

   :width: 50%

 

Any idea why I am getting the error?

 

Thanks,

Mark

 

 

 

From: Engbretson, Mark S. <[email protected]>
Sent: Monday, June 17, 2019 9:56 AM
To: Mark Rivers <[email protected]>
Subject: RE: Question about Sphinx tables

 

https://pythonhosted.org/sphinxjp.themes.basicstrap/sample.html#grid

 

.. cssclass:: table-bordered

 

Maybe?

 

From: [email protected] <[email protected]> On Behalf Of Mark Rivers via Tech-talk
Sent: Monday, June 17, 2019 9:44 AM
To: [email protected]
Subject: Question about Sphinx tables

 

Folks,

 

Thanks to a lot of work by Stuart Wilkins the areaDetector documentation is moving from pure HTML to .rst files processed with Sphinx and hosted at https://areadetector.github.io/master/index.html.

 

I have a question about how to make the tables look better. 

 

I have a simple CSV table:

 

.. csv-table::

   :header: Record names, Record types, GenICam features

   :delim: |

 

   FrameRate, FrameRate_RBV | ao, ai | FrameRate or FrameRateAbs

   FrameRateEnable, FrameRateEnable_RBV | bo, bi| FrameRateEnable or FrameRateEnabled

   TriggerSource, TriggerSource_RBV | mbbo, mbbi | TriggerSource

   TriggerOverlap, TriggerOverlap_RBV | mbbo, mbbi | TriggerOverlap

   TriggerSoftware | bo | TriggerSoftware

   ExposureMode, ExposureMode_RBV | mbbo, mbbi | ExposureMode

   ExposureAuto, ExposureAuto_RBV | mbbo, mbbi | ExposureAuto

   GainAuto, GainAuto_RBV | mbbo, mbbi | GainAuto

   PixelFormat, PixelFormat_RBV | mbbo, mbbi | PixelFormat

 

Sphinx generates this HTML for the beginning of the table:

 

<table border="1" class="docutils">

<colgroup>

<col width="33%" />

<col width="33%" />

<col width="33%" />

</colgroup>

<thead valign="bottom">

<tr class="row-odd"><th class="head">Record names</th>

<th class="head">Record types</th>

<th class="head">GenICam features</th>

</tr>

</thead>

<tbody valign="top">

<tr class="row-even"><td>FrameRate, FrameRate_RBV</td>

<td>ao, ai</td>

<td>FrameRate or FrameRateAbs</td>

 

Note that it has border=”1”, so the table should have borders.  However, it actually renders (in Chrome) as shown in the attachment, i.e. with no borders.

 

I manually edited the HTML to change it to “border=5” and that made no difference, there are still no borders.

 

If I remove the class=”docutils” from the table line, then it does render differently (closely packed columns), but there are still no borders.

 

Can anyone tell me what is causing this behavior?  I suspect it may be related to these lines near the beginning of the generated HTML file:

 

    <link rel="stylesheet" href="" type="text/css" />

    <link rel="stylesheet" href="" type="text/css" />

 

Do those style sheets override the settings for tables?  I looked at those files and I did not see anything obvious for the table borders.

 

Is there a way to get borders?

 

Thanks,

Mark

 

 

 

Attachment: sphinx_table.png
Description: sphinx_table.png


References:
Question about Sphinx tables Mark Rivers via Tech-talk

Navigate by Date:
Prev: RE: Question about Sphinx tables tom.cobb--- via Tech-talk
Next: PVA Client in python Florian Feldbauer via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024  2025 
Navigate by Thread:
Prev: RE: Question about Sphinx tables tom.cobb--- via Tech-talk
Next: procServ v2.8.0-rc2 available for testing and feedback Ralph Lange via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024  2025 
ANJ, 17 Jun 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions ·
· Download · Search · IRMIS · Talk · Documents · Links · Licensing ·