Skip to content

Controlling colors and lines of the references as in hyperref #2613

Open

Description

@Atreyu-94

Description

It would be great to be able to control the colors of the references/citations as you can control them in hyperref/pdfLaTeX. This is very useful for creating documentation or educational content, for example:

Lines Colors
imagen imagen

Some features of hyperref:

  • Have some color around the link when the pdf file is opened in a viewer
  • Have no color around the link if it is printed on a paper (the same with text color that disappears when printed).

This was discussed here: #2585

Use Case

  • When we are using a PDF document to give a presentation or make an educational document, this is often important to know exactly which elements of the document are referenced.
  • It is important that these links/colors that are not designed for printing do not appear in printed documents.
  • Many times we want to differentiate between references, to know if it is a cite, a cross-reference, a link or simply a local file.

Activity

  1. added
    feature request
    on Nov 7, 2023
  2. Enivex commented on Nov 7, 2023

    @Enivex
    Collaborator

    It seems to me like the actual request here is for support for the optional content group PDF feature

  3. added
    pdf
    on Nov 7, 2023
  4. Antoinemarteau commented on May 19, 2026

    @Antoinemarteau

    It would be amazing to be able to collapse / expand section of text / proofs in a typst generated PDF.

  5. Enivex commented on May 19, 2026

    @Enivex
    Collaborator

    It would be amazing to be able to collapse / expand section of text / proofs in a typst generated PDF.

    At most you would be able to hide them. The remaining text wouldn't reflow. That's just inherently not possible in the PDF format.

  6. Antoinemarteau commented on May 19, 2026

    @Antoinemarteau

    Ah, ok, and would it be possible that some text is collapsed by default, and you could expand it over the exiting follow up text momentarily ?

  7. Enivex commented on May 19, 2026

    @Enivex
    Collaborator

    Ah, ok, and would it be possible that some text is collapsed by default, and you could expand it over the exiting follow up text momentarily ?

    I don't know the exact limitations of OCGs, but that sounds more reasonable.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestpdf

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions