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 image extension in Image #8412

Open
ickc opened this issue Nov 2, 2022 · 2 comments
Open

.tex image extension in Image #8412

ickc opened this issue Nov 2, 2022 · 2 comments

Comments

@ickc
Copy link
Contributor

ickc commented Nov 2, 2022

Pardon me if this is mentioned elsewhere, and the lack of example because it seems the issue is simple enough to understand.

Say, for example, in source md,

![alt](image.tex)

When converted to tex, it becomes

\includegraphics{image.tex}
...

while the proper output should be

\input{image.tex}

Such .tex files for example can be in pgf or TikZ code generated by some other libraries.

Case like this is also not very well-defined, because .tex image can be anything. But I think a reasonable expectation is just to input them?

@ickc ickc added the bug label Nov 2, 2022
@jgm
Copy link
Owner

jgm commented Nov 2, 2022

Well, this tex file really isn't an image -- it's tex instructions for creating an image.
so why not include it as raw TeX?

```{=latex}
\input{image.tex}
```

After all, it has no hope of displaying as an image in any other output format.

@ickc
Copy link
Contributor Author

ickc commented Nov 2, 2022

I was thinking more like having an image without extension in the source markdown, then use default image extension set to different ones (say svg for html and tex for LaTeX).

But you're right that the file isn't really an image and this behavior seems kind of arbitrarily defined. But if an Image has .tex extension, may be this is the only way that would make sense?

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

No branches or pull requests

3 participants