Archive

Archive for May, 2015

How to ease editing work in MS-Word by automating search/replace operations

  1. If you frequently have to edit documents according to a large number of editorial rules and regulations
  2. and if you can partially automate these edit operations  (or at least highlight suspicious passages for human review) with Word’s search/replace,
  3. I can recommend an add-in that can automate even the repeated search/replace operations (like the 57 in the video below)
  4. and even help you manage your search/replace strings and regular expressions in a spreadsheet which it can load from:
  5. Greg Maxey’s VBA Find & Replace Word Add-in. See it in action (click for full size):
  6. vbareplace
  7. Two Three Caveats: :
    1. At this point, I cannot get the add-in to work only in Word 2010. Even if I lower Macro security and allow programmatic access to the VBA project, when trying to launch the add-in from the ribbon, Word 2013 complains: “The macro cannot be found or has been disabled due to your macro security settings”:image.
    2. The automation is only as good as your underlying search/replace operations. (Hint: “Some people, when confronted with a problem, think ‘I know, I’ll use regular expressions.’ Now they have two problems.”)
    3. I think I will refrain from search/replace during “Tracking changes” – as in the video – , and rather use “Compare documents” after the replace operations – too many quirks otherwise…

How to define your own conditional content marker “Internal” for Doxygen

  1. Doxygen comes with a built-in conditional content marker \internal the outputting of which can be controlled with the switch INTERNAL_DOCS in Doxygen’s config file.
  2. However, I could not get this to work as advertised in Doxygen 1.8.8.
  3. In cases of similar feature breakage, users are commonly advised to fix the error in the Doxygen source. If you, like I did, lack the time for that, here is a simple workaround which uses another built-in feature that an be controlled via  Doxygen’s config file:
  4. Define as one of the:
    ALIASES = "myinternal=\if myinternal <HR><kbd><em>" \
              "endmyinternal= </em></kbd> \endif"
    # HTML is optional, intended to make internal information stand out clearly if outputted
  5. Switch this ALIAS on and off using ENABLED_SECTIONS       = # myinternal
  6. Example usage in a .dox file:
    -# A high-low-high-low beep sequence followed by a low-high beep
     sequence indicates successful pairing and connection to the remote
     device.
     @myinternal tested with barcode on lower-end of cradle: gives success
     beep sequence @endmyinternal
     -# A long low, long high beep sequence indicates unsuccessful pairing.