当前位置: 首页 > news >正文

使用Citavi进行文献管理,常用宏

大家都知道,citavi的文献管理非常方便,还有很好用的宏可以扩展功能
以下是我整理的一些自己常用的宏功能:

1、将Citavi的Group(分组)转为Category/Categories(分类)

我将endnote数据库导入到Citavi后,endnote的分组(Group)无损转换成了Group,但是想要变成Citavi的Category怎么办呢,毕竟Category可以多层级,利用宏就可以实现:

using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Linq;using SwissAcademic.Citavi;
using SwissAcademic.Citavi.Shell;// 将Groups的分组平移到categories里,保留住相应的文献, citavi 6.8亲测
// 新奥尔良烤乳猪 qq3060191344; 小明 qq1429851250
//citavi交流群 202835945
public static class CitaviMacro
{public static void Main(){if (Program.ProjectShells.Count == 0) return;		//no project openif (IsBackupAvailable() == false) return;			//user wants to backup his/her project firstList<Reference> references = Program.ActiveProjectShell.PrimaryMainForm.GetFilteredReferences();//reference to active ProjectProject activeProject = Program.ActiveProjectShell.Project;if (activeProject == null) return;Dictionary<string, Category> categoryDictionary = new Dictionary<string, Category>();foreach(Group keyword in activeProject.Groups){Category category = activeProject.Categories.FirstOrDefault(item => item.Name.Equals(keyword.FullName, StringComparison.OrdinalIgnoreCase));if (category == null){category = activeProject.Categories.Add(keyword.FullName);}categoryDictionary[keyword.FullName] = category;}foreach (Reference reference in activeProject.References){foreach(Group referenceGroup in reference.Groups){reference.Categories.Add(categoryDictionary[referenceGroup.FullName]);}}}// Ask whether backup is availableprivate static bool IsBackupAvailable(){string warning = String.Concat("Important: This macro will make irreversible changes to your project.","\r\n\r\n", "Make sure you have a current backup of your project before you run this macro.","\r\n", "If you aren't sure, click Cancel and then, in the main Citavi window, on the File menu, click Create backup.","\r\n\r\n", "Do you want to continue?");return (MessageBox.Show(warning, "Citavi", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2) == DialogResult.OK);}}

宏的使用

打开macro editor操作面板,Citavi的宏其实类似于一个临时插件,用一次加载一次。
image.png
把宏代码输入进去,run就可以了。

2、Citavi界面太小了,放大citavi的字体

还是用宏:

using System;
using System.Linq;
using System.ComponentModel;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;using SwissAcademic.Citavi;
using SwissAcademic.Citavi.Metadata;
using SwissAcademic.Citavi.Shell;
using SwissAcademic.Collections;
using System.Drawing;
//citavi 6.8亲测
// 新奥尔良烤乳猪 qq3060191344; 小明 qq1429851250
//citavi交流群 202835945public static class CitaviMacro
{public static void Main(){Project project = Program.ActiveProjectShell.Project;MainForm mainForm = Program.ActiveProjectShell.PrimaryMainForm;Font font = new Font(mainForm.Font.FontFamily,14); // 在此处指定所需的字体名称和字体大小mainForm.Font = font;// MessageBox.Show("设置成功");}
}

//citavi交流群 202835945

http://www.xdnf.cn/news/830125.html

相关文章:

  • MSDE安装和配置提示
  • docker与gosu(1),Golang平台HTTPS抓包解决方案及问题分析
  • RestTemlate源码分析及工具类设计
  • 通译www.djangobook.com之第二十一章:调度Django
  • [矩阵的三角分解系列四] 乔累斯基(Cholesky)分解公式
  • DNF2020年全新脚本展示第三部分
  • SATA接口-SATA和PATA的区别(ATA 设备 )
  • 网关、安全网关?与防火墙的区别?
  • Linux常用命令大全总结及讲解(超详细版)
  • 产品体验测评:使用阿里云操作系统智能助手OS Copilot解锁操作系统运维与编程
  • IDEA常用快捷键记录
  • 【采集软件】根据关键词批量采集小红薯,含笔记正文、笔记链接、发布时间、转评赞藏等
  • HarmonyOS开发指南:鸿蒙编译工具链
  • 深入浅出理解Allan方差分析方法
  • ubuntu or kylinos软件安装错误的终极解决方案
  • HBT机制
  • 四种常见的登录方案
  • 冒泡排序算法详解之C语言版
  • spss分析方法-因子分析(转载)
  • 关于控制台头文件stdafx.h的解决方法。
  • 操作系统系列:快速了解C程序的编译及运行
  • 遍历map的四种方法及Map.entry详解
  • C#中的`Console.WriteLine`函数及其使用方法
  • 9大代理服务器软件的比较与分析之校园局域网代理蝴蝶
  • python创意项目设计方案,python创意编程作品集
  • java:printStackTrace()方法
  • 【Opencv】目标追踪——高斯混合模型分离算法(MOG)
  • Oracle客户端软件的使用
  • Keil_uvision 基本使用教程
  • XHTML基础入门教程