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

Tabs are stripped even with the preserveTabs=true Lua option enabled #38

Closed
Witiko opened this issue Apr 8, 2018 · 0 comments
Closed
Labels
bug lua Related to the Lua interface and implementation

Comments

@Witiko
Copy link
Owner

Witiko commented Apr 8, 2018

Steps to reproduce bug

Create a text document named test.tex with the following content:

\input markdown
\input lmfonts
\catcode`\ =13
\catcode`\^^I=13
\def {\ (SPACE)\ }
\def^^I{\ (TAB)\ }
\input{optionfalse}

\input{optiontrue}
\bye

Using a text editor, create a text document named content.md with the following content. Replace the graphical tab characters (↹) with actual tab characters:

These words are separated by spaces and these↹are↹separated↹by↹tabs.

Afterwards, execute LuaTeX:

$ texlua `kpsewhich markdown-cli.lua` -- content.md optionfalse.tex
$ texlua `kpsewhich markdown-cli.lua` preserveTabs=true -- content.md optiontrue.tex
$ luatex document.tex

Expected behavior

Executing LuaTeX should produce a PDF document named test.pdf with the following content:

These (SPACE) words (SPACE) are (SPACE) separated (SPACE) by (SPACE) spaces (SPACE) and
(SPACE) these (SPACE) are (SPACE) separated (SPACE) by (SPACE) tabs.

These (SPACE) words (SPACE) are (SPACE) separated (SPACE) by (SPACE) spaces (SPACE) and
(SPACE) these (TAB) are (TAB) separated (TAB) by (TAB) tabs.

Actual behavior

Executing LuaTeX produces a PDF document named test.pdf with the following content:

These (SPACE) words (SPACE) are (SPACE) separated (SPACE) by (SPACE) spaces (SPACE) and
(SPACE) these (SPACE) are (SPACE) separated (SPACE) by (SPACE) tabs.

These (SPACE) words (SPACE) are (SPACE) separated (SPACE) by (SPACE) spaces (SPACE) and
(SPACE) these (SPACE) are (SPACE) separated (SPACE) by (SPACE) tabs.

@Witiko Witiko added bug lua Related to the Lua interface and implementation labels Apr 8, 2018
@Witiko Witiko closed this as completed in 8f5da48 Apr 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug lua Related to the Lua interface and implementation
Projects
None yet
Development

No branches or pull requests

1 participant