On 07/26/2013 09:27 PM, Josh Hieronymus wrote:
I'm trying to figure out how to add an option to write CSS generated during XHTML export to a separate directory, but I'm running into some difficulties. I've pushed my attempt to a new branch in the GSoC repo as seen here: http://git.lyx.org/?p=gsoc.git;a=shortlog;h=refs/heads/xhtml/new_features/css-separate-directory.

I'm able to output the CSS to a separate directory, and I'm able to modify the Document > Settings > Output window to include a new checkbox, so I suppose my real problem is getting my variable to reflect the checked/unchecked status of my checkbox. (Radio buttons or a dropdown menu would be more appropriate, but I'll leave that for later.)

When I check the new checkbox and click the "Apply" button, I get the following error message:
BufferParams::readToken(): Unknown token: \html_css_in_separate_directory1
BufferView.cpp (1239): Warning in LFUN_BUFFER_PARAMS_APPLY!

You are missing a space between "\html_css_in_separate_directory" and the boolean value you're writing, namely, 1, in this case.

           << "\\output_changes " << convert<string>(outputChanges) << '\n'
           << "\\html_math_output " << html_math_output << '\n'
           << "\\html_css_as_file " << html_css_as_file << '\n'
+          << "\\html_css_in_separate_directory" << html_css_in_separate_directory 
<< '\n'
           << "\\html_be_strict " << convert<string>(html_be_strict) << '\n';

See the spaces in the other cases?

I'd also suggest making the name shorter somehow. Maybe "\\html_use_subdirs", figuring this will also handle the case of images, etc. I doubt we need to provide for separate directories in some cases but not others.

Richard

Reply via email to