问题标签 [paragraphs]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
4254 浏览

apache-poi - java - 如何使用apache poi从java中的docx中删除包含数据的表格和段落

我有一个单词模板,它有多个相似的表格和一些与放置在它们之前的表格相关联的段落。根据数据量,我填充了一些表,而另一些则不需要,所以有段落。

我的img

我需要删除这些表格和段落。如图所示,我需要删除表 2 及其段落 Table Parahgraph

请帮我怎么做。我尝试使用 document.removeBodyElement(pos) ,但没有帮助。

0 投票
1 回答
1755 浏览

java - 如何用虚线在文本下划线?

我需要合并 2 个段落,第一个是一系列点,第二个是我想写在点上的文本:

我试着玩: pnote.setExtraParagraphSpace(-15); 但这弄乱了接下来的段落。我也尝试过:itext 绝对定位文本 并且工作正常,但前提是我的 pdf 大小是固定的。所以不要解决我的问题。

0 投票
1 回答
112 浏览

python - Python中的段落ad libs-esque组合

我有一个基本段落,例如:

莎拉和她最好的朋友(人)去(地点)取一些(物品),但是他们迷路了,决定去(地点2)。然后莎拉拍了一些(物体)的照片,让她在工作中展示给她的老板。

这些是我想要插入的不同场景:1. 商店、鸡蛋、迈克尔、商场、思想家雕像 2. 健身房、举重、百合、公园、鸭子 3. 药房、医药、乔、嘉年华、大象等。

很明显,顺序确实很重要,我想用每组来填补空白。如何在 Python 中做到这一点?

谢谢

0 投票
3 回答
2004 浏览

c# - 如何在C#中计算字符串中的段落数

我正在尝试计算 C# 中字符串中的段落数。

我将段落定义为一段文本,其部分可以用新行分隔。段落必须由两个或多个新行分隔。所以:

我的第一个想法是将字符串分开\n\n然后计算部分,但是当有多个行空间分隔段落时,在文件的开头和结尾,或者文件只有一行时,这不能正常工作.

如何通过正则表达式或其他方法准确获取字符串中的段落数?

0 投票
3 回答
142 浏览

html - 的使用

标签

据我所知,p标签创建段落。但我经常发现这些标签用于其他目的的 HTML 代码。例如,我在 Codecademy 练习中找到了它:

它在这个圆圈的中心创建了一个名为 Rex 的圆圈:http: //jsfiddle.net/cvT6E。但是雷克斯这个词不是一个段落,它只是一个词!

当我尝试将p标签替换为span(对我来说似乎更合乎逻辑)时,它不起作用:http: //jsfiddle.net/cvT6E/2/。为什么不?

最后,我想知道:

1)p示例中标签的使用在语义上是否正确?
2)为什么p用标签替换span标签时单词不居中?

0 投票
1 回答
608 浏览

html - LTR 和 RTL

排队

我正在尝试根据图像宽度嵌入两个段落(LTR 和 RTL)。因此,这两个段落都在同一行,但都从相反的方向阅读。我试图浮动:右第二段(RTL),但它把它放在图像的顶部。

HTML:

CSS:

JSFiddle 演示

0 投票
4 回答
4081 浏览

android - 如何在活动中给出段落?

我正在为一所大学构建一个应用程序。根据需要,我为每个段落添加了单独的 TextView 段落。有没有办法让我可以合并段落。这只是我对这是否可能的想法?这是我处理的代码片段。

在我的代码中,我想将两个电话号码和电子邮件 ID 组合在一个 TextView 中。可能吗?

0 投票
1 回答
1197 浏览

javascript - 谷歌文档脚本中的“有必要分离元素”错误

当我尝试将段落从一个文档复制到另一个文档时,出现意外错误:

有必要分离元素

这是什么意思?我究竟做错了什么?

这是视频http://youtu.be/1WdCD5ATiYw

PS 你不能提及 get_doc 和 create_doc_in_path 实现。两者都返回 Document 对象。

0 投票
3 回答
6338 浏览

html - Expandable paragraphs with HTML and CSS

I was wondering if anyone here would be as so kind as to help me out a bit. I am looking to make expandable paragraphs for my client's website. They would like to keep all of the content from their site, which is pretty massive, and they want a total overhaul of the design. They mainly wan tot keep it for SEO purposes. Anyhow, I thought it would be helpful for the both of use if there is some way to use expandable paragraphs, you know, with a "read more..." link after a certain line of text. I know that there are some JQuery and Java solutions for this, but we really would like to stay away from those options, if at all possible. When would like HTML and CSS, if we can.

Here is kind of an example:

HEADING HERE

Paragraph with a bunch of text. I would like this to appear in a pre-determined line. For example, maybe the start of the paragraph goes on for, let's say, three lines and then we have the [read more...]

When the visitor clicks "read more", we would like the rest of the content to just expand to reveal the article in its entirety. I would like for the content to already be on the page, so it just expands. I don't want it to be called in from another file or anything, if that makes sense. Thank you in advance for any and all help. It will be greatly appreciated!

Testudo

0 投票
1 回答
136 浏览

java - 使用 doxc4j 避免在段落中回车

我认为根据定义,段落元素会创建一个新行,但我需要插入元素作为页面的第一个元素,而不是向下移动现有元素。

我可以使用其他元素代替段落吗?我认为只有表格和段落可用,并且我知道表格包含段落,因此它们不适用于我的目的。

或者可能存在我可以设置的任何属性以避免新段落移动其他元素?

我尝试了 keepNext 和 keepLines 但不是我想要的。