GithubHelp home page GithubHelp logo

Comments (10)

muzimuzhi avatar muzimuzhi commented on June 6, 2024 2

The problem of broken PDF can be fixed by initializing two internal token variables (in l3backend-opacity.dtx or as a workaround after backend driver is loaded).

\tl_set:Nn \l__opacity_backend_fill_tl { 1 }
\tl_set:Nn \l__opacity_backend_stroke_tl { 1 }

from latex3.

muzimuzhi avatar muzimuzhi commented on June 6, 2024 1

@josephwright Currently m3opacity001.tlg is partially broken since a \DocumentMetadata{} is missing in m3opacity001.lvt.

! Undefined control sequence.
<argument> ..._stroke_tl {}\pdfmanagement_add:nnn
{Page/Resources/ExtGState}...

Have a word about \DocumentMetadata{} in l3opacity's doc?

from latex3.

josephwright avatar josephwright commented on June 6, 2024

@muzimuzhi Was just working on something else, but I had a feeling where was a missing init step - you want to fix?

from latex3.

jasperhabicht avatar jasperhabicht commented on June 6, 2024
\tl_set:Nn \l__opacity_backend_fill_tl { 1 }
\tl_set:Nn \l__opacity_backend_stroke_tl { 1 }

Nice, that indeed solves the problem of the broken PDF. But in MWE B the stroke is still not transparent, if I am not mistaken.

from latex3.

muzimuzhi avatar muzimuzhi commented on June 6, 2024

But in MWE B the stroke is still not transparent, if I am not mistaken.

No, some use case is still not working. I'm digging.

from latex3.

josephwright avatar josephwright commented on June 6, 2024

Looking back, I'm wondering why I use a tl here - I'll probably change ;)

from latex3.

muzimuzhi avatar muzimuzhi commented on June 6, 2024

Ah ha, a typo:

--- a/l3backend/l3backend-opacity.dtx
+++ b/l3backend/l3backend-opacity.dtx
@@ -237,7 +237,7 @@
           { opacity.fill #1 }
           { << /ca ~ #1 >> }
         \pdfmanagement_add:nnn { Page / Resources / ExtGState }
-          { opacity.stroke #1 }
+          { opacity.stroke #2 }
           { << /CA ~ #2 >> }
 %<*dvipdfmx|xetex>
         \__kernel_backend_literal_pdf:n

from latex3.

josephwright avatar josephwright commented on June 6, 2024

@muzimuzhi You want to fix in a PR or should I just do it directly?

from latex3.

muzimuzhi avatar muzimuzhi commented on June 6, 2024

Looking back, I'm wondering why I use a tl here - I'll probably change ;)

Because str functions are slower? (I didn't check l3color.) Or perhaps you want to use fp instead.

@muzimuzhi You want to fix in a PR or should I just do it directly?

Considering the possible re-typing, you can do it directly.

from latex3.

josephwright avatar josephwright commented on June 6, 2024

Looking back, I'm wondering why I use a tl here - I'll probably change ;)

Because str functions are slower? (I didn't check l3color.) Or perhaps you want to use fp instead.

Should really be an fp, yes - but as we don't do maths, I see why I did it this way now. I'll fix shortly.

from latex3.

Related Issues (20)

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.