MikTeX 2.8不为pdfLaTeX添加连字支持(MikTeX 2.8 doesn't add hyphenation support for pdfLaTeX)
我正在使用MikTeX 2.8版本,并安装了匈牙利语支持和连字文件。 使用标准的LaTeX命令,它们工作正常,但是当我尝试使用pdfLaTeX时,它们不会被加载,我得到了
(C:\stuff\miktex\tex\generic\babel\magyar.ldf (C:\stuff\miktex\tex\generic\babel\babel.def) Package babel /b/c12/cWarning:/b/c0/c No hyphenation patterns were loaded for (babel) the language `Magyar' (babel) I will use the patterns loaded for \language=0 instead.
信息。 使用乳胶它工作正常:
(C:\stuff\miktex\tex\latex\00miktex\bblopts.cfg) (C:\stuff\miktex\tex\generic\babel\magyar.ldf (C:\stuff\miktex\tex\generic\babel\babel.def)))
我尝试更新FNDB和格式,但无济于事。
I'm using MikTeX 2.8 edition, and installed the hungarian language support and hyphenation files. Using the standard LaTeX command they work fine, but when I try to use pdfLaTeX, they don't get loaded and I get the
(C:\stuff\miktex\tex\generic\babel\magyar.ldf (C:\stuff\miktex\tex\generic\babel\babel.def) Package babel /b/c12/cWarning:/b/c0/c No hyphenation patterns were loaded for (babel) the language `Magyar' (babel) I will use the patterns loaded for \language=0 instead.
message. Using latex it works fine:
(C:\stuff\miktex\tex\latex\00miktex\bblopts.cfg) (C:\stuff\miktex\tex\generic\babel\magyar.ldf (C:\stuff\miktex\tex\generic\babel\babel.def)))
I tried updating the FNDB and the Formats, but to no avail.
原文:https://stackoverflow.com/questions/2758992
最满意答案
引用的PHP函数返回一个字符串,其中包含源字符串中每个UTF-8代码单元的3位十进制数字。 在斯威夫特那将是
func toNumbers(_ s: String) -> String { return s.utf8.map { String(format: "%03d", $0) }.joined() }
反向转换有点复杂,因为Swift没有与PHP
str_split()
对应的内置函数。 我们必须以3为步长迭代索引,并将每个切片转换为一个字节:func backToString(_ n: String) -> String? { var utf8 = Data() var from = n.startIndex while from < n.endIndex { guard let to = n.index(from, offsetBy: 3, limitedBy: n.endIndex) else { return nil } guard let u = UInt8(n[from..<to]) else { return nil } utf8.append(u) from = to } return String(data: utf8, encoding: .utf8) }
该函数返回一个可选项,因为转换可能会失败。
用法示例:
let s = "Wörks wíth all ストリングズ" let n = toNumbers(s) print(n) // 087195182114107115032119195173116104032097108108032227130185227131136227131170227131179227130176227130186 if let s2 = backToString(n) { print(s2) // Wörks wíth all ストリングズ }
而且只是为了好玩:第二个功能的更紧凑版本:
func backToString(_ n: String) -> String? { return String(bytes: sequence(state: n.startIndex, next: { (from: inout String.Index) -> UInt8? in guard let to = n.index(from, offsetBy: 3, limitedBy: n.endIndex) else { return nil } defer { from = to } return UInt8(n[from..<to]) }), encoding: .utf8) }
The referenced PHP function returns a string with 3 decimal digits for each UTF-8 code unit in the source string. In Swift that would be
func toNumbers(_ s: String) -> String { return s.utf8.map { String(format: "%03d", $0) }.joined() }
The reverse conversion is a bit more complicated because Swift has no built-in function which corresponds to the PHP
str_split()
. We have to iterate over the indices in steps of 3, and convert each slice to a byte:func backToString(_ n: String) -> String? { var utf8 = Data() var from = n.startIndex while from < n.endIndex { guard let to = n.index(from, offsetBy: 3, limitedBy: n.endIndex) else { return nil } guard let u = UInt8(n[from..<to]) else { return nil } utf8.append(u) from = to } return String(data: utf8, encoding: .utf8) }
The function returns an optional because the conversion can fail.
Example usage:
let s = "Wörks wíth all ストリングズ" let n = toNumbers(s) print(n) // 087195182114107115032119195173116104032097108108032227130185227131136227131170227131179227130176227130186 if let s2 = backToString(n) { print(s2) // Wörks wíth all ストリングズ }
And just for fun: a more compact version of the second function:
func backToString(_ n: String) -> String? { return String(bytes: sequence(state: n.startIndex, next: { (from: inout String.Index) -> UInt8? in guard let to = n.index(from, offsetBy: 3, limitedBy: n.endIndex) else { return nil } defer { from = to } return UInt8(n[from..<to]) }), encoding: .utf8) }
相关问答
更多-
使用PHP从字符串中获取数字(Get numbers from string with PHP)[2023-05-06]
你可以使用正则表达式 。 \d 转义序列将匹配主题字符串中的所有数字。 例如:引用的PHP函数返回一个字符串,其中包含源字符串中每个UTF-8代码单元的3位十进制数字。 在斯威夫特那将是 func toNumbers(_ s: String) -> String { return s.utf8.map { String(format: "%03d", $0) }.joined() } 反向转换有点复杂,因为Swift没有与PHP str_split()对应的内置函数。 我们必须以3为步长迭代索引,并将每个切片转换为一个字节: func backToString(_ n: S ...以下是您的问题的可能解决方案,也是Unicode安全的: let string = "0123456789 abc xyz 9876543210" // upper case A...J use 65; lower case a...j use 97 let shift = 65 let convertedString = String(string.characters.lazy.map{ char in Int(String(char)).map{ Character(UnicodeScalar ...Swift中的争夺字符串(Scramble String in Swift)[2023-06-09]
我找到了一个很好的解决方案。 有一个人制作了单个文件MD5转换器而没有任何名为MD5 Digest的第三方库 然后这个库可以像这样使用 let input = "0bb0fca0-1e89-429f-901a-1413894d9f59" let md5 = input.utf8.md5 print(md5) 这给出了结果: 4a89b58cb43b3eecd289c1d093b48bd0 这正是我想要的,可以重新创建的东西,但仍然根据我发送的字符串产生的结果是用户无法连接到正在发送的字符串。 I fou ...尝试这个: if let currentStamps = Int(labelStamps.text!), let stamps = Int(textFieldStamps.text!) { labelStamps.text = "\(stamps + currentStamps)" } Try this: if let currentStamps = Int(labelStamps.text!), let stamps = Int(textFieldStamps.t ...Swift中插值字符串中的数字是否受语言环境影响?(Are numbers in interpolated strings in Swift affected by the locale?)[2023-09-02]
我知道至少有一种类型的插值取决于语言环境:NSNumber(在Linux上): https ://bugs.swift.org/browse/SR-789。 该链接是一个问题,名为“NSNumber.description在Linux上返回本地化版本(例如,带逗号)”,并显示NSNumber在Linux上具有本地化(1000 - >“1,000”)插值。 但是,我认为这是一个实际的bug,因为我的问题的答案是字符串插值不打算受到语言环境的影响。 当然 ,现在,由于类型通过CustomStringConver ...如果需要来自NSString的C字符串,请使用cString或getCString 。 If you want a C string from an NSString, use cString or getCString.Swift中的循环就像for i in 1...5一样,然后你可以使用字符串插值来获得正确的字符串,如下所示: for i in 1...5 { let title = "title\(i)" print(title) } 还读丹的回答 。 A loop in Swift is like for i in 1...5, and then you can use string interpolation to get the correct string like this: for i i ...在Swift 2中,NSRegularExpression“抛出”所以你必须在try使用它。 此外,您不能再为选项传递nil :如果您不想指定选项,则传递一个空数组(对于firstMatchInString )。 而self.length()应该成为self.characters.count 。 最后一点:如果目标是确定一个String是否只包含数字,并且因为你将它命名为“isNumbersOnly”,那么如果只有数字,结果布尔值应为true:它当前是反向的。 我在我的例子中解决了这个问题。 忽略错误: l ...如何在swift上获取字符串数组中的最后8个字符?(How to get the last 8 characters in array of string on swift?)[2022-05-30]
let stringArray = ["88612345678", "98765432", "55587654321"] let result = stringArray.map{String($0.characters.suffix(8))} print(result) // "["12345678", "98765432", "87654321"]\n" let stringArray = ["88612345678", "98765432", "55587654321"] let result ...相关文章
更多- Solr PHP support
- Solrflux源码分析-Sql Support within Solr-类Sql的solr搜索实现(2)
- 《JAVA代码规范》(五)通用代码格式 - 声明(2.8)
- Sql Support within Solr-类Sql的solr搜索实现(1)
- Memcached add 添加key-value命令(存在不会更新)
- 如何 通过TabPanel的add方法,调用已经存在的panel?
- add more solr core for switch deploy old new replace hot deploy
- Don’t work. Be hated. Love someone.
- 关于如何参与到开源项目中《How To Succeed In Open Source ( In Ways You Haven't Considered Yet )》
- javax.imageio.IIOException: Can't create output stream!的解决方案
最新问答
更多- h2元素推动其他h2和div。(h2 element pushing other h2 and div down. two divs, two headers, and they're wrapped within a parent div)
- 创建一个功能(Create a function)
- 我投了份简历,是电脑编程方面的学徒,面试时说要培训三个月,前面
- PDO语句不显示获取的结果(PDOstatement not displaying fetched results)
- Qt冻结循环的原因?(Qt freezing cause of the loop?)
- TableView重复youtube-api结果(TableView Repeating youtube-api result)
- 如何使用自由职业者帐户登录我的php网站?(How can I login into my php website using freelancer account? [closed])
- SQL Server 2014版本支持的最大数据库数(Maximum number of databases supported by SQL Server 2014 editions)
- 我如何获得DynamicJasper 3.1.2(或更高版本)的Maven仓库?(How do I get the maven repository for DynamicJasper 3.1.2 (or higher)?)
- 以编程方式创建UITableView(Creating a UITableView Programmatically)
- 如何打破按钮上的生命周期循环(How to break do-while loop on button)
- C#使用EF访问MVC上的部分类的自定义属性(C# access custom attributes of a partial class on MVC with EF)
- 如何获得facebook app的publish_stream权限?(How to get publish_stream permissions for facebook app?)
- 如何防止调用冗余函数的postgres视图(how to prevent postgres views calling redundant functions)
- Sql Server在欧洲获取当前日期时间(Sql Server get current date time in Europe)
- 设置kotlin扩展名(Setting a kotlin extension)
- 如何并排放置两个元件?(How to position two elements side by side?)
- 如何在vim中启用python3?(How to enable python3 in vim?)
- 在MySQL和/或多列中使用多个表用于Rails应用程序(Using multiple tables in MySQL and/or multiple columns for a Rails application)
- 如何隐藏谷歌地图上的登录按钮?(How to hide the Sign in button from Google maps?)
- Mysql左连接旋转90°表(Mysql Left join rotate 90° table)
- dedecms如何安装?
- 在哪儿学计算机最好?
- 学php哪个的书 最好,本人菜鸟
- 触摸时不要突出显示表格视图行(Do not highlight table view row when touched)
- 如何覆盖错误堆栈getter(How to override Error stack getter)
- 带有ImageMagick和许多图像的GIF动画(GIF animation with ImageMagick and many images)
- USSD INTERFACE - > java web应用程序通信(USSD INTERFACE -> java web app communication)
- 电脑高中毕业学习去哪里培训
- 正则表达式验证SMTP响应(Regex to validate SMTP Responses)