tex4ht produces a corrupted file when a label and a ref to that label use a double-hyphen












0















When my document has a figure with a label{aa--bb} or any other label that uses two hyphens (-) in a row (--), tex4ht produces a corrupt .odt file. Is there a way to fix this bug?



MWE



Using the same same setup as I did in an earlier question, concatenate head.tex, main.tex, and tail.tex then compile it using the command given by Michal Hoftich (@michal.h21) in his answer to that question.



main.tex:



%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode

documentclass[12pt]{memoir}
usepackage{ifmtarg}
usepackage{calc}

%Greek
newcommand{greek}[1]{#1}
newcommand{gk}[1]{#1}

%Arabic
newcommand{ar}[1]{#1}
newenvironment{arab}{}{}

% Bibliography etc
usepackage[american]{babel}
usepackage{csquotes}
usepackage[notes,
alldates= comp,
backend= biber,
bibwarn= false,
cmsdate= both, % reprints: print `origdate` as well as `year`
compresspages= true,
doi= false,
eprint= false,
ibidtracker= true,
inheritshorthand, % feature added for me by D.Fussner
isbn= false,
mincrossrefs = 2,
shorthandibid,
strict= true,
url= true,
usetranslator= true,
uniquename= true
]{biblatex-chicago}
addbibresource{/Users/alexandre/Dropbox/bib-dbs/alexhistory.bib}
addbibresource{/Users/alexandre/Dropbox/bib-dbs/alexhistory-NEW.bib}

usepackage{textcomp} % For angle brackets `textlangle` and `textrangle`

begin{document}

%%%%%%%%%%%%%%%%%%%%
%%% My text goes here: %%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%

Fig.~ref{aa--bb}.

begin{figure}[p]
begin{center}
label{aa--bb}
end{center}
end{figure}

%%%%%%%%%%%%%%%%%%%%
%%% My text ends here: %%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%

end{document}


In the directory, I then include myconfig.cfg (again from Michal Hoftich, for the purposes of making Arabic text appear properly):



Preamble{xhtml}
xeuniuseblock{Greek}
xeuniuseblock{Arabic}
makeatletter
ConfigureEnv{arab}{@rltrue}{@rlfalse}{}{}
makeatother
begin{document}
EndPreamble


Then I run the command:



make4ht -ux -f odt  -c myconfig.cfg main.out.tex









share|improve this question



























    0















    When my document has a figure with a label{aa--bb} or any other label that uses two hyphens (-) in a row (--), tex4ht produces a corrupt .odt file. Is there a way to fix this bug?



    MWE



    Using the same same setup as I did in an earlier question, concatenate head.tex, main.tex, and tail.tex then compile it using the command given by Michal Hoftich (@michal.h21) in his answer to that question.



    main.tex:



    %!TEX TS-program = xelatex
    %!TEX encoding = UTF-8 Unicode

    documentclass[12pt]{memoir}
    usepackage{ifmtarg}
    usepackage{calc}

    %Greek
    newcommand{greek}[1]{#1}
    newcommand{gk}[1]{#1}

    %Arabic
    newcommand{ar}[1]{#1}
    newenvironment{arab}{}{}

    % Bibliography etc
    usepackage[american]{babel}
    usepackage{csquotes}
    usepackage[notes,
    alldates= comp,
    backend= biber,
    bibwarn= false,
    cmsdate= both, % reprints: print `origdate` as well as `year`
    compresspages= true,
    doi= false,
    eprint= false,
    ibidtracker= true,
    inheritshorthand, % feature added for me by D.Fussner
    isbn= false,
    mincrossrefs = 2,
    shorthandibid,
    strict= true,
    url= true,
    usetranslator= true,
    uniquename= true
    ]{biblatex-chicago}
    addbibresource{/Users/alexandre/Dropbox/bib-dbs/alexhistory.bib}
    addbibresource{/Users/alexandre/Dropbox/bib-dbs/alexhistory-NEW.bib}

    usepackage{textcomp} % For angle brackets `textlangle` and `textrangle`

    begin{document}

    %%%%%%%%%%%%%%%%%%%%
    %%% My text goes here: %%%%%%%%%%%%%%%%%%%%%%
    %%%%%%%%%%%%%%%%%%%%

    Fig.~ref{aa--bb}.

    begin{figure}[p]
    begin{center}
    label{aa--bb}
    end{center}
    end{figure}

    %%%%%%%%%%%%%%%%%%%%
    %%% My text ends here: %%%%%%%%%%%%%%%%%%%%%%
    %%%%%%%%%%%%%%%%%%%%

    end{document}


    In the directory, I then include myconfig.cfg (again from Michal Hoftich, for the purposes of making Arabic text appear properly):



    Preamble{xhtml}
    xeuniuseblock{Greek}
    xeuniuseblock{Arabic}
    makeatletter
    ConfigureEnv{arab}{@rltrue}{@rlfalse}{}{}
    makeatother
    begin{document}
    EndPreamble


    Then I run the command:



    make4ht -ux -f odt  -c myconfig.cfg main.out.tex









    share|improve this question

























      0












      0








      0








      When my document has a figure with a label{aa--bb} or any other label that uses two hyphens (-) in a row (--), tex4ht produces a corrupt .odt file. Is there a way to fix this bug?



      MWE



      Using the same same setup as I did in an earlier question, concatenate head.tex, main.tex, and tail.tex then compile it using the command given by Michal Hoftich (@michal.h21) in his answer to that question.



      main.tex:



      %!TEX TS-program = xelatex
      %!TEX encoding = UTF-8 Unicode

      documentclass[12pt]{memoir}
      usepackage{ifmtarg}
      usepackage{calc}

      %Greek
      newcommand{greek}[1]{#1}
      newcommand{gk}[1]{#1}

      %Arabic
      newcommand{ar}[1]{#1}
      newenvironment{arab}{}{}

      % Bibliography etc
      usepackage[american]{babel}
      usepackage{csquotes}
      usepackage[notes,
      alldates= comp,
      backend= biber,
      bibwarn= false,
      cmsdate= both, % reprints: print `origdate` as well as `year`
      compresspages= true,
      doi= false,
      eprint= false,
      ibidtracker= true,
      inheritshorthand, % feature added for me by D.Fussner
      isbn= false,
      mincrossrefs = 2,
      shorthandibid,
      strict= true,
      url= true,
      usetranslator= true,
      uniquename= true
      ]{biblatex-chicago}
      addbibresource{/Users/alexandre/Dropbox/bib-dbs/alexhistory.bib}
      addbibresource{/Users/alexandre/Dropbox/bib-dbs/alexhistory-NEW.bib}

      usepackage{textcomp} % For angle brackets `textlangle` and `textrangle`

      begin{document}

      %%%%%%%%%%%%%%%%%%%%
      %%% My text goes here: %%%%%%%%%%%%%%%%%%%%%%
      %%%%%%%%%%%%%%%%%%%%

      Fig.~ref{aa--bb}.

      begin{figure}[p]
      begin{center}
      label{aa--bb}
      end{center}
      end{figure}

      %%%%%%%%%%%%%%%%%%%%
      %%% My text ends here: %%%%%%%%%%%%%%%%%%%%%%
      %%%%%%%%%%%%%%%%%%%%

      end{document}


      In the directory, I then include myconfig.cfg (again from Michal Hoftich, for the purposes of making Arabic text appear properly):



      Preamble{xhtml}
      xeuniuseblock{Greek}
      xeuniuseblock{Arabic}
      makeatletter
      ConfigureEnv{arab}{@rltrue}{@rlfalse}{}{}
      makeatother
      begin{document}
      EndPreamble


      Then I run the command:



      make4ht -ux -f odt  -c myconfig.cfg main.out.tex









      share|improve this question














      When my document has a figure with a label{aa--bb} or any other label that uses two hyphens (-) in a row (--), tex4ht produces a corrupt .odt file. Is there a way to fix this bug?



      MWE



      Using the same same setup as I did in an earlier question, concatenate head.tex, main.tex, and tail.tex then compile it using the command given by Michal Hoftich (@michal.h21) in his answer to that question.



      main.tex:



      %!TEX TS-program = xelatex
      %!TEX encoding = UTF-8 Unicode

      documentclass[12pt]{memoir}
      usepackage{ifmtarg}
      usepackage{calc}

      %Greek
      newcommand{greek}[1]{#1}
      newcommand{gk}[1]{#1}

      %Arabic
      newcommand{ar}[1]{#1}
      newenvironment{arab}{}{}

      % Bibliography etc
      usepackage[american]{babel}
      usepackage{csquotes}
      usepackage[notes,
      alldates= comp,
      backend= biber,
      bibwarn= false,
      cmsdate= both, % reprints: print `origdate` as well as `year`
      compresspages= true,
      doi= false,
      eprint= false,
      ibidtracker= true,
      inheritshorthand, % feature added for me by D.Fussner
      isbn= false,
      mincrossrefs = 2,
      shorthandibid,
      strict= true,
      url= true,
      usetranslator= true,
      uniquename= true
      ]{biblatex-chicago}
      addbibresource{/Users/alexandre/Dropbox/bib-dbs/alexhistory.bib}
      addbibresource{/Users/alexandre/Dropbox/bib-dbs/alexhistory-NEW.bib}

      usepackage{textcomp} % For angle brackets `textlangle` and `textrangle`

      begin{document}

      %%%%%%%%%%%%%%%%%%%%
      %%% My text goes here: %%%%%%%%%%%%%%%%%%%%%%
      %%%%%%%%%%%%%%%%%%%%

      Fig.~ref{aa--bb}.

      begin{figure}[p]
      begin{center}
      label{aa--bb}
      end{center}
      end{figure}

      %%%%%%%%%%%%%%%%%%%%
      %%% My text ends here: %%%%%%%%%%%%%%%%%%%%%%
      %%%%%%%%%%%%%%%%%%%%

      end{document}


      In the directory, I then include myconfig.cfg (again from Michal Hoftich, for the purposes of making Arabic text appear properly):



      Preamble{xhtml}
      xeuniuseblock{Greek}
      xeuniuseblock{Arabic}
      makeatletter
      ConfigureEnv{arab}{@rltrue}{@rlfalse}{}{}
      makeatother
      begin{document}
      EndPreamble


      Then I run the command:



      make4ht -ux -f odt  -c myconfig.cfg main.out.tex






      cross-referencing tex4ht






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 12 mins ago









      Alex RobertsAlex Roberts

      482210




      482210






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "85"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f472676%2ftex4ht-produces-a-corrupted-file-when-a-label-and-a-ref-to-that-label-use-a-do%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f472676%2ftex4ht-produces-a-corrupted-file-when-a-label-and-a-ref-to-that-label-use-a-do%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

          Calculate evaluation metrics using cross_val_predict sklearn

          Insert data from modal to MySQL (multiple modal on website)