I am suffering from a "TeX capacity exceeded, sorry [save size=50000]" error.
From similar questions (1, 2, 3, 4), I know one fix is to edit a file called "texmf.cnf" and change the "save_size" parameter to something larger.
Unfortunately I have a LyX installation and I can't seem to find this file anywhere on my hard disk.
I do however find a file "texmfapp" (under C:\Program Files (x86)\MiKTeX 2.9\miktex). But this file doesn't have a "save_size" parameter I can change. I reproduce the contents of this file in full below (perhaps there is something here I should change?):
;;; Written in 2016 by Christian Schenk
;;;
;;; To the extent possible under law, the author(s) have dedicated all
;;; copyright and related and neighboring rights to this file to the
;;; public domain worldwide. This file is distributed without any
;;; warranty. You should have received a copy of the CC0 Public
;;; Domain Dedication along with this file. If not, see
;;; http://creativecommons.org/publicdomain/zero/1.0/.
;; TeX uses the buffer to contain input lines, but macro
;; expansion works by writing material into the buffer and reparsing the
;; line. As a consequence, certain constructs require the buffer to be
;; very large, even though most documents can be handled with a small value.
buf_size=200000
;; Width of context lines on terminal error messages.
error_line=79
;; Extra low memory for boxes, glue, breakpoints, etc.
extra_mem_bot=0
;; Extra high memory for chars, tokens, etc.
extra_mem_top=0
;; Width of first lines of contexts in terminal error messages;
;; should be between 30 and (error_line - 15).
half_error_line=50
;; Words of inimemory available.
main_memory=3000000
;; Width of longest text lines output; should be at least 60.
max_print_line=79
;; Maximum number of strings.
max_strings=500000
;; Maximum number of simultaneous macro parameters.
param_size=10000
;; Pool space free after format loaded.
pool_free=47500
;; Max number of characters in all strings, including all
;; error messages, help texts, font names, control sequences.
;; These values apply to TeX and MP.
pool_size=3250000
;; Maximum number of simultaneous input sources.
stack_size=5000
;; Strings available after format loaded.
strings_free=100
;; Minimum pool space after TeX/MP's own strings; must be at least
;; 25000 less than pool_size, but doesn't need to be nearly that large.
string_vacancies=90000
;; Create auxiliary directory if '--aux-directory=DIR' refers
;; a non-existing directory.
CreateAuxDirectory=t
;; Create output directory if '--output-directory=DIR' refers
;; a non-existing directory.
CreateOutputDirectory=t
pdflatex myfile.tex -save-size=75000
or with even higher values. If you run into the same error, please prepare a minimal example document that reproduces the error and add it to your question