mquinson / po4a

Maintain the translations of your documentation with ease (PO for anything)
http://po4a.org/
GNU General Public License v2.0
121 stars 58 forks source link

TeX.pm: allow \input command surrounded by curly braces #406

Open MayeulC opened 1 year ago

MayeulC commented 1 year ago

Previously, the closing brace } would be matched as part of the filename, which was then not found.

This allows the use of \input commands as macro parameters, for instance with the \subcaptionbox command:

\subcaptionbox{Legend}[2cm]{\input{sometikzplot.tex}}

Fixes #405

mquinson commented 1 year ago

Hello @MayeulC, many thanks for reporting this issue and providing the fix. Could you please also add a little test for this feature? You could either extend an existing test, or add a new one. Please see https://github.com/mquinson/po4a/blob/master/CONTRIBUTING.md#writing-a-test

MayeulC commented 1 year ago

Hi, I'll try to, I also figured it would be nice to provide a test, thank you for directing me towards the relevant documentation.

I don't have a clear timeline: I may have a look tomorrow or later this week.

mquinson commented 1 year ago

To be perfectly honest, I hope that the doc is still uptodate. That's a very long time that I didn't review it. Do not hesitate to ask if you have any problem.

Beside of this, this is a contribution to an open source project. There is absolutely no deadline. Your contribution will be really welcome, no matter when it occurs.

Thanks!

mquinson commented 1 year ago

Hello @MayeulC, if you could provide me the LaTeX file needed for the test, I'll integrate it in the test infrastructure. That'd be a live example of how to do that if the doc is outdated.

The difficult part for me is to come up with the LaTeX file that correctly tests the feature.