pandoc-crossref icon indicating copy to clipboard operation
pandoc-crossref copied to clipboard

Cannot get secPrefix to work for References to Chapters output multiple prefixes for docx file

Open aleyner opened this issue 1 year ago • 2 comments

Hello! I'm looking for a solution to a similar problem (/issues/329). I want to display a section, subsection, paragraph and subparagraph. I convert markdown (github) to docx file. But I can only output the prefix "section" instead of "sec". Can you suggest how I can output multiple prefixes?

 ---
 link-citations: true
 nameInLink: true
 linkReferences: true
 secPrefix:
 - "section"
 - "subsection"                                                   
cref: true
listings: false
codeBlockCaptions: true
 ---
 

 # Chapter 1 {#sec:section}
 
Text with reference  [@sec:section] 
 
 ## Subsection {#sec:subsection}
 
Text with reference  [@sec:subsection]

I want to get the output:

Chapter 1

Text with reference section 1

Subsection

Text with reference subsection 1.1.

When I change the header structure, my number changes automatically, but the prefix does not. And every time I have to change them manually. I would like to automate this process and not think about such trifles.

My version pandoc-crossref v0.3.7.0 with Pandoc v2.10

aleyner avatar May 24 '23 07:05 aleyner

Hi. Sorry for the prolonged radio silence, this slipped through the cracks. Unfortunately, I don't bring good news, what you want isn't currently possible. secPrefix is an array to allow for proper singular/plural prefixes, e.g. sec. 1 but secs. 1-3 (using an array allows for languages with dual grammatical number as well)

I'll treat it as a feature request, but I can't promise any specific deadlines.

lierdakil avatar Jun 30 '23 20:06 lierdakil

I'll treat it as a feature request, but I can't promise any specific deadlines.

Thanks for your work and feedback. I will still hope and believe that you will solve this problem sooner or later.

aleyner avatar Jul 03 '23 08:07 aleyner