Hi André,

I have a similar problem to yours. I'm converting from LaTeX to HTML5. I find \ref{} works but \label{} doesn't label the caption. Can you share the contents of your pandoc-crossref.yml in case I'm missing something?

I tried your advice here, also using ```\label{tbl:label-name}``` in my LaTeX without success.

Thanks in advance!
Leena

On Monday, 7 December 2020 at 13:03:39 UTC-8 andrel...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:
The issue is solved.

pandoc -s -f latex -F pandoc-crossref -M crossrefYaml=/...path.../pandoc-crossref.yaml --citeproc --bibliography=bibfile.bib --csl=cslfile.csl -o output.docx -t docx latexfile.tex

Furthermore figures and tables are only numbered if there is a label attached to the floating-object in LaTeX where a figure or table is embedded. It does not matter if the label is used or not for a reference. Only the fact if a label is attached to the floating object decides if the numbering of a figure or table is printed. And the label must exactly correspond to the syntax "fig:.." and "tbl:..". If this syntax in the label is not followed, there is no numbering of the figure or table.


On Thu, Dec 3, 2020 at 12:13 AM André Jäger <andrel...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Thank you for the answer.

Yes, I managed to specify the bibliography and the csl-file using pandoc-citeproc. I just left it out for this example - since my difficulty is to use pandoc-crossref.

For example the numeration of the figures in the output-document (docx-doument) is missing.
Instead of "Figure x: abc" there is only "abc" written, no "Figure x". Same with tables.

I guess the output has to be defined somewhere. How does pandoc-crossref know what to do? I guess I have to define it somewhere.
In the sample-link I see the following comands:
- crossrefYaml: "includes/pandoc-crossref.yaml"
- link-citations: true

Do I have to specify more in the command:

pandoc -s -f latex --filter pandoc-crossref -o destinationfile.docx -t docx latexfile.tex

for example a yaml-file ?

André


gnu...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org schrieb am Dienstag, 1. Dezember 2020 um 09:17:12 UTC+1:

The `--filter ` option is correct. Are you sure the pandoc-crossref executable (probably yes)
also you need to specify the bibliography as shown here
https://raw.githubusercontent.com/gabyx/TechnicalMarkdown/master/Content.md

BR

Am 30.11.2020 um 18:43 schrieb André Jäger:
Hello,
I need to convert a tex-file (latex-document) into a docx-document.

I managed successfully the creation of the bibliography using pandoc-citeproc with a csl-file.

Now I would like to take care of the cross-references and numbering of figures and tables. Therefore pandoc-crossref has to be used..

I fail using pandoc-crossref in a correct way that the expected result is created (a docx-document including the cross-references and numbering of figures and tables). The output-file with the usage of pandoc-crossref is exactly the same as without the usage of pandoc-crossref. There are no cross-references und numberings displayed in the output-docx-file.

I use the following command / syntax:

pandoc -s -f latex --filter pandoc-crossref -o destinationfile.docx -t docx latexfile.tex

I checked the documentation, and I am not sure about the "--filter"-option. I am not sure if a filter has to be defined somewhere.

Somene who can help how pandoc-crossref ist used correctly?
--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discus...-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.orgm.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/86ae9a5a-f9ce-4d69-b3a0-80c62aa07addn%40googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "pandoc-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pandoc-discuss/OPetioI26_0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/5a572de7-3b22-492f-9005-64e5f4e1368fn%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/fd26c909-af62-4b24-b89b-5c7590aaee0fn%40googlegroups.com.