mirror of
https://github.com/kenryuS/report-temp.git
synced 2026-06-14 16:26:13 +09:00
added LaTeX template
This commit is contained in:
@@ -22,19 +22,25 @@
|
|||||||
|
|
||||||
vimWithTex = import ./nix/vim.nix { inherit pkgs; lib = pkgs.lib; };
|
vimWithTex = import ./nix/vim.nix { inherit pkgs; lib = pkgs.lib; };
|
||||||
texEnv = import ./nix/latex.nix { inherit pkgs; };
|
texEnv = import ./nix/latex.nix { inherit pkgs; };
|
||||||
|
|
||||||
|
basePackages = [
|
||||||
|
texEnv
|
||||||
|
pkgs.qpdf
|
||||||
|
pkgs.qpdfview
|
||||||
|
];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
devShells.default = pkgs.stdenv.mkDerivation {
|
templates = {
|
||||||
|
latex = {};
|
||||||
|
};
|
||||||
|
devShells.default = self.devShells.${system}.latex;
|
||||||
|
devShells.latex = pkgs.stdenv.mkDerivation {
|
||||||
inherit name;
|
inherit name;
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
export PS1="${name} \w \$ "
|
export PS1="${name} \w \$ "
|
||||||
'';
|
'';
|
||||||
buildInputs = [
|
buildInputs = basePackages ++ [
|
||||||
texEnv
|
|
||||||
vimWithTex
|
vimWithTex
|
||||||
pkgs._0xproto
|
|
||||||
pkgs.qpdf
|
|
||||||
pkgs.kdePackages.okular
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
devShells.pandoc = pkgs.stdenv.mkDerivation {
|
devShells.pandoc = pkgs.stdenv.mkDerivation {
|
||||||
@@ -42,12 +48,8 @@
|
|||||||
shellHook = ''
|
shellHook = ''
|
||||||
export PS1="${name} pandoc \w \$ "
|
export PS1="${name} pandoc \w \$ "
|
||||||
'';
|
'';
|
||||||
buildInputs = [
|
buildInputs = basePackages ++ [
|
||||||
texEnv
|
|
||||||
pkgs.pandoc
|
pkgs.pandoc
|
||||||
pkgs._0xproto
|
|
||||||
pkgs.qpdf
|
|
||||||
pkgs.qpdfview
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
+30
-29
@@ -2,60 +2,61 @@
|
|||||||
pkgs.texliveSmall.withPackages (ps: with ps; [
|
pkgs.texliveSmall.withPackages (ps: with ps; [
|
||||||
# Bibliography
|
# Bibliography
|
||||||
biber
|
biber
|
||||||
bibtex
|
|
||||||
biblatex
|
biblatex
|
||||||
|
bibtex
|
||||||
|
|
||||||
# Japanese Support
|
# Japanese Support
|
||||||
|
ascmac
|
||||||
babel
|
babel
|
||||||
babel-japanese
|
babel-japanese
|
||||||
luatexja
|
|
||||||
ascmac
|
|
||||||
bxjscls
|
bxjscls
|
||||||
zxjatype
|
|
||||||
collection-langjapanese
|
collection-langjapanese
|
||||||
|
luatexja
|
||||||
|
zxjatype
|
||||||
|
|
||||||
# Fonts
|
# Fonts
|
||||||
noto
|
fontspec
|
||||||
zxjafont
|
|
||||||
haranoaji
|
haranoaji
|
||||||
libertine
|
inconsolata
|
||||||
latex-fonts
|
latex-fonts
|
||||||
|
libertine
|
||||||
|
luainputenc
|
||||||
mathfont
|
mathfont
|
||||||
newtx
|
newtx
|
||||||
luainputenc
|
noto
|
||||||
fontspec
|
|
||||||
type1cm
|
type1cm
|
||||||
|
zxjafont
|
||||||
|
|
||||||
# Math
|
# Math
|
||||||
amsmath
|
|
||||||
amsfonts
|
amsfonts
|
||||||
unicode-math
|
amsmath
|
||||||
mathtools
|
|
||||||
lualatex-math
|
lualatex-math
|
||||||
|
mathtools
|
||||||
|
unicode-math
|
||||||
|
|
||||||
# Graphics
|
# Graphics
|
||||||
graphics
|
|
||||||
wrapfig
|
|
||||||
caption
|
caption
|
||||||
|
circuitikz
|
||||||
|
graphics
|
||||||
here
|
here
|
||||||
pgf
|
pgf
|
||||||
circuitikz
|
wrapfig
|
||||||
|
|
||||||
# Tools
|
# Tools
|
||||||
latexmk
|
|
||||||
subfiles
|
|
||||||
enumitem
|
|
||||||
hyperref
|
|
||||||
cleveref
|
|
||||||
float
|
|
||||||
framed
|
|
||||||
tabularray
|
|
||||||
footmisc
|
|
||||||
listings
|
|
||||||
xcolor
|
|
||||||
xstring
|
|
||||||
xpatch
|
|
||||||
blindtext
|
blindtext
|
||||||
multirow
|
cleveref
|
||||||
|
enumitem
|
||||||
etoolbox
|
etoolbox
|
||||||
|
float
|
||||||
|
footmisc
|
||||||
|
framed
|
||||||
|
hyperref
|
||||||
|
latexmk
|
||||||
|
listings
|
||||||
|
multirow
|
||||||
|
subfiles
|
||||||
|
tabularray
|
||||||
|
xcolor
|
||||||
|
xpatch
|
||||||
|
xstring
|
||||||
] ++ [ ps.import pkgs.my-latex-pkgs ])
|
] ++ [ ps.import pkgs.my-latex-pkgs ])
|
||||||
|
|||||||
+2
-2
@@ -41,8 +41,8 @@ pkgs.vim-full.customize {
|
|||||||
syntax enable
|
syntax enable
|
||||||
|
|
||||||
let g:vimtex_view_method = 'general'
|
let g:vimtex_view_method = 'general'
|
||||||
let g:vimtex_view_general_viewer = 'okular'
|
let g:vimtex_view_general_viewer = 'qpdfview'
|
||||||
let g:vimtex_view_general_options = '--unique file:@pdf\#src:@line@tex'
|
let g:vimtex_view_general_options = '--unique @pdf\#src:@tex:@line:@col'
|
||||||
let g:vimtex_compiler_method = 'latexmk'
|
let g:vimtex_compiler_method = 'latexmk'
|
||||||
let maplocalleader = ","
|
let maplocalleader = ","
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
|||||||
|
.intermediates/
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
# LaTeX Template
|
||||||
|
|
||||||
|
Use `vim` for edit/compile TeX files with vimtex plugin or `latexmk` command to compile.
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
\documentclass[xelatex,a4paper,11pt,ja=standard]{bxjsarticle}
|
||||||
|
|
||||||
|
\usepackage{preamble}
|
||||||
|
\usepackage{detailed-title}
|
||||||
|
|
||||||
|
\reportauthor{高専太郎}
|
||||||
|
\reporttitle{テストレポート}
|
||||||
|
\reportdate{AAAA年}{BB月}{CC日}
|
||||||
|
\turnindate{AAAA年}{BB月}{DD日}
|
||||||
|
\schoolname{abc工業高等専門学校}
|
||||||
|
\department{hogefuga科}
|
||||||
|
\subject{foobazz}
|
||||||
|
\professor{高専先生}
|
||||||
|
\studentid{0000}
|
||||||
|
\seatingnum{0}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
\detailedtitle
|
||||||
|
|
||||||
|
\section{Test}
|
||||||
|
|
||||||
|
Hello world program implemented in C is listed in listing \ref{lst1}.
|
||||||
|
|
||||||
|
\begin{lstlisting}[language=C,caption={Code Listing},label={lst1}]
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main(int argc, char** argv) {
|
||||||
|
printf("Hello World!");
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
\end{lstlisting}
|
||||||
|
\end{document}
|
||||||
|
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
\documentclass[japanese,xelatex,a4paper,10.5pt,ja=standard]{bxjsarticle}
|
||||||
|
|
||||||
|
\usepackage{depD-experiment}
|
||||||
|
\usepackage{pgf}
|
||||||
|
|
||||||
|
\reportauthor{高専太郎}
|
||||||
|
\reporttitle{テストレポート}
|
||||||
|
\reportdate{AAAA年}{BB月}{CC日}
|
||||||
|
\turnindate{AAAA年}{CC月}{DD日}
|
||||||
|
\schoolyear{AAAA}
|
||||||
|
\grade{N}
|
||||||
|
\department{電子xxxx科}
|
||||||
|
\subject{実験}
|
||||||
|
\reportid{0000}
|
||||||
|
\expgroup{fuga}
|
||||||
|
\seatingnum{0}
|
||||||
|
\addExperimentDate{aaaa年 bb月 cc日}
|
||||||
|
\addResearcher{高専花子}
|
||||||
|
|
||||||
|
\addbibresource{./bibliography.bib}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
\experimentTitle
|
||||||
|
|
||||||
|
\section{実験目的}
|
||||||
|
\resetrefcounter
|
||||||
|
|
||||||
|
\section{理論}
|
||||||
|
\resetrefcounter
|
||||||
|
|
||||||
|
\section{実験条件}
|
||||||
|
\resetrefcounter
|
||||||
|
|
||||||
|
\section{実験結果}
|
||||||
|
\resetrefcounter
|
||||||
|
|
||||||
|
\section{考察}
|
||||||
|
\resetrefcounter
|
||||||
|
|
||||||
|
\section{まとめ}
|
||||||
|
|
||||||
|
\printbibliography[title={参考文献}]{}
|
||||||
|
\end{document}
|
||||||
|
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
description = "Template for LaTeX";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||||
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
report-temp.url = "github:kenryuS/report-temp";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, flake-utils, report-temp }:
|
||||||
|
flake-utils.lib.eachDefaultSystem (system:
|
||||||
|
let
|
||||||
|
pkgs = import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
config = {};
|
||||||
|
overlays = [];
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
devShells.default = report-temp.devShells.${system}.latex;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
\documentclass[xelatex,a4paper,11pt,ja=standard]{bxjsarticle}
|
||||||
|
|
||||||
|
\usepackage{preamble}
|
||||||
|
\usepackage{simple-title}
|
||||||
|
|
||||||
|
\reportauthor{高専太郎}
|
||||||
|
\reporttitle{テストレポート}
|
||||||
|
\reportdate{AAAA年}{BB月}{CC日}
|
||||||
|
\turnindate{AAAA年}{BB月}{DD日}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
\simpletitle
|
||||||
|
|
||||||
|
\section{Test}
|
||||||
|
|
||||||
|
Hello \LaTeX{}!
|
||||||
|
|
||||||
|
\begin{itemize}
|
||||||
|
\item{\textrm{Roman}}
|
||||||
|
\item{\textit{Italic}}
|
||||||
|
\item{\textbf{Bold}}
|
||||||
|
\item{\texttt{Typewriter}}
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
\section{テスト}
|
||||||
|
|
||||||
|
いろはにほへとちりぬるを
|
||||||
|
\end{document}
|
||||||
|
|
||||||
@@ -5,3 +5,4 @@
|
|||||||
\usepackage{experiment-title}
|
\usepackage{experiment-title}
|
||||||
\usepackage{depD-bib}
|
\usepackage{depD-bib}
|
||||||
\usepackage{depD-format}
|
\usepackage{depD-format}
|
||||||
|
\usepackage{amssymb}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
\NeedsTeXFormat{LaTeX2e}
|
\NeedsTeXFormat{LaTeX2e}
|
||||||
\ProvidesPackage{depD-format}
|
\ProvidesPackage{depD-format}
|
||||||
|
|
||||||
|
\usepackage{amsmath}
|
||||||
\usepackage{cleveref}
|
\usepackage{cleveref}
|
||||||
|
|
||||||
\renewcommand\figurename{Fig. }
|
\renewcommand\figurename{Fig. }
|
||||||
|
|||||||
+2
-2
@@ -10,9 +10,10 @@
|
|||||||
]{biblatex}
|
]{biblatex}
|
||||||
|
|
||||||
\usepackage{fontspec}
|
\usepackage{fontspec}
|
||||||
|
\usepackage{inconsolata}
|
||||||
|
\fontspec{inconsolata}
|
||||||
\usepackage[mono=false]{libertine}
|
\usepackage[mono=false]{libertine}
|
||||||
\usepackage{noto}
|
\usepackage{noto}
|
||||||
\setmonofont{0xProto}
|
|
||||||
|
|
||||||
\usepackage[european]{circuitikz}
|
\usepackage[european]{circuitikz}
|
||||||
|
|
||||||
@@ -59,4 +60,3 @@
|
|||||||
framexleftmargin=10mm
|
framexleftmargin=10mm
|
||||||
}
|
}
|
||||||
\lstset{style=mystyle}
|
\lstset{style=mystyle}
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
\NeedsTeXFormat{LaTeX2e}
|
|
||||||
\ProvidesPackage{reportpaper}
|
|
||||||
|
|
||||||
\geometry{
|
|
||||||
a4paper,
|
|
||||||
total={166mm,270mm},
|
|
||||||
left=22mm,
|
|
||||||
right=22mm,
|
|
||||||
top=30mm,
|
|
||||||
headheight=15mm,
|
|
||||||
headsep=5mm,
|
|
||||||
marginparwidth=25mm,
|
|
||||||
footnotesep=5mm,
|
|
||||||
footskip=15mm,
|
|
||||||
bottom=25mm
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user