小编mef*_*fiX的帖子

如何使纸张大小适合LaTeX中的内容

我想创建一个只包含一个公式的pdf/ps/eps.我认为最简单的方法是使用乳胶.不幸的是,我没有找到指定的选项,纸张大小应该自动设置为适合内容.

我发现dvipng有一个"-T紧"选项,实际上可以解决这个问题,但是...我希望它采用矢量图形格式.

有什么建议?

谢谢.

latex

18
推荐指数
2
解决办法
6308
查看次数

Emacs自动完成

因为我无法CEDET完成自动代码完成工作(在MS世界中也称为智能),经过多次尝试(不,它只是不起作用!),我决定使用auto-complete它,对于我来说足够了.

不幸的是,auto-complete当谈到退出imenu它的建议时,有一种恼人的行为.

  1. auto-complete开始imenu,不管有多少的建议了.因此,如果只有一个建议,则会出现菜单.1.
  2. 要退出imenu,我必须使用LEFTRIGHT键才能使菜单消失.ESC-ESC-ESC没有任何影响.

有什么方法可以修改这两种行为吗?

这是我的.emacs文件的摘录,显示auto-complete相关的东西:

(require 'auto-complete-config)
(add-to-list 'ac-dictionary-directories "~/.emacs.d/ac-dict")
(ac-config-default)
(setq ac-delay 0.5) ;; eclipse uses 500ms

亲切的问候,mefiX

emacs autocomplete

12
推荐指数
1
解决办法
7061
查看次数

Emacs:在.emacs中检查无窗口系统

有没有可能,检查是否Emacs是在运行--no-window-system(-nw)模式下点emacs的文件中(.emacs)?我想仅在emacs处于窗口模式(/或不是)时才启用/包含某些扩展.

亲切的问候,mefiX

emacs

11
推荐指数
2
解决办法
2711
查看次数

在emacs中搜索剪贴板文本

是否有可能在击中时搜索当前存在于剪贴板中的文本C-s,可能是在击中时触发的某种钩子C-s然后将剪贴板插入到迷你缓冲器中?

emacs

9
推荐指数
1
解决办法
938
查看次数

在C++中初始化动态数组的正确方法

我目前正在开发一个C++项目,其中经常出现动态数组.我想知道,使用new-operator初始化动态数组的正确方法是什么?我的一位同事告诉我,在构造函数中使用new是一个禁忌,因为构造函数是一个不应该容易出错或者根本不应该失败的构造.现在让我们考虑以下示例:我们有两个类,一个或多或少复杂的类State和一个StateContainer类,应该自我解释.

class State {
private:
 unsigned smth;
public:
 State();
 State( unsigned s );
};

class StateContainer {
private:
 unsigned long nStates;
 State *states;
public:
 StateContainer();
 StateContainer( unsigned long n );
 virtual ~StateContainer();
};

StateContainer::StateContainer() {
 nStates = SOME_DEFINE_N_STATES;
 states = new State[nStates];
 if ( !states ) {
  // Error handling
 }
}

StateContainer::StateContainer( unsigned long n ) {
 nStates = n;
 try {
  states = new State[nStates]
 } catch ( std::bad_alloc &e ) {
  // Error handling
 }
}

StateContainer::~StateContainer() …
Run Code Online (Sandbox Code Playgroud)

c++ new-operator

7
推荐指数
2
解决办法
5735
查看次数

Emacs打印边距列

有没有办法在特定列(例如80)显示真实的打印边距,这样背景为"n"以上的列获得另一种颜色或在此列显示实线?

我发现ColumnMarker(见这里),不幸的是,这个插件只突出显示超出指定列的文本.

我还尝试过将emacs的窗口/框架大小更改为(w/h)=(80 /).一般来说,这很好用.不幸的是,如果emacs窗口/框架最大化,它不在GNOME下!

emacs

6
推荐指数
2
解决办法
4069
查看次数

Xamarin 按钮命令绑定

我有一个非常基本的测试页面SettingsPage,它在 xaml 中包含一个按钮,如下所示:

<Button Text="Toggle Compass" Command="{Binding toggleCompassCmd}"/>
Run Code Online (Sandbox Code Playgroud)

一个类CompassTest实现INotifyPropertyChanged并添加了一个名为 的新命令toggleCompassCmd

using System;
using System.ComponentModel;
using System.Windows.Input;
using Xamarin.Essentials;
using Xamarin.Forms;

namespace HelloWorld.Models
{
public class CompassTest : INotifyPropertyChanged
{
    // Set speed delay for monitoring changes.
    SensorSpeed speed = SensorSpeed.UI;

    public ICommand toggleCompassCmd { private set; get; }

    private CompassData m_data;
    protected CompassData compassData
    {
        get { return m_data; }
        private set { m_data = value; }
    }

    public event PropertyChangedEventHandler PropertyChanged; …
Run Code Online (Sandbox Code Playgroud)

c# command xamarin xamarin.forms

6
推荐指数
1
解决办法
6515
查看次数

Xamarin 主要方法或等效方法

我是 Xamarin 的新手,我正在寻找像main()方法这样的入口点。此外,我有一个数据存储(即模型)类,它不断地从 Web 套接字接收数据,并且可以从整个应用程序(即从多个 ViewModels)访问。我在哪里可以放置像这样的重要和中心类?你会把这些放在一个静态类中吗?

另外:是否有类似 a 的东西main-loop负责处理任务和事件?

我非常感谢 Xamarin 应用程序中所有“入口点”的通用/入门概述。

c# xamarin xamarin.forms

4
推荐指数
1
解决办法
1602
查看次数

使用GTK在emacs 23.2中滚动滞后

我正在使用带有GTK工具包的emacs 23.2.我使用以下configure-params从源代码构建了emacs:

./configure --prefix=/usr --without-makeinfo --without-sound
Run Code Online (Sandbox Code Playgroud)

使用以下配置构建emacs:

  Where should the build process find the source code?    /home/****/incoming/emacs-23.2
  What operating system and machine description files should Emacs use?
        `s/gnu-linux.h' and `m/intel386.h'
  What compiler should emacs be built with?               gcc -g -O2 -Wdeclaration-after-statement -Wno-pointer-sign  
  Should Emacs use the GNU version of malloc?             yes
      (Using Doug Lea's new malloc from the GNU C Library.)
  Should Emacs use a relocating allocator for buffers?    yes
  Should Emacs use mmap(2) for buffer allocation?         no
  What window …

emacs emacs23

3
推荐指数
1
解决办法
2116
查看次数

增加LaTeX Beamer中的页码

在LaTeX Beamer中,幻灯片的总数包括仅包含每个部分/子部分之前的目录的那些,这不必要地增加了幻灯片的总数.有什么方法可以防止这种情况吗?

换句话说:我不希望包含TOC的幻灯片有页码.

亲切的问候,mefiX

latex beamer

3
推荐指数
2
解决办法
1万
查看次数