早上好,朋友们;如果你能帮助我创建这个,我将非常感激TD10使用 tikz 记录。谢谢。
答案1
类似这样的?Tikz 非常适合图形处理,因此文档中的某些元素可以用它处理,但不是全部。此外,它并不是唯一可用于此目的的工具。
\Startex
添加新的练习标题。计数器是自动的,只需在您想要开始新练习时添加命令即可。
输出
代码
\documentclass[a4paper]{article}
\usepackage[margin=1.5cm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usepackage{multicol}
\usepackage{lastpage}
\usepackage{fancyhdr}
\usepackage{lipsum}
\usetikzlibrary{calc}
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\fancyfoot[R]{\textsc{page}~\thepage/\pageref{LastPage}}
\newcounter{numex}
\def\thrulefill{\leavevmode\leaders\hrule height 0.7ex depth \dimexpr1pt-0.7ex\hfill\kern0pt}
\setlength{\columnseprule}{.5pt}
\setlength{\columnsep}{1.2cm}
\newcommand\Startex{%
\stepcounter{numex}
\begin{center}
\thrulefill~\textsc{\bfseries Exercise~\thenumex}~\thrulefill
\end{center}
}
\newcommand\around{%
\begin{tikzpicture}[overlay, remember picture]
\draw[rounded corners=5mm] ($(current page.south west)+(1cm,1cm)$) rectangle ($(current page.north east)+(-1cm,-1cm)$);
\node[fill=white, rotate=90, anchor=west, font=\footnotesize\scshape] at ($(current page.south west)+(1cm,2cm)$) {CPGE Lycée Med V};
\end{tikzpicture}
}
\newcommand\Title{
\vspace{2cm}
\begin{center}
\begin{tikzpicture}[overlay, remember picture]
\node[draw, rounded corners, align=center, text width=7cm, minimum height=1.5cm] (title) at (0,0) {TD 10\\\bfseries Fonctions convexes};
\node[anchor=south west] (top) at (title.north west) {PCSI-2 — CPGE Lycée Med V};
\draw (top.east) -- ($(top.east-|title.east)+(-5pt,0)$);
\node[anchor=north east] (bottom) at (title.south east) {2015-2016};
\draw (bottom.west) -- ($(bottom.west-|title.west)+(5pt,0)$);
\end{tikzpicture}
\end{center}
\vspace{2cm}
}
\begin{document}
\around
\Title
\begin{multicols*}{2}
\Startex
\lipsum[1]
\Startex
\lipsum[2]
\end{multicols*}
\end{document}