From: Bill P. <wi...@wh...> - 2010-06-09 17:45:50
|
I agree that it seems awkward. I guess if you think about it in the terms of the work that docutils is going to do (as opposed to latex doing the work) it makes a little more sense, which the --help seems to address it in that way: --section-numbering Enable section numbering by Docutils. (default) --no-section-numbering Disable section numbering by Docutils. On Wed, Jun 09, 2010 at 12:23:38PM -0500, Ryan Krauss wrote: > Right, same here. I guess that is the part that seems mildly broken > to me: I can only make section numbering and references work the way I > think they should by passing in a flag that seems like it should turn > the numbers off. > > On Wed, Jun 9, 2010 at 12:14 PM, Bill Purcell <wi...@wh...> wrote: > > It worked for me with the --no-section-numbering option which lets > > latex do the numbering instead of docutils. > > > > Bill > > > > On Wed, Jun 09, 2010 at 12:02:56PM -0500, Ryan Krauss wrote: > >> That is pretty close to what I want. A simple test is attached. The > >> latex looks like it should work, but the pdf doesn't have the section > >> number for the reference. Or maybe it does and it is just white text. > >> There seems to be a link there is you hunt with your mouse. > >> > >> If you don't want to mess with the attachments, here is the rst: > >> > >> ========== > >> My Title > >> ========== > >> > >> .. role:: latex(raw) > >> :format: latex > >> > >> .. default-role:: latex > >> > >> .. sectnum:: > >> :depth: 3 > >> > >> First Section > >> ============= > >> > >> `\label{sec1}` > >> > >> This is the first section. > >> > >> > >> Second Section > >> ============== > >> > >> In section `\ref{sec1}`, almost nothing was said. > >> > >> > >> > >> -------------- > >> The label and reference get written as: > >> > >> \DUrole{latex}{\label{sec1}} > >> > >> ... > >> > >> In section \DUrole{latex}{\ref{sec1}}, almost nothing was said. > >> > >> > >> Thanks, > >> > >> Ryan > >> > >> On Wed, Jun 9, 2010 at 11:33 AM, Bill Purcell <wi...@wh...> wrote: > >> > On Wed, Jun 09, 2010 at 08:44:26AM -0500, Ryan Krauss wrote: > >> >> lines mostly solves my problem, but it seems to break references to > >> >> sections when I just use raw latex `\ref{sec:mylabel}`. > >> > > >> > This works fine for me: > >> > > >> > .. role:: latex(raw) > >> > :format: latex > >> > > >> > .. sectnum:: > >> > :depth: 3 > >> > > >> > Test > >> > ==== > >> > > >> > :latex:`\ref{test}` > >> > > >> > > >> > Is this what your wanting? > >> > > >> > Does anyone know of anyway to reference the section number without > >> > using raw latex? I know you can link the title like `Test`_ but is it > >> > possible to reference the section number, maybe something like > >> > :ref:`test`. > >> > > >> > Bill > >> > > > > > > > > > > > |