Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_tex_source unexpectedly inserted into output filenames #12

Open
jhaiduce opened this issue Feb 15, 2022 · 5 comments
Open

_tex_source unexpectedly inserted into output filenames #12

jhaiduce opened this issue Feb 15, 2022 · 5 comments

Comments

@jhaiduce
Copy link

Since fa0376c, UseLatexMk has been inserting _tex_source into the names of output files. As far as I can tell this happens with every generated file, regardless of whether the filename was specified with the TARGET argument to add_latex_document or derived from the SOURCE argument.

From the commit message this appears to be a workaround needed to compile LaTeX source that uses the minted package, but in most cases users are expecting the output filenames to be the same as the input file, only with .tex replaced with the output file extension (.pdf, .aux, .ps, .dvi, etc.).

@gruenich
Copy link
Contributor

gruenich commented Dec 2, 2023

I did not encounter what you are reporting. Can you please provide a minimal test case that reproduces your problem?

@jhaiduce
Copy link
Author

jhaiduce commented Dec 7, 2023

The following CMakeLists.txt reproduces the problem:

cmake_minimum_required(VERSION 3.17.1)

project(document LANGUAGES)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/UseLatexMk")

include(UseLatexMk)

add_latex_document(SOURCE document.tex)

Prior to fa0376c the above code produced a file called document.pdf as expected. fa0376c and later produce a file called document_tex_source.pdf.

@gruenich
Copy link
Contributor

gruenich commented Dec 9, 2023

Thanks for providing the minimal setup. Prior, I tested with a project of my own and could not reproduce it. The issue was there, but I got fooled by CMake's caching.

Can you please test #16 and confirm that this fixes your issue? Now you only get an added "_source" if you build in-source (without a dedicated build directory).

@jhaiduce
Copy link
Author

Thanks, it looks like #16 restores the behavior I expected (at least for out-of-source builds, which is what I normally use).

@gruenich
Copy link
Contributor

@dokempf Can you please consider merging this? I am waiting to merge this to dune-common, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants