标签: caption

在 HTML5 的表格标题中使用按钮在语义上是否正确?

我有一个产品数据矩阵。

我的目标是:

  • 使用 HTML5 以表格格式显示矩阵
  • 在描述它的数据上方显示一个左对齐的“标题”
  • 显示一个右对齐的“添加”按钮,与标题垂直对齐,便于向表格中添加行
  • 显示标题行来描述每列数据
  • 如果可能的话,以语义上“正确”的方式完成上述所有操作

因此,最终结果将类似于:

--------------------------------------------------------
|Product Catalog                         [+Add Product]|
--------------------------------------------------------
| Title | Cost | Weight | and | so | on | ...          |
--------------------------------------------------------
| Thing1| $5.99| 3 oz   | ... | ...| ...| ...          |
| Thing2| $2.99| 2 oz   | ... | ...| ...| ...          |
--------------------------------------------------------
Run Code Online (Sandbox Code Playgroud)

我目前的代码:

<table>
    <caption>Product Catalog <button style="float: right; display: block;">+Add Product</button></caption>
    <thead>
        <tr>
            <th>Title</th>
            <th>Cost</th>
            <th>Weight</th>
            <th>and</th>
            <th>so</th>
            <th>on</th>
            <th>...</th>
        </tr>
    </thead>
    <tbody>
        <tr> …
Run Code Online (Sandbox Code Playgroud)

html html-table semantic-markup button caption

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

Sphinx toctree指令:如何隐藏标题不被显示?

如果我有以下内容index.rst

This Section
------------

.. toctree::
   :caption: This Section
   :maxdepth: 1

   this_section/intro
   this_section/body
   this_section/outro
Run Code Online (Sandbox Code Playgroud)

然后“This Section”将在生成的 HTML 文件中显示两次:一次作为<h1>,一次作为<p class="caption">. 我怎样才能摆脱后者,或者生成:caption:一个<h1>?我不能简单地删除:caption:,因为侧边栏(我正在使用 ReadTheDoc 主题)依赖于此选项来正确生成目录树。

caption python-sphinx toctree

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

Latex:带标题的警告

我在 Overleaf 上使用以下设置:

\documentclass[%
 aip,
 jmp,%
 amsmath,amssymb,
%preprint,%
 reprint,%
 nofootinbib,
 nobibnotes,
%author-year,%
%author-numerical,%
10pt
]{revtex4-2}

\usepackage{graphicx}% Include figure files
\usepackage{dcolumn}% Align table columns on decimal point
\usepackage{bm}% bold math
\usepackage{tabularx}

\usepackage[a4paper, total={6.5in, 9in}]{geometry}

\usepackage{microtype}
\usepackage[english]{babel}
\usepackage[utf8]{inputenx}
\usepackage{bm}
\usepackage{amsbsy}
\usepackage{fixmath}
\usepackage{commath}
\usepackage{float}
\usepackage{siunitx} % notazione \num{e-}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{xcolor}
%\usepackage{subcaption}

\usepackage{hyperref}

\usepackage{curve2e}
%\usepackage{caption}
\usepackage{subcaption}
%\usepackage{silence}
%\WarningFilter{caption}{Unsupported document class}
%\usepackage[center]{subfigure}
\usepackage{comment}
%\usepackage[mathlines]{lineno}% Enable numbering of text and display math
%\linenumbers\relax % Commence numbering lines
Run Code Online (Sandbox Code Playgroud)

我收到以下警告:

Package caption Warning: Unknown document class (or …
Run Code Online (Sandbox Code Playgroud)

latex caption

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

Latex:如何使列表subfloats使用列表计数器,TOC等

我有一个宏观做并排数字,下面.它使用子浮点数,因此它在图中.

\newcommand{\listbylist}[6][showlines=true]{
   \begin{figure}
      \subfloat[ ]{
        \lstinputlisting[showlines=true,#1]{#2}                                                  
     \label{#4:A}
  }
  \hfill{}
  \subfloat[ ]{                                                                               
     % by setting the frame to leftline, we avoid a box into oblivion                         
     % turn off numbers                                                                       
     \lstinputlisting[showlines=true,frame=leftline,#1,numbers=none]{#3}                      
     \label{#4:B}                                                                             
  }                                                                                           
  \hfill{}
   \caption[#5]{#6}
       \label{#4}                                                                                         
   \end{figure}
}
Run Code Online (Sandbox Code Playgroud)

不幸的是,这使用了图计数器,而不是列表计数器.它也显示在错误的目录中,并在标题中使用"图"而不是"列表",引用它等等.有没有办法纠正这个问题?

我更喜欢一种简单的方法,比如在某处添加"清单"这个词......

latex caption figure listings

5
推荐指数
1
解决办法
5203
查看次数

在Excel用户窗体中,如何更新标签的标题?

UserForm在Excel中创建了我的第一个无模式,并在其上放置了一个ActiveX标签.如何设置标签的标题以显示标签中的内容Sheet1.Range("A1"),并在单元格A1中的值更改时自行更新?

基本上,我希望Userform's标签始终更新Excel单元格中的第二个更改.谢谢!

excel vba label caption userform

5
推荐指数
1
解决办法
8万
查看次数

在C#中将表单的大小调整为其标题文本

有没有办法使表单的大小适应其标题/标题文本的大小?

例如,官方C#消息框表单将调整其标题文本的大小(注意lorem ipsum):

普通消息框

其他表单不会将其大小调整为标题文本的大小:

其他形式

相反,在末尾添加省略号以适合设计器的"大小"属性中提到的大小.

有没有办法让表单调整到标题的大小而不是我们提到的大小?如果没有,有没有办法获得文本的全长,以便我们可以将其分配给表单?

我尝试使用设置表单的宽度

int topTextWidth =  TextRenderer.MeasureText(this.Text, this.Font).Width;
this.Width = topTextWidth;
Run Code Online (Sandbox Code Playgroud)

this.Font显然是指另一种字体大小.

c# forms size titlebar caption

5
推荐指数
1
解决办法
2417
查看次数

自定义颜色框标题(长标题及其位置)

例如,请参阅此链接

如何在弹出窗口下添加长标题?例如,添加 3 行,如下所示:

在此处输入图片说明 我们可以在标签标题中添加一行,我尝试更改此样式

#cboxTitle {
position: absolute;
bottom: -25px;
left: 0px;
text-align: center;
width: 100%;
font-weight: bold;
color: #7C7C7C;
Run Code Online (Sandbox Code Playgroud)

通过添加高度或顶部:800px,标题消失

css image-gallery caption colorbox

5
推荐指数
2
解决办法
3436
查看次数

MediaRecorder、字幕和副标题

是否可以使用 MediaRecorder 将 WebVTT 轨道(或任何其他类型的字幕轨道)与音频和视频轨道一起混合到输出流中?

WebM 支持 WebVTT 轨道。2012 年的一份W3C 文档简要提到了字幕轨道的可能性。

现在是否支持带内字幕?如果是这样,我该如何使用它?

javascript caption closed-captions web-mediarecorder mediastream

5
推荐指数
1
解决办法
788
查看次数

在 Rmarkdown 中引用带字幕的字幕时,字幕编号不按顺序排列

我正在使用 captioner ( https://cran.r-project.org/web/packages/captioner/vignettes/using_captioner.html ) 在 Rmarkdown 中创建表格标题 - 主要原因是因为我使用 huxtable 进行条件格式化和导出到词。这是我发现的唯一带有编号的标题。

我试图引用标题,但引用标题时标题编号不是按顺序排列的,但前提是 table_nums(..., display="cite") 位于表格之前。我试图给出桌子编号的范围,它改变了最后一张桌子的编号。如果将 r table_nums('third_cars_table',display = "cite") 放在标题后面,则数字不会更改。有没有办法确保表号保持连续顺序?我也很高兴有一个更好的编号标题解决方案。

可重现的例子:

---
title: "Untitled"
output: bookdown::word_document2
---

```{r setup, include=FALSE}
library(captioner)
library(huxtable)
library(knitr)
library(pander)
table_nums <- captioner(prefix = "Table")
fig_nums <- captioner(prefix = "Figure")
knitr::opts_chunk$set(echo = TRUE)
```


## Description of tables
I am trying to put a description of tables 
and say that these results are shown table numbers ranging 
from the first table (`r table_nums('first_cars_table',display = "cite")`) …
Run Code Online (Sandbox Code Playgroud)

caption r-markdown bookdown

5
推荐指数
1
解决办法
429
查看次数

如何使用Python-Moviepy向视频添加多个文本(字幕)?

在某些情况下,我们需要向视频添加字幕。就我而言,我正在处理与视频描述(字幕)相关的问题。此 python 代码有助于向视频添加字幕。我想知道是否有人需要解决方案,请随意来试验代码。

import moviepy.editor as mp


my_video = mp.VideoFileClip("video.mp4") #video path
w,h = moviesize = my_video.size
my_text = mp.TextClip("A man and a women are sitting on a bench", font="Amiri-regular", color="white", fontsize=34)
txt_col = my_text.on_color(size=(my_video.w + my_text.w, my_text.h+5), color=(0,0,0), pos=(6,"center"), col_opacity=0.6)
txt_mov = txt_col.set_pos( lambda t: (max(w/30,int(w-0.5*w*t)),max(5*h/6,int(100*t))) )
final = mp.CompositeVideoClip([my_video,txt_mov])
final.subclip(0,17).write_videofile("final.mp4",fps=24,codec="libx264")
Run Code Online (Sandbox Code Playgroud)

这对于单个标题很有效。您可以使用参数进行更改

"""Multiple Text in single video"""

 
import moviepy.editor as mp


my_video = mp.VideoFileClip("/home/user/cap/video.mp4").subclip(0,10)
print(my_video.duration)
w,h = moviesize = my_video.size

texts = []
with open("/home/user/cap/caption.txt") as file:
    for line …
Run Code Online (Sandbox Code Playgroud)

python animation caption closed-captions moviepy

5
推荐指数
0
解决办法
1986
查看次数