当前位置: 首页>>代码示例>>Java>>正文


Java Text2Latex类代码示例

本文整理汇总了Java中de.vandermeer.translation.targets.Text2Latex的典型用法代码示例。如果您正苦于以下问题:Java Text2Latex类的具体用法?Java Text2Latex怎么用?Java Text2Latex使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Text2Latex类属于de.vandermeer.translation.targets包,在下文中一共展示了Text2Latex类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: showOutput

import de.vandermeer.translation.targets.Text2Latex; //导入依赖的package包/类
@Override
public void showOutput(){
	// tag::example[]
	AP_Context ctx = new AP_Context();
	ctx.setAlignment(TextAlignment.LEFT);

	AsciiParagraph ap = new AsciiParagraph(ctx);
	ap.addText("A sentence with some normal text, not specific to LaTeX.");
	ap.addText("Now for some characters that require conversion: # % &.");
	ap.addText("And some more: © § ¤.");
	ap.addText("And even more: È É Ê Ë.");
	ap.addText("And some arrows as well: ← ↑ → ↓ ↔");
	System.out.println(ap.render(35));

	ctx.setTargetTranslator(new Text2Latex());
	System.out.println(ap.render(35));
	// end::example[]
}
 
开发者ID:vdmeer,项目名称:asciiparagraph,代码行数:19,代码来源:AP_09a_TargetTranslators_LaTeX.java

示例2: latex

import de.vandermeer.translation.targets.Text2Latex; //导入依赖的package包/类
/**
 * A theme for LaTeX target.
 * @return the theme
 */
static DescriptionListTheme latex(){
	return new DescriptionListTheme() {
		@Override
		public void apply(DescriptionListContext ctx) {
			ctx.setTargetTranslator(new Text2Latex());
			ctx.setListStart("\\begin{description}");
			ctx.setListEnd("\\end{description}");
			ctx.setLeftLabelString("\\item[");
			ctx.setRightLabelString("]");
			ctx.setItemMargin(4);
			ctx.setLabelRightMargin(0);
			ctx.setTextLeftMargin(1);
			ctx.setAlignment(TextAlignment.LEFT);
			ctx.setUseSameLine(true);
		}
	};
}
 
开发者ID:vdmeer,项目名称:asciilist,代码行数:22,代码来源:Dl_Themes.java

示例3: latex

import de.vandermeer.translation.targets.Text2Latex; //导入依赖的package包/类
/**
 * A theme for LaTeX target.
 * @return the theme
 */
static ItemizeListTheme latex(){
	return new ItemizeListTheme() {
		@Override
		public void apply(ItemizeListContext ctx) {
			ctx.setTargetTranslator(new Text2Latex());
			ctx.setListStart("\\begin{itemize}");
			ctx.setListEnd("\\end{itemize}");
			ctx.setStyle(A7_ItemizeLists.allBlank());
			ctx.setLeftLabelString("\\item");
			ctx.setItemMargin(4);
			ctx.setLabelRightMargin(0);
			ctx.setTextLeftMargin(0);
		}
	};
}
 
开发者ID:vdmeer,项目名称:asciilist,代码行数:20,代码来源:Il_Themes.java

示例4: latex

import de.vandermeer.translation.targets.Text2Latex; //导入依赖的package包/类
/**
 * A theme for LaTeX target.
 * @return the theme
 */
static EnumerateListTheme latex(){
	return new EnumerateListTheme() {
		@Override
		public void apply(EnumerateListContext ctx) {
			ctx.setTargetTranslator(new Text2Latex());
			ctx.setListStart("\\begin{enumerate}");
			ctx.setListEnd("\\end{enumerate}");
			ctx.setStyle(A7_EnumerateLists.blank());
			ctx.setLeftLabelString("\\item");
			ctx.setItemMargin(4);
			ctx.setLabelRightMargin(0);
			ctx.setTextLeftMargin(0);
			ctx.setSeparatorAfterLastNumber(false);
		}
	};
}
 
开发者ID:vdmeer,项目名称:asciilist,代码行数:21,代码来源:El_Themes.java

示例5: showOutput

import de.vandermeer.translation.targets.Text2Latex; //导入依赖的package包/类
@Override
public void showOutput(){
	// tag::example[]
	String text = "A sentence with some normal text, not specific to LaTeX. " +
		"Now for some characters that require conversion: # % &. " +
		"And some more: © § ¤. " +
		"And even more: È É Ê Ë. " +
		"And some arrows as well: ← ↑ → ↓ ↔"
	;

	AsciiTable at = new AsciiTable();
	at.addRule();
	at.addRow(text, text).getCells().get(1).getContext().setTargetTranslator(new Text2Latex());
	at.addRule();
	at.setTextAlignment(TextAlignment.LEFT);

	System.out.println(at.render());
	// end::example[]
}
 
开发者ID:vdmeer,项目名称:asciitable,代码行数:20,代码来源:AT_08a_TargetTranslator_Latex.java

示例6: latex

import de.vandermeer.translation.targets.Text2Latex; //导入依赖的package包/类
/**
 * A theme for LaTeX target, setting the translator.
 * @return the theme
 */
static AsciiParagraphTheme latex(){
	return new AsciiParagraphTheme() {
		@Override
		public void apply(AP_Context ctx) {
			ctx.setTargetTranslator(new Text2Latex());
		}
	};
}
 
开发者ID:vdmeer,项目名称:asciiparagraph,代码行数:13,代码来源:AP_Themes.java

示例7: latex

import de.vandermeer.translation.targets.Text2Latex; //导入依赖的package包/类
/**
 * A theme for LaTeX target, setting the translator.
 * @return the theme
 */
static AsciiTableTheme latex(){
	return new AsciiTableTheme() {
		@Override
		public void apply(AsciiTable table) {
			table.setTargetTranslator(new Text2Latex());
		}
	};
}
 
开发者ID:vdmeer,项目名称:asciitable,代码行数:13,代码来源:AT_Themes.java


注:本文中的de.vandermeer.translation.targets.Text2Latex类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。