Skip to content

Commit

Permalink
📝 Update README.md
Browse files Browse the repository at this point in the history
Use autofancyhdr to replace fancyhdr
  • Loading branch information
Freed-Wu committed Feb 3, 2022
1 parent d26415f commit bf31a79
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 16 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -288,3 +288,5 @@ TSWLatexianTemp*
# Uncomment the next line to have this generated file ignored.
#*Notes.bib

# autofancyhdr
*.headfootlength
54 changes: 54 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: check-added-large-files
- id: fix-byte-order-marker
- id: check-case-conflict
- id: check-shebang-scripts-are-executable
- id: check-merge-conflict
- id: trailing-whitespace
- id: mixed-line-ending
- id: end-of-file-fixer
- id: detect-private-key
- id: check-symlinks
- id: check-ast
- id: debug-statements
- id: requirements-txt-fixer
- id: check-xml
- id: check-yaml
- id: check-toml
- id: check-json
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.1.11
hooks:
- id: remove-crlf
- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
hooks:
- id: codespell
- repo: https://github.com/jorisroovers/gitlint
rev: v0.17.0
hooks:
- id: gitlint
args: [--ignore=body-is-missing, --msg-filename]
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.13
hooks:
- id: mdformat
args: [--number]
additional_dependencies:
- mdformat-gfm
- mdformat-tables
- mdformat-toc
- mdformat-frontmatter
- mdformat-deflist
- mdformat-black
- mdformat-shfmt
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.4.0
hooks:
- id: markdownlint-cli2
additional_dependencies:
- markdown-it-texmath@0.9.1
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,40 @@
# Weekly Report Template

[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
[![Gitmoji](https://img.shields.io/badge/gitmoji-%20%F0%9F%98%9C%20%F0%9F%98%8D-FFDD67.svg?style=flat-square)](https://gitmoji.dev)

A weekly report template for ViLaB.

## Settings

``` tex
\geometry{%
noheadfoot,
margin={0.79in, 0.49in},
headheight=0.26in,
headsep=0.04in,
}
```

![page](https://user-images.githubusercontent.com/32936898/152362381-c72c06a2-b257-4cf2-94e0-a7373a662147.png)

## Others

Some changes on the [original template](https://github.com/Freed-Wu/weekly-report-template/releases/tag/v0.0.1):

- Fix typos.
- Remove the blank lines in header and contents.

### Add PDF Meta Information

``` tex
\usepackage[pdfusetitle, psdextra]{hyperref}
\title{main}
\author{wzy\thanks{USTC}}
```

``` shell
$ pdfinfo main.pdf|rg Title\|Author
Title: main
Author: wzy
```
34 changes: 18 additions & 16 deletions main.tex
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
\documentclass{article}
\documentclass[a4paper]{article}
\usepackage{xcolor}
\usepackage{parskip}
\usepackage{geometry}
\usepackage{color}
\geometry{
left=0.79in,
right=0.79in,
voffset=-0.25in,
headheight=18pt,
headsep=21pt,
bottom=0.49in,
\geometry{%
noheadfoot,
margin={0.79in, 0.49in},
headheight=0.26in,
headsep=0.04in,
}
\usepackage{fancyhdr}
\usepackage{autofancyhdr}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0mm}
\renewcommand{\footrulewidth}{0mm}
\lhead{\textbf{\Large Weekly Report}}
\rhead{\textbf{\textcolor{blue}{\huge ViLaB}}}
\cfoot{}
\fancyhead[l]{\textbf{\Large Weekly Report}}
\fancyhead[r]{\textbf{\textcolor{blue}{\huge ViLaB}}}
\fancyfoot{}
\fancyfoot[r]{Page \thepage}
\usepackage{tabu}
\newcommand{\Name}[1]{\textbf{\large #1}}
\renewcommand\arraystretch{2}
\usepackage[pdfusetitle, psdextra]{hyperref}
\title{main}
\author{wzy\thanks{USTC}}
\newcommand{\Name}[1]{\textbf{\large #1}}
\begin{document}

\noindent
\begin{tabu}{|X[2.2]|X[4.64]|}
\hline
\Name{Name:} & \\
Expand Down Expand Up @@ -80,4 +81,5 @@
}\\
\hline
\end{tabu}

\end{document}

0 comments on commit bf31a79

Please sign in to comment.