Giter VIP home page Giter VIP logo

latexnote's Introduction

LaTeXNote

Some notes about using LaTeX.

主要以Issues的形式进行记录。

比较好的资料

超级棒的工具

latexnote's People

Contributors

lartpang avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

latexnote's Issues

如何在`\mathcal{}`中使用小写字母

如何在\mathcal{}中使用小写字母

解决方案

\mathcal only works for upper case letters, so you could use

$(\mathcal{C}_m)$

If you need the lower case "m" to be in a similar font, you can load the calligra package and define a \mathcalligra command in the form

\usepackage{calligra}
\DeclareMathAlphabet{\mathcalligra}{T1}{calligra}{m}{n}

A complete example:

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{calligra}
\usepackage{calrsfs}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage[mathscr]{euscript}

\DeclareMathAlphabet{\mathcalligra}{T1}{calligra}{m}{n}

\begin{document}

$(\kern-4pt\mathcalligra{C_m}\kern1pt)$
$(\mathcal{C}_m)$

\end{document}

参考链接

LaTeX论文插图位置问题

LaTeX论文插图位置问题

解决方案

LaTeX图片、表格都是浮动格式。

若要将图片展示在你想要的确切位置,需要在\begin{figure}之后加上[h],这样再次编译后就发现图片位置正确了,但是为什么LaTeX不推荐我们让图形准确出现在放置的位置呢?因为那会导致糟糕的分页,将大片的空白留在页面下方。为得到专家级的排版效果,作者不得不手工调整图形的位置。这种工作是非常乏味的,尤其是几乎每次修改文档都得这样做一次。目的就是让我们将注意力集中在文章的内容,而不是排版上。尤其是在做长文章或书时,用Word每次修改时插入新的文字都要重新调整图片,很不方便。

下面整理了一些网上的资料。

浮动格式

浮动格式 一个典型的插图语句 

\begin{figure}[htbp]
\centering 
\includegraphics[width=6.5cm]{graph.eps} 
\caption{This is an inserted EPS graphic} 
\label{fig:graph} 
\end{figure

其中[htbp]就是浮动格式

  • h 当前位置:将图形放置在正文文本中给出该图形环境的地方。如果本页所剩的页面不够,这一参数将不起作用。 
  • t 顶部:将图形放置在页面的顶部。
  • b 底部:将图形放置在页面的底部。
  • p 浮动页:将图形放置在允许有浮动对象的页面上。

我一般使用[htb]这样的组合,只用[h]是没有用的(原因请读者思考)。这样组合的意思就是LaTeX会尽量满足排在前面的浮动格式,就是h-t-b这个顺序,让排版的效果尽量好。

如果你就是要插在你想插的位置怎么办?

我会这样做:如果TeX不让你插在你想插的位置,说明你的图片太大了,你可以试试调整[width=6.5cm]中的大小,让它能够插得下,其实我们在word中也是这样做的。推荐使用\textwidth这个单位。但还是那句话,不要太勉强。   

一些图片的并排 

如果想要这样的效果,要两张图并列,或几张图排在一起。可以试试下面的模板,效果请自己运行

\begin{figure}[htbp]
\centering 
\subfigure[sin1]{
    \label{fig:fft:a}
    \begin{minipage}[c]{0.5\textwidth} 
        \centering 
        \includegraphics[width=6.5cm]{sin1.eps} 
    \end{minipage}% 
}%注意这个”%”绝对不能省

参考链接

LaTeX脚注设置

LaTeX脚注设置

脚注出现在当前页底、可用两种方式产生:

  1. 一种用单个命令\footnote
  2. 另一种用\footnotemark\footnotetext两条命令的组合

Introduction

Adding a footnote to your document is straightforward:

I'm writing something here to test \footnote{footnotes working fine}
several features.

image

The command \footnote{footnotes working fine} adds a superscript to the word right before the command and prints the corresponding footnote.

Basic usage

The superscript mark to reference a footnote can be manually set. See the example below:

I'm writing something here to test \footnote[10]{footnotes working fine}
several features. You can write the footnote text\footnotemark in its
own line.
\footnotetext{Second footnote}

image

There are three new commands here:

  • \footnote[10]{footnotes working fine} Adds a footnote using "10" as reference mark. Unless you have a good reason to do this, it's not recommended because the footnote counter is not altered and you may end up with two different footnotes with the same mark.
  • \footnotemark Prints a foot note mark but without the actual footnote. This is helpful to write the actual footnote text in a new line.
  • \footnotetext{Second footnote} Prints the footnote corresponding to the previous \footnotemark.

Footnotes with multiple references

We can add several references to a single footnote mark

I'm writing something here to test \footnote{footnotes working fine} 
several features. You can write the footnote text\footnotemark in its 
own line.
 
\footnotetext{Second footnote}

For instance\footnotemark I can use the same footnote more than 
once\footnotemark[\value{footnote}].
 
\footnotetext{footnote with two references}

image

The command \footnotemark[\value{footnote}] inserts a superscript corresponding to the current value of the counter footnote.

Changing the numbering style

You can change the type of numbers printed by the footnote counter

\footnotetext{footnote with two references} 
 
\renewcommand{\thefootnote}{\roman{footnote}}
Now a footnote in Roman\footnote{This footnote is in Roman numerals}

image

The command \renewcommand{\thefootnote}{\roman{footnote}} sets the number styles to lowercase roman. Other possible styles are:

  • arabic Arabic numerals.
  • Roman Upper case Roman numerals.
  • alph Alphabetic lower case.
  • Alph Alphabetic upper case.
  • fnsymbol A set of 9 special symbols.

You can use this command in the preamble to change the numbering style of the footnotes in the whole document.

参考链接

LaTeX让列表更紧凑

LaTeX让列表更紧凑

解决方案

It's easier with the enumitem package:

\documentclass{article}
\usepackage{enumitem}
\begin{document}

Less space:

\begin{itemize}[noitemsep]
  \item foo
  \item bar
  \item baz
\end{itemize}

Even more compact:

\begin{itemize}[noitemsep, nolistsep]
  \item foo
  \item bar
  \item baz
\end{itemize}
\end{document}

The enumitem package provides a lot of features to customize bullets, numbering and lengths.

The paralist package provides very compact lists: compactitem, compactenum and even lists within paragraphs like inparaenum and inparaitem.

参考连接

公式显示间距过大

解决方案

第一,我们输入代码的问题。即我们输入公式时,自动自己空行了,会导致间距扩大。如:

\documentclass{article}
\usepackage{type1cm}
\usepackage[fleqn]{amsmath}
\begin{document}
the  text 

\begin{equation}
a+b=c
\end{equation}


the text
\begin{equation}
a+b=c
\end{equation}
\end{document}

显示效果为:

image

第二,的确是系统提供的公式到文本的间距过大。

这一点可查看参考资料中的内容。

参考资料

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.