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

texdoc generates wrong file URL for html documentation #1349

Open
1 task done
desk7 opened this issue Jul 8, 2023 · 3 comments · May be fixed by #1380
Open
1 task done

texdoc generates wrong file URL for html documentation #1349

desk7 opened this issue Jul 8, 2023 · 3 comments · May be fixed by #1380
Labels

Comments

@desk7
Copy link

desk7 commented Jul 8, 2023

When I try to open a package documentation from powershell typing texdoc packagename, the URL of the html file which should be opened is wrong because of a slash / instead of a backslash \.
AFAIK, it happens for every package.
For example,

texdoc geometry

tries to open c:\Users\USER01\scoop\apps\miktex\current\texmfs/data\miktex\mthelp\geometry.html. Please note the wrong slash between texmfs and data.
Please also note that the issue is visible in Firefox but it is not visible with google chrome only because chrome automatically fixes the URL.
As verification, this is the related log in texdoc.log:

2023-07-07 19:33:49,441+0200 INFO  texdoc.core - start process: firefox C:\Users\USER01\scoop\apps\miktex\current\texmfs/data\miktex\mthelp\siunitx.html

I think that the issue is linked to this one #551 where, if you carefully read the file URL c:\Program Files\MiKTeX 2.9\doc/latex/koma-script\scrartcl.html you will find the same problem, i.e. the slash.

FYI, I made a minimum installation of TeXLive on another pc and the command texdoc scrletter works well.
As a side note, why does texdoc in TeXLive tend to open pdf doc directly while texdoc in MikTeX always opens html files?


initexmf report:

ReportDate: 2023-07-08 11:05:10
CurrentVersion: 23.5
SetupDate: 2023-05-02 19:21:00
SetupVersion: 23.4
Configuration: Portable
GitInfo: 2ed16f7 / 2023-05-03 10:03:00
OS: Windows 10.0.19045
SharedSetup: no
LinkTargetDirectory: C:\Users\USER01\scoop\apps\miktex\current\texmfs\install\miktex\bin\x64
PathOkay: yes
LastUpdateCheck: 2023-07-07 19:56:09
LastUpdate: 2023-07-07 19:56:50
LastUpdateDb: 2023-07-07 19:55:58
SystemAdmin: yes
RootPrivileges: no
AdminMode: no
Root0: C:\Users\USER01\scoop\apps\miktex\current\texmfs\config
Root1: C:\Users\USER01\scoop\apps\miktex\current\texmfs\data
Root2: C:\Users\USER01\scoop\apps\miktex\current\texmfs\install
UserInstall: C:\Users\USER01\scoop\apps\miktex\current\texmfs\install
UserConfig: C:\Users\USER01\scoop\apps\miktex\current\texmfs\config
UserData: C:\Users\USER01\scoop\apps\miktex\current\texmfs\data
@stale
Copy link

stale bot commented Sep 17, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Sep 17, 2023
@ragibson
Copy link

Note that texdoc in MiKTeX is actually a shim to @edocevoli's mthelp, so this is a duplicate of #637.

I don't use Windows for development, but was able to replicate this on a local machine with a portable install. @edocevoli was also able to replicate it a long time ago in this comment. Note that they have missed it in the past (as in your linked issue) because their use of Chrome transparently replaces the slashes to correct the broken file path.

The real texdoc has fixed this issue in this portion of it's utilities by converting the path to all lowercase and replacing all forward slashes with back slashes before attempting to view the file.

Copy link

stale bot commented Dec 15, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants