:ref:`My custom link text goes here<path/to/document:section title>` {endcode} +{subsection: Syntax Highlighting} + +Sphinx can perform syntax highlighting in code blocks, and can sometimes automatically detect what language is in the block, but usually needs a hint to help it out. +A code block with an explicit language looks like this: + +{code} +.. code-block:: console + + $ condor_q + + -- Schedd: submit.chtc.wisc.edu : <127.0.0.1:9618?... @ 12/31/69 23:00:00 + OWNER BATCH_NAME SUBMITTED DONE RUN IDLE HOLD TOTAL JOB_IDS + nemo batch23 4/22 20:44 _ _ _ 1 _ 3671850.0 + nemo batch24 4/22 20:56 _ _ _ 1 _ 3673477.0 + nemo batch25 4/22 20:57 _ _ _ 1 _ 3673728.0 + nemo batch26 4/23 10:44 _ _ _ 1 _ 3750339.0 + nemo batch27 7/2 15:11 _ _ _ _ _ 7594591.0 + nemo batch28 7/10 03:22 4428 3 _ _ 4434 7801943.0 ... 7858552.0 + nemo batch29 7/14 14:18 5074 1182 30 19 80064 7859129.0 ... 7885217.0 + nemo batch30 7/14 14:18 5172 1088 28 30 58310 7859106.0 ... 7885192.0 + + 2388 jobs; 0 completed, 1 removed, 58 idle, 2276 running, 53 held, 0 suspended + +{endcode} + +Some common languages you may want to use: +*: =console=: =bash= console sessions +*: =bash=: =bash= scripts +*: =text=: plain text, no syntax highlighting +*: =doscon=: Windows CMD sessions +*: =bat=: Windows BAT files + +We also have some custom lexers, defined in =full_conf.py=: +*: =condor-classad=: A new or old-style ClassAd +*: =condor-classad-expr=: A bare ClassAd language expression +*: =condor-submit=: Condor submit language +*: =condor-config=: Condor configuration language + + {subsection: Documenting Python Objects} Python "objects" (classes, methods, free functions, enums, anything) are documented via =sphinx-autodoc= (https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html). "Docstrings" for these objects are written directly into the Python bindings C++ source code, are embedded into the Python library during the HTCondor build process, and are then read by Sphinx during the manual build.