Coder Social home page Coder Social logo

Comments (10)

bartp5 avatar bartp5 commented on June 14, 2024

I cannot reproduce your issue. Actually libtexprintf does not handle a % as a special character at all (at this point I do not consider this a bug, but it could be, if there is a use case for comments within the context of libtexprintf). Anyway, I get:
utftex 'A = 25\% \frac{b}{c}'
b
A = 25% ─
c
Just the same as leaving out the slash:
utftex 'A = 25% \frac{b}{c}'
b
A = 25% ─
c

from libtexprintf.

mementum avatar mementum commented on June 14, 2024
  / / / /_  __/ ____/_  __/__ | |/ /
 / / / / / / / /_    / / / _ \|   /
/ /_/ / / / / __/   / / /  __/   |
\____/ /_/ /_/     /_/  \___/_/|_|
This is utftex version 1.16
Powered by libtexprintf 1.25

Given I use the latest release and the patches I see after that do not seem touch that area I wonder if environmental issues are in place. I have tried changing fonts and LANG but with no success.

I will try some more things.

Thanks for looking into it.

from libtexprintf.

stevengj avatar stevengj commented on June 14, 2024

Could it be a shell thing? i.e. maybe your shell is doing something funny with the \% before it gets to utftex

from libtexprintf.

bartp5 avatar bartp5 commented on June 14, 2024

Are you by any chance on windows?
The windows shell requires a % character to be escaped even in a quoted string. The proper escape would be '%%'.

from libtexprintf.

mementum avatar mementum commented on June 14, 2024

bash and the input string is quoted with ' to avoid any shell substitution.

I will compile the latest sources and see what happens.

from libtexprintf.

bartp5 avatar bartp5 commented on June 14, 2024

bash on windows, right?
At least I can reproduce your issue on a windows box. Not sure what happens. I can get the '%' if I escape with %% but the output after the % character is still gone. The number of lines in the output is correct though! Somehow, beyond the '%', only the end-line characters make it to stdout.
Intermediate results are also correct, i.e. the string is parsed correctly and all data structures are fine. The problem pops up either when generating the output string, or when sending this string to stdout. I will see if I can figure out more in the coming days (unfortunately I cannot reproduce it with wine, so I need access to an actual windows machine to debug this).

from libtexprintf.

mementum avatar mementum commented on June 14, 2024

bash on Ubuntu 22.04

I have cloned the repository, compiled the current HEAD and it works

./src/utftex -- 'a = 25\% \times \frac{a}{b}'
         a
a = 25% ×─
         b      

from libtexprintf.

mementum avatar mementum commented on June 14, 2024

I have then checked out the official 1.25 at 399d8e7 and the result is ...

./src/utftex -- 'a = 25\% \times \frac{a}{b}'
         a
a = 25

One of the commits in between HEAD and the tag 1.25 cures the problem.

from libtexprintf.

bartp5 avatar bartp5 commented on June 14, 2024

I see the bug. It was fixed in commit 8a3f061. I should push out a new release..

from libtexprintf.

bartp5 avatar bartp5 commented on June 14, 2024

Thanks!

from libtexprintf.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.