Menu

#327 pgfsys-tex4ht.def broken in version 3.0.0 at \Hnewline

v1.0 (example)
closed-fixed
nobody
None
5
2018-12-29
2014-07-31
No

It doesn't look like anyone filed an actual bug report for https://sourceforge.net/p/pgf/discussion/477362/thread/63c6fd79/
I've ran into the same problem today, so here it is.

Discussion

  • Respawned Fluff

    Respawned Fluff - 2014-07-31

    I just checked that the pgfsys-tex4ht.def currently at version 1.25 in CVS doesn't have the fix. So here's the trivial patch, which works for me too:

    diff U5b generic/pgf/systemlayer/pgfsys-tex4ht.def.orig generic/pgf/systemlayer/pgfsys-tex4ht.def
    --- generic/pgf/systemlayer/pgfsys-tex4ht.def.orig  Fri Dec 20 20:03:38 2013
    +++ generic/pgf/systemlayer/pgfsys-tex4ht.def   Thu Jul 31 13:22:20 2014
    @@ -84,11 +84,11 @@
     %  % undo:
     %  \Configure{htf}{0}{+}{<span\Hnewline
     %     class="}{\%s}{-\%s}{x-x-\%d}{}{">}{</span>}
     %}
    
    -\def\pgfsys@svg@newline{\Hnewline}
    +\def\pgfsys@svg@newline{{?nl}}
    
     % we don't want tex4ht putting <p> and </p> tags automatically in our svg code and causing invalid xhtml in our svg pictures
     \newif\ifpgfsys@CssIncluded@\pgfsys@CssIncluded@false
     \def\pgfsys@beginpicture{% 
       \EndP\HtmlParOff
    
     

    Last edit: Respawned Fluff 2014-07-31
  • Michal Hoftich

    Michal Hoftich - 2015-03-27

    this solution would add {?nl} string in the place of newlines. we may use

    \def\pgfsys@svg@newline{^^J}
    

    instead, this will insert correct newlines in the svg file

     
  • Andrew

    Andrew - 2017-04-02

    As the following trivial example shows, this problem still hasn't been fixed in texlive 2016.

    \documentclass{mathquiz}
    \usepackage{tikz}
    \def\pgfsysdriver{pgfsys-tex4ht.def}
    
    \begin{document}
    
    \begin{tikzpicture}
    \draw(0,0)--(10,0);
    \foreach \x in {1,...,9} \draw[thin](\x,0.2)--(\x,-0.2);
    \end{tikzpicture}
    
    \end{document}
    

    Compiling this with htlatex qtikz.tex "xhtml,html5" results in multiple instances of the error

    >  ! Undefined control sequence.
    > \pgfsys@svg@newline ->\Hnewline
    > 
    l.190   \pgfusepathqfill}
    

    The trivial patch supplied by Miachel fixes the problem.

    Incidentally, it would be good to have tikz set \def\pgfsysdriver{pgfsys-tex4ht.def} when tex4ht is being used.

     
  • Denis Bitouzé

    Denis Bitouzé - 2017-07-06

    Bug still present with un up to date TL 2017, as shown by the following MCE (to be compiled with htlatex test.tex):

    \documentclass{article}
    \usepackage{tikz}
    \begin{document}
    \begin{tikzpicture}
      \draw(0,0)--(1,0);
    \end{tikzpicture}
    \end{document}
    

    Here is my file list:

     *File List*
     article.cls    2014/09/29 v1.4h Standard LaTeX document class
      size10.clo    2014/09/29 v1.4h Standard LaTeX file (size option)
      tex4ht.sty    
        tikz.sty    2015/08/07 v3.0.1a (rcs-revision 1.151)
         pgf.sty    2015/08/07 v3.0.1a (rcs-revision 1.15)
      pgfrcs.sty    2015/08/07 v3.0.1a (rcs-revision 1.31)
    everyshi.sty    2001/05/15 v3.00 EveryShipout Package (MS)
      pgfrcs.code.tex
     pgfcore.sty    2010/04/11 v3.0.1a (rcs-revision 1.7)
    graphicx.sty    2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR)
      keyval.sty    2014/10/28 v1.15 key=value parser (DPC)
    graphics.sty    2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR)
        trig.sty    2016/01/03 v1.10 sin cos tan (DPC)
    graphics.cfg    2016/06/04 v1.11 sample graphics configuration
    graphics.cfg    2016/06/04 v1.11 sample graphics configuration
       dvips.def    2017/06/20 v3.1d Graphics/color driver for dvips
       dvips.def    2017/06/20 v3.1d Graphics/color driver for dvips
      pgfsys.sty    2014/07/09 v3.0.1a (rcs-revision 1.48)
      pgfsys.code.tex
         pgf.cfg    2008/05/14  (rcs-revision 1.7)
    pgfsys-tex4ht.def    2013/08/06  (rcs-revision 1.25)
    pgfsys-common-svg.def    2013/08/28  (rcs-revision 1.24)
      xcolor.sty    2016/05/11 v2.12 LaTeX color extensions (UK)
       color.cfg    2016/01/02 v1.6 sample color configuration
       color.cfg    2016/01/02 v1.6 sample color configuration
    pgfsyssoftpath.code.tex    2013/09/09  (rcs-revision 1.9)
    pgfsyssoftpath.code.tex    2013/09/09  (rcs-revision 1.9)
    pgfsysprotocol.code.tex    2006/10/16  (rcs-revision 1.4)
    pgfsysprotocol.code.tex    2006/10/16  (rcs-revision 1.4)
     pgfcore.code.tex
    pgfcorepoints.code.tex    2013/10/07  (rcs-revision 1.27)
    pgfcorepathconstruct.code.tex    2013/10/07  (rcs-revision 1.29)
    pgfcorepathusage.code.tex    2014/11/02  (rcs-revision 1.24)
    pgfcorescopes.code.tex    2015/05/08  (rcs-revision 1.46)
    pgfcoregraphicstate.code.tex    2014/11/02  (rcs-revision 1.12)
    pgfcoretransformations.code.tex    2015/08/07  (rcs-revision 1.20)
    pgfcorequick.code.tex    2008/10/09  (rcs-revision 1.3)
    pgfcoreobjects.code.tex    2006/10/11  (rcs-revision 1.2)
    pgfcorepathprocessing.code.tex    2013/09/09  (rcs-revision 1.9)
    pgfcorearrows.code.tex    2015/05/14  (rcs-revision 1.43)
    pgfcoreshade.code.tex    2013/07/15  (rcs-revision 1.15)
    pgfcoreimage.code.tex    2013/07/15  (rcs-revision 1.18)
    pgfcoreexternal.code.tex    2014/07/09  (rcs-revision 1.21)
    pgfcorelayers.code.tex    2013/07/18  (rcs-revision 1.7)
    pgfcoretransparency.code.tex    2013/09/30  (rcs-revision 1.5)
    pgfcorepatterns.code.tex    2013/11/07  (rcs-revision 1.5)
    pgfmoduleshapes.code.tex    2014/03/21  (rcs-revision 1.35)
    pgfmoduleplot.code.tex    2015/08/03  (rcs-revision 1.13)
    pgfcomp-version-0-65.sty    2007/07/03 v3.0.1a (rcs-revision 1.7)
    pgfcomp-version-1-18.sty    2007/07/23 v3.0.1a (rcs-revision 1.1)
      pgffor.sty    2013/12/13 v3.0.1a (rcs-revision 1.25)
     pgfkeys.sty    
     pgfkeys.code.tex
     pgfmath.sty    
     pgfmath.code.tex
      pgffor.code.tex
        tikz.code.tex
    pgflibraryplothandlers.code.tex    2013/08/31 v3.0.1a (rcs-revision 1.20)
    pgfmodulematrix.code.tex    2013/09/17  (rcs-revision 1.8)
    tikzlibrarytopaths.code.tex    2008/06/17 v3.0.1a (rcs-revision 1.2)
     ***********
    
     

    Last edit: Denis Bitouzé 2017-07-06
  • Stefan Pinnow

    Stefan Pinnow - 2018-12-29
    • status: open --> closed-fixed
     
  • Stefan Pinnow

    Stefan Pinnow - 2018-12-29

    Thank you for reporting. This is fixed now.