Skip to content
Snippets Groups Projects
  1. Jul 24, 2023
  2. Jan 20, 2023
    • Karl Fogel's avatar
      Switch to not removing refs by default · 320680fb
      Karl Fogel authored
      Before this change, refs would be stripped from documents by default
      (even documents, such as invoices, that don't normally have any
      explicit YAML head).  After this change, refs are not stripped by
      default, but if you put "remove-refs: TRUE" in the YAML head then they
      will be, and you can optionally customize the regex with "ref-regex".
      
      Note also that it's "ref-regex" now instead of "ref_regex".  This is
      because some editors (cough Emacs cough) render unescaped underscores
      in a jarring and distracting way in LaTeX documents, including even
      underscores in YAML frontmatter.  A better fix would be to teach Emacs
      how to recognize when it's in a non-LaTeX section of a mostly-LaTeX
      document, but that's a bit more yak than I have time to shave today.
      320680fb
  3. Sep 19, 2022
  4. May 17, 2021
  5. Mar 19, 2021
    • Karl Fogel's avatar
      Simplify generation of YAML block comment in PDF · ef921a12
      Karl Fogel authored
      Since the OTS_DOCTOOLS_DIR environment variable is required now, use
      that instead of Python's '__file__' variable to get values for the
      YAML block comment that we put at the end of each PDF.
      
      Note that the two other uses of '__file__' in this code base, in
      'pipeline/pipeline.py' and 'pipeline/plugins/65_bugs.py', stay as they
      are: for what they're doing, '__file__' is appropriate.
      ef921a12
  6. Jun 28, 2020
  7. May 06, 2020
  8. Apr 21, 2020
    • Karl Fogel's avatar
      Avoid false positive in detecting footnote problem · 30c1f0e8
      Karl Fogel authored
      As promised in commit db47b65d.
      30c1f0e8
    • Karl Fogel's avatar
      Say more in error message about handling bug case · db47b65d
      Karl Fogel authored
      Since commit 018499ec, when the bug-detection plugin is enabled
      (e.g. "bugs: True" in the header) then on detecting a bug in the
      document we stop the build, unless in draft mode ("draft: True").
      
      There are thus three ways to fix such a build:
      
        1) Fix whatever the bug is in the document.
        2) Turn on draft mode.
        3) Turn off bug-detection mode.
      
      Since our bug-detection module is not perfect, (1) is not always an
      option because there might not actually be a bug in the document.
      That's what happened in this case: the module's attempt to detect
      proper formatting of footnotes by looking for the leading backslash
      (e.g., "\footnote" instead of "footnote") cries a false positive if
      the document uses "\begin{footnotesize} ... \end{footnotesize}" to set
      the font size.
      
      I'll improve that bug-detection case in a subsequent commit.  In the
      meantime, this commit improves the error message to inform the user
      about possibilities (2) and (3), which are not otherwise obvious.
      db47b65d
  9. Mar 25, 2020
  10. Jan 09, 2020
  11. Jan 08, 2020
Loading