-
Notifications
You must be signed in to change notification settings - Fork 518
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
Generate HTML via make4ht #20
Conversation
Known issue: Underscores can't be used in URLs, as the underscore character is not rendered expectedly. |
68c0318
to
c9adc25
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a directory named "docs."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filename "config.cfg" is too generic. Can you use more specific one?
Did you use external source files such as CSS? If so, we have to mention the source and clarify the potential licensing terms. |
I have modified that commit message, thanks. |
I remove the whole html /directory . You can generate these files on your own with |
I'm getting error when rendering the graph at 0.7.3 Manage /proc file with seq_file, is it only me?
|
I don't meet that problem.
|
I encountered the following errors while running
Package information:
|
Yes, as I mentioned. |
I found a workaround to turn off TOC while generating HTML: --- a/lkmpg.tex
+++ b/lkmpg.tex
@@ -39,7 +39,12 @@
\begin{document}
\maketitle
+
+\ifdefined\HCode
+% turn off TOC
+\else
\tableofcontents
+\fi
\section{Introduction}
\label{sec:introduction} Then, I got the message:
|
That way worked for me too. --- a/html.cfg
+++ b/html.cfg
@@ -1,5 +1,7 @@
\Preamble{xhtml}
+\Configure{tableofcontents*}{chapter,section,subsection}
+ And the generated html files contains TOC again |
I think that you misunderstood something about GitHub Page and make4ht-action. The Workflow MattersLet's see the sample name: CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Run make4ht
uses: docker://ghcr.io/michal-h21/make4ht-action:latest
env:
command: "make4ht -d out main.tex"
- name: Publish the web pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./out The workflow do the following tasks whenever there's any
What Should We DoThere're things to be concerned:
I create a simple name: Generate HTML and deploy to GitHub Page.
on:
push:
branches:
- master
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- name: checkout branch
uses: actions/checkout@v2
- name: install dependencies
run: |
sudo apt update
sudo apt install make texlive-full dvipng
make html
- name: deploy site
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./html # --> should be the same as your output folder of make4ht
publish_branch: gh-pages Note that:
|
Thanks for @Hsins ’s reply. |
What about texlive docker container? This is the locally docker-built version: Btw I notice that the svg rendered at 0.7.3 is corrupted (both yours and mine): |
@ekangmonyet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebase the latest master branch where I removed out-of-date kernel versioning scheme.
ee33ae0
to
93ab5f8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use "git rebase -i" to rework/squash git commits in preparation for the merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Always use "directory" instead of "folder."
We prefer UNIX flavors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Improve the git commit messages.
See https://chris.beams.io/posts/git-commit/
eeb688d
to
95cfeeb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Improve the grammar in git commit message. You shall address the motivation and/or the problem you are going to solve at first glance. Then, explain how this patch works.
76a40e4
to
14587e9
Compare
This patch add some scripts which are meant to generate html files successfully using `make4ht`. The target is to build a directory html/ for github page deployment usuage. Problems : When you try using `make4ht -suf html5 -d html lkmpg.tex` to parse the file, you'll find out that make4ht has several defectors: 1. The layout is unsatisfying 2. When it parsing lkmpg.tex and meet \tableofcontents will throw error 3. It generated a lot unneeded files when parsing lkmpg.tex 4. The output filenames are based on input filename and you can't assign them, which is inconvinient cause github page will only recognize the file named `index.html`. Solutions : For problem 1, we can write a config file `html.cfg` to specify the layout style of lkmpg.html with css selectors. For problem 2, we can turn off the \tableofcontents section when using make4ht. However, this cause the output html files without table of contents part. And we can fix this by adding `\Configure{tableofcontents*}{chapter,section,subsection}` into html.cfg so the output html files will contain table of contents again. For problem 3, we can add some delete commands into Makefile. For problem 4, we can add a symbolic link `index.html` lined to `lkmpg.html` Overview of file changes : In html.cfg : Specify the layout of lkmpg.html. Add tables of contents. In Makefile : Add a new target `html` for generating html files and put them in html/ directory. Add a symbolic link `index.html` linked to `lkmpg.html`. Add several `rm` command to get rid of unneeded files. In lkmpg.tex : Turn off the \tableofcontens section when using `make4ht` to prevent from error.
Thank @fennecJ for contributing! I amended the commit messages slightly. |
Thanks for applying my PR, I indeed learned a lot during the discussion. |
make4ht
has a lot of defectors:lkmpg.tex
and meet\tableofcontents
will throw errorlkmpg.tex
and meet url with underscore\_
, it will output\_
directly instead of
_
github action
script released by make4ht's teamworked inconsistent with computer side which causing
error when generating
github page
,and I currently cannotfind a way to generate
github page
throughgithub action
viamake4ht
.You can see the result page in here currently.