Skip to content
Snippets Groups Projects
  1. Feb 09, 2025
  2. Feb 08, 2025
  3. Feb 07, 2025
  4. Dec 01, 2024
    • Karl Fogel's avatar
      Remove command '\nnpref' · 961c3296
      Karl Fogel authored
      This reverts commit 99b732b2.  I decided I didn't need references
      that looked like "This Is My Subsection (§ 1.6 ◦ p. 5)" after all.
      However, let's keep it in the history in case we ever want plain
      references with title, section number, and page number, suitable for
      use in one item in a list of items.
      961c3296
    • Karl Fogel's avatar
      New command '\nnpref' · 99b732b2
      Karl Fogel authored
      99b732b2
  5. Oct 23, 2024
  6. Dec 14, 2023
    • Karl Fogel's avatar
      Include source document rev for all VC systems · e0813f17
      Karl Fogel authored
      In the YAML block of the PDF output, include the source document's
      revision identifier for all the version control systems we use: SVN,
      git-svn, and stock Git.  If uncommitted local changes are present,
      indicate that too.  Relatedly, rename the commit identifier field name
      to "document_rev_id", since "ots_svn" was SVN-specific.
      
      Separately from all the above, also fix an information leak.
      
      Explanation by example:
      =======================
      
      Before this commit, our YAML block couldn't handle regular Git trees
      (such as a clone of https://code.librehq.com/ots/dosp-research), as
      opposed to git-svn checkouts, and the block didn't indicate the
      presence of uncommitted local changes (if any) either.  Also, it would
      includ the full path to the local input file, even though that path is
      specific to the user's computer and by default should be kept private.
      
      Here's an example showing the difference between the old output and
      the new output.
      
      In a stock Git working tree with uncommitted local changes, the old
      output would look like this:
      
        %%% BEGIN OTS YAML BLOCK %%%
        % client: ''
        % date: 15 Dec 2023
        % doctools_git_branch: main
        % doctools_git_id: commit 11ffa0c9bd9e69a3735744aafb7d4cb73fbd66e9
        % draft: false
        % input_filename: /home/jrandom/super-secret-clients/moly-cartel/smuggling/molybdenum-report.ltx
        % ots_svn: r
        % title: 'Recent Developments In The Molybdenum Market'
        % todos: []
        %%% END OTS YAML BLOCK %%%
      
      Note the 'ots_svn' field (i.e., the field name implies SVN, even
      though this is actually a Git working tree), and see how the field's
      value is an empty SVN-style revision number -- just the "r" prefix.
      Note also the information-leaking value of the 'input_filename' field.
      
      Now here's the new output for the same tree:
      
        %%% BEGIN OTS YAML BLOCK %%%
        % client: ''
        % date: 15 Dec 2023
        % doctools_git_branch: main
        % doctools_git_id: 11ffa0c9bd9e69a3735744aafb7d4cb73fbd66e9
        % document_rev_id: 557a94fca2342957793f19c4398c89356dea98fa + uncommitted local changes
        % draft: false
        % input_filename: molybdenum-report.ltx
        % title: 'Recent Developments In The Molybdenum Market'
        % todos: []
        %%% END OTS YAML BLOCK %%%
      
      If the tree is pristine (has no local changes), then the new output
      looks like this:
      
        %%% BEGIN OTS YAML BLOCK %%%
        % client: ''
        % date: 15 Dec 2023
        % doctools_git_branch: main
        % doctools_git_id: 11ffa0c9bd9e69a3735744aafb7d4cb73fbd66e9
        % document_rev_id: 557a49cf2a43927597ff914c93c898356dea98fa
        % draft: false
        % input_filename: molybdenum-report.ltx
        % title: 'Recent Developments In The Molybdenum Market'
        % todos: []
        %%% END OTS YAML BLOCK %%%
      
      You're welcome.
      e0813f17
  7. Nov 19, 2023
    • James Vasile's avatar
      Format list in README · 1d88a158
      James Vasile authored
      1d88a158
    • James Vasile's avatar
      Document dosh in the README · bca3378d
      James Vasile authored
      bca3378d
    • James Vasile's avatar
      Use venv module instead of virtualenv · 23b59c6a
      James Vasile authored
      The venv module is part of standard python, so let's use it instead of
      virtualenv, which requires its own installation step.
      23b59c6a
    • James Vasile's avatar
      Add a task runner · 16640fc8
      James Vasile authored
      Make is not a great taskrunner.  There are some tasks that aren't
      really about building and we don't need make for it.  So here's a simple
      task runner where we can put those things.
      
      To start, we have a 'watch' task, which just watches the doc for changes
      and rebuilds as needed.  We also have a task that checks the links in a
      pdf for 200 responses and complains if it doesn't get one.
      
      Also, add a Makefile target to establish bin/dosh in new doc dirs.  That
      target isn't automatically hit.  The user has to do it manually.  Maybe
      we'll tie it in so it just gets added (like venv), but for now it's not
      a crucial part of the workflow, so we don't do it.
      
      The bin/dosh we stick in dirs is not just a copy and not just a symlink.
      It's a wrapper around our dosh.  This lets the user inherit our targets
      but also add doc-specific changes and new tasks.
      16640fc8
  8. Nov 07, 2023
  9. Oct 30, 2023
    • Karl Fogel's avatar
      Fix URL to ext-Makefile · bd9f543c
      Karl Fogel authored
      bd9f543c
    • Karl Fogel's avatar
      Add report.ltx · d171ecb7
      Karl Fogel authored
      This is identical to ${OTS_DIR}/forms/latex/report.ltx (as of r22457),
      except that here we drop the "MACROS" section from the end -- all it
      contained was the "contact()" macro, which gave James's and Karl's
      contact information, which is not something we want to ship here.
      
      This commit may or may not cause a problem for OTS folks building
      reports, depending on whether this report.ltx shadows the one in
      ${OTS_DIR}/forms/latex/report.ltx.  If it does, we'll fix that when we
      find out about it.  Right now, Karl and Seth Schoen just needed to get
      ots-doctools working for Seth on his machine, and the obstacle in
      front of them was that report.ltx was alleged to be missing:
      
        jinja2.exceptions.TemplateNotFound: report.ltx
      d171ecb7
  10. Jul 24, 2023
  11. Jun 09, 2023
  12. Feb 05, 2023
  13. 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
  14. Oct 11, 2022
  15. Sep 19, 2022
Loading