doxygen icon indicating copy to clipboard operation
doxygen copied to clipboard

Keep latex template files with Unix EOL

Open marecl opened this issue 1 year ago • 2 comments

Windows (CRLF) encoding of *tex files causes output to contain multiple empty lines.
This breaks final output (refman.tex) resulting in (for example) attaching latex tags to project id on pdf main page.
Feel free to see an excerpt of my frustration #10609

marecl avatar Jan 30 '24 01:01 marecl

All text type of files should be in the repository with *nix endings and should also be retrieved as such. So probably some more file extensions could use the file endings. I looked quickly in the my checked out repository (with the *nix utility file) and saw the following files:

deps/libmscgen/mscgen_safe.c:                                         C source, ASCII text, with CRLF line terminators
deps/libmscgen/mscgen_safe.h:                                         C source, ASCII text, with CRLF line terminators
deps/libmscgen/mscgen_usage.h:                                        C source, ASCII text, with CRLF line terminators
deps/libmscgen/mscgen_utf8.c:                                         C source, ASCII text, with CRLF line terminators
deps/libmscgen/mscgen_utf8.h:                                         C source, ASCII text, with CRLF line terminators
deps/spdlog/cmake/spdlogConfig.cmake.in:                              ASCII text, with CRLF line terminators
deps/spdlog/LICENSE:                                                  ASCII text, with CRLF line terminators
deps/spdlog/README.md:                                                C source, ASCII text, with very long lines (463), with CRLF line terminators
deps/svg/svg-3.1.2.js:                                                C++ source, Unicode text, UTF-8 text, with very long lines (458), with CRLF, LF line terminators
doc/translator.py:                                                    Python script, ASCII text executable, with CRLF, CR line terminators

It might also be depending on the LaTeX distribution used.

I'm not sure whether the chosen solution is correct for all platforms (in the past I've seen platforms with line endings \r\n (Windows), \n (*nix) and \r ((old?) Mac)).

albert-github avatar Jan 30 '24 09:01 albert-github

Regarding the problem with files with CRLF in the repository (as mentioned in: https://github.com/doxygen/doxygen/pull/10610#issuecomment-1916421704), I've just pushed a proposed patch, pull request #10611

albert-github avatar Jan 30 '24 11:01 albert-github

Hopefully the 3rd commit does not hit the *.png , *.pdf and *.lib files.

albert-github avatar Jan 30 '24 13:01 albert-github

Aren't the commits "XD" and "XDDD" containing the patch from #10611 as well?

albert-github avatar Jan 30 '24 13:01 albert-github

Aren't the commits "XD" and "XDDD" containing the patch from #10611 as well?

Sorry. I forgot to create testing branch in my repository and I was pushing everything to master...

Hopefully the 3rd commit does not hit the *.png , *.pdf and *.lib files.

In theory it shouldnt. I'll keep this PR closed for a while to test if files were altered

marecl avatar Jan 30 '24 13:01 marecl

Alright. It seems only intended text files were affected. Checked svg, pdf and jpg files and they weren't affected by this PR

marecl avatar Jan 30 '24 13:01 marecl

Looks like there are stil a few extra files: image

Note you can also place the PR in draft mode: image

albert-github avatar Jan 30 '24 13:01 albert-github

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

sonarqubecloud[bot] avatar Jan 30 '24 16:01 sonarqubecloud[bot]